Files
SGGL_SHJ/SGGL/FineUIPro.Web/HJGL/DataImport/MaterialInformationEdit.aspx.cs
T

58 lines
1.7 KiB
C#
Raw Normal View History

using BLL;
using System;
namespace FineUIPro.Web.HJGL.DataImport
{
public partial class MaterialInformationEdit : PageBase
{
/// <summary>
/// 管线材料ID。
/// </summary>
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;
}
}
/// <summary>
/// 保存材料编码。
/// </summary>
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());
}
}
}