2023-10-27

This commit is contained in:
2023-10-27 17:46:32 +08:00
parent e46a7ad179
commit 65a5fdae3e
16 changed files with 268 additions and 50 deletions
@@ -1,6 +1,7 @@
using Aspose.Words;
using BLL;
using Model;
using NPOI.SS.Formula.Functions;
using System;
using System.Collections.Generic;
using System.Data;
@@ -621,5 +622,42 @@ namespace FineUIPro.Web.HJGL.WeldingManage
};
}
protected void Grid1_RowCommand(object sender, GridCommandEventArgs e)
{
if (e.CommandName == "ResetWpq")
{
var weldJointId = e.RowID;
var model = WeldJointService.GetWeldJointByWeldJointId(weldJointId);
if (model != null)
{
model.WPQId = null;
WeldJointService.UpdateWeldJoint(model);
List<Model.View_HJGL_WPQ> wpqList = BLL.WPQListServiceService.GetMatchWPQ(model, this.CurrUser.LoginProjectId, drpUnit.SelectedValue);
if (wpqList != null)
{
Model.HJGL_WeldJoint newJot = new Model.HJGL_WeldJoint();
Model.WPQ_WPQList wps = BLL.WPQListServiceService.GetWPQById(wpqList.First().WPQId);
newJot.WPQId = wps.WPQId;
newJot.WeldJointId = model.WeldJointId;
newJot.WeldingRod = wps.WeldingRod;
newJot.WeldingWire = wps.WeldingWire;
newJot.WeldingMethodId = wps.WeldingMethodId;
newJot.GrooveTypeId = wps.GrooveType;
newJot.PreTemperature = wps.PreTemperature;
newJot.IsHotProess = wps.IsHotProess;
newJot.MatchableWPQ = string.Join(",", wpqList.Select(x => x.WPQCode));
BLL.WeldJointService.UpdateConWeldJoint(newJot);
}
BindGrid();
ShowNotify("焊评已重置!", MessageBoxIcon.Success);
}
}
}
}
}