校正代码
This commit is contained in:
parent
39a7bc2f6c
commit
5b89af7fa0
|
|
@ -1103,36 +1103,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||||
if (weldJoints_add.Count > 0)
|
if (weldJoints_add.Count > 0)
|
||||||
{
|
{
|
||||||
BLL.WeldJointService.AddBulkWeldJoint(weldJoints_add);
|
BLL.WeldJointService.AddBulkWeldJoint(weldJoints_add);
|
||||||
}
|
}
|
||||||
Model.SGGLDB db2 = Funs.DB;
|
|
||||||
List<Model.HJGL_WeldJoint> delJoints = new List<Model.HJGL_WeldJoint>();
|
|
||||||
var allWeldJoints2 = from x in db2.HJGL_WeldJoint
|
|
||||||
join y in db2.HJGL_Pipeline on x.PipelineId equals y.PipelineId
|
|
||||||
where y.UnitWorkId == Request.Params["UnitWorkId"]
|
|
||||||
select x;
|
|
||||||
foreach (var pipelineCode in pipelineCodes)
|
|
||||||
{
|
|
||||||
var pipelineWeldJointCodes = weldJoints.Where(x => x.PipelineCode == pipelineCode).Select(x => x.WeldJointCode).ToList();
|
|
||||||
var q = allWeldJoints2.Where(x => x.PipelineCode == pipelineCode && !pipelineWeldJointCodes.Contains(x.WeldJointCode)).ToList();
|
|
||||||
delJoints.AddRange(q);
|
|
||||||
}
|
|
||||||
if (delJoints.Count() > 0)
|
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
|
||||||
db2.HJGL_WeldJoint.DeleteAllOnSubmit(delJoints);
|
|
||||||
db2.SubmitChanges();
|
|
||||||
}
|
|
||||||
catch (Exception)
|
|
||||||
{
|
|
||||||
string weldJointCodes = string.Empty;
|
|
||||||
foreach (var item in delJoints)
|
|
||||||
{
|
|
||||||
weldJointCodes += item.WeldJointCode + ",";
|
|
||||||
}
|
|
||||||
Alert.ShowInParent(weldJointCodes, MessageBoxIcon.Warning);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//public void AddView_HJGL_WeldJoint(List<Model.View_HJGL_WeldJoint> PipelineList)
|
//public void AddView_HJGL_WeldJoint(List<Model.View_HJGL_WeldJoint> PipelineList)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue