Basf_TCC11/HJGL/FineUIPro.Web/PublicInfo/BaseInfo/MaterialView.aspx.cs

41 lines
1.6 KiB
C#
Raw Normal View History

2024-05-08 16:27:28 +08:00
using System;
using System.Linq;
namespace FineUIPro.Web.PublicInfo.BaseInfo
{
public partial class MaterialView : PageBase
{
#region
/// <summary>
/// 加载页面
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
this.btnClose.OnClientClick = ActiveWindow.GetHideReference();
string consumablesId = Request.Params["MaterialId"];
if (!string.IsNullOrEmpty(consumablesId))
{
Model.Base_Material getMaterial = BLL.Base_MaterialService.GetMaterialByMaterialId(consumablesId);
if (getMaterial != null)
{
this.txtMaterialCode.Text = getMaterial.MaterialCode;
this.txtMaterialType.Text = getMaterial.MaterialType;
var getSteelType = BLL.DropListService.HJGL_GetSteTypeList().FirstOrDefault(x => x.Value == getMaterial.SteelType);
if (getSteelType != null)
{
this.txtSteelType.Text = getSteelType.Text;
}
this.txtMaterialClass.Text = getMaterial.MaterialClass;
this.txtMaterialGroup.Text = getMaterial.MaterialGroup;
this.txtRemark.Text = getMaterial.Remark;
}
}
}
}
#endregion
}
}