123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469 |
- $PBExportHeader$w_accounts_ch.srw
- forward
- global type w_accounts_ch from w_publ_edit_index
- end type
- type st_2 from statictext within w_accounts_ch
- end type
- type ddlb_1 from dropdownlistbox within w_accounts_ch
- end type
- end forward
- global type w_accounts_ch from w_publ_edit_index
- integer width = 3611
- integer height = 1664
- string title = "出纳帐号"
- event ue_help ( )
- st_2 st_2
- ddlb_1 ddlb_1
- end type
- global w_accounts_ch w_accounts_ch
- type variables
- Long cur_ifuse = -1
- Long il_rst_accountsid = 0
- end variables
- event ue_help();Int i
- i = htmlhelpA(Handle(THIS), sys_help_chm, 0, THIS.Title+".htm")
- end event
- on w_accounts_ch.create
- int iCurrent
- call super::create
- this.st_2=create st_2
- this.ddlb_1=create ddlb_1
- iCurrent=UpperBound(this.Control)
- this.Control[iCurrent+1]=this.st_2
- this.Control[iCurrent+2]=this.ddlb_1
- end on
- on w_accounts_ch.destroy
- call super::destroy
- destroy(this.st_2)
- destroy(this.ddlb_1)
- end on
- event ue_usual_query_retr;call super::ue_usual_query_retr;if dw_edit_mode or keydown(keyf4!) or keydown(keyf5!) then return
- string ls_querystrpart=''
- ls_newselect=lower(ori_oldselect)
- if trim(sle_usual_query.text)<>'' then
- if pos(trim(sle_usual_query.text),'%')=0 then
- ls_querystrpart="(accountsname like '%"+trim(sle_usual_query.text)+"%')"
- else
- ls_querystrpart="(accountsname like '"+trim(sle_usual_query.text)+"')"
- end if
- if Pos(ls_newselect," where ") <> 0 then
- ls_newselect=ls_newselect+" AND ("+ls_querystrpart+')'
- else
- ls_newselect=ls_newselect+" where ("+ls_querystrpart+')'
- end if
- end if
- wf_retrieveuc(dw_uc,ls_newselect,1) //注意必须有此句
- end event
- event retrieve_uc;boolean cb_firstpage_enabled,cb_nextpage_enabled,cb_retrieveall_enabled
- boolean cb_priorpage_enabled,cb_query_enabled,cb_retrieve_enabled
- cb_firstpage_enabled=cb_firstpage.enabled
- cb_nextpage_enabled=cb_nextpage.enabled
- cb_retrieveall_enabled=cb_retrieveall.enabled
- cb_priorpage_enabled=cb_priorpage.enabled
- cb_retrieve_enabled=cb_retrieve.enabled
- cb_firstpage.enabled=false
- cb_nextpage.enabled=false
- cb_retrieveall.enabled=false
- cb_priorpage.enabled=false
- cb_retrieve.enabled=false
- dw_UC.setredraw(false)
- dw_index.ShareDataOff()
- SetPointer(HourGlass!)
- dw_UC.retrieve(cur_ifuse)
- SetPointer(Arrow!)
- dw_uc.sharedata(dw_index)
- dw_UC.setredraw(true)
- if dw_index.rowcount()>=1 then
- dw_index.selectrow(0,false)
- dw_index.selectrow(1,true)
- end if
- cb_firstpage.enabled=cb_firstpage_enabled
- cb_nextpage.enabled=cb_nextpage_enabled
- cb_retrieveall.enabled=cb_retrieveall_enabled
- cb_priorpage.enabled=cb_priorpage_enabled
- cb_retrieve.enabled=cb_retrieve_enabled
- end event
- event ue_usual_query_filt;call super::ue_usual_query_filt;IF dw_edit_mode OR KeyDown(keyf4!) OR KeyDown(keyf5!) THEN RETURN
- String obj_expr = ''
- IF Trim(sle_usual_query.Text) <> '' THEN
- IF Pos(Trim(sle_usual_query.Text),'%') = 0 THEN
- obj_expr = obj_expr+'( accountsname like "%'+Trim(sle_usual_query.Text)+'%" )'
- ELSE
- obj_expr = obj_expr+'( accountsname like "'+Trim(sle_usual_query.Text)+'" )'
- END IF
- END IF
- dw_uc.SetFilter(obj_expr)
- dw_uc.SetRedraw(FALSE)
- dw_index.SetRedraw(FALSE)
- dw_uc.Filter()
- IF dw_index.RowCount() >= 1 THEN
- dw_index.SelectRow(0,FALSE)
- dw_index.SelectRow(1,TRUE)
- END IF
- dw_uc.SetRedraw(TRUE)
- dw_index.SetRedraw(TRUE)
- end event
- event refresh_interface;call super::refresh_interface;ddlb_1.enabled = not dw_edit_mode
- end event
- event user_key;call super::user_key;IF KeyDown(KeyF1!) THEN
- THIS.TriggerEvent('ue_help')
- end if
- end event
- event close;call super::close;CLOSEWITHRETURN(THIS,il_rst_accountsid)
- end event
- event open;call super::open; cbx_mlselect.Visible = False
- cbx_allselect.Visible = False
- end event
- type cb_func from w_publ_edit_index`cb_func within w_accounts_ch
- end type
- type cb_exit from w_publ_edit_index`cb_exit within w_accounts_ch
- integer x = 1440
- end type
- type sle_usual_query from w_publ_edit_index`sle_usual_query within w_accounts_ch
- integer x = 343
- integer width = 709
- boolean bringtotop = true
- end type
- type cb_nextpage from w_publ_edit_index`cb_nextpage within w_accounts_ch
- integer x = 3031
- integer width = 165
- boolean bringtotop = true
- boolean enabled = false
- end type
- type cb_priorpage from w_publ_edit_index`cb_priorpage within w_accounts_ch
- integer x = 2866
- integer width = 165
- boolean bringtotop = true
- boolean enabled = false
- end type
- type cb_firstpage from w_publ_edit_index`cb_firstpage within w_accounts_ch
- integer x = 2702
- integer width = 165
- boolean bringtotop = true
- boolean enabled = false
- end type
- type cb_retrieveall from w_publ_edit_index`cb_retrieveall within w_accounts_ch
- integer x = 2537
- integer width = 165
- boolean bringtotop = true
- boolean enabled = false
- end type
- type em_pagerowno from w_publ_edit_index`em_pagerowno within w_accounts_ch
- integer x = 2235
- integer y = 0
- boolean bringtotop = true
- boolean enabled = false
- end type
- type st_pagerowno from w_publ_edit_index`st_pagerowno within w_accounts_ch
- integer x = 128
- integer y = 800
- integer width = 187
- boolean bringtotop = true
- end type
- type st_1 from w_publ_edit_index`st_1 within w_accounts_ch
- integer width = 315
- integer height = 60
- boolean bringtotop = true
- string text = "帐号名称含:"
- alignment alignment = right!
- end type
- type cb_add from w_publ_edit_index`cb_add within w_accounts_ch
- end type
- event cb_add::clicked;IF NOT f_power_ind(141,sys_msg_pow) THEN
- MessageBox(publ_operator,sys_msg_pow)
- RETURN
- END IF
- Long ll_accountsid = 0
- String errmsg = ''
- IF dw_edit_mode THEN
- dw_uc.AcceptText()
- IF dw_uc.GetNextModified(0, primary!) = 0 THEN
- MessageBox('系统提示','没有任何修改,不可以保存!')
- RETURN
- END IF
-
- dw_uc.Object.accountsname[dw_uc.GetRow()] = Trim(dw_uc.Object.accountsname[dw_uc.GetRow()])
- dw_uc.Object.dscrp[dw_uc.GetRow()] = Trim(dw_uc.Object.dscrp[dw_uc.GetRow()])
- dw_uc.Object.opdate[dw_uc.GetRow()] = Today()
- dw_uc.Object.opemp[dw_uc.GetRow()] = publ_operator
-
-
- IF dw_uc.Object.accountsname[dw_uc.GetRow()] = '' THEN
- MessageBox('系统提示','请输入帐号名称!')
- RETURN
- END IF
-
- IF dw_uc.Object.moneyid[dw_uc.GetRow()] = 0 THEN
- MessageBox('系统提示','请选择币种!')
- RETURN
- END IF
-
- //////////////////////////////////////////////////
- IF dw_uc.Object.accountsid[dw_uc.GetRow()] = 0 THEN
- ll_accountsid = f_sys_scidentity(0,"u_accounts","accountsid",errmsg,TRUE,id_sqlca)
- IF ll_accountsid <= 0 THEN
- MessageBox("系统信息",errmsg)
- RETURN
- ELSE
- dw_uc.Object.accountsid[dw_uc.GetRow()] = ll_accountsid
- END IF
- END IF
- /////////////////////////////
- END IF
- CALL SUPER::Clicked
- IF dw_edit_mode THEN
- // dw_uc.SetRedraw(FALSE)
- // dw_uc.object.scid[dw_uc.getrow()] = cur_scid
- // dw_uc.SetRedraw(TRUE)
- dw_uc.SetColumn('accountsname')
- END IF
- end event
- type cb_edit from w_publ_edit_index`cb_edit within w_accounts_ch
- end type
- event cb_edit::clicked;if not f_power_ind(141,sys_msg_pow) THEN
- MessageBox(publ_operator,sys_msg_pow)
- RETURN
- END IF
- CALL SUPER::CLICKED
- end event
- type cb_delet from w_publ_edit_index`cb_delet within w_accounts_ch
- end type
- event cb_delet::clicked;if not f_power_ind(141,sys_msg_pow) THEN
- MessageBox(publ_operator,sys_msg_pow)
- RETURN
- END IF
- long LS_id
- LONG LS_LONG=0
- IF DW_UC.GETROW()<=0 THEN
- MESSAGEBOX('','没有操作目标记录!')
- RETURN
- END IF
- LS_id=DW_UC.OBJECT. accountsid[DW_UC.GETROW()]
- select COUNT(*) into :LS_LONG from u_rap_money where u_rap_money.accountid=:LS_id ;
- if SQLCA.SQLCode<>0 then
- MessageBox ("NO","数据查询操作失败!(请重试!)",Exclamation!,OK!)
- return
- end if
- IF LS_LONG>0 THEN
- MessageBox ("","该资料已经使用于出纳帐,不可以删除!",Exclamation!,OK!)
- RETURN
- END IF
- IF MessageBox ("IF","是否确定要删除当前记录?(选择确定后记录将不可恢复)",Question!,YesNo! ) = 2 THEN
- RETURN
- END IF
- dw_uc.SetRedraw (false)
- dw_UC.DeleteRow (0)
- dw_UC.TriggerEvent (rowfocuschanged!)
- if dw_UC.Update() = -1 then
- rollback;
- MessageBox ("NO","删除记录操作失败!",Exclamation!,OK!)
- else
- commit;
- end if
- dw_uc.SetRedraw (true)
- WF_INDEX_UC()
- end event
- type cb_choice from w_publ_edit_index`cb_choice within w_accounts_ch
- integer width = 165
- end type
- event cb_choice::clicked;call super::clicked;//单选代码
- Long LS_ROW
- LS_ROW = dw_uc.GetRow()
- IF LS_ROW <= 0 THEN
- MessageBox('系统提示','请先选择目标行!',StopSign!)
- RETURN
- END IF
- il_rst_accountsid = dw_INDEX.Object.accountsid[LS_ROW]
- Close(Parent)
- end event
- type cb_cancel from w_publ_edit_index`cb_cancel within w_accounts_ch
- integer x = 1870
- integer y = 0
- integer width = 165
- integer height = 164
- end type
- type cbx_mlselect from w_publ_edit_index`cbx_mlselect within w_accounts_ch
- integer x = 251
- integer y = 512
- end type
- type cbx_allselect from w_publ_edit_index`cbx_allselect within w_accounts_ch
- integer x = 485
- integer y = 512
- end type
- type cb_mode_itfchg_b from w_publ_edit_index`cb_mode_itfchg_b within w_accounts_ch
- integer x = 690
- integer y = 660
- integer height = 124
- end type
- type cb_mode_itfchg from w_publ_edit_index`cb_mode_itfchg within w_accounts_ch
- end type
- type gb_1 from w_publ_edit_index`gb_1 within w_accounts_ch
- integer x = 32
- integer y = 624
- end type
- type dw_uc from w_publ_edit_index`dw_uc within w_accounts_ch
- integer x = 2039
- integer width = 1554
- integer height = 1284
- string dataobject = "dw_accounts_edit"
- end type
- type cb_retrieve from w_publ_edit_index`cb_retrieve within w_accounts_ch
- end type
- type cb_print from w_publ_edit_index`cb_print within w_accounts_ch
- end type
- event cb_print::clicked;S_print_MSG LS_PRMSG
- LS_PRMSG.obj_dwNAME='dw_rp_accounts_index'
- LS_PRMSG.SHARE_DW=DW_UC
- LS_PRMSG.TAG_TEXT='银行帐号'
- LS_PRMSG.SETUP_FLAG=0
- LS_PRMSG.PAGECH_FLAG=1
- Openwithparm(w_publ_preview,LS_PRMSG)
- end event
- type ln_bar from w_publ_edit_index`ln_bar within w_accounts_ch
- end type
- type ln_bar2 from w_publ_edit_index`ln_bar2 within w_accounts_ch
- end type
- type r_bar from w_publ_edit_index`r_bar within w_accounts_ch
- end type
- type ln_1 from w_publ_edit_index`ln_1 within w_accounts_ch
- end type
- type ln_2 from w_publ_edit_index`ln_2 within w_accounts_ch
- end type
- type dw_index from w_publ_edit_index`dw_index within w_accounts_ch
- integer width = 2034
- integer height = 1284
- string dataobject = "dw_accounts_index"
- end type
- type cb_help from w_publ_edit_index`cb_help within w_accounts_ch
- end type
- type st_2 from statictext within w_accounts_ch
- integer x = 1234
- integer y = 208
- integer width = 160
- integer height = 60
- boolean bringtotop = true
- integer textsize = -9
- integer weight = 400
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = variable!
- string facename = "宋体"
- long textcolor = 33554432
- long backcolor = 134217739
- string text = "有效:"
- alignment alignment = right!
- boolean focusrectangle = false
- end type
- type ddlb_1 from dropdownlistbox within w_accounts_ch
- integer x = 1431
- integer y = 192
- integer width = 338
- integer height = 300
- integer taborder = 20
- boolean bringtotop = true
- 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
- event selectionchanged;if this.Text = '有效' then
- cur_ifuse = 1
- elseif this.Text = '无效' then
- cur_ifuse = 0
- else
- cur_ifuse = -1
- end if
- cb_retrieve.triggerevent(clicked!)
- end event
|