123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876 |
- <?xml version="1.0" encoding="utf-8"?>
- <Forms>
- <Form Name="FrmEmployee">
- <Client>
- <Events>
- <Load>
- <![CDATA[
- @Title="员工档案";
- @HaveSearchEmployeeList=false;
- GetSchema();
- ChangeMode("Search");
- Search("SearchIsMarried");
- Search("SearchStatus");
- Search("SearchNation");
- Search("SearchHomeplace");
- Search("SearchDepartment");
- Search("SearchDuty");
- Search("SearchPayLevel");
- Search("SearchInsurance");
- ]]></Load>
- <Closing>
- ;
- </Closing>
- <Closed>
- ;
- </Closed>
- </Events>
- <Mode>
- <Search>
- <Lable name="Search"/>
- </Search>
- <New>
- <Lable name="New"/>
- </New>
- <View>
- <Lable name="View"/>
- </View>
- <Modify>
- <Lable name="Modify"/>
- </Modify>
- </Mode>
- <Controls>
- <IKTextButton name="tbNo" DataSource="Employee.No_Employee">
- <Events>
- <Enter>
- <![CDATA[
- if(tbNo.ReadOnly == false)
- {
- if(tbNo.CValue != StringEmpty())
- {
- UpdateForm(false, "");
- if(Search("SearchEmployeeWithNo", tbNo.CValue))
- {
- ChangeMode("View");
- }
- else
- {
- if(GetRight(@Title,"新增"))
- ChangeMode("New");
- else
- MessageBox("您没有新增员工档案的权限!",@Title);
- }
- }
- else
- {
- MessageBox("请输入员工编号!",@Title);
- }
- }
- ]]>
- </Enter>
- <Click>
- @Temp = ShowSearchBox("EmployeeSearch","INFOMATION",tbNo.CValue);
- if(@Temp != StringEmpty())
- {
- tbNo.CValue = @Temp;
- UpdateForm(false, "");
- if(Search("SearchEmployeeWithNo", tbNo.CValue))
- {
- ChangeMode("View");
- }
- }
- </Click>
- </Events>
- </IKTextButton>
- <IKTextBox name="txtEmployeeNo" DataSource="Employee.EmployeeNo_Employee">
- <Events>
- <Leave><![CDATA[
- if(!txtEmployeeNo.ReadOnly && Search("SearchEmployeeNo", txtEmployeeNo.CValue,tbNo.CValue))
- {
- MessageBox("该员工工号已被使用,请重新输入!",@Title);
- txtEmployeeNo.Focus();
- }
- ]]></Leave>
- </Events>
- </IKTextBox>
- <IKTextBox name="txtName" DataSource="Employee.Name_Employee"/>
- <IKTextBox name="txtEnglishName" DataSource="Employee.NameEng_Employee"/>
- <IKTextBox name="txtIDCard" DataSource="Employee.IDNo_Employee"/>
-
- <IKTextBox name="txtMender" DataSource="Employee.LastModUser_EmployeeName"></IKTextBox>
- <IKDateTimeText name="dttMendeDate" DataSource="Employee.LastModDate_Employee"></IKDateTimeText>
-
- <IKRadioButton name="rbSex0" DataSource="Employee.Gender_Employee">
- <Events>
- <CheckedChanged>
- if(!rbSex0.Checked)
- rbSex1.Checked = true;
- </CheckedChanged>
- </Events>
- </IKRadioButton>
- <IKCountryCombo name="cbCountry" DataSource="Employee.Country_Employee"/>
- <IKTextBox name="txtPassport" DataSource="Employee.Passport_Employee"/>
- <IKComboBoxEx name="cbHomeplace" DisplaySource="Employee.Homeplace_Employee" DataSource="Homeplace" DisplayMember="Result">
- <Events>
- <Reload>
- UpdateForm(false, "cbHomeplace");
- Search("SearchHomeplace");
- UpdateForm(true, "cbHomeplace");
- </Reload>
- </Events>
- </IKComboBoxEx>
- <IKComboBoxEx name="cbNation" DisplaySource="Employee.Nation_Employee" DataSource="Nation" DisplayMember="Result">
- <Events>
- <Reload>
- UpdateForm(false, "cbNation");
- Search("SearchNation");
- UpdateForm(true, "cbNation");
- </Reload>
- </Events>
- </IKComboBoxEx>
- <IKComboBoxEx name="cbMarriage" ValueSource="Employee.IsMarried_Employee" DisplaySource="Employee.Married_Employee" DataSource="IsMarried" ValueMember="Id" DisplayMember="Result">
- <Events>
- <Reload>
- UpdateForm(false, "cbMarriage");
- Search("SearchIsMarried");
- UpdateForm(true, "cbMarriage");
- </Reload>
- </Events>
- </IKComboBoxEx>
- <IKTextBox name="txtTel" DataSource="Employee.Tel_Employee"/>
- <IKTextBox name="txtAddr" DataSource="Employee.Address_Employee"/>
- <IKTextBox name="txtEMail" DataSource="Employee.EMail_Employee"/>
- <IKTextBox name="txtComment" DataSource="Employee.Comment_Employee"/>
- <IKDateTimeText name="dttCreateDate" DataSource="Employee.CreateDate_Employee"/>
- <IKTextBox name="txtCreator" DataSource="Employee.CreatorName_Employee"/>
- <IKDateTimePause name="dtpIsSuspend" DataSource="Employee.SuspendDate_Employee"/>
- <IKComboBoxEx name="cbDept" ValueSource="Employee.ID_Department" DisplaySource="Employee.Name_Department" NoSource="Employee.No_Department"
- DataSource="Department" ValueMember="ID_Department" DisplayMember="Result" NoMember="No_Department">
- <Events>
- <Reload>
- UpdateForm(false, "cbDept");
- Search("SearchDepartment");
- UpdateForm(true, "cbDept");
- </Reload>
- </Events>
- </IKComboBoxEx>
- <IKTextBox name="txtCardNo" DataSource="Employee.CardNo_Employee"/>
- <IKComboBoxEx name="cbDuty" DisplaySource="Employee.Duty_Employee" DataSource="Duty" DisplayMember="Result">
- <Events>
- <Reload>
- UpdateForm(false, "cbDuty");
- Search("SearchDuty");
- UpdateForm(true, "cbDuty");
- </Reload>
- </Events>
- </IKComboBoxEx>
- <IKNumericTextBox name="txtProbation" DataSource="Employee.Probation_Employee"/>
- <IKDateTimePicker name="txtStartDate" DataSource="Employee.OnJobDate_Employee"/>
- <IKDateTimePicker name="txtDate" DataSource="Employee.OnDuty_Employee"/>
- <IKComboBoxEx name="cbStatus" ValueSource="Employee.ObJobStatus_Employee" DisplaySource="Employee.ObJobStatus" DataSource="Status" ValueMember="StatusId" DisplayMember="Result">
- <Events>
- <Reload>
- UpdateForm(false, "cbStatus");
- Search("SearchStatus");
- UpdateForm(true, "cbStatus");
- </Reload>
- <SelectedIndexChanged><![CDATA[
- if((cbStatus.Text=="离职" || cbStatus.Text=="停薪留职") && (@Status == 1 || @Status == 3))
- {
- dttPauseDate.Enabled = true;
- }
- else
- {
- dttPauseDate.Enabled = false;
- }
- ]]></SelectedIndexChanged>
- </Events>
- </IKComboBoxEx>
- <IKDateTimePicker name="dttPauseDate" DataSource="Employee.OffDuty_Employee"/>
- <IKDataGridEx name="dgEmployee" DataSource="EmployeeList" TableStyleIndex="0">
- <DataColumn Index="0" DataSource="EmployeeList.No_Employee" />
- <DataColumn Index="1" DataSource="EmployeeList.Name_Employee" />
- <Events>
- <RowHeaderDoubleClick>
- if(Search("SearchEmployeeWithNo",#EmployeeList.No_Employee))
- {
- ChangeMode("View");
- }
- </RowHeaderDoubleClick>
- </Events>
- </IKDataGridEx>
- <IKCheckBox name="ckDisplay" DataSource="Employee.IsDisplay">
- <Events>
- <CheckedChanged>
- if(ckDisplay.Checked)
- Search("SearchAllEmployeeList");
- else
- Search("SearchEmployeeList");
- </CheckedChanged>
- </Events>
- </IKCheckBox>
- <ikTextBox name="ikTextBox1" DataSource="Employee.DutySubsidy_Employee"/>
- <IKComboBoxEx name="ikComboBoxEx1" DisplaySource="Employee.PayLevel_Employee" DataSource="PayLevel" DisplayMember="PayLevel_Employee">
- <Events>
- <Reload>
- UpdateForm(false, "ikComboBoxEx1");
- Search("SearchPayLevel");
- UpdateForm(true, "ikComboBoxEx1");
- </Reload>
- </Events>
- </IKComboBoxEx>
- <IKComboBoxEx name="ikComboBoxEx2" DisplaySource="Employee.Insurance_Employee" DataSource="Insurance" DisplayMember="Insurance_Employee">
- <Events>
- <Reload>
- UpdateForm(false, "ikComboBoxEx2");
- Search("SearchInsurance");
- UpdateForm(true, "ikComboBoxEx2");
- </Reload>
- </Events>
- </IKComboBoxEx>
- <IKFormToolBar name="toolBar">
- <Events>
- <ClickFirst>
- if(Search("SearchEmployeeFirst", tbNo.CValue))
- {
- ChangeMode("View");
- }
- </ClickFirst>
- <ClickPrev>
- if(Search("SearchEmployeePrevious", tbNo.CValue))
- {
- ChangeMode("View");
- }
- </ClickPrev>
- <ClickNext>
- if(Search("SearchEmployeeNext", tbNo.CValue))
- {
- ChangeMode("View");
- }
- </ClickNext>
- <ClickLast>
- if(Search("SearchEmployeeLast", tbNo.CValue))
- {
- ChangeMode("View");
- }
- </ClickLast>
- <ClickNew>
- ;
- </ClickNew>
- <ClickEmpty>
- ChangeMode("Search");
- </ClickEmpty>
- <ClickSubmit>
- <Lable name="SubmitButtonClick"/>
- </ClickSubmit>
- <ClickModify>
- ChangeMode("Modify");
- <![CDATA[
- if((cbStatus.Text=="离职" || cbStatus.Text=="停薪留职") && (@Status == 1 || @Status == 3))
- {
- dttPauseDate.Enabled = true;
- }
- else
- {
- dttPauseDate.Enabled = false;
- }
- ]]></ClickModify>
- <ClickDelete>
- Delete(); ChangeMode("Search");
- </ClickDelete>
- <ClickPrint>
- #Employee.CountryName = cbCountry.Text;
- PrintReport();
- </ClickPrint>
- <ClickAudit>
- ;
- </ClickAudit>
- <ClickUnAudit>
- ;
- </ClickUnAudit>
- <ClickImport>
- ;
- </ClickImport>
- <ClickExport>
- ;
- </ClickExport>
- <ClickClose>
- ;
- </ClickClose>
- <ClickExpand>
- if(toolBar.ExpandForm==true)
- {
- pnRight.Visible=true;<!--PanelRight is not existed-->
- if(!@HaveSearchEmployeeList)
- {
- Search("SearchEmployeeList");
- @HaveSearchEmployeeList=true;
- }
- }
- else
- {
- pnRight.Visible=false;
- }
- </ClickExpand>
- </Events>
- </IKFormToolBar>
- </Controls>
- <LockInfomation LockID="ID_Employee" LockNO="No_Employee" LockSearchFunction="SearchEmployeeWithNo"/>
- <ChildForms>
- <ChildForm name="EmployeeSearch" DataSource="Employee" SearchFunction="SearchAllEmployee" SearchFunctionByNo="SearchEmployeeWithNo" MappingName="员工">
- <DataColumn Index="0" MappingName="#Employee.No_Employee" HeaderText="员工编号" Width="90" ColumnType="IKDataGridTextBoxColumn"/>
- <DataColumn Index="1" MappingName="#Employee.Name_Employee" HeaderText="员工名称" Width="90" ColumnType="IKDataGridTextBoxColumn"/>
- </ChildForm>
- </ChildForms>
- </Client>
- <Server>
- <Tables>
- <Table name="Employee" Type="Parent">
- <GetSchema CmdType="Text" CmdText=" SELECT TOP 0 Employee.*,convert(nvarchar(64),'') as Married_Employee,convert(nvarchar(64),'') as ObJobStatus, a.Name_User AS CreatorName_Employee,b.Name_User as LastModUser_EmployeeName, Department.Name_Department,Department.No_Department, convert(nvarchar(64),'') as CountryName,Convert(bit,1) As IsDisplay
- FROM Employee
- LEFT JOIN AppUser a ON a.ID_User = Employee.ID_Creator
- LEFT JOIN AppUser b ON b.ID_User = Employee.LastModUser_Employee
- LEFT JOIN Department ON Department.ID_Department= Employee.ID_Department"/>
- <New CmdType="Text" CmdText="INSERT INTO Employee (ID_Employee, No_Employee, Name_Employee, EmployeeNo_Employee, NameEng_Employee, Gender_Employee, Country_Employee, Homeplace_Employee, Nation_Employee, IDNo_Employee, Passport_Employee, IsMarried_Employee, ID_Creator, CreateDate_Employee, ID_Department, Duty_Employee, Probation_Employee, OnJobDate_Employee, OnDuty_Employee, ObJobStatus_Employee, OffDuty_Employee, SuspendDate_Employee, Tel_Employee, EMail_Employee, Address_Employee, Comment_Employee,LastModUser_Employee,LastModDate_Employee,CardNo_Employee,PayLevel_Employee,DutySubsidy_Employee,Insurance_Employee)
- values(@ID_Employee, @No_Employee, @Name_Employee, @EmployeeNo_Employee, @NameEng_Employee, @Gender_Employee, @Country_Employee, @Homeplace_Employee, @Nation_Employee, @IDNo_Employee, @Passport_Employee, @IsMarried_Employee, @ID_Creator, @CreateDate_Employee, @ID_Department, @Duty_Employee, @Probation_Employee, @OnJobDate_Employee, @OnDuty_Employee, @ObJobStatus_Employee, @OffDuty_Employee, @SuspendDate_Employee, @Tel_Employee, @EMail_Employee, @Address_Employee, @Comment_Employee,@LastModUser_Employee,@LastModDate_Employee,@CardNo_Employee,@PayLevel_Employee,@DutySubsidy_Employee,@Insurance_Employee)">
- <Params>
- <Param name="@ID_Employee" type="Employee.ID_Employee" sourceColumn="ID_Employee"/>
- <Param name="@No_Employee" type="Employee.No_Employee" sourceColumn="No_Employee"/>
- <Param name="@Name_Employee" type="Employee.Name_Employee" sourceColumn="Name_Employee"/>
- <Param name="@EmployeeNo_Employee" type="Employee.EmployeeNo_Employee" sourceColumn="EmployeeNo_Employee"/>
- <Param name="@NameEng_Employee" type="Employee.NameEng_Employee" sourceColumn="NameEng_Employee"/>
- <Param name="@Gender_Employee" type="Employee.Gender_Employee" sourceColumn="Gender_Employee"/>
- <Param name="@Country_Employee" type="Employee.Country_Employee" sourceColumn="Country_Employee"/>
- <Param name="@Homeplace_Employee" type="Employee.Homeplace_Employee" sourceColumn="Homeplace_Employee"/>
- <Param name="@Nation_Employee" type="Employee.Nation_Employee" sourceColumn="Nation_Employee"/>
- <Param name="@IDNo_Employee" type="Employee.IDNo_Employee" sourceColumn="IDNo_Employee"/>
- <Param name="@Passport_Employee" type="Employee.Passport_Employee" sourceColumn="Passport_Employee"/>
- <Param name="@IsMarried_Employee" type="Employee.IsMarried_Employee" sourceColumn="IsMarried_Employee"/>
- <Param name="@CreateDate_Employee" type="Employee.CreateDate_Employee" sourceColumn="CreateDate_Employee"/>
- <Param name="@ID_Creator" type="Employee.ID_Creator" sourceColumn="ID_Creator"/>
- <Param name="@ID_Department" type="Employee.ID_Department" sourceColumn="ID_Department"/>
- <Param name="@Duty_Employee" type="Employee.Duty_Employee" sourceColumn="Duty_Employee"/>
- <Param name="@Probation_Employee" type="Employee.Probation_Employee" sourceColumn="Probation_Employee"/>
- <Param name="@OnJobDate_Employee" type="Employee.OnJobDate_Employee" sourceColumn="OnJobDate_Employee"/>
- <Param name="@OnDuty_Employee" type="Employee.OnDuty_Employee" sourceColumn="OnDuty_Employee"/>
- <Param name="@ObJobStatus_Employee" type="Employee.ObJobStatus_Employee" sourceColumn="ObJobStatus_Employee"/>
- <Param name="@OffDuty_Employee" type="Employee.OffDuty_Employee" sourceColumn="OffDuty_Employee"/>
- <Param name="@SuspendDate_Employee" type="Employee.SuspendDate_Employee" sourceColumn="SuspendDate_Employee"/>
- <Param name="@Tel_Employee" type="Employee.Tel_Employee" sourceColumn="Tel_Employee"/>
- <Param name="@EMail_Employee" type="Employee.EMail_Employee" sourceColumn="EMail_Employee"/>
- <Param name="@Address_Employee" type="Employee.Address_Employee" sourceColumn="Address_Employee"/>
- <Param name="@Comment_Employee" type="Employee.Comment_Employee" sourceColumn="Comment_Employee"/>
-
- <Param name="@LastModDate_Employee" type="Employee.LastModDate_Employee" sourceColumn="LastModDate_Employee"/>
- <Param name="@LastModUser_Employee" type="Employee.LastModUser_Employee" sourceColumn="LastModUser_Employee"/>
- <Param name="@CardNo_Employee" type="Employee.CardNo_Employee" sourceColumn="CardNo_Employee"/>
- <Param name="@PayLevel_Employee" type="Employee.PayLevel_Employee" sourceColumn="PayLevel_Employee"/>
- <Param name="@DutySubsidy_Employee" type="Employee.DutySubsidy_Employee" sourceColumn="DutySubsidy_Employee"/>
- <Param name="@Insurance_Employee" type="Employee.Insurance_Employee" sourceColumn="Insurance_Employee"/>
- </Params>
- </New>
- <Update CmdType="Text" CmdText="UPDATE Employee SET LastModDate_Employee=@LastModDate_Employee,LastModUser_Employee=@LastModUser_Employee,Name_Employee = @Name_Employee, EmployeeNo_Employee = @EmployeeNo_Employee, NameEng_Employee = @NameEng_Employee, Gender_Employee = @Gender_Employee, Country_Employee = @Country_Employee, Homeplace_Employee = @Homeplace_Employee, Nation_Employee = @Nation_Employee, IDNo_Employee = @IDNo_Employee, Passport_Employee = @Passport_Employee, IsMarried_Employee = @IsMarried_Employee, CreateDate_Employee = @CreateDate_Employee, ID_Creator = @ID_Creator, ID_Department = @ID_Department, Duty_Employee = @Duty_Employee, Probation_Employee = @Probation_Employee, OnJobDate_Employee = @OnJobDate_Employee, OnDuty_Employee = @OnDuty_Employee, ObJobStatus_Employee = @ObJobStatus_Employee, OffDuty_Employee = @OffDuty_Employee, SuspendDate_Employee = @SuspendDate_Employee,Tel_Employee=@Tel_Employee,EMail_Employee=@EMail_Employee,Address_Employee=@Address_Employee, Comment_Employee=@Comment_Employee,CardNo_Employee=@CardNo_Employee,PayLevel_Employee=@PayLevel_Employee,DutySubsidy_Employee=@DutySubsidy_Employee,Insurance_Employee=@Insurance_Employee WHERE ID_Employee = @ID_Employee">
- <Params>
- <Param name="@ID_Employee" type="Employee.ID_Employee" sourceColumn="ID_Employee"/>
- <Param name="@Name_Employee" type="Employee.Name_Employee" sourceColumn="Name_Employee"/>
- <Param name="@EmployeeNo_Employee" type="Employee.EmployeeNo_Employee" sourceColumn="EmployeeNo_Employee"/>
- <Param name="@NameEng_Employee" type="Employee.NameEng_Employee" sourceColumn="NameEng_Employee"/>
- <Param name="@Gender_Employee" type="Employee.Gender_Employee" sourceColumn="Gender_Employee"/>
- <Param name="@Country_Employee" type="Employee.Country_Employee" sourceColumn="Country_Employee"/>
- <Param name="@Homeplace_Employee" type="Employee.Homeplace_Employee" sourceColumn="Homeplace_Employee"/>
- <Param name="@Nation_Employee" type="Employee.Nation_Employee" sourceColumn="Nation_Employee"/>
- <Param name="@IDNo_Employee" type="Employee.IDNo_Employee" sourceColumn="IDNo_Employee"/>
- <Param name="@Passport_Employee" type="Employee.Passport_Employee" sourceColumn="Passport_Employee"/>
- <Param name="@IsMarried_Employee" type="Employee.IsMarried_Employee" sourceColumn="IsMarried_Employee"/>
- <Param name="@CreateDate_Employee" type="Employee.CreateDate_Employee" sourceColumn="CreateDate_Employee"/>
- <Param name="@ID_Creator" type="Employee.ID_Creator" sourceColumn="ID_Creator"/>
- <Param name="@ID_Department" type="Employee.ID_Department" sourceColumn="ID_Department"/>
- <Param name="@Duty_Employee" type="Employee.Duty_Employee" sourceColumn="Duty_Employee"/>
- <Param name="@Probation_Employee" type="Employee.Probation_Employee" sourceColumn="Probation_Employee"/>
- <Param name="@OnJobDate_Employee" type="Employee.OnJobDate_Employee" sourceColumn="OnJobDate_Employee"/>
- <Param name="@OnDuty_Employee" type="Employee.OnDuty_Employee" sourceColumn="OnDuty_Employee"/>
- <Param name="@ObJobStatus_Employee" type="Employee.ObJobStatus_Employee" sourceColumn="ObJobStatus_Employee"/>
- <Param name="@OffDuty_Employee" type="Employee.OffDuty_Employee" sourceColumn="OffDuty_Employee"/>
- <Param name="@SuspendDate_Employee" type="Employee.SuspendDate_Employee" sourceColumn="SuspendDate_Employee"/>
- <Param name="@Tel_Employee" type="Employee.Tel_Employee" sourceColumn="Tel_Employee"/>
- <Param name="@EMail_Employee" type="Employee.EMail_Employee" sourceColumn="EMail_Employee"/>
- <Param name="@Address_Employee" type="Employee.Address_Employee" sourceColumn="Address_Employee"/>
- <Param name="@Comment_Employee" type="Employee.Comment_Employee" sourceColumn="Comment_Employee"/>
-
- <Param name="@LastModDate_Employee" type="Employee.LastModDate_Employee" sourceColumn="LastModDate_Employee"/>
- <Param name="@LastModUser_Employee" type="Employee.LastModUser_Employee" sourceColumn="LastModUser_Employee"/>
- <Param name="@CardNo_Employee" type="Employee.CardNo_Employee" sourceColumn="CardNo_Employee"/>
- <Param name="@PayLevel_Employee" type="Employee.PayLevel_Employee" sourceColumn="PayLevel_Employee"/>
- <Param name="@DutySubsidy_Employee" type="Employee.DutySubsidy_Employee" sourceColumn="DutySubsidy_Employee"/>
- <Param name="@Insurance_Employee" type="Employee.Insurance_Employee" sourceColumn="Insurance_Employee"/>
- </Params>
- </Update>
- <Delete CmdType="Text" CmdText="DELETE Employee WHERE Employee.ID_Employee = @ID_Employee">
- <Params>
- <Param name="@ID_Employee" type="Employee.ID_Employee" sourceColumn="ID_Employee"/>
- </Params>
- </Delete>
- <FKErrorReport ErrorMessage="该员工已被引用,删除失败!"/>
- <UNIQUEErrorReport ErrorMessage="该员工编号已存在,提交失败!"/>
- </Table>
- <Table name="EmployeeList" Type="Other">
- <GetSchema CmdType="Text" CmdText=" SELECT Top 0 No_Employee,Name_Employee From Employee"/>
- </Table>
- </Tables>
- <Search>
- <SearchAllEmployee CmdType="Text" CmdText="SELECT Employee.No_Employee,Employee.Name_Employee FROM Employee ">
- <Tables>
- <Table name="AllEmployee" />
- </Tables>
- </SearchAllEmployee>
- <SearchEmployeeList CmdType="Text" CmdText="SELECT Employee.No_Employee,Employee.Name_Employee FROM Employee Where SuspendDate_Employee Is Null ">
- <Tables>
- <Table name="EmployeeList" />
- </Tables>
- </SearchEmployeeList>
- <SearchAllEmployeeList CmdType="Text" CmdText="SELECT Employee.No_Employee,Employee.Name_Employee FROM Employee ">
- <Tables>
- <Table name="EmployeeList" />
- </Tables>
- </SearchAllEmployeeList>
- <SearchEmployeeWithNo CmdType="Text" CmdText="DECLARE @ID_Mari bit DECLARE @ID_JobStatus int DECLARE @Married_Employee nvarchar(64) DECLARE @ObJobStatus nvarchar(64)
- SELECT @ID_Mari = Employee.IsMarried_Employee from Employee where Employee.No_Employee = @No_Employee
- SELECT @ID_JobStatus = Employee.ObJobStatus_Employee from Employee where Employee.No_Employee = @No_Employee
- SELECT @Married_Employee = case when @ID_Mari = 0 then '未婚' else '已婚'end
- SELECT @ObJobStatus = case when @ID_JobStatus = 0 then '未就职' when @ID_JobStatus=1 then '在职' when @ID_JobStatus=2 then '离职'when @ID_JobStatus=3 then '停薪留职' else 'Invalid'end
- SELECT Employee.*, @Married_Employee as Married_Employee,@ObJobStatus as ObJobStatus, a.Name_User AS CreatorName_Employee,b.Name_User as LastModUser_EmployeeName, Department.Name_Department,No_Department FROM Employee
- LEFT JOIN AppUser a ON a.ID_User = Employee.ID_Creator
- LEFT JOIN AppUser b ON b.ID_User = Employee.LastModUser_Employee
- left join Department on Department.ID_Department = Employee.ID_Department
- where Employee.No_Employee = @No_Employee">
- <Params>
- <Param name="@No_Employee" type="Employee.No_Employee" Index="0"/>
- </Params>
- <Tables>
- <Table name="Employee"/>
- </Tables>
- </SearchEmployeeWithNo>
- <SearchHomeplace CmdType="Text" CmdText="SELECT TypeDef.Name_TypeDef AS Result FROM TypeDef WHERE Type_TypeDef = 19">
- <Tables>
- <Table name="Homeplace"/>
- </Tables>
- </SearchHomeplace>
- <SearchNation CmdType="Text" CmdText="SELECT TypeDef.Name_TypeDef AS Result FROM TypeDef WHERE Type_TypeDef = 20">
- <Tables>
- <Table name="Nation"/>
- </Tables>
- </SearchNation>
- <SearchIsMarried CmdType="Text" CmdText="select convert(bit,1) as CorId,'已婚' as CorS into #IsMarried insert into #IsMarried values(0,'未婚')
- select #IsMarried.CorId as Id,#IsMarried.CorS as Result from #IsMarried
- drop table #IsMarried">
- <Tables>
- <Table name="IsMarried"/>
- </Tables>
- </SearchIsMarried>
- <SearchDepartment CmdType="Text" CmdText="SELECT ID_Department, Name_Department AS Result,No_Department FROM Department order by No_Department">
- <Tables>
- <Table name="Department"/>
- </Tables>
- </SearchDepartment>
- <SearchDuty CmdType="Text" CmdText="SELECT TypeDef.Name_TypeDef AS Result FROM TypeDef WHERE Type_TypeDef = 18">
- <Tables>
- <Table name="Duty"/>
- </Tables>
- </SearchDuty>
- <SearchStatus CmdType="Text" CmdText="select convert(int,3) as FiledId,'停薪留职' as Filed into #Status insert into #Status values(2,'离职') insert into #Status values(1,'在职') insert into #Status values(0,'未就职')
- select #Status.FiledId as StatusId, #Status.Filed as Result from #Status
- drop table #Status">
- <Tables>
- <Table name="Status"/>
- </Tables>
- </SearchStatus>
- <SearchCardNo CmdType="Text" CmdText="
- Select * From Employee Where CardNo_Employee=@CardNo And No_Employee!=@No">
- <Params>
- <Param name="@CardNo" type="Employee.No_Employee" Index="0" />
- <Param name="@No" type="Employee.No_Employee" Index="1" />
- </Params>
- <Tables>
- <Table name="CardNoList" />
- </Tables>
- </SearchCardNo>
- <SearchEmployeeFirst CmdType="Text" CmdText="DECLARE @NextNo nvarchar(64) DECLARE @ID_Mari bit DECLARE @ID_JobStatus int DECLARE @Married_Employee nvarchar(64) DECLARE @ObJobStatus nvarchar(64)
- SET @NextNo = @No_Employee
- SELECT TOP 1 @NextNo = Employee.No_Employee FROM Employee ORDER BY Employee.No_Employee
- SELECT @ID_Mari = Employee.IsMarried_Employee from Employee where Employee.No_Employee = @NextNo
- SELECT @ID_JobStatus = Employee.ObJobStatus_Employee from Employee where Employee.No_Employee = @NextNo
- SELECT @Married_Employee = case when @ID_Mari = 0 then '未婚' else '已婚'end
- SELECT @ObJobStatus = case when @ID_JobStatus = 0 then '未就职' when @ID_JobStatus=1 then '在职' when @ID_JobStatus=2 then '离职'when @ID_JobStatus=3 then '停薪留职' else 'Invalid'end
- SELECT Employee.*, @Married_Employee as Married_Employee,@ObJobStatus as ObJobStatus, a.Name_User AS CreatorName_Employee,b.Name_User as LastModUser_EmployeeName, Department.Name_Department,No_Department FROM Employee
- LEFT JOIN AppUser a ON a.ID_User = Employee.ID_Creator
- LEFT JOIN AppUser b ON b.ID_User = Employee.LastModUser_Employee
- left join Department on Department.ID_Department = Employee.ID_Department
- where Employee.No_Employee = @NextNo">
- <Params>
- <Param name="@No_Employee" type="Employee.No_Employee" Index="0"/>
- </Params>
- <Tables>
- <Table name="Employee"/>
- </Tables>
- </SearchEmployeeFirst>
- <SearchEmployeePrevious CmdType="Text" CmdText="DECLARE @NextNo nvarchar(64) DECLARE @ID_Mari bit DECLARE @ID_JobStatus int DECLARE @Married_Employee nvarchar(64) DECLARE @ObJobStatus nvarchar(64)
- SET @NextNo = @No_Employee
- SELECT TOP 1 @NextNo = Employee.No_Employee FROM Employee WHERE Employee.No_Employee < @No_Employee ORDER BY Employee.No_Employee Desc
- SELECT @ID_Mari = Employee.IsMarried_Employee from Employee where Employee.No_Employee = @NextNo
- SELECT @ID_JobStatus = Employee.ObJobStatus_Employee from Employee where Employee.No_Employee = @NextNo
- SELECT @Married_Employee = case when @ID_Mari = 0 then '未婚' else '已婚'end
- SELECT @ObJobStatus = case when @ID_JobStatus = 0 then '未就职' when @ID_JobStatus=1 then '在职' when @ID_JobStatus=2 then '离职'when @ID_JobStatus=3 then '停薪留职' else 'Invalid'end
- SELECT Employee.*, @Married_Employee as Married_Employee,@ObJobStatus as ObJobStatus, a.Name_User AS CreatorName_Employee,b.Name_User as LastModUser_EmployeeName, Department.Name_Department,No_Department FROM Employee
- LEFT JOIN AppUser a ON a.ID_User = Employee.ID_Creator
- LEFT JOIN AppUser b ON b.ID_User = Employee.LastModUser_Employee
- left join Department on Department.ID_Department = Employee.ID_Department
- where Employee.No_Employee = @NextNo">
- <Params>
- <Param name="@No_Employee" type="Employee.No_Employee" Index="0"/>
- </Params>
- <Tables>
- <Table name="Employee"/>
- </Tables>
- </SearchEmployeePrevious>
- <SearchEmployeeNext CmdType="Text" CmdText="DECLARE @NextNo nvarchar(64) DECLARE @ID_Mari bit DECLARE @ID_JobStatus int DECLARE @Married_Employee nvarchar(64) DECLARE @ObJobStatus nvarchar(64)
- SET @NextNo = @No_Employee
- SELECT TOP 1 @NextNo = Employee.No_Employee FROM Employee WHERE Employee.No_Employee > @No_Employee ORDER BY Employee.No_Employee
- SELECT @ID_Mari = Employee.IsMarried_Employee from Employee where Employee.No_Employee = @NextNo
- SELECT @ID_JobStatus = Employee.ObJobStatus_Employee from Employee where Employee.No_Employee = @NextNo
- SELECT @Married_Employee = case when @ID_Mari = 0 then '未婚' else '已婚'end
- SELECT @ObJobStatus = case when @ID_JobStatus = 0 then '未就职' when @ID_JobStatus=1 then '在职' when @ID_JobStatus=2 then '离职'when @ID_JobStatus=3 then '停薪留职' else 'Invalid'end
- SELECT Employee.*, @Married_Employee as Married_Employee,@ObJobStatus as ObJobStatus, a.Name_User AS CreatorName_Employee,b.Name_User as LastModUser_EmployeeName, Department.Name_Department,No_Department FROM Employee
- LEFT JOIN AppUser a ON a.ID_User = Employee.ID_Creator
- LEFT JOIN AppUser b ON b.ID_User = Employee.LastModUser_Employee
- left join Department on Department.ID_Department = Employee.ID_Department
- where Employee.No_Employee = @NextNo">
- <Params>
- <Param name="@No_Employee" type="Employee.No_Employee" Index="0"/>
- </Params>
- <Tables>
- <Table name="Employee"/>
- </Tables>
- </SearchEmployeeNext>
- <SearchEmployeeLast CmdType="Text" CmdText="DECLARE @NextNo nvarchar(64) DECLARE @ID_Mari bit DECLARE @ID_JobStatus int DECLARE @Married_Employee nvarchar(64) DECLARE @ObJobStatus nvarchar(64)
- SET @NextNo = @No_Employee
- SELECT TOP 1 @NextNo = Employee.No_Employee FROM Employee ORDER BY Employee.No_Employee desc
- SELECT @ID_Mari = Employee.IsMarried_Employee from Employee where Employee.No_Employee = @NextNo
- SELECT @ID_JobStatus = Employee.ObJobStatus_Employee from Employee where Employee.No_Employee = @NextNo
- SELECT @Married_Employee = case when @ID_Mari = 0 then '未婚' else '已婚'end
- SELECT @ObJobStatus = case when @ID_JobStatus = 0 then '未就职' when @ID_JobStatus=1 then '在职' when @ID_JobStatus=2 then '离职'when @ID_JobStatus=3 then '停薪留职' else 'Invalid'end
- SELECT Employee.*, @Married_Employee as Married_Employee,@ObJobStatus as ObJobStatus, a.Name_User AS CreatorName_Employee,b.Name_User as LastModUser_EmployeeName, Department.Name_Department,No_Department FROM Employee
- LEFT JOIN AppUser a ON a.ID_User = Employee.ID_Creator
- LEFT JOIN AppUser b ON b.ID_User = Employee.LastModUser_Employee
- left join Department on Department.ID_Department = Employee.ID_Department
- where Employee.No_Employee = @NextNo">
- <Params>
- <Param name="@No_Employee" type="Employee.No_Employee" Index="0"/>
- </Params>
- <Tables>
- <Table name="Employee"/>
- </Tables>
- </SearchEmployeeLast>
- <SearchEmployeeNo CmdType="Text" CmdText="Select * from Employee where EmployeeNo_Employee = @EmployeeNo_Employee and No_Employee != @No_Employee">
- <Params>
- <Param name="@EmployeeNo_Employee" type="Employee.EmployeeNo_Employee" Index="0"/>
- <Param name="@No_Employee" type="Employee.No_Employee" Index="1"/>
- </Params>
- <Tables>
- <Table name="EmployeeNo"/>
- </Tables>
- </SearchEmployeeNo>
- <SearchEmployeeIDCard CmdType="Text" CmdText="Select * from Employee where IDNo_Employee = @IDNo_Employee and No_Employee != @No_Employee">
- <Params>
- <Param name="@IDNo_Employee" type="Employee.IDNo_Employee" Index="0"/>
- <Param name="@No_Employee" type="Employee.No_Employee" Index="1"/>
- </Params>
- <Tables>
- <Table name="EmployeeIDNo"/>
- </Tables>
- </SearchEmployeeIDCard>
- <SearchPayLevel CmdType="Text" CmdText="select Type_PayBase As PayLevel_Employee from PayBase">
- <Tables>
- <Table name="PayLevel"/>
- </Tables>
- </SearchPayLevel>
- <SearchInsurance CmdType="Text" CmdText="Select '未缴' As Insurance_Employee
- Union All Select '三金' As Insurance_Employee
- Union All Select '四金' As Insurance_Employee
- Union All Select '公积金' As Insurance_Employee
- Union All Select '综合保险' As Insurance_Employee">
- <Tables>
- <Table name="Insurance"/>
- </Tables>
- </SearchInsurance>
- </Search>
- </Server>
- <Lables>
- <Search>
- Empty();
- NewInstance();
- tbNo.ReadOnly=false;
- txtEmployeeNo.ReadOnly=true;
- txtName.ReadOnly=true;
- txtEnglishName.ReadOnly=true;
- txtIDCard.ReadOnly=true;
- rbSex0.Enabled=false;
- rbSex1.Enabled=false;
- cbDept.Enabled=false;
- cbDuty.Enabled=false;
- txtProbation.ReadOnly=true;
- txtDate.Enabled=false;
- txtStartDate.Enabled=false;
- cbStatus.Enabled=false;
- cbCountry.Enabled=false;
- txtPassport.ReadOnly=true;
- cbHomeplace.Enabled=false;
- cbNation.Enabled=false;
- cbMarriage.Enabled=false;
- txtTel.ReadOnly=true;
- txtAddr.ReadOnly=true;
- txtEMail.ReadOnly=true;
- txtComment.ReadOnly=true;
- dttPauseDate.Enabled=false;
- dtpIsSuspend.Enabled=false;
- txtCardNo.ReadOnly=true;
- ikTextBox1.ReadOnly=true;
- ikComboBoxEx1.Enabled=false;
- ikComboBoxEx2.Enabled=false;
- toolBar.EnableSubmit=false;
- toolBar.EnableModify=false;
- toolBar.EnableDelete=false;
- toolBar.EnablePrint=false;
- rbSex0.Checked = false;
- rbSex1.Checked = false;
- #Employee.CreateDate_Employee=DBNull();
- #Employee.LastModDate_Employee=DBNull();
- #Employee.LastModUser_Employee=DBNull();
- #Employee.ID_Department=GuidEmpty();
- if(ckDisplay.Checked)
- #Employee.IsDisplay=1;
- else
- #Employee.IsDisplay=0;
- UpdateForm(true, "");
- tbNo.Focus();
- @Status=0;
- </Search>
- <New>
- tbNo.ReadOnly=true;
- txtEmployeeNo.ReadOnly=false;
- txtName.ReadOnly=false;
- txtEnglishName.ReadOnly=false;
- txtIDCard.ReadOnly=false;
- rbSex0.Enabled=true;
- rbSex1.Enabled=true;
- cbDept.Enabled=true;
- cbDuty.Enabled=true;
- txtProbation.ReadOnly=false;
- txtDate.Enabled=true;
- txtStartDate.Enabled=true;
- cbStatus.Enabled=true;
- cbCountry.Enabled=true;
- txtPassport.ReadOnly=false;
- cbHomeplace.Enabled=true;
- cbNation.Enabled=true;
- cbMarriage.Enabled=true;
- txtTel.ReadOnly=false;
- txtAddr.ReadOnly=false;
- txtEMail.ReadOnly=false;
- rbSex0.Checked = true;
- dtpIsSuspend.Enabled=true;
- txtComment.ReadOnly=false;
- txtCardNo.ReadOnly=false;
- ikTextBox1.ReadOnly=false;
- ikComboBoxEx1.Enabled=true;
- ikComboBoxEx2.Enabled=true;
- toolBar.EnableSubmit=GetRight(@Title,"新增");
- toolBar.EnableModify=false;
- toolBar.EnableDelete=false;
- toolBar.EnablePrint=false;
- #Employee.Country_Employee=40;
- #Employee.Gender_Employee=true;
- #Employee.ID_Employee=NewGuid();
- #Employee.CreateDate_Employee=DateTimeNow();
- #Employee.ID_Creator=GetLoginUserID();
- #Employee.CreatorName_Employee=GetCurrentUser();
- #Employee.No_Employee=tbNo.CValue;
- #Employee.ID_Department=DBNull();
- #Employee.SuspendDate_Employee=DBNull();
- #Employee.LastModDate_Employee=DBNull();
- #Employee.LastModUser_Employee=DBNull();
- if(ckDisplay.Checked)
- #Employee.IsDisplay=1;
- else
- #Employee.IsDisplay=0;
- UpdateForm(true, "");
- txtEmployeeNo.Focus();
- @Status=1;
- </New>
- <View>
- tbNo.ReadOnly=false;
- txtEmployeeNo.ReadOnly=true;
- txtName.ReadOnly=true;
- txtEnglishName.ReadOnly=true;
- txtIDCard.ReadOnly=true;
- rbSex0.Enabled=false;
- rbSex1.Enabled=false;
- cbDept.Enabled=false;
- cbDuty.Enabled=false;
- txtProbation.ReadOnly=true;
- txtDate.Enabled=false;
- txtStartDate.Enabled=false;
- cbStatus.Enabled=false;
- cbCountry.Enabled=false;
- txtPassport.ReadOnly=true;
- cbHomeplace.Enabled=false;
- cbNation.Enabled=false;
- cbMarriage.Enabled=false;
- txtTel.ReadOnly=true;
- txtAddr.ReadOnly=true;
- txtEMail.ReadOnly=true;
- txtComment.ReadOnly=true;
- txtCardNo.ReadOnly=true;
- ikTextBox1.ReadOnly=true;
- ikComboBoxEx1.Enabled=false;
- ikComboBoxEx2.Enabled=false;
- dtpIsSuspend.Enabled=false;
- if(!rbSex0.Checked)
- rbSex1.Checked = true;
- toolBar.EnableSubmit=false;
- toolBar.EnableModify=GetRight(@Title,"修改");
- toolBar.EnableDelete=GetRight(@Title,"删除");
- toolBar.EnablePrint=GetRight(@Title,"打印");
- if(ckDisplay.Checked)
- #Employee.IsDisplay=1;
- else
- #Employee.IsDisplay=0;
- UpdateForm(true, "");
- @Status=2;
- </View>
- <Modify>
- tbNo.ReadOnly=true;
- txtEmployeeNo.ReadOnly=false;
- txtName.ReadOnly=false;
- txtEnglishName.ReadOnly=false;
- txtIDCard.ReadOnly=false;
- rbSex0.Enabled=true;
- rbSex1.Enabled=true;
- cbDept.Enabled=true;
- cbDuty.Enabled=true;
- txtProbation.ReadOnly=false;
- txtDate.Enabled=true;
- txtStartDate.Enabled=true;
- cbStatus.Enabled=true;
- cbCountry.Enabled=true;
- txtPassport.ReadOnly=false;
- cbHomeplace.Enabled=true;
- cbNation.Enabled=true;
- cbMarriage.Enabled=true;
- txtTel.ReadOnly=false;
- txtAddr.ReadOnly=false;
- txtEMail.ReadOnly=false;
- txtComment.ReadOnly=false;
- txtCardNo.ReadOnly=false;
- ikTextBox1.ReadOnly=false;
- ikComboBoxEx1.Enabled=true;
- ikComboBoxEx2.Enabled=true;
- dtpIsSuspend.Enabled=true;
- toolBar.EnableSubmit=GetRight(@Title,"新增");
- toolBar.EnableModify=false;
- toolBar.EnableDelete=GetRight(@Title,"删除");
- toolBar.EnablePrint=false;
- #Employee.LastModDate_Employee=DateTimeNow();
- #Employee.LastModUser_Employee=GetLoginUserID();
- #Employee.LastModUser_EmployeeName=GetCurrentUser();
- if(ckDisplay.Checked)
- #Employee.IsDisplay=1;
- else
- #Employee.IsDisplay=0;
- UpdateForm(true, "");
- txtEmployeeNo.Focus();
- @Status=3;
- </Modify>
- <SubmitButtonClick>
- <![CDATA[
- if(txtEmployeeNo.CValue=="")
- {
- MessageBox("请输入员工工号!",@Title);
- txtEmployeeNo.Focus();
- return;
- }
- else
- {
- if(Search("SearchEmployeeNo", txtEmployeeNo.CValue,tbNo.CValue))
- {
- MessageBox("该员工工号已被使用,请重新输入!",@Title);
- txtEmployeeNo.Focus();
- return;
- }
- }
- if(txtName.CValue=="")
- {
- tcOperMan.SelectedIndex=0;
- MessageBox("请输入员工姓名!",@Title);
- txtName.Focus();
- return;
- }
- if(txtIDCard.CValue!=""&&Search("SearchEmployeeIDCard", txtIDCard.CValue,tbNo.CValue))
- {
- tcOperMan.SelectedIndex=0;
- MessageBox("身份证号已被使用,请重新输入!",@Title);
- txtIDCard.Focus();
- return;
- }
- if(cbCountry.CValue==0)
- {
- tcOperMan.SelectedIndex=0;
- MessageBox("请输入国籍!",@Title);
- cbCountry.Focus();
- return;
- }
- if(cbMarriage.SelectedName=="")
- {
- tcOperMan.SelectedIndex=0;
- MessageBox("请选择婚姻状况!",@Title);
- cbMarriage.Focus();
- return;
- }
- if(!cbDept.CheckSelectedItem())
- {
-
- MessageBox("请选择有效的任职部门!",@Title);
- cbDept.Focus();
- return;
- }
- if(txtCardNo.CValue!="" && Search("SearchCardNo",txtCardNo.CValue,tbNo.CValue))
- {
- tcOperMan.SelectedIndex=1;
- MessageBox("考勤卡号已存在!",@Title);
- txtCardNo.Focus();
- return;
- }
- if(cbStatus.SelectedName=="")
- {
- tcOperMan.SelectedIndex=1;
- MessageBox("请选择任职状况!",@Title);
- cbStatus.Focus();
- return;
- }
- UpdateForm(false, "");
- if(@Status==1)
- {
- New();
- }
- if(@Status == 3)
- {
- #Employee.LastModDate_Employee=DateTimeNow();
- Update();
- }
- ChangeMode("View");
- ]]></SubmitButtonClick>
- </Lables>
- </Form>
- </Forms>
|