$PBExportHeader$w_aifmb_datetime_parm_ch.srw forward global type w_aifmb_datetime_parm_ch from window end type type cb_10 from commandbutton within w_aifmb_datetime_parm_ch end type type cb_9 from commandbutton within w_aifmb_datetime_parm_ch end type type tab_1 from tab within w_aifmb_datetime_parm_ch end type type tabpage_1 from userobject within tab_1 end type type mle_1 from multilineedit within tabpage_1 end type type cb_2 from commandbutton within tabpage_1 end type type cb_1 from commandbutton within tabpage_1 end type type em_1 from editmask within tabpage_1 end type type dw_1 from datawindow within tabpage_1 end type type tabpage_1 from userobject within tab_1 mle_1 mle_1 cb_2 cb_2 cb_1 cb_1 em_1 em_1 dw_1 dw_1 end type type tabpage_2 from userobject within tab_1 end type type ddlb_1 from dropdownlistbox within tabpage_2 end type type em_2 from editmask within tabpage_2 end type type cb_4 from commandbutton within tabpage_2 end type type cb_3 from commandbutton within tabpage_2 end type type mle_2 from multilineedit within tabpage_2 end type type dw_2 from datawindow within tabpage_2 end type type tabpage_2 from userobject within tab_1 ddlb_1 ddlb_1 em_2 em_2 cb_4 cb_4 cb_3 cb_3 mle_2 mle_2 dw_2 dw_2 end type type tabpage_3 from userobject within tab_1 end type type mle_3 from multilineedit within tabpage_3 end type type dw_3 from datawindow within tabpage_3 end type type cb_6 from commandbutton within tabpage_3 end type type cb_5 from commandbutton within tabpage_3 end type type em_3 from editmask within tabpage_3 end type type ddlb_2 from dropdownlistbox within tabpage_3 end type type tabpage_3 from userobject within tab_1 mle_3 mle_3 dw_3 dw_3 cb_6 cb_6 cb_5 cb_5 em_3 em_3 ddlb_2 ddlb_2 end type type tabpage_4 from userobject within tab_1 end type type mle_4 from multilineedit within tabpage_4 end type type dw_4 from datawindow within tabpage_4 end type type cb_8 from commandbutton within tabpage_4 end type type cb_7 from commandbutton within tabpage_4 end type type em_4 from editmask within tabpage_4 end type type tabpage_4 from userobject within tab_1 mle_4 mle_4 dw_4 dw_4 cb_8 cb_8 cb_7 cb_7 em_4 em_4 end type type tab_1 from tab within w_aifmb_datetime_parm_ch tabpage_1 tabpage_1 tabpage_2 tabpage_2 tabpage_3 tabpage_3 tabpage_4 tabpage_4 end type end forward global type w_aifmb_datetime_parm_ch from window integer width = 1733 integer height = 1208 boolean titlebar = true string title = "执行频率" boolean controlmenu = true windowtype windowtype = response! long backcolor = 67108864 string icon = "AppIcon!" boolean center = true cb_10 cb_10 cb_9 cb_9 tab_1 tab_1 end type global w_aifmb_datetime_parm_ch w_aifmb_datetime_parm_ch type variables s_aifmb_datetime_parm_ch ins_rslt end variables forward prototypes public subroutine wf_monthstr () public subroutine wf_weekstr () public subroutine wf_yearstr () public subroutine wf_daystr () end prototypes public subroutine wf_monthstr ();String ls_str = '' datawindow dw_3 dw_3 = tab_1.tabpage_3.dw_3 Long i IF dw_3.RowCount() > 0 THEN ls_str = String(dw_3.Object.month[1]) + ' ' + String(dw_3.Object.mtime[1], 'HH:mm') FOR i = 2 To dw_3.RowCount() ls_str += ',' + String(dw_3.Object.month[i]) + ' ' + String(dw_3.Object.mtime[i], 'HH:mm') NEXT END IF tab_1.tabpage_3.mle_3.Text = ls_str end subroutine public subroutine wf_weekstr ();String ls_str = '' datawindow dw_2 dw_2 = tab_1.tabpage_2.dw_2 Long i IF dw_2.RowCount() > 0 THEN ls_str = String(dw_2.Object.week[1]) + ' ' + String(dw_2.Object.wtime[1], 'HH:mm') FOR i = 2 To dw_2.RowCount() ls_str += ',' + String(dw_2.Object.week[i]) + ' ' + String(dw_2.Object.wtime[i], 'HH:mm') NEXT END IF tab_1.tabpage_2.mle_2.Text = ls_str end subroutine public subroutine wf_yearstr ();String ls_str = '' Long i datawindow dw_4 dw_4 = tab_1.tabpage_4.dw_4 IF dw_4.RowCount() > 0 THEN ls_str = String(dw_4.Object.ytime[1], 'MM-dd HH:mm') FOR i = 2 To dw_4.RowCount() ls_str += ',' + String(dw_4.Object.ytime[i], 'MM-dd HH:mm') NEXT END IF tab_1.tabpage_4.mle_4.Text = ls_str end subroutine public subroutine wf_daystr ();String ls_str = '' Long i datawindow dw_1 dw_1 = tab_1.tabpage_1.dw_1 IF dw_1.RowCount() > 0 THEN ls_str = String(dw_1.Object.dtime[1], 'HH:mm') FOR i = 2 To dw_1.RowCount() ls_str += ',' + String(dw_1.Object.dtime[i], 'HH:mm') NEXT END IF tab_1.tabpage_1.mle_1.Text = ls_str end subroutine on w_aifmb_datetime_parm_ch.create this.cb_10=create cb_10 this.cb_9=create cb_9 this.tab_1=create tab_1 this.Control[]={this.cb_10,& this.cb_9,& this.tab_1} end on on w_aifmb_datetime_parm_ch.destroy destroy(this.cb_10) destroy(this.cb_9) destroy(this.tab_1) end on event open;tab_1.tabpage_4.em_4.Text = '2000-01-01 00:00:00' end event event close;closewithreturn(this, ins_rslt) end event type cb_10 from commandbutton within w_aifmb_datetime_parm_ch integer x = 1440 integer y = 1008 integer width = 224 integer height = 84 integer taborder = 50 integer textsize = -9 integer weight = 400 fontcharset fontcharset = gb2312charset! fontpitch fontpitch = variable! string facename = "宋体" string text = "取消" end type event clicked;ins_rslt.ifok = 0 close(parent) end event type cb_9 from commandbutton within w_aifmb_datetime_parm_ch integer x = 1175 integer y = 1008 integer width = 224 integer height = 84 integer taborder = 40 integer textsize = -9 integer weight = 400 fontcharset fontcharset = gb2312charset! fontpitch fontpitch = variable! string facename = "宋体" string text = "确定" end type event clicked;ins_rslt.ifok = 1 IF tab_1.SelectedTab = 1 THEN ins_rslt.pricetype = 'D' ins_rslt.priceparam = tab_1.tabpage_1.mle_1.Text ELSEIF tab_1.SelectedTab = 2 THEN ins_rslt.pricetype = 'W' ins_rslt.priceparam = tab_1.tabpage_2.mle_2.Text ELSEIF tab_1.SelectedTab = 3 THEN ins_rslt.pricetype = 'M' ins_rslt.priceparam = tab_1.tabpage_3.mle_3.Text ELSEIF tab_1.SelectedTab = 4 THEN ins_rslt.pricetype = 'Y' ins_rslt.priceparam = tab_1.tabpage_4.mle_4.Text END IF Close(Parent) end event type tab_1 from tab within w_aifmb_datetime_parm_ch integer width = 1719 integer height = 980 integer taborder = 10 integer textsize = -9 integer weight = 400 fontcharset fontcharset = gb2312charset! fontpitch fontpitch = variable! string facename = "宋体" long backcolor = 67108864 boolean raggedright = true boolean focusonbuttondown = true integer selectedtab = 1 tabpage_1 tabpage_1 tabpage_2 tabpage_2 tabpage_3 tabpage_3 tabpage_4 tabpage_4 end type on tab_1.create this.tabpage_1=create tabpage_1 this.tabpage_2=create tabpage_2 this.tabpage_3=create tabpage_3 this.tabpage_4=create tabpage_4 this.Control[]={this.tabpage_1,& this.tabpage_2,& this.tabpage_3,& this.tabpage_4} end on on tab_1.destroy destroy(this.tabpage_1) destroy(this.tabpage_2) destroy(this.tabpage_3) destroy(this.tabpage_4) end on type tabpage_1 from userobject within tab_1 integer x = 18 integer y = 96 integer width = 1682 integer height = 868 long backcolor = 67108864 string text = "天" long tabtextcolor = 33554432 long picturemaskcolor = 536870912 mle_1 mle_1 cb_2 cb_2 cb_1 cb_1 em_1 em_1 dw_1 dw_1 end type on tabpage_1.create this.mle_1=create mle_1 this.cb_2=create cb_2 this.cb_1=create cb_1 this.em_1=create em_1 this.dw_1=create dw_1 this.Control[]={this.mle_1,& this.cb_2,& this.cb_1,& this.em_1,& this.dw_1} end on on tabpage_1.destroy destroy(this.mle_1) destroy(this.cb_2) destroy(this.cb_1) destroy(this.em_1) destroy(this.dw_1) end on type mle_1 from multilineedit within tabpage_1 integer x = 759 integer y = 104 integer width = 923 integer height = 764 integer taborder = 30 integer textsize = -9 integer weight = 400 fontcharset fontcharset = gb2312charset! fontpitch fontpitch = variable! string facename = "宋体" long textcolor = 33554432 boolean displayonly = true borderstyle borderstyle = stylelowered! end type type cb_2 from commandbutton within tabpage_1 integer x = 430 integer y = 8 integer width = 169 integer height = 84 integer taborder = 60 integer textsize = -9 integer weight = 400 fontcharset fontcharset = gb2312charset! fontpitch fontpitch = variable! string facename = "宋体" string text = "删除" end type event clicked;Long row row = dw_1.GetRow() IF row > 0 THEN dw_1.DeleteRow(row) END IF wf_daystr() end event type cb_1 from commandbutton within tabpage_1 integer x = 251 integer y = 8 integer width = 169 integer height = 84 integer taborder = 50 integer textsize = -9 integer weight = 400 fontcharset fontcharset = gb2312charset! fontpitch fontpitch = variable! string facename = "宋体" string text = "添加" end type event clicked;Time lt_addtime lt_addtime = Time(em_1.Text) Long i, row FOR i = 1 To dw_1.RowCount() IF dw_1.Object.dtime[i] = lt_addtime THEN RETURN IF dw_1.Object.dtime[i] > lt_addtime THEN EXIT END IF NEXT IF i > dw_1.RowCount() THEN i = 0 row = dw_1.InsertRow(i) dw_1.Object.dtime[row] = lt_addtime wf_daystr() end event type em_1 from editmask within tabpage_1 integer y = 8 integer width = 201 integer height = 84 integer taborder = 40 integer textsize = -9 integer weight = 400 fontcharset fontcharset = gb2312charset! fontpitch fontpitch = variable! string facename = "宋体" long textcolor = 33554432 string text = "00:00" borderstyle borderstyle = stylelowered! maskdatatype maskdatatype = timemask! string mask = "HH:mm" end type type dw_1 from datawindow within tabpage_1 integer y = 104 integer width = 763 integer height = 764 integer taborder = 20 string title = "none" string dataobject = "dw_aifmb_day_datetime_parm_ch" boolean vscrollbar = true boolean livescroll = true borderstyle borderstyle = stylelowered! end type event clicked;IF row > 0 THEN This.SetRow(row) This.ScrollToRow(row) END IF end event event rowfocuschanged;This.SelectRow(0, False) IF currentrow > 0 THEN This.SelectRow(currentrow, True) END IF end event type tabpage_2 from userobject within tab_1 integer x = 18 integer y = 96 integer width = 1682 integer height = 868 long backcolor = 67108864 string text = "周" long tabtextcolor = 33554432 long picturemaskcolor = 536870912 ddlb_1 ddlb_1 em_2 em_2 cb_4 cb_4 cb_3 cb_3 mle_2 mle_2 dw_2 dw_2 end type on tabpage_2.create this.ddlb_1=create ddlb_1 this.em_2=create em_2 this.cb_4=create cb_4 this.cb_3=create cb_3 this.mle_2=create mle_2 this.dw_2=create dw_2 this.Control[]={this.ddlb_1,& this.em_2,& this.cb_4,& this.cb_3,& this.mle_2,& this.dw_2} end on on tabpage_2.destroy destroy(this.ddlb_1) destroy(this.em_2) destroy(this.cb_4) destroy(this.cb_3) destroy(this.mle_2) destroy(this.dw_2) end on type ddlb_1 from dropdownlistbox within tabpage_2 integer y = 12 integer width = 192 integer height = 760 integer taborder = 70 integer textsize = -9 integer weight = 400 fontcharset fontcharset = gb2312charset! fontpitch fontpitch = variable! string facename = "宋体" long textcolor = 33554432 string text = "日" boolean sorted = false string item[] = {"日","一","二","三","四","五","六"} borderstyle borderstyle = stylelowered! end type type em_2 from editmask within tabpage_2 integer x = 197 integer y = 8 integer width = 201 integer height = 84 integer taborder = 50 integer textsize = -9 integer weight = 400 fontcharset fontcharset = gb2312charset! fontpitch fontpitch = variable! string facename = "宋体" long textcolor = 33554432 string text = "00:00" borderstyle borderstyle = stylelowered! maskdatatype maskdatatype = timemask! string mask = "HH:mm" end type type cb_4 from commandbutton within tabpage_2 integer x = 594 integer y = 8 integer width = 169 integer height = 84 integer taborder = 70 integer textsize = -9 integer weight = 400 fontcharset fontcharset = gb2312charset! fontpitch fontpitch = variable! string facename = "宋体" string text = "删除" end type event clicked;long row row = dw_2.GetRow() if row > 0 then dw_2.DeleteRow(row) end if wf_weekstr() end event type cb_3 from commandbutton within tabpage_2 integer x = 416 integer y = 8 integer width = 169 integer height = 84 integer taborder = 60 integer textsize = -9 integer weight = 400 fontcharset fontcharset = gb2312charset! fontpitch fontpitch = variable! string facename = "宋体" string text = "添加" end type event clicked;Long ll_week IF ddlb_1.Text = '日' THEN ll_week = 0 ELSEIF ddlb_1.Text = '一' THEN ll_week = 1 ELSEIF ddlb_1.Text = '二' THEN ll_week = 2 ELSEIF ddlb_1.Text = '三' THEN ll_week = 3 ELSEIF ddlb_1.Text = '四' THEN ll_week = 4 ELSEIF ddlb_1.Text = '五' THEN ll_week = 5 ELSEIF ddlb_1.Text = '六' THEN ll_week = 6 END IF Time lt_addtime lt_addtime = Time(em_2.Text) Long i FOR i = 1 To dw_2.RowCount() IF dw_2.Object.week[i] = ll_week And dw_2.Object.wtime[i] = lt_addtime THEN RETURN IF dw_2.Object.week[i] > ll_week Or (dw_2.Object.week[i] = ll_week And dw_2.Object.wtime[i] > lt_addtime) THEN EXIT END IF NEXT if i > dw_2.RowCount() then i = 0 long row row = dw_2.InsertRow(i) dw_2.Object.week[row] = ll_week dw_2.Object.wtime[row] = lt_addtime wf_weekstr() end event type mle_2 from multilineedit within tabpage_2 integer x = 759 integer y = 104 integer width = 923 integer height = 764 integer taborder = 40 integer textsize = -9 integer weight = 400 fontcharset fontcharset = gb2312charset! fontpitch fontpitch = variable! string facename = "宋体" long textcolor = 33554432 boolean displayonly = true borderstyle borderstyle = stylelowered! end type type dw_2 from datawindow within tabpage_2 integer y = 104 integer width = 763 integer height = 764 integer taborder = 30 string title = "none" string dataobject = "dw_aifmb_week_datetime_parm_ch" boolean livescroll = true borderstyle borderstyle = stylelowered! end type event rowfocuschanged;This.SelectRow(0, False) IF currentrow > 0 THEN This.SelectRow(currentrow, True) END IF end event event clicked;IF row > 0 THEN This.SetRow(row) This.ScrollToRow(row) END IF end event type tabpage_3 from userobject within tab_1 integer x = 18 integer y = 96 integer width = 1682 integer height = 868 long backcolor = 67108864 string text = "月" long tabtextcolor = 33554432 long picturemaskcolor = 536870912 mle_3 mle_3 dw_3 dw_3 cb_6 cb_6 cb_5 cb_5 em_3 em_3 ddlb_2 ddlb_2 end type on tabpage_3.create this.mle_3=create mle_3 this.dw_3=create dw_3 this.cb_6=create cb_6 this.cb_5=create cb_5 this.em_3=create em_3 this.ddlb_2=create ddlb_2 this.Control[]={this.mle_3,& this.dw_3,& this.cb_6,& this.cb_5,& this.em_3,& this.ddlb_2} end on on tabpage_3.destroy destroy(this.mle_3) destroy(this.dw_3) destroy(this.cb_6) destroy(this.cb_5) destroy(this.em_3) destroy(this.ddlb_2) end on type mle_3 from multilineedit within tabpage_3 integer x = 759 integer y = 104 integer width = 923 integer height = 764 integer taborder = 50 integer textsize = -9 integer weight = 400 fontcharset fontcharset = gb2312charset! fontpitch fontpitch = variable! string facename = "宋体" long textcolor = 33554432 boolean displayonly = true borderstyle borderstyle = stylelowered! end type type dw_3 from datawindow within tabpage_3 integer y = 104 integer width = 763 integer height = 764 integer taborder = 40 string title = "none" string dataobject = "dw_aifmb_month_datetime_parm_ch" boolean livescroll = true borderstyle borderstyle = stylelowered! end type event rowfocuschanged;This.SelectRow(0, False) IF currentrow > 0 THEN This.SelectRow(currentrow, True) END IF end event event clicked;IF row > 0 THEN This.SetRow(row) This.ScrollToRow(row) END IF end event type cb_6 from commandbutton within tabpage_3 integer x = 594 integer y = 8 integer width = 169 integer height = 84 integer taborder = 80 integer textsize = -9 integer weight = 400 fontcharset fontcharset = gb2312charset! fontpitch fontpitch = variable! string facename = "宋体" string text = "删除" end type event clicked;long row row = dw_3.GetRow() if row > 0 then dw_3.DeleteRow(row) end if wf_monthstr() end event type cb_5 from commandbutton within tabpage_3 integer x = 416 integer y = 8 integer width = 169 integer height = 84 integer taborder = 70 integer textsize = -9 integer weight = 400 fontcharset fontcharset = gb2312charset! fontpitch fontpitch = variable! string facename = "宋体" string text = "添加" end type event clicked;Long ll_month ll_month = long(ddlb_2.Text) Time lt_addtime lt_addtime = Time(em_3.Text) Long i FOR i = 1 To dw_3.RowCount() IF dw_3.Object.month[i] = ll_month And dw_3.Object.mtime[i] = lt_addtime THEN RETURN IF dw_3.Object.month[i] > ll_month Or (dw_3.Object.month[i] = ll_month And dw_3.Object.mtime[i] > lt_addtime) THEN EXIT END IF NEXT if i > dw_3.RowCount() then i = 0 long row row = dw_3.InsertRow(i) dw_3.Object.month[row] = ll_month dw_3.Object.mtime[row] = lt_addtime wf_monthstr() end event type em_3 from editmask within tabpage_3 integer x = 197 integer y = 8 integer width = 201 integer height = 84 integer taborder = 60 integer textsize = -9 integer weight = 400 fontcharset fontcharset = gb2312charset! fontpitch fontpitch = variable! string facename = "宋体" long textcolor = 33554432 string text = "00:00" borderstyle borderstyle = stylelowered! maskdatatype maskdatatype = timemask! string mask = "HH:mm" end type type ddlb_2 from dropdownlistbox within tabpage_3 integer y = 12 integer width = 192 integer height = 760 integer taborder = 80 integer textsize = -9 integer weight = 400 fontcharset fontcharset = gb2312charset! fontpitch fontpitch = variable! string facename = "宋体" long textcolor = 33554432 string text = "1" boolean sorted = false boolean vscrollbar = true string item[] = {"1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19","20","21","22","23","24","25","26","27","28","29","30","31"} borderstyle borderstyle = stylelowered! end type type tabpage_4 from userobject within tab_1 integer x = 18 integer y = 96 integer width = 1682 integer height = 868 long backcolor = 67108864 string text = "年" long tabtextcolor = 33554432 long picturemaskcolor = 536870912 mle_4 mle_4 dw_4 dw_4 cb_8 cb_8 cb_7 cb_7 em_4 em_4 end type on tabpage_4.create this.mle_4=create mle_4 this.dw_4=create dw_4 this.cb_8=create cb_8 this.cb_7=create cb_7 this.em_4=create em_4 this.Control[]={this.mle_4,& this.dw_4,& this.cb_8,& this.cb_7,& this.em_4} end on on tabpage_4.destroy destroy(this.mle_4) destroy(this.dw_4) destroy(this.cb_8) destroy(this.cb_7) destroy(this.em_4) end on type mle_4 from multilineedit within tabpage_4 integer x = 759 integer y = 104 integer width = 923 integer height = 764 integer taborder = 60 integer textsize = -9 integer weight = 400 fontcharset fontcharset = gb2312charset! fontpitch fontpitch = variable! string facename = "宋体" long textcolor = 33554432 boolean displayonly = true borderstyle borderstyle = stylelowered! end type type dw_4 from datawindow within tabpage_4 integer y = 104 integer width = 763 integer height = 764 integer taborder = 50 string title = "none" string dataobject = "dw_aifmb_year_datetime_parm_ch" boolean livescroll = true borderstyle borderstyle = stylelowered! end type event rowfocuschanged;This.SelectRow(0, False) IF currentrow > 0 THEN This.SelectRow(currentrow, True) END IF end event event clicked;IF row > 0 THEN This.SetRow(row) This.ScrollToRow(row) END IF end event type cb_8 from commandbutton within tabpage_4 integer x = 594 integer y = 8 integer width = 169 integer height = 84 integer taborder = 90 integer textsize = -9 integer weight = 400 fontcharset fontcharset = gb2312charset! fontpitch fontpitch = variable! string facename = "宋体" string text = "删除" end type event clicked;Long row row = dw_4.GetRow() IF row > 0 THEN dw_4.DeleteRow(row) END IF wf_yearstr() end event type cb_7 from commandbutton within tabpage_4 integer x = 416 integer y = 8 integer width = 169 integer height = 84 integer taborder = 80 integer textsize = -9 integer weight = 400 fontcharset fontcharset = gb2312charset! fontpitch fontpitch = variable! string facename = "宋体" string text = "添加" end type event clicked;DateTime lt_adytime lt_adytime = DateTime(Date('2000-' + Mid(em_4.Text,1, 5)), Time(Mid(em_4.Text, 7))) IF lt_adytime < DateTime(2000-01-01) THEN RETURN Long i, row FOR i = 1 To dw_4.RowCount() IF dw_4.Object.ytime[i] = lt_adytime THEN RETURN IF dw_4.Object.ytime[i] > lt_adytime THEN EXIT END IF NEXT IF i > dw_4.RowCount() THEN i = 0 row = dw_4.InsertRow(i) dw_4.Object.ytime[row] = lt_adytime wf_yearstr() end event type em_4 from editmask within tabpage_4 integer x = 14 integer y = 8 integer width = 389 integer height = 84 integer taborder = 70 integer textsize = -9 integer weight = 400 fontcharset fontcharset = gb2312charset! fontpitch fontpitch = variable! string facename = "宋体" long textcolor = 33554432 string text = "01-01 00:00" borderstyle borderstyle = stylelowered! maskdatatype maskdatatype = datetimemask! string mask = "MM-dd HH:mm" end type