87 lines
2.8 KiB
C#
87 lines
2.8 KiB
C#
using System;
|
||
using System.Data;
|
||
using System.Linq;
|
||
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 Storage = SuperMap.RealEstate.HighWay.Storage;
|
||
|
||
namespace SuperMap.RealEstate.HighWay.Compents.EditProinst
|
||
{
|
||
/// <summary>
|
||
/// T_COMMODITY_商品管理 的WebUserControl
|
||
/// <summary>
|
||
public partial class Default : UserControl<Running.Business.COMMODITY>
|
||
{
|
||
//流程实例
|
||
Running.Business.HIGHWAYPROINST _HighWayProInst = null;
|
||
protected void Page_Load(object sender, EventArgs e)
|
||
{
|
||
if (IsPostBack)
|
||
{
|
||
return;
|
||
}
|
||
|
||
if (_HighWayProInst.ProInst != null && _HighWayProInst.ProInst.Operation_Type != null)
|
||
{
|
||
if (!_HighWayProInst.ProInst.Operation_Type_BaseValue.ToString().StartsWith("4"))
|
||
{
|
||
EXPENSEBILL_CODE.Visible = false;
|
||
li_name.Attributes["style"] = "width:100%;";
|
||
}
|
||
if (!_HighWayProInst.ProInst.Operation_Type_BaseValue.ToString().StartsWith("350"))
|
||
{
|
||
PROINST_NAME.AllowEmpty = false;
|
||
}
|
||
}
|
||
}
|
||
|
||
|
||
|
||
protected override void OnInit(EventArgs e)
|
||
{
|
||
Common.PageHelper.CreateHeaderStyle(Page);
|
||
_HighWayProInst = Running.Business.HIGHWAYPROINST.CreateInstance(Page);
|
||
base.OnInit(e);
|
||
|
||
}
|
||
|
||
public override bool LoadData()
|
||
{
|
||
EXPENSEBILL_CODE.Text = _HighWayProInst.ProInst.ProInst_Code;
|
||
PROINST_NAME.Text = _HighWayProInst.ProInst.ProInst_Name;
|
||
|
||
return true;
|
||
}
|
||
|
||
//在此加入界面的数据初始化(Page_Load之前),如DropDownList的数据源绑定等
|
||
public override void InitializeWebControl()
|
||
{
|
||
//加载对应的数据
|
||
}
|
||
|
||
//public override bool Save(bool AutoBindData = true)
|
||
//{
|
||
// //WorkFlow.Instance.Business.ProInst _ProInst = _HighWayProInst.ProInst;
|
||
// //_ProInst.ProInst_Name = PROINST_NAME.Text;
|
||
// //_ProInst.Update();
|
||
|
||
// return true;
|
||
//}
|
||
//载入数据
|
||
|
||
public override void OnDataAction_BeforeSave(DataActionEventArgs<Running.Business.COMMODITY> e)
|
||
{
|
||
WorkFlow.Instance.Business.ProInst _ProInst = _HighWayProInst.ProInst;
|
||
_ProInst.ProInst_Name = PROINST_NAME.Text;
|
||
_ProInst.Update();
|
||
base.OnDataAction_BeforeSave(e);
|
||
}
|
||
}
|
||
}
|