65 lines
2.3 KiB
C#
65 lines
2.3 KiB
C#
using System;
|
||
using System.Collections.Generic;
|
||
using System.Linq;
|
||
using System.Web;
|
||
using System.Web.UI;
|
||
using System.Web.UI.WebControls;
|
||
using Running = SuperMap.RealEstate.Personnel.Running;
|
||
using SuperMap.RealEstate.Web.UI;
|
||
|
||
namespace SuperMap.RealEstate.Personnel.Compents.Employ
|
||
{
|
||
public partial class EMPLOY : UserControl<Running.Business.EMPLOY>
|
||
{
|
||
Running.Business.PERSONNELPROINST _PERSONNELPROINST = null;
|
||
#region 方法 -> 页面加载
|
||
protected void Page_Load(object sender, EventArgs e)
|
||
{
|
||
}
|
||
#endregion
|
||
|
||
#region 方法 -> 页面加载前初始化
|
||
protected override void OnInit(EventArgs e)
|
||
{
|
||
Common.PageHelper.CreateHeaderStyle(Page);
|
||
_PERSONNELPROINST = Running.Business.PERSONNELPROINST.CreateInstance(Page);
|
||
base.ButtonVisible = true;
|
||
base.OnInit(e);
|
||
}
|
||
|
||
#endregion
|
||
|
||
#region 方法 -> 载入数据
|
||
public override bool LoadData()
|
||
{
|
||
Running.Business.EMPLOY _EMPLOY = new Running.Business.EMPLOY(_PERSONNELPROINST);
|
||
_EMPLOY.AddSearchParameter("PERSONNELPROINST_ID", _PERSONNELPROINST.PERSONNELPROINST_ID);
|
||
if (_EMPLOY.Search())
|
||
{
|
||
CurrObject.EMPLOY_ID_Encrypt = _EMPLOY.EMPLOY_ID_Encrypt;
|
||
bool isresult= this.Select();
|
||
PERSONNELPROINST_ID.Text = CurrObject.PERSONNELPROINST_ID.ToString();
|
||
return isresult;
|
||
}
|
||
else
|
||
{
|
||
PERSONNELPROINST_ID.Text = _PERSONNELPROINST.PERSONNELPROINST_ID.ToString();
|
||
}
|
||
//默认返回值,工作流组件返回True,功能模块返回False。
|
||
return (WorkFlowPage != null);
|
||
}
|
||
#endregion
|
||
|
||
#region 方法 -> 保存方法执行前执行
|
||
//OnDataAction_XXXXX 有一个系列可用,在此加入界面的逻辑处理
|
||
//e.CancelDataAction 来处理是否取消该动作;
|
||
//失败的原因可以用Page.Alert()传递到页面
|
||
public override void OnDataAction_BeforeSave(DataActionEventArgs<Running.Business.EMPLOY> e)
|
||
{
|
||
CurrObject.CREATE_DATE = DateTime.Now;
|
||
CurrObject.PERSONNELPROINST_ID = Convert.ToInt32(PERSONNELPROINST_ID.Text);
|
||
base.OnDataAction_BeforeSave(e);
|
||
}
|
||
#endregion
|
||
}
|
||
} |