diff --git a/HJGL_DS/FineUIPro.Web/FineUIPro.Web.csproj.user b/HJGL_DS/FineUIPro.Web/FineUIPro.Web.csproj.user index e3436b8..6e29203 100644 --- a/HJGL_DS/FineUIPro.Web/FineUIPro.Web.csproj.user +++ b/HJGL_DS/FineUIPro.Web/FineUIPro.Web.csproj.user @@ -2,7 +2,7 @@ true - Release|Any CPU + Debug|Any CPU diff --git a/HJGL_DS/FineUIPro.Web/HJGL/HotHardManage/HardReportSet.aspx b/HJGL_DS/FineUIPro.Web/HJGL/HotHardManage/HardReportSet.aspx index 07b915a..e7a1631 100644 --- a/HJGL_DS/FineUIPro.Web/HJGL/HotHardManage/HardReportSet.aspx +++ b/HJGL_DS/FineUIPro.Web/HJGL/HotHardManage/HardReportSet.aspx @@ -36,7 +36,7 @@ - diff --git a/HJGL_DS/FineUIPro.Web/HJGL/HotHardManage/HardReportSet.aspx.cs b/HJGL_DS/FineUIPro.Web/HJGL/HotHardManage/HardReportSet.aspx.cs index faf27df..e7936fb 100644 --- a/HJGL_DS/FineUIPro.Web/HJGL/HotHardManage/HardReportSet.aspx.cs +++ b/HJGL_DS/FineUIPro.Web/HJGL/HotHardManage/HardReportSet.aspx.cs @@ -40,7 +40,7 @@ namespace FineUIPro.Web.HJGL.HotHardManage this.drpProjectId.DataSource = BLL.Base_ProjectService.GetOnProjectListByUserId(this.CurrUser.UserId, "1"); this.drpProjectId.DataBind(); Funs.FineUIPleaseSelect(this.drpProjectId); - //this.drpProjectId.SelectedValue = this.CurrUser.LoginProjectId; + this.drpProjectId.SelectedValue = this.CurrUser.LoginProjectId; //var projects = BLL.Base_ProjectService.GetProjectListByUserIdAndState(this.CurrUser.UserId, this.drpIsProjectClosed.SelectedValue); //RadioButtonList1.DataTextField = "ProjectCode"; @@ -106,7 +106,11 @@ namespace FineUIPro.Web.HJGL.HotHardManage rootProjectNode.EnableClickEvent = true; rootNode.Nodes.Add(rootProjectNode); } - + if (this.drpProjectId.SelectedValue != BLL.Const._Null && !string.IsNullOrEmpty(this.drpProjectId.SelectedValue)) + { + this.tvControlItem.SelectedNodeID = this.drpProjectId.SelectedValue; + BindGrid(); + } } #endregion diff --git a/HJGL_DS/FineUIPro.Web/HJGL/HotHardManage/HardTestReport.aspx b/HJGL_DS/FineUIPro.Web/HJGL/HotHardManage/HardTestReport.aspx index b449275..4ed08ba 100644 --- a/HJGL_DS/FineUIPro.Web/HJGL/HotHardManage/HardTestReport.aspx +++ b/HJGL_DS/FineUIPro.Web/HJGL/HotHardManage/HardTestReport.aspx @@ -33,7 +33,7 @@ + EnableEdit="true" AutoPostBack="true" OnSelectedIndexChanged="drpProjectId_SelectedIndexChanged"> diff --git a/HJGL_DS/FineUIPro.Web/HJGL/HotHardManage/HardTestReport.aspx.cs b/HJGL_DS/FineUIPro.Web/HJGL/HotHardManage/HardTestReport.aspx.cs index 39e6f44..e41683d 100644 --- a/HJGL_DS/FineUIPro.Web/HJGL/HotHardManage/HardTestReport.aspx.cs +++ b/HJGL_DS/FineUIPro.Web/HJGL/HotHardManage/HardTestReport.aspx.cs @@ -52,7 +52,7 @@ namespace FineUIPro.Web.HJGL.HotHardManage this.drpProjectId.DataSource = BLL.Base_ProjectService.GetProjectListByUserIdAndState(this.CurrUser.UserId, this.drpIsProjectClosed.SelectedValue, "1"); this.drpProjectId.DataBind(); Funs.FineUIPleaseSelect(this.drpProjectId); - //this.drpProjectId.SelectedValue = this.CurrUser.LoginProjectId; + this.drpProjectId.SelectedValue = this.CurrUser.LoginProjectId; this.tvControlItem.Nodes.Clear(); TreeNode rootNode = new TreeNode(); rootNode.Text = "项目"; @@ -64,6 +64,7 @@ namespace FineUIPro.Web.HJGL.HotHardManage //this.InitTreeMenu();//加载树 //this.tvControlItem.SelectedNodeID = this.CurrUser.LoginProjectId; //BindGrid(); + this.InitTreeMenu(); } } #endregion diff --git a/HJGL_DS/FineUIPro.Web/HJGL/HotHardManage/HardTestResult.aspx b/HJGL_DS/FineUIPro.Web/HJGL/HotHardManage/HardTestResult.aspx index af1deb0..dddfeef 100644 --- a/HJGL_DS/FineUIPro.Web/HJGL/HotHardManage/HardTestResult.aspx +++ b/HJGL_DS/FineUIPro.Web/HJGL/HotHardManage/HardTestResult.aspx @@ -31,7 +31,7 @@ - diff --git a/HJGL_DS/FineUIPro.Web/HJGL/HotHardManage/HardTestResult.aspx.cs b/HJGL_DS/FineUIPro.Web/HJGL/HotHardManage/HardTestResult.aspx.cs index e2ba8c6..609fdcc 100644 --- a/HJGL_DS/FineUIPro.Web/HJGL/HotHardManage/HardTestResult.aspx.cs +++ b/HJGL_DS/FineUIPro.Web/HJGL/HotHardManage/HardTestResult.aspx.cs @@ -39,7 +39,7 @@ namespace FineUIPro.Web.HJGL.HotHardManage this.drpProjectId.DataSource = BLL.Base_ProjectService.GetOnProjectListByUserId(this.CurrUser.UserId, "1"); this.drpProjectId.DataBind(); Funs.FineUIPleaseSelect(this.drpProjectId); - //this.drpProjectId.SelectedValue = this.CurrUser.LoginProjectId; + this.drpProjectId.SelectedValue = this.CurrUser.LoginProjectId; this.tvHardTestTrust.Nodes.Clear(); TreeNode rootNode = new TreeNode(); rootNode.Text = "项目"; @@ -48,7 +48,7 @@ namespace FineUIPro.Web.HJGL.HotHardManage rootNode.Expanded = true; rootNode.EnableClickEvent = true; this.tvHardTestTrust.Nodes.Add(rootNode); - //this.InitTreeMenu();//加载树 + this.InitTreeMenu();//加载树 //this.tvHardTestTrust.SelectedNodeID = "0"; //BindGrid(); CheckBoxField cbf1 = Grid1.FindColumn("IsOK1") as CheckBoxField; @@ -213,6 +213,7 @@ namespace FineUIPro.Web.HJGL.HotHardManage rootUnitNode.Nodes.Add(tn); } } + } #endregion diff --git a/HJGL_DS/FineUIPro.Web/HJGL/HotHardManage/HotHardManageEdit.aspx b/HJGL_DS/FineUIPro.Web/HJGL/HotHardManage/HotHardManageEdit.aspx index 149df27..917cd21 100644 --- a/HJGL_DS/FineUIPro.Web/HJGL/HotHardManage/HotHardManageEdit.aspx +++ b/HJGL_DS/FineUIPro.Web/HJGL/HotHardManage/HotHardManageEdit.aspx @@ -28,7 +28,7 @@ - diff --git a/HJGL_DS/FineUIPro.Web/HJGL/HotHardManage/HotHardManageEdit.aspx.cs b/HJGL_DS/FineUIPro.Web/HJGL/HotHardManage/HotHardManageEdit.aspx.cs index cb77a62..88453bc 100644 --- a/HJGL_DS/FineUIPro.Web/HJGL/HotHardManage/HotHardManageEdit.aspx.cs +++ b/HJGL_DS/FineUIPro.Web/HJGL/HotHardManage/HotHardManageEdit.aspx.cs @@ -41,12 +41,14 @@ namespace FineUIPro.Web.HJGL.HotHardManage { this.ddlPageSize.SelectedValue = this.Grid1.PageSize.ToString(); this.HardTestReportId = string.Empty; + this.drpProjectId.DataTextField = "ProjectCode"; this.drpProjectId.DataValueField = "ProjectId"; this.drpProjectId.DataSource = BLL.Base_ProjectService.GetOnProjectListByUserId(this.CurrUser.UserId, "1"); this.drpProjectId.DataBind(); Funs.FineUIPleaseSelect(this.drpProjectId); - //this.drpProjectId.SelectedValue = this.CurrUser.LoginProjectId; + this.drpProjectId.SelectedValue = this.CurrUser.LoginProjectId; + this.tvControlItem.Nodes.Clear(); TreeNode rootNode = new TreeNode(); rootNode.Text = "项目"; @@ -58,6 +60,7 @@ namespace FineUIPro.Web.HJGL.HotHardManage //this.InitTreeMenu();//加载树 //this.tvControlItem.SelectedNodeID = "0"; //BindGrid(); + this.InitTreeMenu(); } } #endregion diff --git a/HJGL_DS/FineUIPro.Web/HJGL/HotHardManage/HotHardSet.aspx b/HJGL_DS/FineUIPro.Web/HJGL/HotHardManage/HotHardSet.aspx index c1e1e72..18ac7ed 100644 --- a/HJGL_DS/FineUIPro.Web/HJGL/HotHardManage/HotHardSet.aspx +++ b/HJGL_DS/FineUIPro.Web/HJGL/HotHardManage/HotHardSet.aspx @@ -36,7 +36,7 @@ - diff --git a/HJGL_DS/FineUIPro.Web/HJGL/HotHardManage/HotHardSet.aspx.cs b/HJGL_DS/FineUIPro.Web/HJGL/HotHardManage/HotHardSet.aspx.cs index f6130e4..034a65b 100644 --- a/HJGL_DS/FineUIPro.Web/HJGL/HotHardManage/HotHardSet.aspx.cs +++ b/HJGL_DS/FineUIPro.Web/HJGL/HotHardManage/HotHardSet.aspx.cs @@ -40,7 +40,7 @@ namespace FineUIPro.Web.HJGL.HotHardManage this.drpProjectId.DataSource = BLL.Base_ProjectService.GetOnProjectListByUserId(this.CurrUser.UserId, "1"); this.drpProjectId.DataBind(); Funs.FineUIPleaseSelect(this.drpProjectId); - //this.drpProjectId.SelectedValue = this.CurrUser.LoginProjectId; + this.drpProjectId.SelectedValue = this.CurrUser.LoginProjectId; //var projects = BLL.Base_ProjectService.GetProjectListByUserIdAndState(this.CurrUser.UserId, this.drpIsProjectClosed.SelectedValue); //RadioButtonList1.DataTextField = "ProjectCode"; @@ -103,6 +103,11 @@ namespace FineUIPro.Web.HJGL.HotHardManage rootProjectNode.EnableClickEvent = true; rootNode.Nodes.Add(rootProjectNode); } + if (this.drpProjectId.SelectedValue != BLL.Const._Null && !string.IsNullOrEmpty(this.drpProjectId.SelectedValue)) + { + this.tvControlItem.SelectedNodeID = this.drpProjectId.SelectedValue; + BindGrid(); + } } #endregion diff --git a/HJGL_DS/FineUIPro.Web/HJGL/HotProessManage/HotProessManageEdit.aspx.cs b/HJGL_DS/FineUIPro.Web/HJGL/HotProessManage/HotProessManageEdit.aspx.cs index ae75691..9df7660 100644 --- a/HJGL_DS/FineUIPro.Web/HJGL/HotProessManage/HotProessManageEdit.aspx.cs +++ b/HJGL_DS/FineUIPro.Web/HJGL/HotProessManage/HotProessManageEdit.aspx.cs @@ -974,7 +974,6 @@ namespace FineUIPro.Web.HJGL.HotProessManage // return; //} SaveData(); - ShowNotify("提交成功!", MessageBoxIcon.Success); } else { @@ -989,6 +988,7 @@ namespace FineUIPro.Web.HJGL.HotProessManage /// private void SaveData() { + bool isEmpty = false;//是否为空 string isoidLog = string.Empty; //是否同一管线标记 int i = 0; //检验数量 int flag = 0; //打印标记 @@ -1033,22 +1033,120 @@ namespace FineUIPro.Web.HJGL.HotProessManage //} //else //{ - - newHotProessItem.PointCount = values.Value("PointCount").ToString(); - newHotProessItem.RequiredT = values.Value("RequiredT").ToString(); - newHotProessItem.ActualT = values.Value("ActualT").ToString(); - newHotProessItem.RequestTime = values.Value("RequestTime").ToString(); - newHotProessItem.ActualTime = values.Value("ActualTime").ToString(); - newHotProessItem.HotProessDate = Funs.GetNewDateTime(values.Value("HotProessDate").ToString()); - newHotProessItem.RecordChartNo = values.Value("RecordChartNo").ToString(); - newHotProessItem.ThermocouplesNum = values.Value("ThermocouplesNum").ToString(); - newHotProessItem.HeatingRange = values.Value("HeatingRange").ToString(); - newHotProessItem.InsulationRange = values.Value("InsulationRange").ToString(); - newHotProessItem.InsulationThickness = values.Value("InsulationThickness").ToString(); - newHotProessItem.HotStartDate = Funs.GetNewDateTime(values.Value("HotStartDate").ToString()); - newHotProessItem.HotEndDate = Funs.GetNewDateTime(values.Value("HotEndDate").ToString()); + if (!string.IsNullOrEmpty(values.Value("PointCount").ToString())) + { + newHotProessItem.PointCount = values.Value("PointCount").ToString(); + } + else + { + isEmpty = true; + } + if (!string.IsNullOrEmpty(values.Value("RequiredT").ToString())) + { + newHotProessItem.RequiredT = values.Value("RequiredT").ToString(); + } + else + { + isEmpty = true; + } + if (!string.IsNullOrEmpty(values.Value("ActualT").ToString())) + { + newHotProessItem.ActualT = values.Value("ActualT").ToString(); + } + else + { + isEmpty = true; + } + if (!string.IsNullOrEmpty(values.Value("RequestTime").ToString())) + { + newHotProessItem.RequestTime = values.Value("RequestTime").ToString(); + } + else + { + isEmpty = true; + } + if (!string.IsNullOrEmpty(values.Value("ActualTime").ToString())) + { + newHotProessItem.ActualTime = values.Value("ActualTime").ToString(); + } + else + { + isEmpty = true; + } + if (!string.IsNullOrEmpty(values.Value("HotProessDate").ToString())) + { + newHotProessItem.HotProessDate = Funs.GetNewDateTime(values.Value("HotProessDate").ToString()); + } + else + { + isEmpty = true; + } + if (!string.IsNullOrEmpty(values.Value("RecordChartNo").ToString())) + { + newHotProessItem.RecordChartNo = values.Value("RecordChartNo").ToString(); + } + else + { + isEmpty = true; + } + if (!string.IsNullOrEmpty(values.Value("ThermocouplesNum").ToString())) + { + newHotProessItem.ThermocouplesNum = values.Value("ThermocouplesNum").ToString(); + } + else + { + isEmpty = true; + } + if (!string.IsNullOrEmpty(values.Value("HeatingRange").ToString())) + { + newHotProessItem.HeatingRange = values.Value("HeatingRange").ToString(); + } + else + { + isEmpty = true; + } + if (!string.IsNullOrEmpty(values.Value("InsulationRange").ToString())) + { + newHotProessItem.InsulationRange = values.Value("InsulationRange").ToString(); + } + else + { + isEmpty = true; + } + if (!string.IsNullOrEmpty(values.Value("InsulationThickness").ToString())) + { + newHotProessItem.InsulationThickness = values.Value("InsulationThickness").ToString(); + } + else + { + isEmpty = true; + } + if (!string.IsNullOrEmpty(values.Value("HotStartDate").ToString())) + { + newHotProessItem.HotStartDate = Funs.GetNewDateTime(values.Value("HotStartDate").ToString()); + } + else + { + isEmpty = true; + } + if (!string.IsNullOrEmpty(values.Value("HotEndDate").ToString())) + { + newHotProessItem.HotEndDate = Funs.GetNewDateTime(values.Value("HotEndDate").ToString()); + } + else + { + isEmpty = true; + } newHotProessItem.Remark = values.Value("Remark").ToString(); - Funs.DB.SubmitChanges(); + if (!isEmpty) + { + Funs.DB.SubmitChanges(); + } + else + { + Alert.ShowInTop("测温点编号、热处理温度℃(要求)、热处理温度℃(实际)、恒温时间h(要求)、恒温时间h(实际)、热处理日期、记录曲线图编号、热电偶数量、加热范围、保温范围、保温厚度、热处理开始时间、热处理完成时间不能为空!", MessageBoxIcon.Warning); + return; + } //} } if (hotProessItem.ProessTypes.Contains("4")) //消应力热处理需要进行硬度委托 @@ -1270,6 +1368,10 @@ namespace FineUIPro.Web.HJGL.HotProessManage // oldHardTestReport2.TestCount = i; // BLL.HJGL_CH_HardTestReportService.UpdateCH_HardTestReport(oldHardTestReport2); //} + if (!isEmpty) + { + ShowNotify("提交成功!", MessageBoxIcon.Success); + } } /// diff --git a/HJGL_DS/FineUIPro.Web/Web.config b/HJGL_DS/FineUIPro.Web/Web.config index 30834b7..6bfb6c8 100644 --- a/HJGL_DS/FineUIPro.Web/Web.config +++ b/HJGL_DS/FineUIPro.Web/Web.config @@ -67,7 +67,7 @@ - + diff --git a/HJGL_DS/WebAPI/WebAPI.csproj.user b/HJGL_DS/WebAPI/WebAPI.csproj.user index 8cd7f1f..ef14066 100644 --- a/HJGL_DS/WebAPI/WebAPI.csproj.user +++ b/HJGL_DS/WebAPI/WebAPI.csproj.user @@ -1,7 +1,7 @@ - Release|Any CPU + Debug|Any CPU FolderProfile true