Basf_TCC7/HJGL/FineUIPro.Web/PublicInfo/BaseInfo/WeldingMethodView.aspx.cs

56 lines
2.2 KiB
C#

using System;
using System.Linq;
namespace FineUIPro.Web.PublicInfo.BaseInfo
{
public partial class WeldingMethodView : 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 WeldingMethodId = Request.Params["WeldingMethodId"];
if (!string.IsNullOrEmpty(WeldingMethodId))
{
Model.Base_WeldingMethod getWeldingMethod = BLL.Base_WeldingMethodService.GetWeldingMethodByWeldingMethodId(WeldingMethodId);
if (getWeldingMethod != null)
{
this.txtWeldingMethodCode.Text = getWeldingMethod.WeldingMethodCode;
this.txtWeldingMethodName.Text = getWeldingMethod.WeldingMethodName;
this.txtRemark.Text = getWeldingMethod.Remark;
if (!string.IsNullOrEmpty(getWeldingMethod.ConsumablesType))
{
string name = string.Empty;
var lists = getWeldingMethod.ConsumablesType.Split(',');
foreach (var item in lists)
{
if (item == "1")
{
name += Resources.Lan.WeldingWire + ",";
}
if (item == "2")
{
name += Resources.Lan.Electrode + ",";
}
}
if (!string.IsNullOrEmpty(name))
{
name = name.Substring(0, name.LastIndexOf(','));
}
this.txtConsumablesType.Text = name;
}
}
}
}
}
#endregion
}
}