using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using System.Data; using SuperMap.RealEstate.Web.UI; using SuperMap.RealEstate.Web.UI.WebControls; using SuperMap.RealEstate.CoreFrameWork; using SuperMap.RealEstate.ServiceModel; using SuperMap.RealEstate.Utility; using SuperMap.RealEstate.Web.Utility; using SuperMap.RealEstate.CoreFrameWork.Dictionary.Business; using Business = SuperMap.RealEstate.Personnel.Storage.Business; namespace SuperMap.RealEstate.Personnel.Modules.Staff { public partial class AddInOut : UserControl { protected void Page_Load(object sender, EventArgs e) { } //在此加入界面的数据初始化(Page_Load之前),如DropDownList的数据源绑定等 public override void InitializeWebControl() { } //载入数据 public override bool LoadData() { STAFF_ID.Text = Request["STAFF_ID"].ToDecrypt(); //如果是工作流组件请自行修改载入的逻辑,以下是功能模块的默认代码 if (!String.IsNullOrEmpty(Request["ID"])) { CurrObject.INOUTRECORD_ID_Encrypt = Request["ID"]; return this.Select(); } //默认返回值,工作流组件返回True,功能模块返回False。 return (WorkFlowPage != null); } protected void BACK_TIME_CallBackSetControl(object sender, ClientSetEventArgs e) { if (!string.IsNullOrEmpty(BACK_TIME.Text) && !string.IsNullOrEmpty(VISIT_TIME.Text)) { DateTime T1 = DateTime.Parse(BACK_TIME.Text); DateTime T2 = DateTime.Parse(VISIT_TIME.Text); TimeSpan span = T1.Subtract(T2); e.SetValue(OUT_DAYS, span.Days.ToString()); } } protected void VISIT_TIME_CallBackSetControl(object sender, ClientSetEventArgs e) { if (!string.IsNullOrEmpty(BACK_TIME.Text) && !string.IsNullOrEmpty(VISIT_TIME.Text)) { DateTime T1 = DateTime.Parse(BACK_TIME.Text); DateTime T2 = DateTime.Parse(VISIT_TIME.Text); TimeSpan span = T1.Subtract(T2); e.SetValue(OUT_DAYS, span.Days.ToString()); } } } }