FrmHolidaySetting.xml 6.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <Forms>
  3. <Form Name="FrmHolidaySetting">
  4. <Client>
  5. <Events>
  6. <Load>
  7. <![CDATA[
  8. @Title="法定节假日设定";
  9. GetSchema();
  10. Search("SearchHolidaySettingType");
  11. ChangeMode("Search");
  12. ]]>
  13. </Load>
  14. <Closing>
  15. ;
  16. </Closing>
  17. <Closed>
  18. ;
  19. </Closed>
  20. </Events>
  21. <Mode>
  22. <Search>
  23. <Lable name="Search"/>
  24. </Search>
  25. <View>
  26. <Lable name="View"/>
  27. </View>
  28. </Mode>
  29. <Controls>
  30. <IKComboBoxEx name="cbYear"/>
  31. <IKDateTimePicker name="dtStart"/>
  32. <IKDateTimePicker name="dtEnd"/>
  33. <IKButton name="btnCreate">
  34. <Events>
  35. <Click>
  36. CreatePdtCalendar(cbYear.Text);
  37. </Click>
  38. </Events>
  39. </IKButton>
  40. <IKButton name="btnSearch">
  41. <Events>
  42. <Click>
  43. Search("SearchHolidaySettingList",dtStart.Value,dtEnd.Value);
  44. ChangeMode("View");
  45. </Click>
  46. </Events>
  47. </IKButton>
  48. <IKDataGridEx name="dgCalendarList" DataSource="HolidaySettingList" TableStyleIndex="0">
  49. <DataColumn Index="0" DataSource="HolidaySettingList.Date_HolidaySetting" />
  50. <DataColumn Index="1" DataSource="HolidaySettingList.WeekDay_HolidaySetting" />
  51. <DataColumn Index="2" DataSource="HolidaySettingList.Type_HolidaySetting" >
  52. <IKDataGridComboBoxColumn ValueSourceEx="HolidaySettingList.Type_HolidaySetting" DisplaySourceEx="HolidaySettingList.Type_HolidaySetting" DataSourceEx="HolidaySettingType" DisplayMemberEx="Result" ValueMemberEx="Result">
  53. <Events>
  54. <Reload>
  55. Search("SearchHolidaySettingType");
  56. SetDataGridColumnDataSource(2,"dgCalendarList");
  57. </Reload>
  58. </Events>
  59. </IKDataGridComboBoxColumn>
  60. </DataColumn>
  61. </IKDataGridEx>
  62. <IKFormToolBar name="toolBar">
  63. <Events>
  64. <ClickFirst>
  65. ;
  66. </ClickFirst>
  67. <ClickPrev>
  68. ;
  69. </ClickPrev>
  70. <ClickNext>
  71. ;
  72. </ClickNext>
  73. <ClickLast>
  74. ;
  75. </ClickLast>
  76. <ClickNew>
  77. ;
  78. </ClickNew>
  79. <ClickEmpty>
  80. ChangeMode("Search");
  81. </ClickEmpty>
  82. <ClickSubmit>
  83. <Lable name="SubmitButtonClick"/>
  84. </ClickSubmit>
  85. <ClickModify>
  86. ;
  87. </ClickModify>
  88. <ClickDelete>
  89. ;
  90. </ClickDelete>
  91. <ClickPrint>
  92. ;
  93. </ClickPrint>
  94. <ClickAudit>
  95. ;
  96. </ClickAudit>
  97. <ClickUnAudit>
  98. ;
  99. </ClickUnAudit>
  100. <ClickImport>
  101. ;
  102. </ClickImport>
  103. <ClickExport>
  104. ;
  105. </ClickExport>
  106. <ClickClose>
  107. ;
  108. </ClickClose>
  109. <ClickExpand>
  110. ;
  111. </ClickExpand>
  112. </Events>
  113. </IKFormToolBar>
  114. </Controls>
  115. </Client>
  116. <Server>
  117. <Tables>
  118. <Table name="HolidaySettingList" Type="Child">
  119. <GetSchema CmdType="Text" CmdText=" SELECT Top 0 ID_HolidaySetting,convert(varchar(10),Date_HolidaySetting,120) As Date_HolidaySetting,case WeekDay_HolidaySetting when 1 then '七' when 2 then '一' when 3 then '二' when 4 then '三' when 5 then '四' when 6 then '五' else '六' end As WeekDay_HolidaySetting,Type_HolidaySetting
  120. FROM HolidaySetting
  121. "/>
  122. <Update CmdType="Text" CmdText="
  123. Update HolidaySetting
  124. SET Type_HolidaySetting=@Type_HolidaySetting
  125. Where ID_HolidaySetting=@ID_HolidaySetting
  126. ">
  127. <Params>
  128. <Param name="@ID_HolidaySetting" type="HolidaySetting.ID_HolidaySetting" sourceColumn="ID_HolidaySetting"/>
  129. <Param name="@Type_HolidaySetting" type="HolidaySetting.Type_HolidaySetting" sourceColumn="Type_HolidaySetting"/>
  130. </Params>
  131. </Update>
  132. <FKErrorReport ErrorMessage="该法定节假日单号设定已被引用,删除失败!"/>
  133. <UNIQUEErrorReport ErrorMessage="该法定节假日设定单号已存在,提交失败!"/>
  134. </Table>
  135. </Tables>
  136. <Search>
  137. <SearchHolidaySettingList CmdType="Text" CmdText="SELECT ID_HolidaySetting,convert(varchar(10),Date_HolidaySetting,120) As Date_HolidaySetting,case WeekDay_HolidaySetting when 1 then '日' when 2 then '一' when 3 then '二' when 4 then '三' when 5 then '四' when 6 then '五' else '六' end As WeekDay_HolidaySetting,Type_HolidaySetting
  138. FROM HolidaySetting
  139. Where DateDiff(day,@StartDate,Date_HolidaySetting) &gt;=0 And DateDiff(day,@EndDate,Date_HolidaySetting) &lt;=0
  140. Order By Date_HolidaySetting">
  141. <Params>
  142. <Param name="@StartDate" type="HolidaySetting.Date_HolidaySetting" index="0"/>
  143. <Param name="@EndDate" type="HolidaySetting.Date_HolidaySetting" index="1"/>
  144. </Params>
  145. <Tables>
  146. <Table name="HolidaySettingList" />
  147. </Tables>
  148. </SearchHolidaySettingList>
  149. <SearchHolidaySettingType CmdType="Text" CmdText=" Create Table #HolidaySettingType
  150. (
  151. Result nvarchar(64)
  152. )
  153. Insert into #HolidaySettingType Values('周末')
  154. Insert into #HolidaySettingType Values('节日')
  155. Insert into #HolidaySettingType Values('工作日')
  156. Select * From #HolidaySettingType
  157. Drop Table #HolidaySettingType">
  158. <Tables>
  159. <Table name="HolidaySettingType" />
  160. </Tables>
  161. </SearchHolidaySettingType>
  162. </Search>
  163. </Server>
  164. <Lables>
  165. <Search>
  166. Empty();
  167. NewInstance();
  168. cbYear.SelectedIndex=0;
  169. dgCalendarList.ReadOnly=true;
  170. dgCalendarList.AllowNew(false);
  171. dgCalendarList.AllowDelete(false);
  172. </Search>
  173. <View>
  174. dgCalendarList.ReadOnly=false;
  175. dgCalendarList.AllowNew(false);
  176. dgCalendarList.AllowDelete(false);
  177. </View>
  178. <SubmitButtonClick>
  179. <![CDATA[
  180. Update();
  181. ChangeMode("Search");
  182. ]]>
  183. </SubmitButtonClick>
  184. </Lables>
  185. </Form>
  186. </Forms>