111
This commit is contained in:
@@ -307,7 +307,7 @@ namespace FineUIPro.Web.HJGL.HotHardManage
|
||||
SelectList.Add(Grid1.DataKeys[rowIndex][0] + "," + Grid1.DataKeys[rowIndex][1]);
|
||||
}
|
||||
string strSql = @"select * from dbo.HJGL_View_CH_HardTestReportItemSet Item
|
||||
where Item.ProjectId=@ProjectId and HardTestReportId is null ";
|
||||
where Item.ProjectId=@ProjectId and HardTestReportId is null ";
|
||||
List<SqlParameter> listStr = new List<SqlParameter>();
|
||||
listStr.Add(new SqlParameter("@ProjectId", this.tvControlItem.SelectedNodeID));
|
||||
if (this.drpIsoNo.SelectedValue != BLL.Const._Null)
|
||||
@@ -320,7 +320,7 @@ where Item.ProjectId=@ProjectId and HardTestReportId is null ";
|
||||
|
||||
|
||||
Grid1.RecordCount = tb.Rows.Count;
|
||||
tb = GetFilteredTable(Grid1.FilteredData, tb);
|
||||
//tb = GetFilteredTable(Grid1.FilteredData, tb);
|
||||
// 2.获取当前排序(如不分页要调用这个排序方法)
|
||||
//var table = this.GetSortTable(Grid1, tb);
|
||||
// 2.获取当前分页数据
|
||||
@@ -378,34 +378,44 @@ where Item.ProjectId=@ProjectId and HardTestReportId is null ";
|
||||
/// <param name="e"></param>
|
||||
protected void btnSave_Click(object sender, EventArgs e)
|
||||
{
|
||||
JArray mergedData = Grid1.GetMergedData();
|
||||
string jot_id = string.Empty, hardTestReportId = string.Empty, hardTestReportItemId = string.Empty, hardTestReportItemId2 = string.Empty, hardTestReportItemId3 = string.Empty, isoidLog = string.Empty, jointIdLog = string.Empty;
|
||||
foreach (JObject mergedRow in mergedData)
|
||||
if (!string.IsNullOrEmpty(this.txtCheckDate.Text))
|
||||
{
|
||||
string status = mergedRow.Value<string>("status");
|
||||
JObject values = mergedRow.Value<JObject>("values");
|
||||
int rowIndex = mergedRow.Value<int>("index");
|
||||
jot_id = Grid1.DataKeys[rowIndex][3].ToString();
|
||||
hardTestReportItemId = Grid1.DataKeys[rowIndex][0].ToString();
|
||||
hardTestReportItemId2 = Grid1.DataKeys[rowIndex][1].ToString();
|
||||
hardTestReportItemId3 = Grid1.DataKeys[rowIndex][2].ToString();
|
||||
Model.HJGL_PW_JointInfo joint = BLL.HJGL_PW_JointInfoService.GetJointInfoByJotID(jot_id);
|
||||
Model.HJGL_PW_IsoInfo iso = BLL.HJGL_PW_IsoInfoService.GetIsoInfoByIsoInfoId(joint.ISO_ID);
|
||||
Model.HJGL_CH_HardTestReportItem item1 = BLL.HJGL_CH_HardTestReportService.GetCH_HardTestReportItemByID(hardTestReportItemId);
|
||||
item1.HardNessValue = Funs.GetNewInt(values.Value<string>("HardNessValue1").ToString());
|
||||
item1.Remark = values.Value<string>("Remark").ToString();
|
||||
BLL.HJGL_CH_HardTestReportService.UpdateCH_HardTestReportItem(item1);
|
||||
Model.HJGL_CH_HardTestReportItem item2 = BLL.HJGL_CH_HardTestReportService.GetCH_HardTestReportItemByID(hardTestReportItemId2);
|
||||
item2.HardNessValue = Funs.GetNewInt(values.Value<string>("HardNessValue2").ToString());
|
||||
item2.Remark = values.Value<string>("Remark").ToString();
|
||||
BLL.HJGL_CH_HardTestReportService.UpdateCH_HardTestReportItem(item2);
|
||||
Model.HJGL_CH_HardTestReportItem item3 = BLL.HJGL_CH_HardTestReportService.GetCH_HardTestReportItemByID(hardTestReportItemId3);
|
||||
item3.HardNessValue = Funs.GetNewInt(values.Value<string>("HardNessValue3").ToString());
|
||||
item3.Remark = values.Value<string>("Remark").ToString();
|
||||
BLL.HJGL_CH_HardTestReportService.UpdateCH_HardTestReportItem(item3);
|
||||
JArray mergedData = Grid1.GetModifiedData();//.GetMergedData();
|
||||
string jot_id = string.Empty, hardTestReportId = string.Empty, hardTestReportItemId = string.Empty, hardTestReportItemId2 = string.Empty, hardTestReportItemId3 = string.Empty, isoidLog = string.Empty, jointIdLog = string.Empty;
|
||||
foreach (JObject mergedRow in mergedData)
|
||||
{
|
||||
string status = mergedRow.Value<string>("status");
|
||||
JObject values = mergedRow.Value<JObject>("values");
|
||||
int rowIndex = mergedRow.Value<int>("index");
|
||||
jot_id = Grid1.DataKeys[rowIndex][3].ToString();
|
||||
hardTestReportItemId = Grid1.DataKeys[rowIndex][0] != null ? Grid1.DataKeys[rowIndex][0].ToString() : null;
|
||||
hardTestReportItemId2 = Grid1.DataKeys[rowIndex][1] != null ? Grid1.DataKeys[rowIndex][1].ToString() : null;
|
||||
hardTestReportItemId3 = Grid1.DataKeys[rowIndex][2] != null ? Grid1.DataKeys[rowIndex][2].ToString() : null;
|
||||
Model.HJGL_PW_JointInfo joint = BLL.HJGL_PW_JointInfoService.GetJointInfoByJotID(jot_id);
|
||||
Model.HJGL_PW_IsoInfo iso = BLL.HJGL_PW_IsoInfoService.GetIsoInfoByIsoInfoId(joint.ISO_ID);
|
||||
Model.HJGL_CH_HardTestReportItem item1 = BLL.HJGL_CH_HardTestReportService.GetCH_HardTestReportItemByID(hardTestReportItemId);
|
||||
item1.HardNessValue = Funs.GetNewInt(values.Value<string>("HardNessValue1"));
|
||||
item1.Remark = values.Value<string>("Remark") != null ? values.Value<string>("Remark").ToString() : null;
|
||||
item1.CheckDate = Convert.ToDateTime(txtCheckDate.Text);
|
||||
BLL.HJGL_CH_HardTestReportService.UpdateCH_HardTestReportItem(item1);
|
||||
Model.HJGL_CH_HardTestReportItem item2 = BLL.HJGL_CH_HardTestReportService.GetCH_HardTestReportItemByID(hardTestReportItemId2);
|
||||
item2.HardNessValue = Funs.GetNewInt(values.Value<string>("HardNessValue2"));
|
||||
item2.Remark = values.Value<string>("Remark") != null ? values.Value<string>("Remark").ToString() : null;
|
||||
item2.CheckDate = Convert.ToDateTime(txtCheckDate.Text);
|
||||
BLL.HJGL_CH_HardTestReportService.UpdateCH_HardTestReportItem(item2);
|
||||
Model.HJGL_CH_HardTestReportItem item3 = BLL.HJGL_CH_HardTestReportService.GetCH_HardTestReportItemByID(hardTestReportItemId3);
|
||||
item3.HardNessValue = Funs.GetNewInt(values.Value<string>("HardNessValue3"));
|
||||
item3.Remark = values.Value<string>("Remark") != null ? values.Value<string>("Remark").ToString() : null;
|
||||
item3.CheckDate = Convert.ToDateTime(txtCheckDate.Text);
|
||||
BLL.HJGL_CH_HardTestReportService.UpdateCH_HardTestReportItem(item3);
|
||||
}
|
||||
ShowNotify("提交成功!", MessageBoxIcon.Success);
|
||||
BindGrid();
|
||||
}
|
||||
else
|
||||
{
|
||||
ShowNotify("请选择检测日期!", MessageBoxIcon.Warning);
|
||||
}
|
||||
ShowNotify("提交成功!", MessageBoxIcon.Success);
|
||||
BindGrid();
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user