75 lines
2.9 KiB
C#
75 lines
2.9 KiB
C#
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.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 Business = SuperMap.RealEstate.Personnel.Storage.Business;
|
||
|
||
namespace SuperMap.RealEstate.Personnel.Modules.SalaryTemplate
|
||
{
|
||
public partial class Salary : UserControl<Business.POSTSALARY>
|
||
{
|
||
protected void Page_Load(object sender, EventArgs e)
|
||
{
|
||
if (IsPostBack) return;
|
||
//if (!string.IsNullOrEmpty(Request["ID"]))
|
||
//{
|
||
// POSITION_ID.SelectedValue = Request["ID"].ToDecrypt();
|
||
// Business.AUTOTYPESALARY _AUTOTYPESALARY = new Business.AUTOTYPESALARY();
|
||
// _AUTOTYPESALARY.AddSearchParameter("POSITION_ID", Request["ID"].ToDecrypt());
|
||
// if (_AUTOTYPESALARY.Search())
|
||
// {
|
||
|
||
// }
|
||
//}
|
||
}
|
||
|
||
//在此加入界面的数据初始化(Page_Load之前),如DropDownList的数据源绑定等
|
||
public override void InitializeWebControl()
|
||
{
|
||
STAFF_RANK.Clear();
|
||
DictionaryHelper.BindingDropDownList("RANK", STAFF_RANK.Items, Transaction);
|
||
GRADE.Clear();
|
||
DictionaryHelper.BindingDropDownList("GRADE", GRADE.Items, Transaction);
|
||
}
|
||
|
||
//载入数据
|
||
public override bool LoadData()
|
||
{
|
||
//如果是工作流组件请自行修改载入的逻辑,以下是功能模块的默认代码
|
||
if (!String.IsNullOrEmpty(Request["ID"]))
|
||
{
|
||
CurrObject.POSTSALARY_ID_Encrypt = Request["ID"];
|
||
return this.Select();
|
||
}
|
||
//默认返回值,工作流组件返回True,功能模块返回False。
|
||
return (WorkFlowPage != null);
|
||
}
|
||
|
||
public override void OnDataAction_BeforeSave(DataActionEventArgs<Business.POSTSALARY> e)
|
||
{
|
||
if (String.IsNullOrEmpty(Request["ID"]))
|
||
{
|
||
Business.POSTSALARY _POSTSALARY = new Business.POSTSALARY(Transaction);
|
||
_POSTSALARY.AddSearchParameter("STAFF_RANK", STAFF_RANK.SelectedValue);
|
||
_POSTSALARY.AddSearchParameter("GRADE", GRADE.SelectedValue);
|
||
if (_POSTSALARY.Search())
|
||
{
|
||
throw new Exception("职级:" + STAFF_RANK.SelectedItem.Text + "档级:" + GRADE.SelectedItem.Text + "的薪资模板已创建!");
|
||
}
|
||
}
|
||
e.CurrObject.OPERATE_DATE = DateTime.Now;
|
||
e.CurrObject.OPERATE_USER = Page.PassportInfo.Name;
|
||
e.CurrObject.OPERATE_USERID = Page.PassportInfo.ID;
|
||
base.OnDataAction_BeforeSave(e);
|
||
}
|
||
}
|
||
} |