FrmEmployee.xml 41 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <Forms>
  3. <Form Name="FrmEmployee">
  4. <Client>
  5. <Events>
  6. <Load>
  7. <![CDATA[
  8. @Title="员工档案";
  9. @HaveSearchEmployeeList=false;
  10. GetSchema();
  11. ChangeMode("Search");
  12. Search("SearchIsMarried");
  13. Search("SearchStatus");
  14. Search("SearchNation");
  15. Search("SearchHomeplace");
  16. Search("SearchDepartment");
  17. Search("SearchDuty");
  18. Search("SearchPayLevel");
  19. Search("SearchInsurance");
  20. ]]></Load>
  21. <Closing>
  22. ;
  23. </Closing>
  24. <Closed>
  25. ;
  26. </Closed>
  27. </Events>
  28. <Mode>
  29. <Search>
  30. <Lable name="Search"/>
  31. </Search>
  32. <New>
  33. <Lable name="New"/>
  34. </New>
  35. <View>
  36. <Lable name="View"/>
  37. </View>
  38. <Modify>
  39. <Lable name="Modify"/>
  40. </Modify>
  41. </Mode>
  42. <Controls>
  43. <IKTextButton name="tbNo" DataSource="Employee.No_Employee">
  44. <Events>
  45. <Enter>
  46. <![CDATA[
  47. if(tbNo.ReadOnly == false)
  48. {
  49. if(tbNo.CValue != StringEmpty())
  50. {
  51. UpdateForm(false, "");
  52. if(Search("SearchEmployeeWithNo", tbNo.CValue))
  53. {
  54. ChangeMode("View");
  55. }
  56. else
  57. {
  58. if(GetRight(@Title,"新增"))
  59. ChangeMode("New");
  60. else
  61. MessageBox("您没有新增员工档案的权限!",@Title);
  62. }
  63. }
  64. else
  65. {
  66. MessageBox("请输入员工编号!",@Title);
  67. }
  68. }
  69. ]]>
  70. </Enter>
  71. <Click>
  72. @Temp = ShowSearchBox("EmployeeSearch","INFOMATION",tbNo.CValue);
  73. if(@Temp != StringEmpty())
  74. {
  75. tbNo.CValue = @Temp;
  76. UpdateForm(false, "");
  77. if(Search("SearchEmployeeWithNo", tbNo.CValue))
  78. {
  79. ChangeMode("View");
  80. }
  81. }
  82. </Click>
  83. </Events>
  84. </IKTextButton>
  85. <IKTextBox name="txtEmployeeNo" DataSource="Employee.EmployeeNo_Employee">
  86. <Events>
  87. <Leave><![CDATA[
  88. if(!txtEmployeeNo.ReadOnly && Search("SearchEmployeeNo", txtEmployeeNo.CValue,tbNo.CValue))
  89. {
  90. MessageBox("该员工工号已被使用,请重新输入!",@Title);
  91. txtEmployeeNo.Focus();
  92. }
  93. ]]></Leave>
  94. </Events>
  95. </IKTextBox>
  96. <IKTextBox name="txtName" DataSource="Employee.Name_Employee"/>
  97. <IKTextBox name="txtEnglishName" DataSource="Employee.NameEng_Employee"/>
  98. <IKTextBox name="txtIDCard" DataSource="Employee.IDNo_Employee"/>
  99. <IKTextBox name="txtMender" DataSource="Employee.LastModUser_EmployeeName"></IKTextBox>
  100. <IKDateTimeText name="dttMendeDate" DataSource="Employee.LastModDate_Employee"></IKDateTimeText>
  101. <IKRadioButton name="rbSex0" DataSource="Employee.Gender_Employee">
  102. <Events>
  103. <CheckedChanged>
  104. if(!rbSex0.Checked)
  105. rbSex1.Checked = true;
  106. </CheckedChanged>
  107. </Events>
  108. </IKRadioButton>
  109. <IKCountryCombo name="cbCountry" DataSource="Employee.Country_Employee"/>
  110. <IKTextBox name="txtPassport" DataSource="Employee.Passport_Employee"/>
  111. <IKComboBoxEx name="cbHomeplace" DisplaySource="Employee.Homeplace_Employee" DataSource="Homeplace" DisplayMember="Result">
  112. <Events>
  113. <Reload>
  114. UpdateForm(false, "cbHomeplace");
  115. Search("SearchHomeplace");
  116. UpdateForm(true, "cbHomeplace");
  117. </Reload>
  118. </Events>
  119. </IKComboBoxEx>
  120. <IKComboBoxEx name="cbNation" DisplaySource="Employee.Nation_Employee" DataSource="Nation" DisplayMember="Result">
  121. <Events>
  122. <Reload>
  123. UpdateForm(false, "cbNation");
  124. Search("SearchNation");
  125. UpdateForm(true, "cbNation");
  126. </Reload>
  127. </Events>
  128. </IKComboBoxEx>
  129. <IKComboBoxEx name="cbMarriage" ValueSource="Employee.IsMarried_Employee" DisplaySource="Employee.Married_Employee" DataSource="IsMarried" ValueMember="Id" DisplayMember="Result">
  130. <Events>
  131. <Reload>
  132. UpdateForm(false, "cbMarriage");
  133. Search("SearchIsMarried");
  134. UpdateForm(true, "cbMarriage");
  135. </Reload>
  136. </Events>
  137. </IKComboBoxEx>
  138. <IKTextBox name="txtTel" DataSource="Employee.Tel_Employee"/>
  139. <IKTextBox name="txtAddr" DataSource="Employee.Address_Employee"/>
  140. <IKTextBox name="txtEMail" DataSource="Employee.EMail_Employee"/>
  141. <IKTextBox name="txtComment" DataSource="Employee.Comment_Employee"/>
  142. <IKDateTimeText name="dttCreateDate" DataSource="Employee.CreateDate_Employee"/>
  143. <IKTextBox name="txtCreator" DataSource="Employee.CreatorName_Employee"/>
  144. <IKDateTimePause name="dtpIsSuspend" DataSource="Employee.SuspendDate_Employee"/>
  145. <IKComboBoxEx name="cbDept" ValueSource="Employee.ID_Department" DisplaySource="Employee.Name_Department" NoSource="Employee.No_Department"
  146. DataSource="Department" ValueMember="ID_Department" DisplayMember="Result" NoMember="No_Department">
  147. <Events>
  148. <Reload>
  149. UpdateForm(false, "cbDept");
  150. Search("SearchDepartment");
  151. UpdateForm(true, "cbDept");
  152. </Reload>
  153. </Events>
  154. </IKComboBoxEx>
  155. <IKTextBox name="txtCardNo" DataSource="Employee.CardNo_Employee"/>
  156. <IKComboBoxEx name="cbDuty" DisplaySource="Employee.Duty_Employee" DataSource="Duty" DisplayMember="Result">
  157. <Events>
  158. <Reload>
  159. UpdateForm(false, "cbDuty");
  160. Search("SearchDuty");
  161. UpdateForm(true, "cbDuty");
  162. </Reload>
  163. </Events>
  164. </IKComboBoxEx>
  165. <IKNumericTextBox name="txtProbation" DataSource="Employee.Probation_Employee"/>
  166. <IKDateTimePicker name="txtStartDate" DataSource="Employee.OnJobDate_Employee"/>
  167. <IKDateTimePicker name="txtDate" DataSource="Employee.OnDuty_Employee"/>
  168. <IKComboBoxEx name="cbStatus" ValueSource="Employee.ObJobStatus_Employee" DisplaySource="Employee.ObJobStatus" DataSource="Status" ValueMember="StatusId" DisplayMember="Result">
  169. <Events>
  170. <Reload>
  171. UpdateForm(false, "cbStatus");
  172. Search("SearchStatus");
  173. UpdateForm(true, "cbStatus");
  174. </Reload>
  175. <SelectedIndexChanged><![CDATA[
  176. if((cbStatus.Text=="离职" || cbStatus.Text=="停薪留职") && (@Status == 1 || @Status == 3))
  177. {
  178. dttPauseDate.Enabled = true;
  179. }
  180. else
  181. {
  182. dttPauseDate.Enabled = false;
  183. }
  184. ]]></SelectedIndexChanged>
  185. </Events>
  186. </IKComboBoxEx>
  187. <IKDateTimePicker name="dttPauseDate" DataSource="Employee.OffDuty_Employee"/>
  188. <IKDataGridEx name="dgEmployee" DataSource="EmployeeList" TableStyleIndex="0">
  189. <DataColumn Index="0" DataSource="EmployeeList.No_Employee" />
  190. <DataColumn Index="1" DataSource="EmployeeList.Name_Employee" />
  191. <Events>
  192. <RowHeaderDoubleClick>
  193. if(Search("SearchEmployeeWithNo",#EmployeeList.No_Employee))
  194. {
  195. ChangeMode("View");
  196. }
  197. </RowHeaderDoubleClick>
  198. </Events>
  199. </IKDataGridEx>
  200. <IKCheckBox name="ckDisplay" DataSource="Employee.IsDisplay">
  201. <Events>
  202. <CheckedChanged>
  203. if(ckDisplay.Checked)
  204. Search("SearchAllEmployeeList");
  205. else
  206. Search("SearchEmployeeList");
  207. </CheckedChanged>
  208. </Events>
  209. </IKCheckBox>
  210. <ikTextBox name="ikTextBox1" DataSource="Employee.DutySubsidy_Employee"/>
  211. <IKComboBoxEx name="ikComboBoxEx1" DisplaySource="Employee.PayLevel_Employee" DataSource="PayLevel" DisplayMember="PayLevel_Employee">
  212. <Events>
  213. <Reload>
  214. UpdateForm(false, "ikComboBoxEx1");
  215. Search("SearchPayLevel");
  216. UpdateForm(true, "ikComboBoxEx1");
  217. </Reload>
  218. </Events>
  219. </IKComboBoxEx>
  220. <IKComboBoxEx name="ikComboBoxEx2" DisplaySource="Employee.Insurance_Employee" DataSource="Insurance" DisplayMember="Insurance_Employee">
  221. <Events>
  222. <Reload>
  223. UpdateForm(false, "ikComboBoxEx2");
  224. Search("SearchInsurance");
  225. UpdateForm(true, "ikComboBoxEx2");
  226. </Reload>
  227. </Events>
  228. </IKComboBoxEx>
  229. <IKFormToolBar name="toolBar">
  230. <Events>
  231. <ClickFirst>
  232. if(Search("SearchEmployeeFirst", tbNo.CValue))
  233. {
  234. ChangeMode("View");
  235. }
  236. </ClickFirst>
  237. <ClickPrev>
  238. if(Search("SearchEmployeePrevious", tbNo.CValue))
  239. {
  240. ChangeMode("View");
  241. }
  242. </ClickPrev>
  243. <ClickNext>
  244. if(Search("SearchEmployeeNext", tbNo.CValue))
  245. {
  246. ChangeMode("View");
  247. }
  248. </ClickNext>
  249. <ClickLast>
  250. if(Search("SearchEmployeeLast", tbNo.CValue))
  251. {
  252. ChangeMode("View");
  253. }
  254. </ClickLast>
  255. <ClickNew>
  256. ;
  257. </ClickNew>
  258. <ClickEmpty>
  259. ChangeMode("Search");
  260. </ClickEmpty>
  261. <ClickSubmit>
  262. <Lable name="SubmitButtonClick"/>
  263. </ClickSubmit>
  264. <ClickModify>
  265. ChangeMode("Modify");
  266. <![CDATA[
  267. if((cbStatus.Text=="离职" || cbStatus.Text=="停薪留职") && (@Status == 1 || @Status == 3))
  268. {
  269. dttPauseDate.Enabled = true;
  270. }
  271. else
  272. {
  273. dttPauseDate.Enabled = false;
  274. }
  275. ]]></ClickModify>
  276. <ClickDelete>
  277. Delete(); ChangeMode("Search");
  278. </ClickDelete>
  279. <ClickPrint>
  280. #Employee.CountryName = cbCountry.Text;
  281. PrintReport();
  282. </ClickPrint>
  283. <ClickAudit>
  284. ;
  285. </ClickAudit>
  286. <ClickUnAudit>
  287. ;
  288. </ClickUnAudit>
  289. <ClickImport>
  290. ;
  291. </ClickImport>
  292. <ClickExport>
  293. ;
  294. </ClickExport>
  295. <ClickClose>
  296. ;
  297. </ClickClose>
  298. <ClickExpand>
  299. if(toolBar.ExpandForm==true)
  300. {
  301. pnRight.Visible=true;<!--PanelRight is not existed-->
  302. if(!@HaveSearchEmployeeList)
  303. {
  304. Search("SearchEmployeeList");
  305. @HaveSearchEmployeeList=true;
  306. }
  307. }
  308. else
  309. {
  310. pnRight.Visible=false;
  311. }
  312. </ClickExpand>
  313. </Events>
  314. </IKFormToolBar>
  315. </Controls>
  316. <LockInfomation LockID="ID_Employee" LockNO="No_Employee" LockSearchFunction="SearchEmployeeWithNo"/>
  317. <ChildForms>
  318. <ChildForm name="EmployeeSearch" DataSource="Employee" SearchFunction="SearchAllEmployee" SearchFunctionByNo="SearchEmployeeWithNo" MappingName="员工">
  319. <DataColumn Index="0" MappingName="#Employee.No_Employee" HeaderText="员工编号" Width="90" ColumnType="IKDataGridTextBoxColumn"/>
  320. <DataColumn Index="1" MappingName="#Employee.Name_Employee" HeaderText="员工名称" Width="90" ColumnType="IKDataGridTextBoxColumn"/>
  321. </ChildForm>
  322. </ChildForms>
  323. </Client>
  324. <Server>
  325. <Tables>
  326. <Table name="Employee" Type="Parent">
  327. <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
  328. FROM Employee
  329. LEFT JOIN AppUser a ON a.ID_User = Employee.ID_Creator
  330. LEFT JOIN AppUser b ON b.ID_User = Employee.LastModUser_Employee
  331. LEFT JOIN Department ON Department.ID_Department= Employee.ID_Department"/>
  332. <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)
  333. 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)">
  334. <Params>
  335. <Param name="@ID_Employee" type="Employee.ID_Employee" sourceColumn="ID_Employee"/>
  336. <Param name="@No_Employee" type="Employee.No_Employee" sourceColumn="No_Employee"/>
  337. <Param name="@Name_Employee" type="Employee.Name_Employee" sourceColumn="Name_Employee"/>
  338. <Param name="@EmployeeNo_Employee" type="Employee.EmployeeNo_Employee" sourceColumn="EmployeeNo_Employee"/>
  339. <Param name="@NameEng_Employee" type="Employee.NameEng_Employee" sourceColumn="NameEng_Employee"/>
  340. <Param name="@Gender_Employee" type="Employee.Gender_Employee" sourceColumn="Gender_Employee"/>
  341. <Param name="@Country_Employee" type="Employee.Country_Employee" sourceColumn="Country_Employee"/>
  342. <Param name="@Homeplace_Employee" type="Employee.Homeplace_Employee" sourceColumn="Homeplace_Employee"/>
  343. <Param name="@Nation_Employee" type="Employee.Nation_Employee" sourceColumn="Nation_Employee"/>
  344. <Param name="@IDNo_Employee" type="Employee.IDNo_Employee" sourceColumn="IDNo_Employee"/>
  345. <Param name="@Passport_Employee" type="Employee.Passport_Employee" sourceColumn="Passport_Employee"/>
  346. <Param name="@IsMarried_Employee" type="Employee.IsMarried_Employee" sourceColumn="IsMarried_Employee"/>
  347. <Param name="@CreateDate_Employee" type="Employee.CreateDate_Employee" sourceColumn="CreateDate_Employee"/>
  348. <Param name="@ID_Creator" type="Employee.ID_Creator" sourceColumn="ID_Creator"/>
  349. <Param name="@ID_Department" type="Employee.ID_Department" sourceColumn="ID_Department"/>
  350. <Param name="@Duty_Employee" type="Employee.Duty_Employee" sourceColumn="Duty_Employee"/>
  351. <Param name="@Probation_Employee" type="Employee.Probation_Employee" sourceColumn="Probation_Employee"/>
  352. <Param name="@OnJobDate_Employee" type="Employee.OnJobDate_Employee" sourceColumn="OnJobDate_Employee"/>
  353. <Param name="@OnDuty_Employee" type="Employee.OnDuty_Employee" sourceColumn="OnDuty_Employee"/>
  354. <Param name="@ObJobStatus_Employee" type="Employee.ObJobStatus_Employee" sourceColumn="ObJobStatus_Employee"/>
  355. <Param name="@OffDuty_Employee" type="Employee.OffDuty_Employee" sourceColumn="OffDuty_Employee"/>
  356. <Param name="@SuspendDate_Employee" type="Employee.SuspendDate_Employee" sourceColumn="SuspendDate_Employee"/>
  357. <Param name="@Tel_Employee" type="Employee.Tel_Employee" sourceColumn="Tel_Employee"/>
  358. <Param name="@EMail_Employee" type="Employee.EMail_Employee" sourceColumn="EMail_Employee"/>
  359. <Param name="@Address_Employee" type="Employee.Address_Employee" sourceColumn="Address_Employee"/>
  360. <Param name="@Comment_Employee" type="Employee.Comment_Employee" sourceColumn="Comment_Employee"/>
  361. <Param name="@LastModDate_Employee" type="Employee.LastModDate_Employee" sourceColumn="LastModDate_Employee"/>
  362. <Param name="@LastModUser_Employee" type="Employee.LastModUser_Employee" sourceColumn="LastModUser_Employee"/>
  363. <Param name="@CardNo_Employee" type="Employee.CardNo_Employee" sourceColumn="CardNo_Employee"/>
  364. <Param name="@PayLevel_Employee" type="Employee.PayLevel_Employee" sourceColumn="PayLevel_Employee"/>
  365. <Param name="@DutySubsidy_Employee" type="Employee.DutySubsidy_Employee" sourceColumn="DutySubsidy_Employee"/>
  366. <Param name="@Insurance_Employee" type="Employee.Insurance_Employee" sourceColumn="Insurance_Employee"/>
  367. </Params>
  368. </New>
  369. <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">
  370. <Params>
  371. <Param name="@ID_Employee" type="Employee.ID_Employee" sourceColumn="ID_Employee"/>
  372. <Param name="@Name_Employee" type="Employee.Name_Employee" sourceColumn="Name_Employee"/>
  373. <Param name="@EmployeeNo_Employee" type="Employee.EmployeeNo_Employee" sourceColumn="EmployeeNo_Employee"/>
  374. <Param name="@NameEng_Employee" type="Employee.NameEng_Employee" sourceColumn="NameEng_Employee"/>
  375. <Param name="@Gender_Employee" type="Employee.Gender_Employee" sourceColumn="Gender_Employee"/>
  376. <Param name="@Country_Employee" type="Employee.Country_Employee" sourceColumn="Country_Employee"/>
  377. <Param name="@Homeplace_Employee" type="Employee.Homeplace_Employee" sourceColumn="Homeplace_Employee"/>
  378. <Param name="@Nation_Employee" type="Employee.Nation_Employee" sourceColumn="Nation_Employee"/>
  379. <Param name="@IDNo_Employee" type="Employee.IDNo_Employee" sourceColumn="IDNo_Employee"/>
  380. <Param name="@Passport_Employee" type="Employee.Passport_Employee" sourceColumn="Passport_Employee"/>
  381. <Param name="@IsMarried_Employee" type="Employee.IsMarried_Employee" sourceColumn="IsMarried_Employee"/>
  382. <Param name="@CreateDate_Employee" type="Employee.CreateDate_Employee" sourceColumn="CreateDate_Employee"/>
  383. <Param name="@ID_Creator" type="Employee.ID_Creator" sourceColumn="ID_Creator"/>
  384. <Param name="@ID_Department" type="Employee.ID_Department" sourceColumn="ID_Department"/>
  385. <Param name="@Duty_Employee" type="Employee.Duty_Employee" sourceColumn="Duty_Employee"/>
  386. <Param name="@Probation_Employee" type="Employee.Probation_Employee" sourceColumn="Probation_Employee"/>
  387. <Param name="@OnJobDate_Employee" type="Employee.OnJobDate_Employee" sourceColumn="OnJobDate_Employee"/>
  388. <Param name="@OnDuty_Employee" type="Employee.OnDuty_Employee" sourceColumn="OnDuty_Employee"/>
  389. <Param name="@ObJobStatus_Employee" type="Employee.ObJobStatus_Employee" sourceColumn="ObJobStatus_Employee"/>
  390. <Param name="@OffDuty_Employee" type="Employee.OffDuty_Employee" sourceColumn="OffDuty_Employee"/>
  391. <Param name="@SuspendDate_Employee" type="Employee.SuspendDate_Employee" sourceColumn="SuspendDate_Employee"/>
  392. <Param name="@Tel_Employee" type="Employee.Tel_Employee" sourceColumn="Tel_Employee"/>
  393. <Param name="@EMail_Employee" type="Employee.EMail_Employee" sourceColumn="EMail_Employee"/>
  394. <Param name="@Address_Employee" type="Employee.Address_Employee" sourceColumn="Address_Employee"/>
  395. <Param name="@Comment_Employee" type="Employee.Comment_Employee" sourceColumn="Comment_Employee"/>
  396. <Param name="@LastModDate_Employee" type="Employee.LastModDate_Employee" sourceColumn="LastModDate_Employee"/>
  397. <Param name="@LastModUser_Employee" type="Employee.LastModUser_Employee" sourceColumn="LastModUser_Employee"/>
  398. <Param name="@CardNo_Employee" type="Employee.CardNo_Employee" sourceColumn="CardNo_Employee"/>
  399. <Param name="@PayLevel_Employee" type="Employee.PayLevel_Employee" sourceColumn="PayLevel_Employee"/>
  400. <Param name="@DutySubsidy_Employee" type="Employee.DutySubsidy_Employee" sourceColumn="DutySubsidy_Employee"/>
  401. <Param name="@Insurance_Employee" type="Employee.Insurance_Employee" sourceColumn="Insurance_Employee"/>
  402. </Params>
  403. </Update>
  404. <Delete CmdType="Text" CmdText="DELETE Employee WHERE Employee.ID_Employee = @ID_Employee">
  405. <Params>
  406. <Param name="@ID_Employee" type="Employee.ID_Employee" sourceColumn="ID_Employee"/>
  407. </Params>
  408. </Delete>
  409. <FKErrorReport ErrorMessage="该员工已被引用,删除失败!"/>
  410. <UNIQUEErrorReport ErrorMessage="该员工编号已存在,提交失败!"/>
  411. </Table>
  412. <Table name="EmployeeList" Type="Other">
  413. <GetSchema CmdType="Text" CmdText=" SELECT Top 0 No_Employee,Name_Employee From Employee"/>
  414. </Table>
  415. </Tables>
  416. <Search>
  417. <SearchAllEmployee CmdType="Text" CmdText="SELECT Employee.No_Employee,Employee.Name_Employee FROM Employee ">
  418. <Tables>
  419. <Table name="AllEmployee" />
  420. </Tables>
  421. </SearchAllEmployee>
  422. <SearchEmployeeList CmdType="Text" CmdText="SELECT Employee.No_Employee,Employee.Name_Employee FROM Employee Where SuspendDate_Employee Is Null ">
  423. <Tables>
  424. <Table name="EmployeeList" />
  425. </Tables>
  426. </SearchEmployeeList>
  427. <SearchAllEmployeeList CmdType="Text" CmdText="SELECT Employee.No_Employee,Employee.Name_Employee FROM Employee ">
  428. <Tables>
  429. <Table name="EmployeeList" />
  430. </Tables>
  431. </SearchAllEmployeeList>
  432. <SearchEmployeeWithNo CmdType="Text" CmdText="DECLARE @ID_Mari bit DECLARE @ID_JobStatus int DECLARE @Married_Employee nvarchar(64) DECLARE @ObJobStatus nvarchar(64)
  433. SELECT @ID_Mari = Employee.IsMarried_Employee from Employee where Employee.No_Employee = @No_Employee
  434. SELECT @ID_JobStatus = Employee.ObJobStatus_Employee from Employee where Employee.No_Employee = @No_Employee
  435. SELECT @Married_Employee = case when @ID_Mari = 0 then '未婚' else '已婚'end
  436. 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
  437. 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
  438. LEFT JOIN AppUser a ON a.ID_User = Employee.ID_Creator
  439. LEFT JOIN AppUser b ON b.ID_User = Employee.LastModUser_Employee
  440. left join Department on Department.ID_Department = Employee.ID_Department
  441. where Employee.No_Employee = @No_Employee">
  442. <Params>
  443. <Param name="@No_Employee" type="Employee.No_Employee" Index="0"/>
  444. </Params>
  445. <Tables>
  446. <Table name="Employee"/>
  447. </Tables>
  448. </SearchEmployeeWithNo>
  449. <SearchHomeplace CmdType="Text" CmdText="SELECT TypeDef.Name_TypeDef AS Result FROM TypeDef WHERE Type_TypeDef = 19">
  450. <Tables>
  451. <Table name="Homeplace"/>
  452. </Tables>
  453. </SearchHomeplace>
  454. <SearchNation CmdType="Text" CmdText="SELECT TypeDef.Name_TypeDef AS Result FROM TypeDef WHERE Type_TypeDef = 20">
  455. <Tables>
  456. <Table name="Nation"/>
  457. </Tables>
  458. </SearchNation>
  459. <SearchIsMarried CmdType="Text" CmdText="select convert(bit,1) as CorId,'已婚' as CorS into #IsMarried insert into #IsMarried values(0,'未婚')
  460. select #IsMarried.CorId as Id,#IsMarried.CorS as Result from #IsMarried
  461. drop table #IsMarried">
  462. <Tables>
  463. <Table name="IsMarried"/>
  464. </Tables>
  465. </SearchIsMarried>
  466. <SearchDepartment CmdType="Text" CmdText="SELECT ID_Department, Name_Department AS Result,No_Department FROM Department order by No_Department">
  467. <Tables>
  468. <Table name="Department"/>
  469. </Tables>
  470. </SearchDepartment>
  471. <SearchDuty CmdType="Text" CmdText="SELECT TypeDef.Name_TypeDef AS Result FROM TypeDef WHERE Type_TypeDef = 18">
  472. <Tables>
  473. <Table name="Duty"/>
  474. </Tables>
  475. </SearchDuty>
  476. <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,'未就职')
  477. select #Status.FiledId as StatusId, #Status.Filed as Result from #Status
  478. drop table #Status">
  479. <Tables>
  480. <Table name="Status"/>
  481. </Tables>
  482. </SearchStatus>
  483. <SearchCardNo CmdType="Text" CmdText="
  484. Select * From Employee Where CardNo_Employee=@CardNo And No_Employee!=@No">
  485. <Params>
  486. <Param name="@CardNo" type="Employee.No_Employee" Index="0" />
  487. <Param name="@No" type="Employee.No_Employee" Index="1" />
  488. </Params>
  489. <Tables>
  490. <Table name="CardNoList" />
  491. </Tables>
  492. </SearchCardNo>
  493. <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)
  494. SET @NextNo = @No_Employee
  495. SELECT TOP 1 @NextNo = Employee.No_Employee FROM Employee ORDER BY Employee.No_Employee
  496. SELECT @ID_Mari = Employee.IsMarried_Employee from Employee where Employee.No_Employee = @NextNo
  497. SELECT @ID_JobStatus = Employee.ObJobStatus_Employee from Employee where Employee.No_Employee = @NextNo
  498. SELECT @Married_Employee = case when @ID_Mari = 0 then '未婚' else '已婚'end
  499. 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
  500. 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
  501. LEFT JOIN AppUser a ON a.ID_User = Employee.ID_Creator
  502. LEFT JOIN AppUser b ON b.ID_User = Employee.LastModUser_Employee
  503. left join Department on Department.ID_Department = Employee.ID_Department
  504. where Employee.No_Employee = @NextNo">
  505. <Params>
  506. <Param name="@No_Employee" type="Employee.No_Employee" Index="0"/>
  507. </Params>
  508. <Tables>
  509. <Table name="Employee"/>
  510. </Tables>
  511. </SearchEmployeeFirst>
  512. <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)
  513. SET @NextNo = @No_Employee
  514. SELECT TOP 1 @NextNo = Employee.No_Employee FROM Employee WHERE Employee.No_Employee &lt; @No_Employee ORDER BY Employee.No_Employee Desc
  515. SELECT @ID_Mari = Employee.IsMarried_Employee from Employee where Employee.No_Employee = @NextNo
  516. SELECT @ID_JobStatus = Employee.ObJobStatus_Employee from Employee where Employee.No_Employee = @NextNo
  517. SELECT @Married_Employee = case when @ID_Mari = 0 then '未婚' else '已婚'end
  518. 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
  519. 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
  520. LEFT JOIN AppUser a ON a.ID_User = Employee.ID_Creator
  521. LEFT JOIN AppUser b ON b.ID_User = Employee.LastModUser_Employee
  522. left join Department on Department.ID_Department = Employee.ID_Department
  523. where Employee.No_Employee = @NextNo">
  524. <Params>
  525. <Param name="@No_Employee" type="Employee.No_Employee" Index="0"/>
  526. </Params>
  527. <Tables>
  528. <Table name="Employee"/>
  529. </Tables>
  530. </SearchEmployeePrevious>
  531. <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)
  532. SET @NextNo = @No_Employee
  533. SELECT TOP 1 @NextNo = Employee.No_Employee FROM Employee WHERE Employee.No_Employee &gt; @No_Employee ORDER BY Employee.No_Employee
  534. SELECT @ID_Mari = Employee.IsMarried_Employee from Employee where Employee.No_Employee = @NextNo
  535. SELECT @ID_JobStatus = Employee.ObJobStatus_Employee from Employee where Employee.No_Employee = @NextNo
  536. SELECT @Married_Employee = case when @ID_Mari = 0 then '未婚' else '已婚'end
  537. 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
  538. 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
  539. LEFT JOIN AppUser a ON a.ID_User = Employee.ID_Creator
  540. LEFT JOIN AppUser b ON b.ID_User = Employee.LastModUser_Employee
  541. left join Department on Department.ID_Department = Employee.ID_Department
  542. where Employee.No_Employee = @NextNo">
  543. <Params>
  544. <Param name="@No_Employee" type="Employee.No_Employee" Index="0"/>
  545. </Params>
  546. <Tables>
  547. <Table name="Employee"/>
  548. </Tables>
  549. </SearchEmployeeNext>
  550. <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)
  551. SET @NextNo = @No_Employee
  552. SELECT TOP 1 @NextNo = Employee.No_Employee FROM Employee ORDER BY Employee.No_Employee desc
  553. SELECT @ID_Mari = Employee.IsMarried_Employee from Employee where Employee.No_Employee = @NextNo
  554. SELECT @ID_JobStatus = Employee.ObJobStatus_Employee from Employee where Employee.No_Employee = @NextNo
  555. SELECT @Married_Employee = case when @ID_Mari = 0 then '未婚' else '已婚'end
  556. 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
  557. 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
  558. LEFT JOIN AppUser a ON a.ID_User = Employee.ID_Creator
  559. LEFT JOIN AppUser b ON b.ID_User = Employee.LastModUser_Employee
  560. left join Department on Department.ID_Department = Employee.ID_Department
  561. where Employee.No_Employee = @NextNo">
  562. <Params>
  563. <Param name="@No_Employee" type="Employee.No_Employee" Index="0"/>
  564. </Params>
  565. <Tables>
  566. <Table name="Employee"/>
  567. </Tables>
  568. </SearchEmployeeLast>
  569. <SearchEmployeeNo CmdType="Text" CmdText="Select * from Employee where EmployeeNo_Employee = @EmployeeNo_Employee and No_Employee != @No_Employee">
  570. <Params>
  571. <Param name="@EmployeeNo_Employee" type="Employee.EmployeeNo_Employee" Index="0"/>
  572. <Param name="@No_Employee" type="Employee.No_Employee" Index="1"/>
  573. </Params>
  574. <Tables>
  575. <Table name="EmployeeNo"/>
  576. </Tables>
  577. </SearchEmployeeNo>
  578. <SearchEmployeeIDCard CmdType="Text" CmdText="Select * from Employee where IDNo_Employee = @IDNo_Employee and No_Employee != @No_Employee">
  579. <Params>
  580. <Param name="@IDNo_Employee" type="Employee.IDNo_Employee" Index="0"/>
  581. <Param name="@No_Employee" type="Employee.No_Employee" Index="1"/>
  582. </Params>
  583. <Tables>
  584. <Table name="EmployeeIDNo"/>
  585. </Tables>
  586. </SearchEmployeeIDCard>
  587. <SearchPayLevel CmdType="Text" CmdText="select Type_PayBase As PayLevel_Employee from PayBase">
  588. <Tables>
  589. <Table name="PayLevel"/>
  590. </Tables>
  591. </SearchPayLevel>
  592. <SearchInsurance CmdType="Text" CmdText="Select '未缴' As Insurance_Employee
  593. Union All Select '三金' As Insurance_Employee
  594. Union All Select '四金' As Insurance_Employee
  595. Union All Select '公积金' As Insurance_Employee
  596. Union All Select '综合保险' As Insurance_Employee">
  597. <Tables>
  598. <Table name="Insurance"/>
  599. </Tables>
  600. </SearchInsurance>
  601. </Search>
  602. </Server>
  603. <Lables>
  604. <Search>
  605. Empty();
  606. NewInstance();
  607. tbNo.ReadOnly=false;
  608. txtEmployeeNo.ReadOnly=true;
  609. txtName.ReadOnly=true;
  610. txtEnglishName.ReadOnly=true;
  611. txtIDCard.ReadOnly=true;
  612. rbSex0.Enabled=false;
  613. rbSex1.Enabled=false;
  614. cbDept.Enabled=false;
  615. cbDuty.Enabled=false;
  616. txtProbation.ReadOnly=true;
  617. txtDate.Enabled=false;
  618. txtStartDate.Enabled=false;
  619. cbStatus.Enabled=false;
  620. cbCountry.Enabled=false;
  621. txtPassport.ReadOnly=true;
  622. cbHomeplace.Enabled=false;
  623. cbNation.Enabled=false;
  624. cbMarriage.Enabled=false;
  625. txtTel.ReadOnly=true;
  626. txtAddr.ReadOnly=true;
  627. txtEMail.ReadOnly=true;
  628. txtComment.ReadOnly=true;
  629. dttPauseDate.Enabled=false;
  630. dtpIsSuspend.Enabled=false;
  631. txtCardNo.ReadOnly=true;
  632. ikTextBox1.ReadOnly=true;
  633. ikComboBoxEx1.Enabled=false;
  634. ikComboBoxEx2.Enabled=false;
  635. toolBar.EnableSubmit=false;
  636. toolBar.EnableModify=false;
  637. toolBar.EnableDelete=false;
  638. toolBar.EnablePrint=false;
  639. rbSex0.Checked = false;
  640. rbSex1.Checked = false;
  641. #Employee.CreateDate_Employee=DBNull();
  642. #Employee.LastModDate_Employee=DBNull();
  643. #Employee.LastModUser_Employee=DBNull();
  644. #Employee.ID_Department=GuidEmpty();
  645. if(ckDisplay.Checked)
  646. #Employee.IsDisplay=1;
  647. else
  648. #Employee.IsDisplay=0;
  649. UpdateForm(true, "");
  650. tbNo.Focus();
  651. @Status=0;
  652. </Search>
  653. <New>
  654. tbNo.ReadOnly=true;
  655. txtEmployeeNo.ReadOnly=false;
  656. txtName.ReadOnly=false;
  657. txtEnglishName.ReadOnly=false;
  658. txtIDCard.ReadOnly=false;
  659. rbSex0.Enabled=true;
  660. rbSex1.Enabled=true;
  661. cbDept.Enabled=true;
  662. cbDuty.Enabled=true;
  663. txtProbation.ReadOnly=false;
  664. txtDate.Enabled=true;
  665. txtStartDate.Enabled=true;
  666. cbStatus.Enabled=true;
  667. cbCountry.Enabled=true;
  668. txtPassport.ReadOnly=false;
  669. cbHomeplace.Enabled=true;
  670. cbNation.Enabled=true;
  671. cbMarriage.Enabled=true;
  672. txtTel.ReadOnly=false;
  673. txtAddr.ReadOnly=false;
  674. txtEMail.ReadOnly=false;
  675. rbSex0.Checked = true;
  676. dtpIsSuspend.Enabled=true;
  677. txtComment.ReadOnly=false;
  678. txtCardNo.ReadOnly=false;
  679. ikTextBox1.ReadOnly=false;
  680. ikComboBoxEx1.Enabled=true;
  681. ikComboBoxEx2.Enabled=true;
  682. toolBar.EnableSubmit=GetRight(@Title,"新增");
  683. toolBar.EnableModify=false;
  684. toolBar.EnableDelete=false;
  685. toolBar.EnablePrint=false;
  686. #Employee.Country_Employee=40;
  687. #Employee.Gender_Employee=true;
  688. #Employee.ID_Employee=NewGuid();
  689. #Employee.CreateDate_Employee=DateTimeNow();
  690. #Employee.ID_Creator=GetLoginUserID();
  691. #Employee.CreatorName_Employee=GetCurrentUser();
  692. #Employee.No_Employee=tbNo.CValue;
  693. #Employee.ID_Department=DBNull();
  694. #Employee.SuspendDate_Employee=DBNull();
  695. #Employee.LastModDate_Employee=DBNull();
  696. #Employee.LastModUser_Employee=DBNull();
  697. if(ckDisplay.Checked)
  698. #Employee.IsDisplay=1;
  699. else
  700. #Employee.IsDisplay=0;
  701. UpdateForm(true, "");
  702. txtEmployeeNo.Focus();
  703. @Status=1;
  704. </New>
  705. <View>
  706. tbNo.ReadOnly=false;
  707. txtEmployeeNo.ReadOnly=true;
  708. txtName.ReadOnly=true;
  709. txtEnglishName.ReadOnly=true;
  710. txtIDCard.ReadOnly=true;
  711. rbSex0.Enabled=false;
  712. rbSex1.Enabled=false;
  713. cbDept.Enabled=false;
  714. cbDuty.Enabled=false;
  715. txtProbation.ReadOnly=true;
  716. txtDate.Enabled=false;
  717. txtStartDate.Enabled=false;
  718. cbStatus.Enabled=false;
  719. cbCountry.Enabled=false;
  720. txtPassport.ReadOnly=true;
  721. cbHomeplace.Enabled=false;
  722. cbNation.Enabled=false;
  723. cbMarriage.Enabled=false;
  724. txtTel.ReadOnly=true;
  725. txtAddr.ReadOnly=true;
  726. txtEMail.ReadOnly=true;
  727. txtComment.ReadOnly=true;
  728. txtCardNo.ReadOnly=true;
  729. ikTextBox1.ReadOnly=true;
  730. ikComboBoxEx1.Enabled=false;
  731. ikComboBoxEx2.Enabled=false;
  732. dtpIsSuspend.Enabled=false;
  733. if(!rbSex0.Checked)
  734. rbSex1.Checked = true;
  735. toolBar.EnableSubmit=false;
  736. toolBar.EnableModify=GetRight(@Title,"修改");
  737. toolBar.EnableDelete=GetRight(@Title,"删除");
  738. toolBar.EnablePrint=GetRight(@Title,"打印");
  739. if(ckDisplay.Checked)
  740. #Employee.IsDisplay=1;
  741. else
  742. #Employee.IsDisplay=0;
  743. UpdateForm(true, "");
  744. @Status=2;
  745. </View>
  746. <Modify>
  747. tbNo.ReadOnly=true;
  748. txtEmployeeNo.ReadOnly=false;
  749. txtName.ReadOnly=false;
  750. txtEnglishName.ReadOnly=false;
  751. txtIDCard.ReadOnly=false;
  752. rbSex0.Enabled=true;
  753. rbSex1.Enabled=true;
  754. cbDept.Enabled=true;
  755. cbDuty.Enabled=true;
  756. txtProbation.ReadOnly=false;
  757. txtDate.Enabled=true;
  758. txtStartDate.Enabled=true;
  759. cbStatus.Enabled=true;
  760. cbCountry.Enabled=true;
  761. txtPassport.ReadOnly=false;
  762. cbHomeplace.Enabled=true;
  763. cbNation.Enabled=true;
  764. cbMarriage.Enabled=true;
  765. txtTel.ReadOnly=false;
  766. txtAddr.ReadOnly=false;
  767. txtEMail.ReadOnly=false;
  768. txtComment.ReadOnly=false;
  769. txtCardNo.ReadOnly=false;
  770. ikTextBox1.ReadOnly=false;
  771. ikComboBoxEx1.Enabled=true;
  772. ikComboBoxEx2.Enabled=true;
  773. dtpIsSuspend.Enabled=true;
  774. toolBar.EnableSubmit=GetRight(@Title,"新增");
  775. toolBar.EnableModify=false;
  776. toolBar.EnableDelete=GetRight(@Title,"删除");
  777. toolBar.EnablePrint=false;
  778. #Employee.LastModDate_Employee=DateTimeNow();
  779. #Employee.LastModUser_Employee=GetLoginUserID();
  780. #Employee.LastModUser_EmployeeName=GetCurrentUser();
  781. if(ckDisplay.Checked)
  782. #Employee.IsDisplay=1;
  783. else
  784. #Employee.IsDisplay=0;
  785. UpdateForm(true, "");
  786. txtEmployeeNo.Focus();
  787. @Status=3;
  788. </Modify>
  789. <SubmitButtonClick>
  790. <![CDATA[
  791. if(txtEmployeeNo.CValue=="")
  792. {
  793. MessageBox("请输入员工工号!",@Title);
  794. txtEmployeeNo.Focus();
  795. return;
  796. }
  797. else
  798. {
  799. if(Search("SearchEmployeeNo", txtEmployeeNo.CValue,tbNo.CValue))
  800. {
  801. MessageBox("该员工工号已被使用,请重新输入!",@Title);
  802. txtEmployeeNo.Focus();
  803. return;
  804. }
  805. }
  806. if(txtName.CValue=="")
  807. {
  808. tcOperMan.SelectedIndex=0;
  809. MessageBox("请输入员工姓名!",@Title);
  810. txtName.Focus();
  811. return;
  812. }
  813. if(txtIDCard.CValue!=""&&Search("SearchEmployeeIDCard", txtIDCard.CValue,tbNo.CValue))
  814. {
  815. tcOperMan.SelectedIndex=0;
  816. MessageBox("身份证号已被使用,请重新输入!",@Title);
  817. txtIDCard.Focus();
  818. return;
  819. }
  820. if(cbCountry.CValue==0)
  821. {
  822. tcOperMan.SelectedIndex=0;
  823. MessageBox("请输入国籍!",@Title);
  824. cbCountry.Focus();
  825. return;
  826. }
  827. if(cbMarriage.SelectedName=="")
  828. {
  829. tcOperMan.SelectedIndex=0;
  830. MessageBox("请选择婚姻状况!",@Title);
  831. cbMarriage.Focus();
  832. return;
  833. }
  834. if(!cbDept.CheckSelectedItem())
  835. {
  836. MessageBox("请选择有效的任职部门!",@Title);
  837. cbDept.Focus();
  838. return;
  839. }
  840. if(txtCardNo.CValue!="" && Search("SearchCardNo",txtCardNo.CValue,tbNo.CValue))
  841. {
  842. tcOperMan.SelectedIndex=1;
  843. MessageBox("考勤卡号已存在!",@Title);
  844. txtCardNo.Focus();
  845. return;
  846. }
  847. if(cbStatus.SelectedName=="")
  848. {
  849. tcOperMan.SelectedIndex=1;
  850. MessageBox("请选择任职状况!",@Title);
  851. cbStatus.Focus();
  852. return;
  853. }
  854. UpdateForm(false, "");
  855. if(@Status==1)
  856. {
  857. New();
  858. }
  859. if(@Status == 3)
  860. {
  861. #Employee.LastModDate_Employee=DateTimeNow();
  862. Update();
  863. }
  864. ChangeMode("View");
  865. ]]></SubmitButtonClick>
  866. </Lables>
  867. </Form>
  868. </Forms>