123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191 |
- <?xml version="1.0" encoding="utf-8"?>
- <Forms>
- <Form Name="FrmHolidaySetting">
- <Client>
- <Events>
- <Load>
- <![CDATA[
- @Title="法定节假日设定";
- GetSchema();
- Search("SearchHolidaySettingType");
- ChangeMode("Search");
- ]]>
- </Load>
- <Closing>
- ;
- </Closing>
- <Closed>
- ;
- </Closed>
- </Events>
- <Mode>
- <Search>
- <Lable name="Search"/>
- </Search>
- <View>
- <Lable name="View"/>
- </View>
- </Mode>
- <Controls>
- <IKComboBoxEx name="cbYear"/>
- <IKDateTimePicker name="dtStart"/>
- <IKDateTimePicker name="dtEnd"/>
- <IKButton name="btnCreate">
- <Events>
- <Click>
- CreatePdtCalendar(cbYear.Text);
- </Click>
- </Events>
- </IKButton>
- <IKButton name="btnSearch">
- <Events>
- <Click>
- Search("SearchHolidaySettingList",dtStart.Value,dtEnd.Value);
- ChangeMode("View");
- </Click>
- </Events>
- </IKButton>
- <IKDataGridEx name="dgCalendarList" DataSource="HolidaySettingList" TableStyleIndex="0">
- <DataColumn Index="0" DataSource="HolidaySettingList.Date_HolidaySetting" />
- <DataColumn Index="1" DataSource="HolidaySettingList.WeekDay_HolidaySetting" />
- <DataColumn Index="2" DataSource="HolidaySettingList.Type_HolidaySetting" >
- <IKDataGridComboBoxColumn ValueSourceEx="HolidaySettingList.Type_HolidaySetting" DisplaySourceEx="HolidaySettingList.Type_HolidaySetting" DataSourceEx="HolidaySettingType" DisplayMemberEx="Result" ValueMemberEx="Result">
- <Events>
- <Reload>
- Search("SearchHolidaySettingType");
- SetDataGridColumnDataSource(2,"dgCalendarList");
- </Reload>
- </Events>
- </IKDataGridComboBoxColumn>
- </DataColumn>
- </IKDataGridEx>
- <IKFormToolBar name="toolBar">
- <Events>
- <ClickFirst>
- ;
- </ClickFirst>
- <ClickPrev>
- ;
- </ClickPrev>
- <ClickNext>
- ;
- </ClickNext>
- <ClickLast>
- ;
- </ClickLast>
- <ClickNew>
- ;
- </ClickNew>
- <ClickEmpty>
- ChangeMode("Search");
- </ClickEmpty>
- <ClickSubmit>
- <Lable name="SubmitButtonClick"/>
- </ClickSubmit>
- <ClickModify>
- ;
- </ClickModify>
- <ClickDelete>
- ;
- </ClickDelete>
- <ClickPrint>
- ;
- </ClickPrint>
- <ClickAudit>
- ;
- </ClickAudit>
- <ClickUnAudit>
- ;
- </ClickUnAudit>
- <ClickImport>
- ;
- </ClickImport>
- <ClickExport>
- ;
- </ClickExport>
- <ClickClose>
- ;
- </ClickClose>
- <ClickExpand>
- ;
- </ClickExpand>
- </Events>
- </IKFormToolBar>
- </Controls>
- </Client>
- <Server>
- <Tables>
- <Table name="HolidaySettingList" Type="Child">
- <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
- FROM HolidaySetting
- "/>
- <Update CmdType="Text" CmdText="
- Update HolidaySetting
- SET Type_HolidaySetting=@Type_HolidaySetting
- Where ID_HolidaySetting=@ID_HolidaySetting
- ">
- <Params>
- <Param name="@ID_HolidaySetting" type="HolidaySetting.ID_HolidaySetting" sourceColumn="ID_HolidaySetting"/>
- <Param name="@Type_HolidaySetting" type="HolidaySetting.Type_HolidaySetting" sourceColumn="Type_HolidaySetting"/>
- </Params>
- </Update>
- <FKErrorReport ErrorMessage="该法定节假日单号设定已被引用,删除失败!"/>
- <UNIQUEErrorReport ErrorMessage="该法定节假日设定单号已存在,提交失败!"/>
- </Table>
- </Tables>
- <Search>
- <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
- FROM HolidaySetting
- Where DateDiff(day,@StartDate,Date_HolidaySetting) >=0 And DateDiff(day,@EndDate,Date_HolidaySetting) <=0
- Order By Date_HolidaySetting">
- <Params>
- <Param name="@StartDate" type="HolidaySetting.Date_HolidaySetting" index="0"/>
- <Param name="@EndDate" type="HolidaySetting.Date_HolidaySetting" index="1"/>
- </Params>
- <Tables>
- <Table name="HolidaySettingList" />
- </Tables>
- </SearchHolidaySettingList>
- <SearchHolidaySettingType CmdType="Text" CmdText=" Create Table #HolidaySettingType
- (
- Result nvarchar(64)
- )
- Insert into #HolidaySettingType Values('周末')
- Insert into #HolidaySettingType Values('节日')
- Insert into #HolidaySettingType Values('工作日')
- Select * From #HolidaySettingType
- Drop Table #HolidaySettingType">
- <Tables>
- <Table name="HolidaySettingType" />
- </Tables>
- </SearchHolidaySettingType>
- </Search>
- </Server>
- <Lables>
- <Search>
- Empty();
- NewInstance();
- cbYear.SelectedIndex=0;
- dgCalendarList.ReadOnly=true;
- dgCalendarList.AllowNew(false);
- dgCalendarList.AllowDelete(false);
- </Search>
- <View>
- dgCalendarList.ReadOnly=false;
- dgCalendarList.AllowNew(false);
- dgCalendarList.AllowDelete(false);
- </View>
- <SubmitButtonClick>
- <![CDATA[
- Update();
- ChangeMode("Search");
- ]]>
- </SubmitButtonClick>
- </Lables>
- </Form>
- </Forms>
|