diff --git a/HJGL_DS/FineUIPro.Web/HJGL/MaterialManage/QualityCertificateEdit.aspx b/HJGL_DS/FineUIPro.Web/HJGL/MaterialManage/QualityCertificateEdit.aspx index bb4eb25..915df67 100644 --- a/HJGL_DS/FineUIPro.Web/HJGL/MaterialManage/QualityCertificateEdit.aspx +++ b/HJGL_DS/FineUIPro.Web/HJGL/MaterialManage/QualityCertificateEdit.aspx @@ -25,17 +25,6 @@ - - - - - - - - - - + + + + + + + + + diff --git a/HJGL_DS/FineUIPro.Web/HJGL/MaterialManage/QualityCertificateEdit.aspx.cs b/HJGL_DS/FineUIPro.Web/HJGL/MaterialManage/QualityCertificateEdit.aspx.cs index 1fe893c..16f7eff 100644 --- a/HJGL_DS/FineUIPro.Web/HJGL/MaterialManage/QualityCertificateEdit.aspx.cs +++ b/HJGL_DS/FineUIPro.Web/HJGL/MaterialManage/QualityCertificateEdit.aspx.cs @@ -35,7 +35,7 @@ namespace FineUIPro.Web.HJGL.MaterialManage { this.btnClose.OnClientClick = ActiveWindow.GetHideReference(); this.QualityCertificateId = Request.Params["QualityCertificateId"]; - StockInitService.InitHeartNo(this.drpWarrantybook, true); + StockInitService.InitWarrantybook(this.drpWarrantybook, true); if (!string.IsNullOrEmpty(this.QualityCertificateId)) { this.hdQualityCertificateId.Text = this.QualityCertificateId; @@ -81,7 +81,7 @@ namespace FineUIPro.Web.HJGL.MaterialManage /// protected void btnSave_Click(object sender, EventArgs e) { - if (this.hdWeldId.Text == string.Empty) + if (this.txtWeldName.Text.Trim() == string.Empty) { Alert.ShowInTop("请选择焊材牌号!", MessageBoxIcon.Warning); return; @@ -148,7 +148,7 @@ namespace FineUIPro.Web.HJGL.MaterialManage protected void btnAttachUrl2_Click(object sender, EventArgs e) { string edit = "0"; // 表示能打开附件上传窗口,但不能上传附件 - if (BLL.CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.CLGL_QualityCertificateMenuId, BLL.Const.BtnSave)) + if (BLL.CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.CLGL_QualityCertificateMenuId, BLL.Const.BtnAdd)) { if (string.IsNullOrEmpty(this.hdQualityCertificateId.Text.Trim())) { @@ -206,9 +206,32 @@ namespace FineUIPro.Web.HJGL.MaterialManage protected void drpWarrantybook_SelectedIndexChanged(object sender, EventArgs e) { this.txtHeartNo.Text = string.Empty; + this.txtWeldName.Text = string.Empty; + this.txtWeldSpec.Text = string.Empty; + this.txtWeldType.Text = string.Empty; if (this.drpWarrantybook.SelectedValue != BLL.Const._Null) { this.txtHeartNo.Text = this.drpWarrantybook.SelectedValue; + Model.Weld_StockIn s = (from x in Funs.DB.Weld_StockIn where x.Warrantybook == this.drpWarrantybook.SelectedItem.Text.Trim() select x).FirstOrDefault(); + if (s != null) + { + this.hdWeldId.Text = s.WeldId; + var weld = BLL.WeldInfoService.GetWeldInfoById(s.WeldId); + if (weld != null) + { + //this.txtWeldCode.Text = weld.WeldCode; + this.txtWeldName.Text = weld.WeldName; + this.txtWeldSpec.Text = weld.WeldSpec; + if (!string.IsNullOrEmpty(weld.WeldTypeId)) + { + var weldType = BLL.WeldTypeService.GetWeldTypeById(weld.WeldTypeId); + if (weldType != null) + { + this.txtWeldType.Text = weldType.WeldTypeName; + } + } + } + } } } } diff --git a/HJGL_DS/FineUIPro.Web/HJGL/MaterialManage/QualityCertificateEdit.aspx.designer.cs b/HJGL_DS/FineUIPro.Web/HJGL/MaterialManage/QualityCertificateEdit.aspx.designer.cs index 2f9760f..8592add 100644 --- a/HJGL_DS/FineUIPro.Web/HJGL/MaterialManage/QualityCertificateEdit.aspx.designer.cs +++ b/HJGL_DS/FineUIPro.Web/HJGL/MaterialManage/QualityCertificateEdit.aspx.designer.cs @@ -57,6 +57,24 @@ namespace FineUIPro.Web.HJGL.MaterialManage { /// protected global::FineUIPro.HiddenField hdQualityCertificateId; + /// + /// drpWarrantybook 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList drpWarrantybook; + + /// + /// txtWeldType 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtWeldType; + /// /// txtWeldName 控件。 /// @@ -84,24 +102,6 @@ namespace FineUIPro.Web.HJGL.MaterialManage { /// protected global::FineUIPro.TextBox txtWeldSpec; - /// - /// drpWarrantybook 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.DropDownList drpWarrantybook; - - /// - /// txtWeldType 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.TextBox txtWeldType; - /// /// txtHeartNo 控件。 /// diff --git a/HJGL_DS/FineUIPro.Web/Web.config b/HJGL_DS/FineUIPro.Web/Web.config index 30834b7..3f81ed7 100644 --- a/HJGL_DS/FineUIPro.Web/Web.config +++ b/HJGL_DS/FineUIPro.Web/Web.config @@ -11,7 +11,7 @@ - +