123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411 |
- $PBExportHeader$w_accounts_def.srw
- forward
- global type w_accounts_def from w_publ_edit_index
- end type
- type cbx_1 from checkbox within w_accounts_def
- end type
- end forward
- global type w_accounts_def from w_publ_edit_index
- integer width = 3008
- integer height = 1640
- string title = "出纳帐号"
- boolean minbox = true
- windowtype windowtype = popup!
- cbx_1 cbx_1
- end type
- global w_accounts_def w_accounts_def
- type variables
- long cur_scid=-1
- end variables
- on w_accounts_def.create
- int iCurrent
- call super::create
- this.cbx_1=create cbx_1
- iCurrent=UpperBound(this.Control)
- this.Control[iCurrent+1]=this.cbx_1
- end on
- on w_accounts_def.destroy
- call super::destroy
- destroy(this.cbx_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!)
- Long ifuse
- IF NOT cbx_1.Checked THEN
- ifuse = -1
- ELSE
- ifuse = 1
- END IF
- dw_UC.Retrieve(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
- type cb_func from w_publ_edit_index`cb_func within w_accounts_def
- end type
- type cb_exit from w_publ_edit_index`cb_exit within w_accounts_def
- integer x = 1179
- end type
- type sle_usual_query from w_publ_edit_index`sle_usual_query within w_accounts_def
- integer x = 201
- integer y = 188
- integer width = 631
- integer height = 88
- boolean bringtotop = true
- end type
- type cb_nextpage from w_publ_edit_index`cb_nextpage within w_accounts_def
- boolean bringtotop = true
- end type
- type cb_priorpage from w_publ_edit_index`cb_priorpage within w_accounts_def
- boolean bringtotop = true
- end type
- type cb_firstpage from w_publ_edit_index`cb_firstpage within w_accounts_def
- boolean bringtotop = true
- end type
- type cb_retrieveall from w_publ_edit_index`cb_retrieveall within w_accounts_def
- boolean bringtotop = true
- end type
- type em_pagerowno from w_publ_edit_index`em_pagerowno within w_accounts_def
- boolean bringtotop = true
- end type
- type st_pagerowno from w_publ_edit_index`st_pagerowno within w_accounts_def
- integer y = 16
- integer width = 238
- boolean bringtotop = true
- end type
- type st_1 from w_publ_edit_index`st_1 within w_accounts_def
- integer x = 0
- integer width = 187
- 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_def
- end type
- event cb_add::clicked;IF Not f_power_ind(141) THEN
- MessageBox('提示','你没有使用权限!',information!,ok!)
- 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('提示','没有任何修改,不可以保存!',information!,ok!)
- RETURN
- END IF
-
- dw_uc.Object.bankstr[dw_uc.GetRow()] = Trim(dw_uc.Object.bankstr[dw_uc.GetRow()])
- dw_uc.Object.idcode[dw_uc.GetRow()] = Trim(dw_uc.Object.idcode[dw_uc.GetRow()])
- 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('提示','请输入帐号名称!',information!,ok!)
- RETURN
- END IF
-
- IF dw_uc.Object.moneyid[dw_uc.GetRow()] = 0 THEN
- MessageBox('提示','请选择币种!',information!,ok!)
- RETURN
- END IF
- //////////////////////////////////////////////// //
- IF dw_uc.Object.accountsid[dw_uc.GetRow()] = 0 THEN
- ll_accountsid = f_sys_scidentity(0,"u_accounts","accountsid",errmsg,False,sqlca)
- IF ll_accountsid <= 0 THEN
- MessageBox("提示",errmsg,information!,ok!)
- RETURN
- ELSE
- dw_uc.Object.accountsid[dw_uc.GetRow()] = ll_accountsid
- END IF
- END IF
- /////////////////////////// //
- //ELSE
- // if cur_scid < 0 then
- // messagebox('系统提示','请先选择分部!')
- // return
- // end if
- END IF
- CALL Super::Clicked
- IF dw_edit_mode THEN
- dw_uc.SetRedraw(False)
- //dw_uc.object.u_accounts_scid[dw_uc.getrow()] = cur_scid
- dw_uc.SetRedraw(True)
- dw_uc.SetColumn('bankstr')
- END IF
- end event
- type cb_edit from w_publ_edit_index`cb_edit within w_accounts_def
- end type
- event cb_edit::clicked;if not f_power_ind(141) then
- messagebox('提示','你没有使用权限!',information!,ok!)
- return
- end if
- CALL SUPER::CLICKED
- end event
- type cb_delet from w_publ_edit_index`cb_delet within w_accounts_def
- end type
- event cb_delet::clicked;if not f_power_ind(141) then
- messagebox('提示','你没有使用权限!',information!,ok!)
- return
- end if
- long LS_id
- LONG LS_LONG=0
- IF DW_UC.GETROW()<=0 THEN
- MESSAGEBOX('提示','没有操作目标记录!',information!,ok!)
- 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 ("错误","数据查询操作失败!(请重试!)",stopsign!,OK!)
- return
- end if
- IF LS_LONG>0 THEN
- MessageBox ("错误","该资料已经使用于出纳帐,不可以删除!",stopsign!,OK!)
- RETURN
- END IF
- IF MessageBox ("询问","是否确定要删除当前记录?(选择确定后记录将不可恢复)",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 ("错误","删除记录操作失败!",stopsign!,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_def
- integer x = 1029
- end type
- type cb_cancel from w_publ_edit_index`cb_cancel within w_accounts_def
- end type
- type cbx_mlselect from w_publ_edit_index`cbx_mlselect within w_accounts_def
- integer x = 2363
- integer y = 212
- end type
- type cbx_allselect from w_publ_edit_index`cbx_allselect within w_accounts_def
- integer x = 2597
- integer y = 212
- end type
- type cb_mode_itfchg_b from w_publ_edit_index`cb_mode_itfchg_b within w_accounts_def
- end type
- type cb_mode_itfchg from w_publ_edit_index`cb_mode_itfchg within w_accounts_def
- integer x = 1330
- end type
- type gb_1 from w_publ_edit_index`gb_1 within w_accounts_def
- end type
- type dw_uc from w_publ_edit_index`dw_uc within w_accounts_def
- integer x = 1472
- integer y = 304
- integer width = 1509
- integer height = 1240
- string dataobject = "dw_accounts_edit"
- end type
- type cb_retrieve from w_publ_edit_index`cb_retrieve within w_accounts_def
- end type
- type cb_print from w_publ_edit_index`cb_print within w_accounts_def
- 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_def
- end type
- type ln_bar2 from w_publ_edit_index`ln_bar2 within w_accounts_def
- end type
- type r_bar from w_publ_edit_index`r_bar within w_accounts_def
- end type
- type ln_1 from w_publ_edit_index`ln_1 within w_accounts_def
- end type
- type ln_2 from w_publ_edit_index`ln_2 within w_accounts_def
- end type
- type dw_index from w_publ_edit_index`dw_index within w_accounts_def
- integer y = 304
- integer width = 1463
- integer height = 1240
- string dataobject = "dw_accounts_index"
- end type
- type cb_help from w_publ_edit_index`cb_help within w_accounts_def
- end type
- type cbx_1 from checkbox within w_accounts_def
- integer x = 919
- integer y = 212
- integer width = 402
- 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 = "只显示有效"
- end type
- event clicked;int ll_ifuse
- if this.checked then
- ll_ifuse = 1
- else
- ll_ifuse = -1
- end if
- f_SetProfileString (sys_empid,dw_uc.DATAOBJECT, "if_user",string(ll_ifuse) )
- parent.triggerevent('retrieve_uc')
- end event
- event constructor;Int ll_ifuse
- ll_ifuse = Long(f_ProfileString (sys_empid,dw_uc.DataObject, "if_user",'-1'))
- IF ll_ifuse = 1 THEN
- THIS.Checked = TRUE
- ELSE
- THIS.Checked = FALSE
- END IF
- end event
|