123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607 |
- $PBExportHeader$w_oa_workremindadmin.srw
- forward
- global type w_oa_workremindadmin from window
- end type
- type cb_5 from uo_imflatbutton within w_oa_workremindadmin
- end type
- type cb_exit from uo_imflatbutton within w_oa_workremindadmin
- end type
- type cbx_2 from checkbox within w_oa_workremindadmin
- end type
- type cbx_1 from checkbox within w_oa_workremindadmin
- end type
- type dw_list from datawindow within w_oa_workremindadmin
- end type
- type tv_1 from datawindow within w_oa_workremindadmin
- end type
- type dw_userlist from datawindow within w_oa_workremindadmin
- end type
- type cb_4 from uo_imflatbutton within w_oa_workremindadmin
- end type
- type cb_3 from uo_imflatbutton within w_oa_workremindadmin
- end type
- type cb_2 from uo_imflatbutton within w_oa_workremindadmin
- end type
- type cb_1 from uo_imflatbutton within w_oa_workremindadmin
- end type
- type ln_bar2 from line within w_oa_workremindadmin
- end type
- type ln_bar from line within w_oa_workremindadmin
- end type
- type r_bar from rectangle within w_oa_workremindadmin
- end type
- end forward
- global type w_oa_workremindadmin 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_exit cb_exit
- cbx_2 cbx_2
- cbx_1 cbx_1
- dw_list dw_list
- tv_1 tv_1
- dw_userlist dw_userlist
- cb_4 cb_4
- cb_3 cb_3
- cb_2 cb_2
- cb_1 cb_1
- ln_bar2 ln_bar2
- ln_bar ln_bar
- r_bar r_bar
- end type
- global w_oa_workremindadmin w_oa_workremindadmin
- type variables
- boolean ib_edit=false
- string is_curmod=''
- uo_oa_workremind u_wrm
- long il_curid=-1
- string is_curSelectUser=''
- s_wrm_right user_remindRight[]
- s_wrm_right copyRight[]
- 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="放弃"
- // cb_3.enabled=true
- cb_4.enabled=true
- 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_3.enabled=false
- cb_4.enabled=false
- 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
- event open;dw_userlist.setTrans(sqlca)
- tv_1.setTrans(sqlca)
- dw_list.setTrans(sqlca)
- long ll_wrmid,cnt_wrm,cnt
- u_wrm=create uo_oa_workremind
- string ls_right
-
- //取提醒定义表的提醒id列
- declare cr cursor for
- select wrmid
- from oa_workreminddef;
- open cr;
- fetch cr into :ll_wrmid;
- do while sqlca.sqlcode=0
- cnt_wrm++
- user_remindRight[cnt_wrm].wrmid=ll_wrmid
- user_remindRight[cnt_wrm].selected=0
- fetch cr into :ll_wrmid;
- loop
- 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
- dw_userlist.retrieve()
- tv_1.retrieve()
- end event
- on w_oa_workremindadmin.create
- this.cb_5=create cb_5
- this.cb_exit=create cb_exit
- this.cbx_2=create cbx_2
- this.cbx_1=create cbx_1
- this.dw_list=create dw_list
- this.tv_1=create tv_1
- this.dw_userlist=create dw_userlist
- this.cb_4=create cb_4
- this.cb_3=create cb_3
- this.cb_2=create cb_2
- this.cb_1=create cb_1
- this.ln_bar2=create ln_bar2
- this.ln_bar=create ln_bar
- this.r_bar=create r_bar
- this.Control[]={this.cb_5,&
- this.cb_exit,&
- this.cbx_2,&
- this.cbx_1,&
- this.dw_list,&
- this.tv_1,&
- this.dw_userlist,&
- this.cb_4,&
- this.cb_3,&
- this.cb_2,&
- this.cb_1,&
- this.ln_bar2,&
- this.ln_bar,&
- this.r_bar}
- end on
- on w_oa_workremindadmin.destroy
- destroy(this.cb_5)
- destroy(this.cb_exit)
- destroy(this.cbx_2)
- destroy(this.cbx_1)
- destroy(this.dw_list)
- destroy(this.tv_1)
- destroy(this.dw_userlist)
- destroy(this.cb_4)
- destroy(this.cb_3)
- destroy(this.cb_2)
- destroy(this.cb_1)
- destroy(this.ln_bar2)
- destroy(this.ln_bar)
- destroy(this.r_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 - 380
- //
- //dw_userlist.height=height1
- //tv_1.height=height1
- //tv_1.x=dw_userlist.x+dw_userlist.width+10
- //tv_1.y=dw_userlist.y
- //
- //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
- tv_1.x = dw_userlist.x + dw_userlist.width + 10
- dw_list.x = tv_1.x + tv_1.width + 10
- dw_list.width = this.width - dw_list.x - 40
- dw_userlist.height = this.height - dw_userlist.y - 140
- tv_1.height = dw_userlist.height
- dw_list.height = dw_userlist.height
- end event
- type cb_5 from uo_imflatbutton within w_oa_workremindadmin
- integer x = 37
- integer width = 169
- integer height = 172
- integer taborder = 30
- string text = "刷新"
- string normalpicname = "refresh.bmp"
- integer picsize = 16
- toolbaralignment pic_align = alignattop!
- boolean border = false
- end type
- event clicked;call super::clicked;dw_list.retrieve(is_curMOD)
- f_oa_workremind_setRight(user_remindRight,dw_list)
- end event
- type cb_exit from uo_imflatbutton within w_oa_workremindadmin
- integer x = 887
- 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 cbx_2 from checkbox within w_oa_workremindadmin
- integer x = 1527
- integer y = 68
- 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 = 67108864
- 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_workremindadmin
- integer x = 1266
- integer y = 48
- integer width = 224
- integer height = 92
- integer textsize = -9
- integer weight = 400
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = variable!
- string facename = "宋体"
- long textcolor = 33554432
- long backcolor = 67108864
- 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 dw_list from datawindow within w_oa_workremindadmin
- integer x = 1669
- integer y = 192
- integer width = 1911
- integer height = 1344
- integer taborder = 40
- string title = "none"
- 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_workremindadmin
- integer x = 699
- integer y = 192
- integer width = 955
- integer height = 1344
- integer taborder = 30
- 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)
- //f_oa_workremind_setRight(user_remindRight,dw_list)
- cb_5.triggerevent(clicked!)
- end event
- event rowfocuschanging;IF ib_edit THEN return 1
- end event
- event clicked;
- if row > 0 then
- this.selectrow(0, false)
- this.setrow(row)
- this.selectrow(row, true)
- end if
- end event
- type dw_userlist from datawindow within w_oa_workremindadmin
- integer y = 188
- integer width = 699
- integer height = 1336
- integer taborder = 20
- string title = "none"
- string dataobject = "dw_oa_remind_userlist"
- 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
- String ls_right,arg_msg
- Long cnt
- ib_edit = FALSE
- wf_refresh()
- is_curSelectUser = dw_userlist.Object.UserID[currentrow]
- //u_wrm.uf_get_userworkremind(ref ls_right,is_curSelectUser,ref arg_msg)
- u_wrm.uf_get_cansee(is_curSelectUser,REF is_cansee,REF arg_msg)
- FOR cnt = 1 TO UpperBound(user_remindRight)
- IF Pos(is_cansee,String(user_remindRight[cnt].wrmid)) <> 0 THEN
- user_remindRight[cnt].Selected = 1
- ELSE
- user_remindRight[cnt].Selected = 0
- END IF
- NEXT
- //dw_list.Retrieve(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 cb_4 from uo_imflatbutton within w_oa_workremindadmin
- integer x = 718
- integer width = 169
- integer height = 172
- integer taborder = 10
- boolean enabled = false
- string text = "粘贴"
- string normalpicname = "PASTE.BMP"
- integer picsize = 16
- toolbaralignment pic_align = alignattop!
- boolean border = false
- end type
- event clicked;call super::clicked;long cnt
- string ls_right='',arg_msg
- for cnt=1 to UpperBound(copyRight)
- user_remindRight[cnt]=copyRight[cnt]
- if copyRight[cnt].selected=1 then
- ls_right+=string(copyRight[cnt].wrmid)+","
- end if
- next
- if not u_wrm.uf_add_userworkremind(ls_right,is_curSelectUser,arg_msg)then
- messagebox('',arg_msg)
- return
- end if
- ib_edit=false
- wf_refresh()
- f_oa_workremind_setright(user_remindRight,dw_list)
- end event
- type cb_3 from uo_imflatbutton within w_oa_workremindadmin
- integer x = 549
- integer width = 169
- integer height = 172
- integer taborder = 10
- string text = "复制"
- string normalpicname = "COPY.BMP"
- integer picsize = 16
- toolbaralignment pic_align = alignattop!
- boolean border = false
- end type
- event clicked;call super::clicked;long cnt
- if ib_edit then
- IF MessageBox(publ_operator,'当前处于编辑状态,更改将不被复制!~n是否放弃复制?', Exclamation!, YesNo!, 2) = 1 THEN
- RETURN
- END IF
- end if
- for cnt=1 to UpperBound(user_remindRight)
- copyRight[cnt]=user_remindRight[cnt]
- next
- end event
- type cb_2 from uo_imflatbutton within w_oa_workremindadmin
- integer x = 379
- integer width = 169
- integer height = 172
- integer taborder = 10
- 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_1 from uo_imflatbutton within w_oa_workremindadmin
- integer x = 210
- integer width = 169
- 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_setRight(user_remindRight,dw_list)
- cb_5.triggerevent(clicked!)
- if not u_wrm.uf_add_canseeStr(new_right1,is_curSelectUser,ref arg_msg) then
- messagebox('',arg_msg)
- end if
- end event
- type ln_bar2 from line within w_oa_workremindadmin
- long linecolor = 16777215
- integer linethickness = 4
- integer beginy = 180
- integer endx = 3323
- integer endy = 188
- end type
- type ln_bar from line within w_oa_workremindadmin
- long linecolor = 268435456
- integer linethickness = 4
- integer beginy = 180
- integer endx = 3323
- integer endy = 180
- end type
- type r_bar from rectangle within w_oa_workremindadmin
- long linecolor = 16777215
- long fillcolor = 1073741824
- integer x = 1778
- 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
|