123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284 |
- $PBExportHeader$w_book_def.srw
- forward
- global type w_book_def from w_publ_edit_choice
- end type
- type st_1 from statictext within w_book_def
- end type
- end forward
- global type w_book_def from w_publ_edit_choice
- string title = "帐套设置"
- boolean minbox = true
- windowtype windowtype = popup!
- st_1 st_1
- end type
- global w_book_def w_book_def
- on w_book_def.create
- int iCurrent
- call super::create
- this.st_1=create st_1
- iCurrent=UpperBound(this.Control)
- this.Control[iCurrent+1]=this.st_1
- end on
- on w_book_def.destroy
- call super::destroy
- destroy(this.st_1)
- end on
- event retrieve_uc;Long i
- String ls_ini_book
- Long ll_row
- string ls_temp
- dw_uc.SetRedraw(FALSE)
- dw_uc.reset()
- FOR i = 1 TO 20
- // ls_ini_book = f_psw_bczh(ProfileString (sys_inifilename_other,'sys_dl_book', String(i), ''),1,sys_power_key)
- ls_ini_book = ProfileString (sys_inifilename_other,'sys_dl_book', String(i), '')
-
- IF Trim(ls_ini_book) = '' THEN CONTINUE
-
- ll_row = dw_uc.InsertRow(0)
-
- dw_uc.Object.bookname[ll_row] = Mid(ls_ini_book,1,Pos(ls_ini_book,':') -1 )
- ls_ini_book = replace(ls_ini_book,1,Pos(ls_ini_book,':') ,'')
- dw_uc.Object.dbname[ll_row] = Mid(ls_ini_book,1,Pos(ls_ini_book,':') -1 )
- ls_ini_book = replace(ls_ini_book,1,Pos(ls_ini_book,':') ,'')
- dw_uc.Object.code[ll_row] = Mid(ls_ini_book,1,Pos(ls_ini_book,':') -1 )
- ls_ini_book = replace(ls_ini_book,1,Pos(ls_ini_book,':') ,'')
- dw_uc.Object.ifuse[ll_row] = long(ls_ini_book)
- dw_uc.Object.printid[ll_row] = i
- NEXT
- dw_uc.SetSort('code A')
- dw_uc.Sort()
- dw_uc.SetRedraw(TRUE)
- end event
- event close;call super::close;IF IsValid(w_sys_login_s) THEN
- w_sys_login_s.Dynamic wf_getbook(True)
- END IF
- end event
- type cb_func from w_publ_edit_choice`cb_func within w_book_def
- integer x = 0
- integer width = 329
- string text = "服务器设置"
- end type
- event cb_func::clicked;open(w_set_server)
- end event
- type cb_exit from w_publ_edit_choice`cb_exit within w_book_def
- integer x = 1015
- end type
- type cb_add from w_publ_edit_choice`cb_add within w_book_def
- integer x = 329
- end type
- event cb_add::clicked;Long i
- IF dw_edit_mode THEN
- Long ll_row
- ll_row = dw_uc.GetRow()
- dw_uc.AcceptText()
-
-
-
- IF ll_row = 0 THEN RETURN
- IF Pos(dw_uc.Object.dbname[ll_row],':') > 0 THEN
- MessageBox('提示',"数据库名称含有':',请修改", Information!, OK! )
- END IF
- IF Pos(dw_uc.Object.bookname[ll_row],':') > 0 THEN
- MessageBox('提示',"帐套名称含有':',请修改", Information!, OK! )
- END IF
- IF Pos(dw_uc.Object.code[ll_row],':') > 0 THEN
- MessageBox('提示',"编号含有':',请修改", Information!, OK! )
- END IF
-
- String ls_ini_book
-
- ls_ini_book = RightTrim(LeftTrim(dw_uc.Object.bookname[ll_row])) + ':'+&
- RightTrim(LeftTrim(dw_uc.Object.dbname[ll_row]))+ ':'+&
- RightTrim(LeftTrim(dw_uc.Object.code[ll_row]))+ ':'+&
- String(dw_uc.Object.ifuse[ll_row])
- SetProfileString(sys_inifilename_other,'sys_dl_book', String(dw_uc.Object.printid[ll_row]), f_psw_bczh(ls_ini_book,0,sys_power_key))
-
- dw_edit_mode = Not dw_edit_mode
- WF_FACE_CHANGE()
-
- ELSE
- IF dw_uc.RowCount() = 20 THEN
- MessageBox('提示',"不能再建立帐套", Information!, OK! )
- RETURN
- END IF
-
- i = 1
- DO While (dw_uc.Find("printid = " + String(i), 1, dw_uc.RowCount()) > 0)
- i++
- LOOP
-
- s_set_book_parm s_parm
- s_parm.bookid = i
- s_parm.ifguid = 0
-
- OpenWithParm(w_set_book, s_parm)
- END IF
- dw_uc.SetTabOrder('bookname',0)
- dw_uc.SetTabOrder('dbname',0)
- dw_uc.SetTabOrder('ifuse',0)
- Parent.TriggerEvent('retrieve_uc')
- end event
- type cb_edit from w_publ_edit_choice`cb_edit within w_book_def
- integer x = 521
- end type
- event cb_edit::clicked;call super::clicked;//Long i
- //IF dw_edit_mode THEN
- // IF dw_uc.GetItemStatus(dw_uc.GetRow(), 0, Primary!) = NewModified! OR dw_uc.GetItemStatus(dw_uc.GetRow(), 0, Primary!) = New! THEN
- // dw_uc.DeleteRow(dw_uc.GetRow())
- // ELSE
- // dw_uc.ReselectRow(dw_uc.GetRow())
- // END IF
- // dw_uc.SetTabOrder('bookname',0)
- // dw_uc.SetTabOrder('dbname',0)
- // dw_uc.SetTabOrder('ifuse',0)
- // modifyrow_no = 0
- // parent.triggerevent('retrieve_uc')
- //ELSE
- // modifyrow_no = dw_uc.GetRow()
- // dw_uc.SetTabOrder('bookname',10)
- // dw_uc.SetTabOrder('dbname',20)
- // dw_uc.SetTabOrder('ifuse',30)
- // dw_uc.SetFocus()
- //
- // dw_uc.SelectRow(0,FALSE)
- // dw_uc.ScrollToRow (modifyrow_no)
- // dw_uc.SelectRow(modifyrow_no,TRUE)
- //
- //END IF
- //
- //dw_edit_mode = NOT dw_edit_mode
- //WF_FACE_CHANGE()
- IF dw_uc.GetRow() <= 0 THEN RETURN
- s_set_book_parm s_parm
- s_parm.bookid = dw_uc.Object.printid[dw_uc.GetRow()]
- s_parm.ifguid = 0
- OpenWithParm(w_set_book, s_parm)
- Parent.TriggerEvent('retrieve_uc')
- end event
- type cb_delet from w_publ_edit_choice`cb_delet within w_book_def
- integer x = 713
- end type
- event cb_delet::clicked;call super::clicked;Long ll_row
- Long ll_printid
- Long j
- String ls_ini_ip_j
- ll_row = dw_uc.GetRow()
- IF ll_row <= 0 THEN
- MessageBox('提示','请选择要删除的行!',information!,OK!)
- RETURN
- END IF
- IF MessageBox('询问','确定要删除当前连接设置吗?',question!,yesno!) = 2 THEN RETURN
- ll_printid = dw_uc.Object.printid[ll_row]
- IF dw_uc.RowCount() = 1 THEN
- MessageBox('提示','不能删除最后的帐套!',information!,OK!)
- return
- END IF
- FOR j = ll_printid + 1 TO 20
- ls_ini_ip_j = ProfileString (sys_inifilename_other,'sys_dl_book', String(j), '')
- IF Trim(ls_ini_ip_j) = '' THEN CONTINUE
- SetProfileString (sys_inifilename_other,'sys_dl_book', String(j - 1), ls_ini_ip_j)
- NEXT
- FOR j = 20 TO 1 STEP -1
- ls_ini_ip_j = ProfileString (sys_inifilename_other,'sys_dl_book', String(j), '')
- IF Trim(ls_ini_ip_j) = '' THEN CONTINUE
-
- IF pfc_delprofilestring(sys_inifilename_other,'sys_dl_book',String(j)) <> 1 THEN
- MessageBox('提示','清除ini文件连接列表信息失败',information!,OK!)
- RETURN
- END IF
- EXIT
- NEXT
- PARENT.TriggerEvent('retrieve_uc')
- end event
- type cb_choice from w_publ_edit_choice`cb_choice within w_book_def
- boolean visible = false
- end type
- type dw_uc from w_publ_edit_choice`dw_uc within w_book_def
- string dataobject = "dw_book_index"
- end type
- type cb_rtr from w_publ_edit_choice`cb_rtr within w_book_def
- boolean visible = false
- end type
- type cb_help from w_publ_edit_choice`cb_help within w_book_def
- integer x = 864
- end type
- type ln_bar from w_publ_edit_choice`ln_bar within w_book_def
- end type
- type ln_bar2 from w_publ_edit_choice`ln_bar2 within w_book_def
- end type
- type r_bar from w_publ_edit_choice`r_bar within w_book_def
- end type
- type st_1 from statictext within w_book_def
- integer x = 1376
- integer y = 92
- integer width = 645
- integer height = 48
- boolean bringtotop = true
- integer textsize = -9
- integer weight = 400
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = variable!
- string facename = "宋体"
- long textcolor = 255
- long backcolor = 67108864
- string text = "提示:最多能建立20个帐套"
- boolean focusrectangle = false
- end type
- event constructor;this.backcolor = 14215660
- end event
|