提交代码
This commit is contained in:
@@ -206,7 +206,7 @@ namespace FineUIPro.Web.WeldingProcess.WeldingManage
|
||||
&& x.WeldingDailyId == null/*|| x.WeldingDailyId == this.WeldingDailyId*/)
|
||||
|
||||
select x).ToList();
|
||||
weldJointIds= weldJointIds.GroupBy(x => x.WeldJointId, (key, group) => group.OrderByDescending(x=>x.TaskDate).First()).ToList();
|
||||
weldJointIds = weldJointIds.GroupBy(x => x.WeldJointId, (key, group) => group.OrderByDescending(x => x.TaskDate).First()).ToList();
|
||||
task = weldJointIds;
|
||||
//foreach (var weldJointId in weldJointIds)
|
||||
//{
|
||||
@@ -214,7 +214,7 @@ namespace FineUIPro.Web.WeldingProcess.WeldingManage
|
||||
//}
|
||||
if (drpJointAttribute.SelectedValue != Const._Null)
|
||||
{
|
||||
task = task.Where(x=>x.JointAttribute== drpJointAttribute.SelectedValue).ToList();
|
||||
task = task.Where(x => x.JointAttribute == drpJointAttribute.SelectedValue).ToList();
|
||||
}
|
||||
|
||||
if (drpUnit.SelectedValue != Const._Null)
|
||||
@@ -255,7 +255,7 @@ namespace FineUIPro.Web.WeldingProcess.WeldingManage
|
||||
}
|
||||
|
||||
task = task.OrderBy(x => x.PipelineCode).ThenBy(x => x.WeldJointNum).ToList();
|
||||
Grid1.RecordCount = task.Count;
|
||||
Grid1.RecordCount = task.Count;
|
||||
Grid1.DataSource = task;
|
||||
Grid1.DataBind();
|
||||
|
||||
@@ -488,7 +488,7 @@ namespace FineUIPro.Web.WeldingProcess.WeldingManage
|
||||
string eventArg = string.Empty;
|
||||
// 焊工资质判断
|
||||
// CheckWelderQualification(weldJointView);
|
||||
|
||||
|
||||
if (eventArg == string.Empty) //焊工焊接的所有焊口资质都符合要求)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(this.WeldingDailyId))
|
||||
@@ -519,10 +519,11 @@ namespace FineUIPro.Web.WeldingProcess.WeldingManage
|
||||
|
||||
if (newWeldJoint != null)
|
||||
{
|
||||
newWeldJoint.JointAttribute = values.Value<string>("JointAttribute");
|
||||
var coverWelderCode = (from x in Funs.DB.SitePerson_Person
|
||||
where x.ProjectId == CurrUser.LoginProjectId &&
|
||||
x.WelderCode == values.Value<string>("CoverWelderCode")
|
||||
select x).FirstOrDefault();
|
||||
where x.ProjectId == CurrUser.LoginProjectId &&
|
||||
x.WelderCode == values.Value<string>("CoverWelderCode")
|
||||
select x).FirstOrDefault();
|
||||
if (coverWelderCode != null)
|
||||
{
|
||||
t.CoverWelderId = coverWelderCode.PersonId;
|
||||
@@ -530,9 +531,9 @@ namespace FineUIPro.Web.WeldingProcess.WeldingManage
|
||||
}
|
||||
|
||||
var backingWelderCode = (from x in Funs.DB.SitePerson_Person
|
||||
where x.ProjectId == CurrUser.LoginProjectId &&
|
||||
x.WelderCode == values.Value<string>("BackingWelderCode")
|
||||
select x).FirstOrDefault();
|
||||
where x.ProjectId == CurrUser.LoginProjectId &&
|
||||
x.WelderCode == values.Value<string>("BackingWelderCode")
|
||||
select x).FirstOrDefault();
|
||||
if (backingWelderCode != null)
|
||||
{
|
||||
t.BackingWelderId = backingWelderCode.PersonId;
|
||||
@@ -563,8 +564,9 @@ namespace FineUIPro.Web.WeldingProcess.WeldingManage
|
||||
foreach (string row in Grid1.SelectedRowIDArray)
|
||||
{
|
||||
var t = BLL.WeldTaskService.GetWeldTaskById(row);
|
||||
var newWeldJoint = BLL.WeldJointService.GetWeldJointByWeldJointId(t.WeldJointId);
|
||||
errlog += InsertWeldingDailyItem(t.WeldJointId, t.CoverWelderId, t.BackingWelderId,
|
||||
t.JointAttribute, newWeldingDaily.WeldingDate, batchCondition, true);
|
||||
newWeldJoint.JointAttribute, newWeldingDaily.WeldingDate, batchCondition, true);
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -574,8 +576,9 @@ namespace FineUIPro.Web.WeldingProcess.WeldingManage
|
||||
if (Grid1.SelectedRowIDArray.Contains(Grid1.Rows[i].RowID))
|
||||
{
|
||||
var t = BLL.WeldTaskService.GetWeldTaskById(Grid1.Rows[i].RowID);
|
||||
var newWeldJoint = BLL.WeldJointService.GetWeldJointByWeldJointId(t.WeldJointId);
|
||||
errlog += InsertWeldingDailyItem(t.WeldJointId, t.CoverWelderId, t.BackingWelderId,
|
||||
t.JointAttribute, newWeldingDaily.WeldingDate, batchCondition, true);
|
||||
newWeldJoint.JointAttribute, newWeldingDaily.WeldingDate, batchCondition, true);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -674,7 +677,7 @@ namespace FineUIPro.Web.WeldingProcess.WeldingManage
|
||||
{
|
||||
ChanggeState();
|
||||
});
|
||||
|
||||
|
||||
if (string.IsNullOrEmpty(errlog))
|
||||
{
|
||||
ShowNotify("保存成功!", MessageBoxIcon.Success);
|
||||
@@ -1051,7 +1054,7 @@ namespace FineUIPro.Web.WeldingProcess.WeldingManage
|
||||
{
|
||||
if (!string.IsNullOrEmpty(this.WeldingDailyId))
|
||||
{
|
||||
List<Model.SpWeldingDailyItem> GetWeldingDailyItem = BLL.WeldingDailyService.GetWeldingDailyItem(this.WeldingDailyId);
|
||||
List<Model.SpWeldingDailyItem> GetWeldingDailyItem = BLL.WeldingDailyService.GetWeldingDailyItem(this.WeldingDailyId);
|
||||
this.BindGrid(GetWeldingDailyItem); // 初始化页面
|
||||
}
|
||||
else
|
||||
@@ -1066,7 +1069,7 @@ namespace FineUIPro.Web.WeldingProcess.WeldingManage
|
||||
{
|
||||
foreach (var rowId in Grid1.SelectedRowIDArray)
|
||||
{
|
||||
|
||||
|
||||
var t = BLL.WeldTaskService.GetWeldTaskById(rowId);
|
||||
var newWeldJoint = BLL.WeldJointService.GetWeldJointByWeldJointId(t.WeldJointId);
|
||||
|
||||
@@ -1084,39 +1087,39 @@ namespace FineUIPro.Web.WeldingProcess.WeldingManage
|
||||
|
||||
}*/
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
protected void Grid1_RowDataBound(object sender, GridRowEventArgs e)
|
||||
{
|
||||
DataRowView row = e.DataItem as DataRowView;
|
||||
var id= row["WeldJointId"].ToString();
|
||||
var id = row["WeldJointId"].ToString();
|
||||
var hotProesssItem = Funs.DB.HJGL_HotProess_TrustItem.FirstOrDefault(x => x.WeldJointId == id);
|
||||
if (hotProesssItem != null) //已生成热处理委托,不能编辑或删除
|
||||
{
|
||||
e.RowSelectable = false;
|
||||
e.RowSelectable = false;
|
||||
// Grid1.DeleteRow(e.RowID);
|
||||
// Grid1.DeleteRow(e.RowID);
|
||||
// Grid1.DeleteRow(e.RowID);
|
||||
}
|
||||
var pointBatchItem = Funs.DB.HJGL_Batch_PointBatchItem.FirstOrDefault(x => x.WeldJointId == id && x.PointState != null);
|
||||
if (pointBatchItem != null) //已生成委托,不能编辑或删除
|
||||
{
|
||||
e.RowSelectable = false;
|
||||
e.RowSelectable = false;
|
||||
// Grid1.DeleteRow(e.RowID);
|
||||
// Grid1.DeleteRow(e.RowID);
|
||||
// Grid1.DeleteRow(e.RowID);
|
||||
}
|
||||
//for (int i = 0; i < this.Grid1.Rows.Count; i++)
|
||||
//{
|
||||
// var hotProesssItem = Funs.DB.HJGL_HotProess_TrustItem.FirstOrDefault(x => x.WeldJointId == this.Grid1.Rows[i].DataKeys[1].ToString());
|
||||
// if (hotProesssItem != null) //已生成热处理委托,不能编辑或删除
|
||||
// {
|
||||
// Grid1.Rows[i].RowSelectable = false;
|
||||
// }
|
||||
// var pointBatchItem = Funs.DB.HJGL_Batch_PointBatchItem.FirstOrDefault(x => x.WeldJointId == this.Grid1.Rows[i].DataKeys[1].ToString() && x.PointState != null);
|
||||
// if (pointBatchItem != null) //已生成委托,不能编辑或删除
|
||||
// {
|
||||
// Grid1.Rows[i].RowSelectable = false;
|
||||
// }
|
||||
//}
|
||||
//for (int i = 0; i < this.Grid1.Rows.Count; i++)
|
||||
//{
|
||||
// var hotProesssItem = Funs.DB.HJGL_HotProess_TrustItem.FirstOrDefault(x => x.WeldJointId == this.Grid1.Rows[i].DataKeys[1].ToString());
|
||||
// if (hotProesssItem != null) //已生成热处理委托,不能编辑或删除
|
||||
// {
|
||||
// Grid1.Rows[i].RowSelectable = false;
|
||||
// }
|
||||
// var pointBatchItem = Funs.DB.HJGL_Batch_PointBatchItem.FirstOrDefault(x => x.WeldJointId == this.Grid1.Rows[i].DataKeys[1].ToString() && x.PointState != null);
|
||||
// if (pointBatchItem != null) //已生成委托,不能编辑或删除
|
||||
// {
|
||||
// Grid1.Rows[i].RowSelectable = false;
|
||||
// }
|
||||
//}
|
||||
}
|
||||
|
||||
#region 分页选择下拉改变事件
|
||||
@@ -1156,7 +1159,7 @@ namespace FineUIPro.Web.WeldingProcess.WeldingManage
|
||||
BLL.WeldTaskService.UpdateWelderTask(weldTaskId, drpCanWelder.SelectedValue);
|
||||
}
|
||||
this.BindGrid(null);
|
||||
drpCanWelder.Items.Clear();
|
||||
drpCanWelder.Items.Clear();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user