123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494 |
- $PBExportHeader$w_oa_workreminduser.srw
- forward
- global type w_oa_workreminduser from window
- end type
- type cb_5 from uo_imflatbutton within w_oa_workreminduser
- end type
- type cb_2 from uo_imflatbutton within w_oa_workreminduser
- end type
- type cb_exit from uo_imflatbutton within w_oa_workreminduser
- end type
- type dw_list from datawindow within w_oa_workreminduser
- end type
- type tv_1 from datawindow within w_oa_workreminduser
- end type
- type cbx_2 from checkbox within w_oa_workreminduser
- end type
- type cbx_1 from checkbox within w_oa_workreminduser
- end type
- type cb_1 from uo_imflatbutton within w_oa_workreminduser
- end type
- type r_bar from rectangle within w_oa_workreminduser
- end type
- type ln_bar2 from line within w_oa_workreminduser
- end type
- type ln_bar from line within w_oa_workreminduser
- end type
- end forward
- global type w_oa_workreminduser from window
- integer width = 3611
- integer height = 2380
- boolean titlebar = true
- string title = "工作提醒用户订阅"
- boolean controlmenu = true
- boolean minbox = true
- windowtype windowtype = popup!
- long backcolor = 67108864
- string icon = "AppIcon!"
- boolean center = true
- cb_5 cb_5
- cb_2 cb_2
- cb_exit cb_exit
- dw_list dw_list
- tv_1 tv_1
- cbx_2 cbx_2
- cbx_1 cbx_1
- cb_1 cb_1
- r_bar r_bar
- ln_bar2 ln_bar2
- ln_bar ln_bar
- end type
- global w_oa_workreminduser w_oa_workreminduser
- type variables
- string is_curmod=''
- long il_curid=-1
- uo_oa_workremind u_wrm
- s_wrm_right user_remindRight[]
- boolean ib_edit=false
- string is_cansee
- end variables
- forward prototypes
- public subroutine wf_refresh ()
- end prototypes
- public subroutine wf_refresh ();if ib_edit then
- dw_list.setTabOrder("selected",10)
- cbx_1.enabled=true
- cbx_2.enabled=true
- cb_1.enabled=true
- cb_2.text="放弃"
- cbx_1.checked=false
- cbx_2.checked=false
- cb_2.normalpicname = 'undo.bmp'
- else
- dw_list.setTabOrder("selected",0)
- cbx_1.enabled=false
- cbx_2.enabled=false
- cb_1.enabled=false
- cb_2.text="修改"
- cb_2.normalpicname = 'open.bmp'
- end if
- cb_1.of_init_draw()
- cb_2.of_init_draw()
- cb_1.of_paint()
- cb_2.of_paint()
- cb_1.TriggerEvent('ue_textchange')
- cb_2.TriggerEvent('ue_textchange')
- end subroutine
- on w_oa_workreminduser.create
- this.cb_5=create cb_5
- this.cb_2=create cb_2
- this.cb_exit=create cb_exit
- this.dw_list=create dw_list
- this.tv_1=create tv_1
- this.cbx_2=create cbx_2
- this.cbx_1=create cbx_1
- this.cb_1=create cb_1
- this.r_bar=create r_bar
- this.ln_bar2=create ln_bar2
- this.ln_bar=create ln_bar
- this.Control[]={this.cb_5,&
- this.cb_2,&
- this.cb_exit,&
- this.dw_list,&
- this.tv_1,&
- this.cbx_2,&
- this.cbx_1,&
- this.cb_1,&
- this.r_bar,&
- this.ln_bar2,&
- this.ln_bar}
- end on
- on w_oa_workreminduser.destroy
- destroy(this.cb_5)
- destroy(this.cb_2)
- destroy(this.cb_exit)
- destroy(this.dw_list)
- destroy(this.tv_1)
- destroy(this.cbx_2)
- destroy(this.cbx_1)
- destroy(this.cb_1)
- destroy(this.r_bar)
- destroy(this.ln_bar2)
- destroy(this.ln_bar)
- end on
- event resize;ln_bar.EndX = THIS.Width
- ln_bar2.EndX = THIS.Width
- r_bar.Width = ln_bar2.EndX
- //long width1,height1
- //width1 = width - 118
- //height1 =height - 400
- //tv_1.height=height1
- //
- //dw_list.width=width1 - tv_1.x - tv_1.width - 2
- //dw_list.height=height1
- //dw_list.x=tv_1.x+tv_1.width+10
- //dw_list.y=tv_1.y
- dw_list.X = tv_1.X + tv_1.Width + 10
- dw_list.Width = THIS.Width - dw_list.X - 40
- tv_1.Height = THIS.Height - tv_1.Y - 140
- dw_list.Height = tv_1.Height
- end event
- event open;String ls_userid = publ_operator
- String ls_right,arg_msg
- Long ll_wrmid
- Long cnt_wrm = 0,cnt
- dw_list.SetTabOrder("selected",0)
- tv_1.SetTrans(sqlca)
- dw_list.SetTrans(sqlca)
- u_wrm = CREATE uo_oa_workremind
- //获取用户订阅列表
- IF NOT u_wrm.uf_get_userworkremind(REF ls_right,publ_userid,REF arg_msg) THEN
- MessageBox('',arg_msg)
- RETURN
- END IF
- //得到用户可视订阅列
- IF NOT u_wrm.uf_get_Cansee(publ_userid,REF is_cansee,REF arg_msg) THEN
- MessageBox('',arg_msg)
- RETURN
- END IF
- String list[]
- f_oa_workremind_splitstr(is_cansee,",",REF list)
- //取提醒定义表的提醒id列
- //declare cr cursor for
- //select wrmid
- //from oa_workreminddef
- //where wrmid in (:is_cansee);
- //open cr;
- //fetch cr into :ll_wrmid;
- FOR cnt = 1 TO UpperBound(list)
- cnt_wrm++
- user_remindRight[cnt_wrm].wrmid = Long(list[cnt])
- user_remindRight[cnt_wrm].Selected = 0
- // fetch cr into :ll_wrmid;
- NEXT
- //close cr;
- IF ls_right <> '' AND cnt_wrm <> 0 THEN
- FOR cnt = 1 TO cnt_wrm
- String ls_curWrmid
- ls_curWrmid = String(user_remindRight[cnt].wrmid)
- IF Pos(ls_right,ls_curWrmid) <> 0 THEN
- user_remindRight[cnt].Selected = 1
- END IF
- NEXT
- END IF
- IF is_cansee <> "" THEN
- tv_1.Retrieve(is_cansee)
- // dw_list.retrieve( is_curmod , is_cansee )
- //f_oa_workremind_retrieve_list(ref dw_list,is_cansee,is_curmod)
- // f_oa_workremind_setRight(user_remindRight,dw_list)
- END IF
- end event
- type cb_5 from uo_imflatbutton within w_oa_workreminduser
- integer x = 37
- integer width = 169
- integer height = 172
- integer taborder = 10
- string text = "刷新"
- string normalpicname = "refresh.bmp"
- integer picsize = 16
- toolbaralignment pic_align = alignattop!
- boolean border = false
- end type
- event clicked;call super::clicked;
- f_oa_workremind_retrieve_list(REF dw_list,is_cansee,is_curMOD)
- f_oa_workremind_setRight(user_remindRight,dw_list)
- end event
- type cb_2 from uo_imflatbutton within w_oa_workreminduser
- integer x = 379
- integer width = 192
- integer height = 172
- integer taborder = 10
- boolean bringtotop = true
- string text = "修改&E"
- string normalpicname = "open.bmp"
- integer picsize = 16
- toolbaralignment pic_align = alignattop!
- boolean border = false
- end type
- event clicked;call super::clicked;
- if ib_edit then
- IF MessageBox(publ_operator,'是否要确定放弃保存资料', Exclamation!, YesNo!, 2) = 2 THEN
- RETURN
- END IF
- end if
- ib_edit=not ib_edit
- wf_refresh()
- end event
- type cb_exit from uo_imflatbutton within w_oa_workreminduser
- integer x = 571
- integer width = 165
- integer height = 172
- integer taborder = 20
- 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 dw_list from datawindow within w_oa_workreminduser
- integer x = 1330
- integer y = 184
- integer width = 2258
- integer height = 1344
- integer taborder = 30
- string title = "工作提醒用户订阅"
- string dataobject = "dw_oa_remainddef"
- boolean vscrollbar = true
- boolean livescroll = true
- borderstyle borderstyle = stylelowered!
- end type
- event rowfocuschanged;IF currentrow > 0 THEN
- THIS.SelectRow(0, FALSE)
- THIS.SetRow(currentrow)
- THIS.SelectRow(currentrow, TRUE)
-
- Long ll_curid
- ll_curid = Long(dw_list.Object.WrmID[currentrow])
- il_curid = ll_curid
-
- END IF
- end event
- event clicked;
- if row > 0 then
- this.selectrow(0, false)
- this.setrow(row)
- this.selectrow(row, true)
- end if
- end event
- type tv_1 from datawindow within w_oa_workreminduser
- integer y = 184
- integer width = 1326
- integer height = 1348
- integer taborder = 20
- string title = "none"
- string dataobject = "dw_oa_remind_modlist"
- boolean livescroll = true
- borderstyle borderstyle = stylelowered!
- end type
- event rowfocuschanged;IF ib_edit THEN
- IF MessageBox(publ_operator,'是否要确定放弃保存资料', Exclamation!, YesNo!, 2) = 2 THEN
- RETURN
- END IF
- END IF
- if currentrow > 0 then
- this.selectrow(0, false)
- this.setrow(currentrow)
- this.selectrow(currentrow, true)
- end if
- ib_edit = FALSE
- wf_refresh()
- is_curMOD = tv_1.Object.ModuleName[currentrow]
- //dw_list.retrieve(is_curMOD,is_cansee)
- //f_oa_workremind_retrieve_list(REF dw_list,is_cansee,is_curMOD)
- //f_oa_workremind_setRight(user_remindRight,dw_list)
- cb_5.triggerevent(clicked!)
- end event
- event clicked;
- if row > 0 then
- this.selectrow(0, false)
- this.setrow(row)
- this.selectrow(row, true)
- end if
- end event
- event rowfocuschanging;IF ib_edit THEN return 1
- end event
- type cbx_2 from checkbox within w_oa_workreminduser
- integer x = 1074
- integer y = 72
- integer width = 238
- integer height = 60
- integer textsize = -9
- integer weight = 400
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = variable!
- string facename = "宋体"
- long textcolor = 33554432
- long backcolor = 134217739
- boolean enabled = false
- string text = "反选"
- end type
- event clicked;cbx_2.checked=false
- cbx_1.checked=false
- long cnt
- for cnt=1 to dw_list.rowcount()
- if dw_list.object.selected[cnt]=1 then
- dw_list.object.selected[cnt]=0
- else
- dw_list.object.selected[cnt]=1
- end if
- next
- end event
- event constructor;this.BackColor=14215660
- end event
- type cbx_1 from checkbox within w_oa_workreminduser
- integer x = 814
- integer y = 72
- integer width = 224
- integer height = 60
- integer textsize = -9
- integer weight = 400
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = variable!
- string facename = "宋体"
- long textcolor = 33554432
- long backcolor = 134217739
- boolean enabled = false
- string text = "全选"
- end type
- event clicked;long cnt,curState
- if cbx_1.checked then
- curstate=1
- else
- curState=0
- end if
- for cnt=1 to dw_list.rowcount()
- dw_list.object.selected[cnt]=curState
- next
- end event
- event constructor;this.BackColor=14215660
- end event
- type cb_1 from uo_imflatbutton within w_oa_workreminduser
- integer x = 206
- integer width = 174
- integer height = 172
- integer taborder = 10
- boolean enabled = false
- string text = "保存"
- string normalpicname = "SAVE.BMP"
- integer picsize = 16
- toolbaralignment pic_align = alignattop!
- boolean border = false
- end type
- event clicked;call super::clicked;long cnt
- string new_right[]={'',''},arg_msg
- //复制一份订阅表
- for cnt=1 to dw_list.rowcount()
- if dw_list.object.selected[cnt]=1 then
- new_right[1]+=string(dw_list.object.wrmid[cnt])+","
- end if
- new_right[2]+=string(dw_list.object.wrmid[cnt])+","
- next
- f_oa_workremind_saveright(new_right,ref user_remindRight)
- string new_right1=''
- for cnt=1 to UpperBound(user_remindRight)
- if user_remindRight[cnt].selected=1 then
- new_right1+= string(user_remindRight[cnt].wrmid)+","
- end if
- next
- ib_edit=false
- wf_refresh()
- //dw_list.retrieve(is_curmod)
- //f_oa_workremind_retrieve_list(ref dw_list,is_cansee,is_curmod)
- //f_oa_workremind_setRight(user_remindRight,ref dw_list)
- cb_5.triggerevent(clicked!)
- if not u_wrm.uf_add_userworkremind(new_right1,publ_userid,arg_msg) then
- messagebox('',arg_msg)
- end if
- end event
- type r_bar from rectangle within w_oa_workreminduser
- long linecolor = 16777215
- long fillcolor = 1073741824
- integer x = 1330
- integer y = 8
- integer width = 73
- integer height = 172
- end type
- event constructor;this.fillcolor = 14215660
- this.linecolor = 14215660
- this.x = -1
- this.y = -1
- this.height = ln_bar2.beginy - 5
- this.width=ln_bar2.endx
- end event
- type ln_bar2 from line within w_oa_workreminduser
- long linecolor = 16777215
- integer linethickness = 4
- integer beginy = 180
- integer endx = 3323
- integer endy = 180
- end type
- type ln_bar from line within w_oa_workreminduser
- long linecolor = 268435456
- integer linethickness = 4
- integer beginy = 176
- integer endx = 3323
- integer endy = 176
- end type
|