using BLL; using System; namespace FineUIPro.Web.HJGL.DataImport { public partial class MaterialInformationEdit : PageBase { /// /// 管线材料ID。 /// public string PipeLineMatId { get { return (string)ViewState["PipeLineMatId"]; } set { ViewState["PipeLineMatId"] = value; } } protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { btnClose.OnClientClick = ActiveWindow.GetHideReference(); this.PipeLineMatId = Request.Params["PipeLineMatId"]; Model.HJGL_PipeLineMat pipeLineMat = PipelineMatService.GetPipeLineMat(this.PipeLineMatId); if (pipeLineMat == null) { Alert.ShowInTop("未找到材料记录!", MessageBoxIcon.Warning); return; } this.txtMaterialCode.Text = pipeLineMat.MaterialCode2; } } /// /// 保存材料编码。 /// protected void btnSave_Click(object sender, EventArgs e) { if (string.IsNullOrEmpty(this.PipeLineMatId)) { Alert.ShowInTop("未找到材料记录!", MessageBoxIcon.Warning); return; } PipelineMatService.UpdateMaterialCode2(this.PipeLineMatId, this.txtMaterialCode.Text.Trim()); ShowNotify("保存成功!", MessageBoxIcon.Success); PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference()); } } }