$PBExportHeader$w_aifmb_index_book.srw forward global type w_aifmb_index_book from window end type type tv_1 from uo_aifmb_tv_class within w_aifmb_index_book end type type cb_exit from uo_imflatbutton within w_aifmb_index_book end type type cb_reflash from uo_imflatbutton within w_aifmb_index_book end type type cb_del from commandbutton within w_aifmb_index_book end type type cb_add from commandbutton within w_aifmb_index_book end type type dw_2 from u_dw_rbtnfilter within w_aifmb_index_book end type type dw_1 from u_dw_rbtnfilter within w_aifmb_index_book end type type cb_ok from uo_imflatbutton within w_aifmb_index_book end type type ln_bar from line within w_aifmb_index_book end type type ln_bar2 from line within w_aifmb_index_book end type type r_bar from rectangle within w_aifmb_index_book end type end forward global type w_aifmb_index_book from window integer width = 3141 integer height = 1744 boolean titlebar = true string title = "指数订阅" boolean controlmenu = true boolean minbox = true windowtype windowtype = popup! long backcolor = 67108864 string icon = "AppIcon!" boolean center = true event ue_retrieve ( ) tv_1 tv_1 cb_exit cb_exit cb_reflash cb_reflash cb_del cb_del cb_add cb_add dw_2 dw_2 dw_1 dw_1 cb_ok cb_ok ln_bar ln_bar ln_bar2 ln_bar2 r_bar r_bar end type global w_aifmb_index_book w_aifmb_index_book type variables long ins_nodeid_arr[] boolean can_retrieve = false end variables event ue_retrieve();IF UpperBound(ins_nodeid_arr) = 0 THEN ins_nodeid_arr[1] = -1 END IF IF can_retrieve THEN dw_1.Retrieve(ins_nodeid_arr) END IF end event on w_aifmb_index_book.create this.tv_1=create tv_1 this.cb_exit=create cb_exit this.cb_reflash=create cb_reflash this.cb_del=create cb_del this.cb_add=create cb_add this.dw_2=create dw_2 this.dw_1=create dw_1 this.cb_ok=create cb_ok this.ln_bar=create ln_bar this.ln_bar2=create ln_bar2 this.r_bar=create r_bar this.Control[]={this.tv_1,& this.cb_exit,& this.cb_reflash,& this.cb_del,& this.cb_add,& this.dw_2,& this.dw_1,& this.cb_ok,& this.ln_bar,& this.ln_bar2,& this.r_bar} end on on w_aifmb_index_book.destroy destroy(this.tv_1) destroy(this.cb_exit) destroy(this.cb_reflash) destroy(this.cb_del) destroy(this.cb_add) destroy(this.dw_2) destroy(this.dw_1) destroy(this.cb_ok) destroy(this.ln_bar) destroy(this.ln_bar2) destroy(this.r_bar) end on event resize;ln_bar.EndX = This.Width ln_bar2.EndX = This.Width r_bar.Width = This.Width tv_1.Height = This.WorkSpaceHeight() - tv_1.Y dw_1.Width = This.WorkSpaceWidth() - dw_1.X long deltaX long deltaY deltaX = This.WorkSpaceWidth() - dw_1.X - dw_1.Width deltaY = This.WorkSpaceHeight() - dw_2.Y - dw_2.Height dw_1.Width = dw_1.Width + deltaX dw_1.Height = dw_1.Height + deltaY cb_add.X = cb_add.X + deltaX cb_add.Y = cb_add.Y + deltaY cb_del.X = cb_del.X + deltaX cb_del.Y = cb_del.Y + deltaY dw_2.Width = dw_1.Width dw_2.Y = dw_2.Y + deltaY end event event open;Int rslt = 1 String arg_msg uo_aifmb lo_aifmb lo_aifmb = Create uo_aifmb dw_1.SetTransObject(sqlca) dw_2.SetTransObject(sqlca) can_retrieve = true //IF lo_aifmb.uf_sync_node(arg_msg) <> 1 THEN // rslt = 0 // GOTO ext //END IF IF lo_aifmb.uf_getindexdefinelist(arg_msg) <> 1 THEN rslt = 0 GOTO ext END IF //tv_1.InsertItemLast(0, '指数', 1) //cb_reflash.TriggerEvent(Clicked!) dw_2.Retrieve() triggerevent('ue_retrieve') goto ext ext: Destroy lo_aifmb IF rslt = 0 THEN MessageBox('ERROR', arg_msg) cb_exit.PostEvent(Clicked!) END IF end event type tv_1 from uo_aifmb_tv_class within w_aifmb_index_book event destroy ( ) integer y = 184 integer width = 827 integer taborder = 40 boolean uo_withindex = true end type on tv_1.destroy call uo_aifmb_tv_class::destroy end on event ue_selectionchanged;call super::ue_selectionchanged;ins_nodeid_arr = uo_nodeid_arr //IF uo_keyword <> '' THEN // sle_keyword.Text = uo_keyword //END IF parent.triggerevent('ue_retrieve') end event type cb_exit from uo_imflatbutton within w_aifmb_index_book integer x = 320 integer width = 151 integer height = 164 integer taborder = 30 string text = "退出" boolean cancel = true string normalpicname = "exit.BMP" integer picsize = 16 toolbaralignment pic_align = alignattop! boolean border = false end type event clicked;call super::clicked;Close(PARENT) end event type cb_reflash from uo_imflatbutton within w_aifmb_index_book integer x = 160 integer width = 151 integer height = 164 integer taborder = 20 string text = "刷新" string normalpicname = "refresh.bmp" integer picsize = 16 toolbaralignment pic_align = alignattop! boolean border = false end type event clicked;call super::clicked;tv_1.uf_build_tree() end event type cb_del from commandbutton within w_aifmb_index_book integer x = 2821 integer y = 880 integer width = 265 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;Long i FOR i = dw_2.RowCount() To 1 Step -1 IF dw_2.IsSelected(i) THEN dw_2.DeleteRow(i) END IF NEXT end event type cb_add from commandbutton within w_aifmb_index_book integer x = 2528 integer y = 880 integer width = 265 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;Long i FOR i = 1 To dw_1.RowCount() IF dw_1.IsSelected(i) THEN IF dw_2.Find('indexid = ' + String(dw_1.Object.indexid[i]), 1, dw_2.RowCount()) > 0 THEN CONTINUE dw_1.RowsCopy(i, i, Primary!, dw_2, dw_2.RowCount() + 1, Primary!) dw_1.SelectRow(i, False) END IF NEXT end event type dw_2 from u_dw_rbtnfilter within w_aifmb_index_book integer x = 841 integer y = 984 integer width = 2254 integer height = 664 integer taborder = 40 boolean bringtotop = true string dataobject = "dw_aifmb_index_book_ch" boolean hscrollbar = true boolean vscrollbar = true boolean hsplitscroll = true end type event clicked;call super::clicked;IF row > 0 THEN This.SelectRow(row, Not This.IsSelected(row)) END IF end event type dw_1 from u_dw_rbtnfilter within w_aifmb_index_book integer x = 841 integer y = 184 integer width = 2263 integer height = 664 integer taborder = 30 boolean bringtotop = true string dataobject = "dw_aifmb_index_book" boolean hscrollbar = true boolean vscrollbar = true boolean hsplitscroll = true end type event clicked;call super::clicked;IF row > 0 THEN This.SelectRow(row, Not This.IsSelected(row)) END IF end event type cb_ok from uo_imflatbutton within w_aifmb_index_book integer width = 151 integer height = 164 integer taborder = 10 string text = "提交" string normalpicname = "ok.bmp" integer picsize = 16 toolbaralignment pic_align = alignattop! boolean border = false end type event clicked;call super::clicked;Int rslt = 1 String arg_msg = '' uo_aifmb lo_aifmb lo_aifmb = Create uo_aifmb s_aifmb_indexbookinfo s_indexes[] Long i = 0 FOR i = 1 To dw_2.RowCount() s_indexes[i].IndexID = dw_2.Object.IndexID[i] s_indexes[i].StartTime = dw_2.Object.bookbegindate[i] s_indexes[i].EndTime = dw_2.Object.bookenddate[i] s_indexes[i].BookType = 0 NEXT IF lo_aifmb.uf_bookindexes(s_indexes, arg_msg) <> 1 THEN rslt = 0 GOTO ext END IF ext: Destroy lo_aifmb IF rslt = 0 THEN MessageBox('ERROR', arg_msg) ELSE MessageBox('OK', '提交成功') Close(Parent) END IF end event type ln_bar from line within w_aifmb_index_book long linecolor = 268435456 integer linethickness = 4 integer beginy = 172 integer endx = 2007 integer endy = 172 end type type ln_bar2 from line within w_aifmb_index_book long linecolor = 16777215 integer linethickness = 4 integer beginy = 176 integer endx = 2039 integer endy = 176 end type type r_bar from rectangle within w_aifmb_index_book long linecolor = 16777215 integer linethickness = 4 long fillcolor = 1073741824 integer x = 2089 integer width = 146 integer height = 68 end type event constructor;this.fillcolor = 14215660 this.linecolor = 14215660 this.x = -1 this.y = -1 this.height = ln_bar.beginy - 5 end event