2025-10-10 14:33:21 +08:00
|
|
|
|
using System;
|
2022-09-05 16:36:31 +08:00
|
|
|
|
|
|
|
|
|
|
namespace FineUIPro.Web.CQMS.Material
|
|
|
|
|
|
{
|
|
|
|
|
|
public partial class EquipmentView : PageBase
|
|
|
|
|
|
{
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 项目id
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
public string ProjectId
|
|
|
|
|
|
{
|
|
|
|
|
|
get
|
|
|
|
|
|
{
|
|
|
|
|
|
return (string)ViewState["ProjectId"];
|
|
|
|
|
|
}
|
|
|
|
|
|
set
|
|
|
|
|
|
{
|
|
|
|
|
|
ViewState["ProjectId"] = value;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
protected void Page_Load(object sender, EventArgs e)
|
|
|
|
|
|
{
|
|
|
|
|
|
if (!IsPostBack)
|
|
|
|
|
|
{
|
|
|
|
|
|
this.ProjectId = this.CurrUser.LoginProjectId;
|
2023-06-26 15:42:26 +08:00
|
|
|
|
BLL.UnitService.InitUnitDropDownList(this.drpUnit, this.ProjectId, true);
|
2022-09-05 16:36:31 +08:00
|
|
|
|
BLL.MainItemService.InitMainItemDownList(drpMainItem, this.ProjectId, true);
|
|
|
|
|
|
this.btnClose.OnClientClick = ActiveWindow.GetHideReference();
|
|
|
|
|
|
string EquipmentId = Request.Params["EquipmentId"];
|
|
|
|
|
|
if (!string.IsNullOrEmpty(EquipmentId))
|
|
|
|
|
|
{
|
|
|
|
|
|
Model.Material_Equipment Equipment = BLL.CQMS_EquipmentService.GetEquipmentByEquipmentId(EquipmentId);
|
|
|
|
|
|
if (Equipment != null)
|
|
|
|
|
|
{
|
|
|
|
|
|
this.txtContractNo.Text = Equipment.ContractNo;
|
|
|
|
|
|
if (!string.IsNullOrEmpty(Equipment.UnitId))
|
|
|
|
|
|
{
|
|
|
|
|
|
this.drpUnit.SelectedValue = Equipment.UnitId;
|
|
|
|
|
|
}
|
|
|
|
|
|
if (!string.IsNullOrEmpty(Equipment.MainItemId))
|
|
|
|
|
|
{
|
|
|
|
|
|
this.drpMainItem.SelectedValue = Equipment.MainItemId;
|
|
|
|
|
|
}
|
|
|
|
|
|
this.txtEquipmentName.Text = Equipment.EquipmentName;
|
|
|
|
|
|
this.txtSpecificationAndModel.Text = Equipment.SpecificationAndModel;
|
|
|
|
|
|
this.txtEquipmentCode.Text = Equipment.EquipmentCode;
|
|
|
|
|
|
this.txtPressClass.Text = Equipment.PressClass;
|
|
|
|
|
|
this.txtUnit.Text = Equipment.Unit;
|
|
|
|
|
|
if (Equipment.Num != null)
|
|
|
|
|
|
{
|
|
|
|
|
|
this.txtNum.Text = Equipment.Num.ToString();
|
|
|
|
|
|
}
|
|
|
|
|
|
if (Equipment.ArrivalDate != null)
|
|
|
|
|
|
{
|
|
|
|
|
|
this.txtArrivalDate.Text = string.Format("{0:yyyy-MM-dd}", Equipment.ArrivalDate);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|