73 lines
3.0 KiB
C#
73 lines
3.0 KiB
C#
using System;
|
||
using System.Collections.Generic;
|
||
using System.Linq;
|
||
using System.Web;
|
||
using System.Web.UI;
|
||
using System.Web.UI.WebControls;
|
||
using SuperMap.RealEstate.CoreFrameWork;
|
||
using SuperMap.RealEstate.ServiceModel;
|
||
using SuperMap.RealEstate.Utility;
|
||
using SuperMap.RealEstate.Web.UI;
|
||
using SuperMap.RealEstate.Web.UI.WebControls;
|
||
using SuperMap.RealEstate.Web.Utility;
|
||
using MSB = SuperMap.RealEstate.MainTenance.Storage.Business;
|
||
using System.Data;
|
||
|
||
namespace SuperMap.RealEstate.MainTenance.Storage.Modules.Proinst
|
||
{
|
||
public partial class ProinstDetall : UserControl<Business.PROINSTDETAIL>
|
||
{
|
||
protected void Page_Load(object sender, EventArgs e)
|
||
{
|
||
if (IsPostBack) return;
|
||
string id = Request.QueryString["HD"].ToString().ToDecrypt();
|
||
MSB.PROINST _PROINST = new MSB.PROINST(Transaction);
|
||
DataTable dt = _PROINST.ExecuteDataTable("select PROINST_TYPE from MAINTENANCE_STORAGE.T_PROINST where PROINST_ID='" + id + "'");
|
||
if (dt.Rows[0][0].ToString() == "1000")
|
||
{
|
||
ORIGIN_TYPE.CaptionText = "设备来源:";
|
||
TOTAL_COUNT.CaptionText = " 入库数量:";
|
||
PROINST_DATE.CaptionText = "入库日期:";
|
||
ORIGIN_TYPE.Items.Add(new ListItemEx("购买", "1000"));
|
||
ORIGIN_TYPE.Items.Add(new ListItemEx("网购", "3000"));
|
||
ORIGIN_TYPE.Items.Add(new ListItemEx("维修返件", "4000"));
|
||
}
|
||
else if (dt.Rows[0][0].ToString() == "2000")
|
||
{
|
||
ORIGIN_TYPE.CaptionText = "设备去由:";
|
||
TOTAL_COUNT.CaptionText = " 出库数量:";
|
||
PROINST_DATE.CaptionText = "出库日期:";
|
||
ORIGIN_TYPE.Items.Add(new ListItemEx("购买", "1000"));
|
||
ORIGIN_TYPE.Items.Add(new ListItemEx("租赁", "2000"));
|
||
ORIGIN_TYPE.Items.Add(new ListItemEx("备件消耗", "5000"));
|
||
}
|
||
}
|
||
//在此加入界面的数据初始化(Page_Load之前),如DropDownList的数据源绑定等
|
||
public override void InitializeWebControl()
|
||
{
|
||
|
||
}
|
||
|
||
//载入数据
|
||
public override bool LoadData()
|
||
{
|
||
//如果是工作流组件请自行修改载入的逻辑,以下是功能模块的默认代码
|
||
if (!String.IsNullOrEmpty(Request["ID"]))
|
||
{
|
||
CurrObject.PROINSTDETAIL_ID_Encrypt = Request["ID"];
|
||
return this.Select();
|
||
}
|
||
//默认返回值,工作流组件返回True,功能模块返回False。
|
||
return (WorkFlowPage != null);
|
||
}
|
||
|
||
//OnDataAction_XXXXX 有一个系列可用,在此加入界面的逻辑处理
|
||
//e.CancelDataAction 来处理是否取消该动作;
|
||
//失败的原因可以用Page.Alert()传递到页面
|
||
public override void OnDataAction_BeforeSave(DataActionEventArgs<Business.PROINSTDETAIL> e)
|
||
{
|
||
base.OnDataAction_BeforeSave(e);
|
||
}
|
||
|
||
}
|
||
} |