From 6235fe8f3c6fb328ac6fc4f3386ffd66cbcdf25e Mon Sep 17 00:00:00 2001 From: wendy <408182087@qq.com> Date: Tue, 9 Jun 2026 16:52:52 +0800 Subject: [PATCH] =?UTF-8?q?20260609=20=E7=84=8A=E5=8F=A3=E5=88=87=E6=8D=A2?= =?UTF-8?q?=E9=A1=B9=E7=9B=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../HJGL/WeldingManage/JointInfo.aspx | 39 +++++----- .../HJGL/WeldingManage/JointInfo.aspx.cs | 74 ++++++++++++++----- .../WeldingManage/JointInfo.aspx.designer.cs | 18 +++++ .../WeldingManage/JointInfoBatchEdit.aspx.cs | 28 +++++-- .../HJGL/WeldingManage/JointInfoEdit.aspx.cs | 38 ++++++++-- 5 files changed, 147 insertions(+), 50 deletions(-) diff --git a/HJGL_DS/FineUIPro.Web/HJGL/WeldingManage/JointInfo.aspx b/HJGL_DS/FineUIPro.Web/HJGL/WeldingManage/JointInfo.aspx index 815a56a..7823936 100644 --- a/HJGL_DS/FineUIPro.Web/HJGL/WeldingManage/JointInfo.aspx +++ b/HJGL_DS/FineUIPro.Web/HJGL/WeldingManage/JointInfo.aspx @@ -30,10 +30,15 @@ EnableCollapse="true" Width="300px" Title="焊口信息" ShowBorder="true" Layout="VBox" ShowHeader="true" AutoScroll="true" BodyPadding="5px" IconFont="ArrowCircleLeft"> + + + + + + OnTextChanged="Tree_TextChanged" Width="250px" LabelWidth="80px" LabelAlign="Right"> @@ -74,7 +79,7 @@ - + @@ -118,7 +123,7 @@ - + @@ -152,7 +157,7 @@ - + @@ -161,13 +166,13 @@ EnableColumnLines="true" ClicksToEdit="2" DataIDField="JOT_ID" AllowSorting="true" SortField="JOTY_Group,Sort1,Sort2,Sort3,Sort4,Sort5" SortDirection="ASC" OnSort="Grid1_Sort" AllowPaging="true" IsDatabasePaging="true" PageSize="15" OnPageIndexChange="Grid1_PageIndexChange" OnRowCommand="Grid1_RowCommand" - EnableTextSelection="True" AutoScroll="true" EnableRowDoubleClickEvent="true" - OnRowDoubleClick="Grid1_RowDoubleClick" OnRowDataBound="Grid1_RowDataBound" > + EnableTextSelection="True" AutoScroll="true" EnableRowDoubleClickEvent="true" + OnRowDoubleClick="Grid1_RowDoubleClick" OnRowDataBound="Grid1_RowDataBound"> <%----%> + AutoPostBack="true" CommandName="IsSelected" DataField="JOT_ID" HeaderText="选择删除" HeaderTextAlign="Center" Locked="true" /> - - - - - - - @@ -371,7 +376,7 @@ Target="Self" EnableResize="true" runat="server" OnClose="Window1_Close" IsModal="true" Width="1024px" Height="620px"> - @@ -385,8 +390,8 @@ runat="server" Text="编辑" Icon="TableEdit"> - + runat="server" Text="增口" Icon="PageCopy"> + diff --git a/HJGL_DS/FineUIPro.Web/HJGL/WeldingManage/JointInfo.aspx.cs b/HJGL_DS/FineUIPro.Web/HJGL/WeldingManage/JointInfo.aspx.cs index b7596d9..4b6490f 100644 --- a/HJGL_DS/FineUIPro.Web/HJGL/WeldingManage/JointInfo.aspx.cs +++ b/HJGL_DS/FineUIPro.Web/HJGL/WeldingManage/JointInfo.aspx.cs @@ -14,6 +14,21 @@ namespace FineUIPro.Web.HJGL.WeldingManage { public partial class JointInfo : PageBase { + /// + /// 项目id + /// + public string ProjectId + { + get + { + return (string)ViewState["ProjectId"]; + } + set + { + ViewState["ProjectId"] = value; + } + } + /// /// 定义集合 /// @@ -30,6 +45,15 @@ namespace FineUIPro.Web.HJGL.WeldingManage if (!IsPostBack) { this.ddlPageSize.SelectedValue = this.Grid1.PageSize.ToString(); + + this.drpProjectId.DataTextField = "ProjectCode"; + this.drpProjectId.DataValueField = "ProjectId"; + this.drpProjectId.DataSource = BLL.Base_ProjectService.GetOnProjectListByUser(this.CurrUser.UserId, "1"); + this.drpProjectId.DataBind(); + Funs.FineUIPleaseSelect(this.drpProjectId); + this.ProjectId = this.CurrUser.LoginProjectId; + this.drpProjectId.SelectedValue = this.ProjectId; + this.InitTreeMenu();//加载树 Funs.FineUIPleaseSelect(this.drpRTState); Funs.FineUIPleaseSelect(this.drpUTState); @@ -113,8 +137,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage rootNode.NodeID = "0"; rootNode.Expanded = true; this.tvControlItem.Nodes.Add(rootNode); - // var joints = from x in Funs.DB.HJGL_PW_JointInfo where x.ProjectId == this.CurrUser.LoginProjectId select x; - var iso = from x in Funs.DB.HJGL_PW_IsoInfo where x.ProjectId == this.CurrUser.LoginProjectId select x; + var iso = from x in Funs.DB.HJGL_PW_IsoInfo where x.ProjectId == this.ProjectId select x; if (!string.IsNullOrEmpty(this.txtIsono.Text)) { iso = iso.Where(e => e.ISO_IsoNo.Contains(this.txtIsono.Text.Trim())); @@ -202,7 +225,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage ,(CASE WHEN IsSpecial=1 THEN '是' ELSE '否' END) AS IsSpecialName FROM HJGL_View_JointInfo WHERE ProjectId= @ProjectId"; List listStr = new List(); - listStr.Add(new SqlParameter("@ProjectId", this.CurrUser.LoginProjectId)); + listStr.Add(new SqlParameter("@ProjectId", this.ProjectId)); if (rbIsHj.SelectedValue == "0") { strSql += " AND ISO_ID =@ISO_ID"; @@ -350,7 +373,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage /// protected void Grid1_RowDoubleClick(object sender, GridRowClickEventArgs e) { - if (BLL.CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.HJGL_JointInfoMenuId, BLL.Const.BtnModify)) + if (BLL.CommonService.GetAllButtonPowerList(this.ProjectId, this.CurrUser.UserId, BLL.Const.HJGL_JointInfoMenuId, BLL.Const.BtnModify)) { PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("JointInfoEdit.aspx?JOT_ID={0}", Grid1.SelectedRowID, "编辑 - "))); } @@ -367,12 +390,12 @@ namespace FineUIPro.Web.HJGL.WeldingManage /// protected void btnNew_Click(object sender, EventArgs e) { - if (CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, Const.HJGL_JointInfoMenuId, Const.BtnAdd)) + if (CommonService.GetAllButtonPowerList(this.ProjectId, this.CurrUser.UserId, Const.HJGL_JointInfoMenuId, Const.BtnAdd)) { var isoInfo = BLL.HJGL_PW_IsoInfoService.GetIsoInfoByIsoInfoId(tvControlItem.SelectedNodeID); if (isoInfo != null) { - PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("JointInfoEdit.aspx?ISO_ID={0}", this.tvControlItem.SelectedNodeID, "新增 - "))); + PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("JointInfoEdit.aspx?ISO_ID={0}&&projectId={1}", this.tvControlItem.SelectedNodeID,this.ProjectId, "新增 - "))); } else { @@ -392,13 +415,13 @@ namespace FineUIPro.Web.HJGL.WeldingManage /// protected void btnBatchAdd_Click(object sender, EventArgs e) { - if (CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, Const.HJGL_JointInfoMenuId, Const.BtnAdd)) + if (CommonService.GetAllButtonPowerList(this.ProjectId, this.CurrUser.UserId, Const.HJGL_JointInfoMenuId, Const.BtnAdd)) { var isoInfo = BLL.HJGL_PW_IsoInfoService.GetIsoInfoByIsoInfoId(tvControlItem.SelectedNodeID); if (isoInfo != null) { this.hdPageMax.Text = "1"; - PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("JointInfoBatchEdit.aspx?ISO_ID={0}", this.tvControlItem.SelectedNodeID, "新增 - "))); + PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("JointInfoBatchEdit.aspx?ISO_ID={0}&&projectId={1}", this.tvControlItem.SelectedNodeID,this.ProjectId, "新增 - "))); } else { @@ -418,7 +441,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage /// protected void btnMenuEdit_Click(object sender, EventArgs e) { - if (BLL.CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.HJGL_JointInfoMenuId, BLL.Const.BtnModify)) + if (BLL.CommonService.GetAllButtonPowerList(this.ProjectId, this.CurrUser.UserId, BLL.Const.HJGL_JointInfoMenuId, BLL.Const.BtnModify)) { if (Grid1.SelectedRowIndexArray.Length == 0) { @@ -435,7 +458,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage protected void btnMenuUpdate_Click(object sender, EventArgs e) { - if (BLL.CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.HJGL_JointInfoMenuId, BLL.Const.BtnModify)) + if (BLL.CommonService.GetAllButtonPowerList(this.ProjectId, this.CurrUser.UserId, BLL.Const.HJGL_JointInfoMenuId, BLL.Const.BtnModify)) { if (Grid1.SelectedRowIndexArray.Length == 0) { @@ -486,7 +509,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage /// protected void btnMenuDelete_Click(object sender, EventArgs e) { - if (CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, Const.HJGL_JointInfoMenuId, Const.BtnDelete)) + if (CommonService.GetAllButtonPowerList(this.ProjectId, this.CurrUser.UserId, Const.HJGL_JointInfoMenuId, Const.BtnDelete)) { if (Grid1.SelectedRowIndexArray.Length == 0) { @@ -526,7 +549,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage BLL.HJGL_BO_BatchDetailService.DeleteBatchDetail(rowID); //删除批明细 BLL.HJGL_PW_JointInfoService.DeleteJointInfo(rowID); var jot = BLL.HJGL_PW_JointInfoService.GetJointInfoByJotID(rowID); - BLL.Sys_LogService.AddLog(BLL.Const.System_3, this.CurrUser.LoginProjectId, this.CurrUser.UserId, "删除焊口[" + jot.JOT_JointNo + "]"); + BLL.Sys_LogService.AddLog(BLL.Const.System_3, this.ProjectId, this.CurrUser.UserId, "删除焊口[" + jot.JOT_JointNo + "]"); } else { @@ -596,8 +619,8 @@ namespace FineUIPro.Web.HJGL.WeldingManage Directory.CreateDirectory(filePath); } string ReportFileName = filePath + "out.xlsx"; - var project = Base_ProjectService.GetProjectByProjectId(this.CurrUser.LoginProjectId); - var isoList = from x in Funs.DB.HJGL_PW_IsoInfo where x.ProjectId == this.CurrUser.LoginProjectId select x; + var project = Base_ProjectService.GetProjectByProjectId(this.ProjectId); + var isoList = from x in Funs.DB.HJGL_PW_IsoInfo where x.ProjectId == this.ProjectId select x; if (isoList != null && isoList.Count() > 0) { int rowIndex = 0; @@ -878,7 +901,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage if (q != null) { string projectName = string.Empty; - var project = BLL.Base_ProjectService.GetProjectByProjectId(this.CurrUser.LoginProjectId); + var project = BLL.Base_ProjectService.GetProjectByProjectId(this.ProjectId); if (project != null) { projectName = project.ProjectName; @@ -1074,6 +1097,16 @@ namespace FineUIPro.Web.HJGL.WeldingManage this.InitTreeMenu(); this.BindGrid(); } + + protected void drpProjectId_SelectedIndexChanged(object sender, EventArgs e) + { + if (this.drpProjectId.SelectedValue != BLL.Const._Null && !string.IsNullOrEmpty(this.drpProjectId.SelectedValue)) + { + this.ProjectId = this.drpProjectId.SelectedValue; + InitTreeMenu(); + BindGrid(); + } + } #endregion #region 判断是否可删除 @@ -1130,7 +1163,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage var iso = BLL.HJGL_PW_IsoInfoService.GetIsoInfoByIsoInfoId(this.tvControlItem.SelectedNodeID); if (iso != null) { - var set = BLL.Project_SysSetService.GetSysSetBySetId("4", this.CurrUser.LoginProjectId); + var set = BLL.Project_SysSetService.GetSysSetBySetId("4", this.ProjectId); if (set != null && set.IsAuto == true) ///是PDMS格式 { PageContext.RegisterStartupScript(Window3.GetShowReference(String.Format("JointInfoOut2.aspx?ISO_ID={0}", this.tvControlItem.SelectedNodeID, "导出 - "))); @@ -1275,7 +1308,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage /// private void CopyData() { - if (BLL.CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.HJGL_JointInfoMenuId, BLL.Const.BtnModify)) + if (BLL.CommonService.GetAllButtonPowerList(this.ProjectId, this.CurrUser.UserId, BLL.Const.HJGL_JointInfoMenuId, BLL.Const.BtnModify)) { if (Grid1.SelectedRowIndexArray.Length == 0) { @@ -1328,7 +1361,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage /// protected void btnBatchDel_Click(object sender, EventArgs e) { - if (CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, Const.HJGL_JointInfoMenuId, Const.BtnDelete)) + if (CommonService.GetAllButtonPowerList(this.ProjectId, this.CurrUser.UserId, Const.HJGL_JointInfoMenuId, Const.BtnDelete)) { // 第一次点击:只打开复选框 if (this.Grid1.Columns[0].Hidden) @@ -1373,7 +1406,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage db.SubmitChanges(); BLL.HJGL_BO_BatchDetailService.DeleteBatchDetail(rowID); //删除批明细 BLL.HJGL_PW_JointInfoService.DeleteJointInfo(rowID); - BLL.Sys_LogService.AddLog(BLL.Const.System_3, this.CurrUser.LoginProjectId, this.CurrUser.UserId, "删除焊口信息"); + BLL.Sys_LogService.AddLog(BLL.Const.System_3, this.ProjectId, this.CurrUser.UserId, "删除焊口信息"); } else { @@ -1452,7 +1485,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage /// protected void btnBatchModify_Click(object sender, EventArgs e) { - if (CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, Const.HJGL_JointInfoMenuId, Const.BtnModify)) + if (CommonService.GetAllButtonPowerList(this.ProjectId, this.CurrUser.UserId, Const.HJGL_JointInfoMenuId, Const.BtnModify)) { var isoInfo = BLL.HJGL_PW_IsoInfoService.GetIsoInfoByIsoInfoId(tvControlItem.SelectedNodeID); if (isoInfo != null) @@ -1469,5 +1502,6 @@ namespace FineUIPro.Web.HJGL.WeldingManage Alert.ShowInTop("您没有这个权限,请与管理员联系!", MessageBoxIcon.Warning); } } + } } \ No newline at end of file diff --git a/HJGL_DS/FineUIPro.Web/HJGL/WeldingManage/JointInfo.aspx.designer.cs b/HJGL_DS/FineUIPro.Web/HJGL/WeldingManage/JointInfo.aspx.designer.cs index abb0406..c8f56b1 100644 --- a/HJGL_DS/FineUIPro.Web/HJGL/WeldingManage/JointInfo.aspx.designer.cs +++ b/HJGL_DS/FineUIPro.Web/HJGL/WeldingManage/JointInfo.aspx.designer.cs @@ -59,6 +59,24 @@ namespace FineUIPro.Web.HJGL.WeldingManage /// protected global::FineUIPro.Panel panelLeftRegion; + /// + /// Toolbar6 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar6; + + /// + /// drpProjectId 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList drpProjectId; + /// /// Toolbar1 控件。 /// diff --git a/HJGL_DS/FineUIPro.Web/HJGL/WeldingManage/JointInfoBatchEdit.aspx.cs b/HJGL_DS/FineUIPro.Web/HJGL/WeldingManage/JointInfoBatchEdit.aspx.cs index d5b24da..36eebfa 100644 --- a/HJGL_DS/FineUIPro.Web/HJGL/WeldingManage/JointInfoBatchEdit.aspx.cs +++ b/HJGL_DS/FineUIPro.Web/HJGL/WeldingManage/JointInfoBatchEdit.aspx.cs @@ -7,6 +7,21 @@ public partial class JointInfoBatchEdit : PageBase { #region 定义项 + /// + /// 项目id + /// + private string ProjectId + { + get + { + return (string)ViewState["ProjectId"]; + } + set + { + ViewState["ProjectId"] = value; + } + } + /// /// 管线主键 /// @@ -34,6 +49,7 @@ if (!IsPostBack) { this.ISO_ID = Request.Params["ISO_ID"]; + this.ProjectId = Request.Params["projectId"]; ///初始化下拉框 this.LoadDropDownList(); ///初始化显示信息 @@ -100,7 +116,7 @@ this.drpInstallationId.DataTextField = "Text"; this.drpInstallationId.DataValueField = "Value"; - this.drpInstallationId.DataSource = BLL.Project_InstallationService.GetInstallationList(this.CurrUser.LoginProjectId); + this.drpInstallationId.DataSource = BLL.Project_InstallationService.GetInstallationList(this.ProjectId); this.drpInstallationId.DataBind(); Funs.FineUIPleaseSelect(this.drpInstallationId); @@ -233,7 +249,7 @@ /// protected void btnSave_Click(object sender, EventArgs e) { - if (CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, Const.HJGL_JointInfoMenuId, Const.BtnSave)) + if (CommonService.GetAllButtonPowerList(this.ProjectId, this.CurrUser.UserId, Const.HJGL_JointInfoMenuId, Const.BtnSave)) { if (this.drpInstallationId.SelectedValue == BLL.Const._Null) { @@ -284,7 +300,7 @@ } Model.HJGL_PW_JointInfo newJointInfo = new Model.HJGL_PW_JointInfo(); - newJointInfo.ProjectId = this.CurrUser.LoginProjectId; + newJointInfo.ProjectId = this.ProjectId; newJointInfo.ISO_ID = this.ISO_ID; newJointInfo.JOT_JointNo = this.txtJointNo.Text.Trim(); newJointInfo.JOT_JointDesc = this.txtJointDesc.Text.Trim(); @@ -409,7 +425,7 @@ // newJointInfo.JOT_JointNo = this.txtJointNo.Text.Trim() + Convert.ToString(i); //} newJointInfo.JOT_JointNo = this.txtJointNo.Text.Trim() + Convert.ToString(i); - if (!BLL.HJGL_PW_JointInfoService.IsExistJointInfoCode(this.CurrUser.LoginProjectId, newJointInfo.JOT_JointNo, this.ISO_ID, null)) + if (!BLL.HJGL_PW_JointInfoService.IsExistJointInfoCode(this.ProjectId, newJointInfo.JOT_JointNo, this.ISO_ID, null)) { try { @@ -445,7 +461,7 @@ THEN ISNULL(TRY_CAST(SUBSTRING(JOT_JointNo,2,len(JOT_JointNo)-1) as int),0) ELSE 0 END) WHERE JOT_ID='" + newJointInfo.JOT_ID + "'"; SQLHelper.ExecutSql(strSort); - BLL.Sys_LogService.AddLog(BLL.Const.System_3, this.CurrUser.LoginProjectId, this.CurrUser.UserId, "添加焊口信息!"); + BLL.Sys_LogService.AddLog(BLL.Const.System_3, this.ProjectId, this.CurrUser.UserId, "添加焊口信息!"); } catch { @@ -475,7 +491,7 @@ { if (!string.IsNullOrEmpty(this.txtJointNoS.Text.Trim()) && !string.IsNullOrEmpty(this.ISO_ID)) { - var jointInfo = BLL.HJGL_PW_JointInfoService.GetJointInfoByJointNoAndIsoId(this.txtJointNoS.Text.Trim(), this.ISO_ID, this.CurrUser.LoginProjectId); + var jointInfo = BLL.HJGL_PW_JointInfoService.GetJointInfoByJointNoAndIsoId(this.txtJointNoS.Text.Trim(), this.ISO_ID, this.ProjectId); if (jointInfo != null) { //this.txtJointNo.Text = jointInfo.JOT_JointNo; diff --git a/HJGL_DS/FineUIPro.Web/HJGL/WeldingManage/JointInfoEdit.aspx.cs b/HJGL_DS/FineUIPro.Web/HJGL/WeldingManage/JointInfoEdit.aspx.cs index fde075a..ec40f32 100644 --- a/HJGL_DS/FineUIPro.Web/HJGL/WeldingManage/JointInfoEdit.aspx.cs +++ b/HJGL_DS/FineUIPro.Web/HJGL/WeldingManage/JointInfoEdit.aspx.cs @@ -10,6 +10,21 @@ public partial class JointInfoEdit : PageBase { #region 定义项 + /// + /// 项目id + /// + private string ProjectId + { + get + { + return (string)ViewState["ProjectId"]; + } + set + { + ViewState["ProjectId"] = value; + } + } + /// /// 管线主键 /// @@ -52,11 +67,13 @@ { this.JOT_ID = Request.Params["JOT_ID"]; this.ISO_ID = Request.Params["ISO_ID"]; + this.ProjectId = Request.Params["projectId"]; ///初始化下拉框 this.LoadDropDownList(); var jointInfo = BLL.HJGL_PW_JointInfoService.GetJointInfoByJotID(this.JOT_ID); if (jointInfo != null) { + this.ProjectId = jointInfo.ProjectId; this.ISO_ID = jointInfo.ISO_ID; // 初始化显示信息 this.LoadShowInfo(jointInfo); @@ -172,7 +189,7 @@ this.drpInstallationId.DataTextField = "Text"; this.drpInstallationId.DataValueField = "Value"; - this.drpInstallationId.DataSource = BLL.Project_InstallationService.GetInstallationList(this.CurrUser.LoginProjectId); + this.drpInstallationId.DataSource = BLL.Project_InstallationService.GetInstallationList(this.ProjectId); this.drpInstallationId.DataBind(); Funs.FineUIPleaseSelect(this.drpInstallationId); @@ -378,6 +395,7 @@ { if (jointInfo != null) { + this.ProjectId = jointInfo.ProjectId; this.txtJointNo.Text = jointInfo.JOT_JointNo; this.txtJointDesc.Text = jointInfo.JOT_JointDesc; if (!string.IsNullOrEmpty(jointInfo.DReportID)) @@ -490,6 +508,12 @@ this.txtRemark.Text = jointInfo.JOT_Remark; if (!string.IsNullOrEmpty(jointInfo.InstallationId)) { + this.drpInstallationId.Items.Clear(); + this.drpInstallationId.DataTextField = "Text"; + this.drpInstallationId.DataValueField = "Value"; + this.drpInstallationId.DataSource = BLL.Project_InstallationService.GetInstallationList(this.ProjectId); + this.drpInstallationId.DataBind(); + Funs.FineUIPleaseSelect(this.drpInstallationId); this.drpInstallationId.SelectedValue = jointInfo.InstallationId; } if (!string.IsNullOrEmpty(jointInfo.NDTR_ID)) @@ -601,16 +625,16 @@ /// protected void btnSave_Click(object sender, EventArgs e) { - if (CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, Const.HJGL_JointInfoMenuId, Const.BtnSave)) + if (CommonService.GetAllButtonPowerList(this.ProjectId, this.CurrUser.UserId, Const.HJGL_JointInfoMenuId, Const.BtnSave)) { - if (BLL.HJGL_PW_JointInfoService.IsExistJointInfoCode(this.CurrUser.LoginProjectId, this.txtJointNo.Text.Trim(), this.ISO_ID, this.JOT_ID)) + if (BLL.HJGL_PW_JointInfoService.IsExistJointInfoCode(this.ProjectId, this.txtJointNo.Text.Trim(), this.ISO_ID, this.JOT_ID)) { Alert.ShowInTop("该管线焊口号已存在!", MessageBoxIcon.Warning); return; } Model.HJGL_PW_JointInfo newJointInfo = new Model.HJGL_PW_JointInfo(); - newJointInfo.ProjectId = this.CurrUser.LoginProjectId; + newJointInfo.ProjectId =this.ProjectId; newJointInfo.ISO_ID = this.ISO_ID; newJointInfo.JOT_JointNo = this.txtJointNo.Text.Trim(); newJointInfo.JOT_JointDesc = this.txtJointDesc.Text.Trim(); @@ -769,7 +793,7 @@ newJointInfo.JOT_ID = SQLHelper.GetNewID(typeof(Model.HJGL_PW_JointInfo)); this.JOT_ID = newJointInfo.JOT_ID; BLL.HJGL_PW_JointInfoService.AddJointInfo(newJointInfo); - BLL.Sys_LogService.AddLog(BLL.Const.System_3, this.CurrUser.LoginProjectId, this.CurrUser.UserId, "添加[" + this.txtISONO.Text + "]管线下,焊口[" + newJointInfo.JOT_JointNo + "]!"); + BLL.Sys_LogService.AddLog(BLL.Const.System_3, this.ProjectId, this.CurrUser.UserId, "添加[" + this.txtISONO.Text + "]管线下,焊口[" + newJointInfo.JOT_JointNo + "]!"); } catch { @@ -822,7 +846,7 @@ { BLL.HJGL_PW_JointInfoService.UpdateJointNoAddG(this.JOT_ID, this.ddlJointAttribute.SelectedValue, Const.Add); } - BLL.Sys_LogService.AddLog(BLL.Const.System_3, this.CurrUser.LoginProjectId, this.CurrUser.UserId, "修改[" + this.txtISONO.Text + "]管线下,焊口[" + newJointInfo.JOT_JointNo + "]!"); + BLL.Sys_LogService.AddLog(BLL.Const.System_3, this.ProjectId, this.CurrUser.UserId, "修改[" + this.txtISONO.Text + "]管线下,焊口[" + newJointInfo.JOT_JointNo + "]!"); } // 更新排序字段 string strSort = @"UPDATE dbo.HJGL_PW_JointInfo SET @@ -1083,7 +1107,7 @@ { if (!string.IsNullOrEmpty(this.txtJointNoS.Text.Trim()) && !string.IsNullOrEmpty(this.ISO_ID)) { - var jointInfo = BLL.HJGL_PW_JointInfoService.GetJointInfoByJointNoAndIsoId(this.txtJointNoS.Text.Trim(), this.ISO_ID, this.CurrUser.LoginProjectId); + var jointInfo = BLL.HJGL_PW_JointInfoService.GetJointInfoByJointNoAndIsoId(this.txtJointNoS.Text.Trim(), this.ISO_ID, this.ProjectId); if (jointInfo != null) { //this.txtJointNo.Text = jointInfo.JOT_JointNo;