123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708 |
- $PBExportHeader$w_set_incept_sqlca.srw
- forward
- global type w_set_incept_sqlca from w_publ_base
- end type
- type sle_logpass from singlelineedit within w_set_incept_sqlca
- end type
- type sle_logid from singlelineedit within w_set_incept_sqlca
- end type
- type sle_server from singlelineedit within w_set_incept_sqlca
- end type
- type sle_database from singlelineedit within w_set_incept_sqlca
- end type
- type sle_dbpass from singlelineedit within w_set_incept_sqlca
- end type
- type sle_userid from singlelineedit within w_set_incept_sqlca
- end type
- type sle_dbparm from singlelineedit within w_set_incept_sqlca
- end type
- type cb_ok from commandbutton within w_set_incept_sqlca
- end type
- type sle_dbms from dropdownlistbox within w_set_incept_sqlca
- end type
- type st_9 from statictext within w_set_incept_sqlca
- end type
- type st_6 from statictext within w_set_incept_sqlca
- end type
- type st_5 from statictext within w_set_incept_sqlca
- end type
- type st_4 from statictext within w_set_incept_sqlca
- end type
- type st_3 from statictext within w_set_incept_sqlca
- end type
- type st_2 from statictext within w_set_incept_sqlca
- end type
- type st_00 from statictext within w_set_incept_sqlca
- end type
- type st_7 from statictext within w_set_incept_sqlca
- end type
- type ddplb_cnt from dropdownpicturelistbox within w_set_incept_sqlca
- end type
- type cb_addcnt from commandbutton within w_set_incept_sqlca
- end type
- type st_8 from statictext within w_set_incept_sqlca
- end type
- type cb_delcnt from commandbutton within w_set_incept_sqlca
- end type
- type sle_cntname from singlelineedit within w_set_incept_sqlca
- end type
- type st_12 from statictext within w_set_incept_sqlca
- end type
- type cb_refresh from commandbutton within w_set_incept_sqlca
- end type
- type gb_1 from groupbox within w_set_incept_sqlca
- end type
- end forward
- global type w_set_incept_sqlca from w_publ_base
- integer width = 2290
- integer height = 1300
- string title = "外部数据库连接设置"
- sle_logpass sle_logpass
- sle_logid sle_logid
- sle_server sle_server
- sle_database sle_database
- sle_dbpass sle_dbpass
- sle_userid sle_userid
- sle_dbparm sle_dbparm
- cb_ok cb_ok
- sle_dbms sle_dbms
- st_9 st_9
- st_6 st_6
- st_5 st_5
- st_4 st_4
- st_3 st_3
- st_2 st_2
- st_00 st_00
- st_7 st_7
- ddplb_cnt ddplb_cnt
- cb_addcnt cb_addcnt
- st_8 st_8
- cb_delcnt cb_delcnt
- sle_cntname sle_cntname
- st_12 st_12
- cb_refresh cb_refresh
- gb_1 gb_1
- end type
- global w_set_incept_sqlca w_set_incept_sqlca
- type variables
- uo_remote_sqlca uo_rm_sqlca
- end variables
- forward prototypes
- public function integer wf_getcntset (string arg_cntname)
- end prototypes
- public function integer wf_getcntset (string arg_cntname);sle_dbms.Text = ProfileString (sys_inifilename, arg_cntname, "dbms", "")
- sle_database.Text = ProfileString (sys_inifilename, arg_cntname, "database", "")
- sle_userid.Text = ProfileString (sys_inifilename, arg_cntname, "userid", "")
- sle_dbpass.Text = f_psw_bczh(ProfileString (sys_inifilename, arg_cntname, "dbpass", ""),1,sys_power_key)
- sle_logid.Text = ProfileString (sys_inifilename, arg_cntname, "logid", "")
- sle_logpass.Text = f_psw_bczh(ProfileString (sys_inifilename, arg_cntname, "LogPassWord", ""),1,sys_power_key)
- sle_server.Text = ProfileString (sys_inifilename, arg_cntname, "servername", "")
- sle_dbparm.Text = f_psw_bczh(ProfileString (sys_inifilename, arg_cntname, "dbparm", ""),1,sys_power_key)
- return 0
- end function
- on w_set_incept_sqlca.create
- int iCurrent
- call super::create
- this.sle_logpass=create sle_logpass
- this.sle_logid=create sle_logid
- this.sle_server=create sle_server
- this.sle_database=create sle_database
- this.sle_dbpass=create sle_dbpass
- this.sle_userid=create sle_userid
- this.sle_dbparm=create sle_dbparm
- this.cb_ok=create cb_ok
- this.sle_dbms=create sle_dbms
- this.st_9=create st_9
- this.st_6=create st_6
- this.st_5=create st_5
- this.st_4=create st_4
- this.st_3=create st_3
- this.st_2=create st_2
- this.st_00=create st_00
- this.st_7=create st_7
- this.ddplb_cnt=create ddplb_cnt
- this.cb_addcnt=create cb_addcnt
- this.st_8=create st_8
- this.cb_delcnt=create cb_delcnt
- this.sle_cntname=create sle_cntname
- this.st_12=create st_12
- this.cb_refresh=create cb_refresh
- this.gb_1=create gb_1
- iCurrent=UpperBound(this.Control)
- this.Control[iCurrent+1]=this.sle_logpass
- this.Control[iCurrent+2]=this.sle_logid
- this.Control[iCurrent+3]=this.sle_server
- this.Control[iCurrent+4]=this.sle_database
- this.Control[iCurrent+5]=this.sle_dbpass
- this.Control[iCurrent+6]=this.sle_userid
- this.Control[iCurrent+7]=this.sle_dbparm
- this.Control[iCurrent+8]=this.cb_ok
- this.Control[iCurrent+9]=this.sle_dbms
- this.Control[iCurrent+10]=this.st_9
- this.Control[iCurrent+11]=this.st_6
- this.Control[iCurrent+12]=this.st_5
- this.Control[iCurrent+13]=this.st_4
- this.Control[iCurrent+14]=this.st_3
- this.Control[iCurrent+15]=this.st_2
- this.Control[iCurrent+16]=this.st_00
- this.Control[iCurrent+17]=this.st_7
- this.Control[iCurrent+18]=this.ddplb_cnt
- this.Control[iCurrent+19]=this.cb_addcnt
- this.Control[iCurrent+20]=this.st_8
- this.Control[iCurrent+21]=this.cb_delcnt
- this.Control[iCurrent+22]=this.sle_cntname
- this.Control[iCurrent+23]=this.st_12
- this.Control[iCurrent+24]=this.cb_refresh
- this.Control[iCurrent+25]=this.gb_1
- end on
- on w_set_incept_sqlca.destroy
- call super::destroy
- destroy(this.sle_logpass)
- destroy(this.sle_logid)
- destroy(this.sle_server)
- destroy(this.sle_database)
- destroy(this.sle_dbpass)
- destroy(this.sle_userid)
- destroy(this.sle_dbparm)
- destroy(this.cb_ok)
- destroy(this.sle_dbms)
- destroy(this.st_9)
- destroy(this.st_6)
- destroy(this.st_5)
- destroy(this.st_4)
- destroy(this.st_3)
- destroy(this.st_2)
- destroy(this.st_00)
- destroy(this.st_7)
- destroy(this.ddplb_cnt)
- destroy(this.cb_addcnt)
- destroy(this.st_8)
- destroy(this.cb_delcnt)
- destroy(this.sle_cntname)
- destroy(this.st_12)
- destroy(this.cb_refresh)
- destroy(this.gb_1)
- end on
- event open;call super::open;
- cb_refresh.triggerevent(clicked!)
- end event
- type cb_func from w_publ_base`cb_func within w_set_incept_sqlca
- boolean visible = false
- integer x = 1920
- integer y = 308
- boolean enabled = false
- end type
- type cb_exit from w_publ_base`cb_exit within w_set_incept_sqlca
- integer x = 1920
- integer y = 132
- end type
- type sle_logpass from singlelineedit within w_set_incept_sqlca
- integer x = 398
- integer y = 848
- integer width = 1422
- integer height = 80
- integer taborder = 80
- integer textsize = -8
- integer weight = 400
- fontpitch fontpitch = variable!
- fontfamily fontfamily = swiss!
- string facename = "MS Sans Serif"
- long textcolor = 41943040
- boolean autohscroll = false
- boolean password = true
- borderstyle borderstyle = stylelowered!
- end type
- type sle_logid from singlelineedit within w_set_incept_sqlca
- integer x = 398
- integer y = 760
- integer width = 1422
- integer height = 80
- integer taborder = 150
- integer textsize = -8
- integer weight = 400
- fontpitch fontpitch = variable!
- fontfamily fontfamily = swiss!
- string facename = "MS Sans Serif"
- long textcolor = 41943040
- boolean autohscroll = false
- borderstyle borderstyle = stylelowered!
- end type
- type sle_server from singlelineedit within w_set_incept_sqlca
- integer x = 398
- integer y = 672
- integer width = 1422
- integer height = 80
- integer taborder = 140
- integer textsize = -8
- integer weight = 400
- fontpitch fontpitch = variable!
- fontfamily fontfamily = swiss!
- string facename = "MS Sans Serif"
- long textcolor = 41943040
- boolean autohscroll = false
- borderstyle borderstyle = stylelowered!
- end type
- type sle_database from singlelineedit within w_set_incept_sqlca
- integer x = 398
- integer y = 584
- integer width = 1422
- integer height = 80
- integer taborder = 130
- integer textsize = -8
- integer weight = 400
- fontpitch fontpitch = variable!
- fontfamily fontfamily = swiss!
- string facename = "MS Sans Serif"
- long textcolor = 41943040
- boolean autohscroll = false
- borderstyle borderstyle = stylelowered!
- end type
- type sle_dbpass from singlelineedit within w_set_incept_sqlca
- integer x = 398
- integer y = 496
- integer width = 1422
- integer height = 80
- integer taborder = 120
- integer textsize = -8
- integer weight = 400
- fontpitch fontpitch = variable!
- fontfamily fontfamily = swiss!
- string facename = "MS Sans Serif"
- long textcolor = 41943040
- boolean enabled = false
- boolean autohscroll = false
- boolean password = true
- borderstyle borderstyle = stylelowered!
- end type
- type sle_userid from singlelineedit within w_set_incept_sqlca
- integer x = 398
- integer y = 408
- integer width = 1422
- integer height = 80
- integer taborder = 90
- integer textsize = -8
- integer weight = 400
- fontcharset fontcharset = ansi!
- fontpitch fontpitch = variable!
- fontfamily fontfamily = swiss!
- string facename = "MS Sans Serif"
- long textcolor = 41943040
- boolean enabled = false
- boolean autohscroll = false
- borderstyle borderstyle = stylelowered!
- end type
- type sle_dbparm from singlelineedit within w_set_incept_sqlca
- integer x = 398
- integer y = 936
- integer width = 1422
- integer height = 80
- integer taborder = 110
- integer textsize = -8
- integer weight = 400
- fontpitch fontpitch = variable!
- fontfamily fontfamily = swiss!
- string facename = "MS Sans Serif"
- long textcolor = 41943040
- borderstyle borderstyle = stylelowered!
- end type
- type cb_ok from commandbutton within w_set_incept_sqlca
- integer x = 1499
- integer y = 1036
- integer width = 315
- integer height = 96
- integer taborder = 70
- integer textsize = -9
- integer weight = 400
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = variable!
- string facename = "宋体"
- string text = "保存设置"
- end type
- event clicked;int arg_cnt_no,rslt=1
- arg_cnt_no=integer(right(ddplb_cnt.text,2))
- string arg_msg
- rslt=uo_rm_sqlca.Set_remote_sqlca(arg_cnt_no,sle_cntname.Text,sle_dbms.Text,sle_database.Text,sle_userid.Text,&
- sle_dbpass.Text,sle_logid.Text,sle_logpass.Text,sle_server.Text,sle_dbparm.Text,arg_msg)
- if rslt=0 then
- MESSAGEBOX('错误','设置保存失败!',stopsign!,OK!)
- else
- MESSAGEBOX('提示','设置保存成功!',information!,OK!)
- end if
- end event
- type sle_dbms from dropdownlistbox within w_set_incept_sqlca
- integer x = 398
- integer y = 320
- integer width = 1422
- integer height = 156
- integer taborder = 60
- boolean bringtotop = true
- integer textsize = -8
- integer weight = 400
- fontcharset fontcharset = ansi!
- fontpitch fontpitch = variable!
- fontfamily fontfamily = swiss!
- string facename = "MS Sans Serif"
- long textcolor = 33554432
- boolean allowedit = true
- boolean sorted = false
- boolean vscrollbar = true
- string item[] = {"ODBC","MSS Microsoft SQL Server 6.x"}
- borderstyle borderstyle = stylelowered!
- end type
- event modified;sle_dbms.postevent(selectionchanged!)
- end event
- event selectionchanged;//cbx_addnewdatabase.enabled=ARROWADDNEW<>0 and rb_server.checked and sle_dbms.text='MSS Microsoft SQL Server 6.x'
- //if not rb_server.checked then cbx_addnewdatabase.checked=false
- //if not cbx_addnewdatabase.checked then cbx_addnewdatabase.triggerevent(clicked!)
- //wf_findisql()
- end event
- type st_9 from statictext within w_set_incept_sqlca
- integer x = 96
- integer y = 944
- integer width = 297
- integer height = 60
- integer textsize = -9
- integer weight = 400
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = variable!
- string facename = "宋体"
- long textcolor = 41943040
- long backcolor = 74481808
- boolean enabled = false
- string text = "DBPARM:"
- alignment alignment = right!
- boolean focusrectangle = false
- end type
- type st_6 from statictext within w_set_incept_sqlca
- integer x = 96
- integer y = 852
- integer width = 297
- integer height = 60
- integer textsize = -9
- integer weight = 400
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = variable!
- string facename = "宋体"
- long textcolor = 41943040
- long backcolor = 74481808
- boolean enabled = false
- string text = "登录口令:"
- alignment alignment = right!
- boolean focusrectangle = false
- end type
- type st_5 from statictext within w_set_incept_sqlca
- integer x = 96
- integer y = 768
- integer width = 297
- integer height = 60
- integer textsize = -9
- integer weight = 400
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = variable!
- string facename = "宋体"
- long textcolor = 41943040
- long backcolor = 74481808
- boolean enabled = false
- string text = "登录ID:"
- alignment alignment = right!
- boolean focusrectangle = false
- end type
- type st_4 from statictext within w_set_incept_sqlca
- integer x = 96
- integer y = 504
- integer width = 297
- integer height = 60
- integer textsize = -9
- integer weight = 400
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = variable!
- string facename = "宋体"
- long textcolor = 41943040
- long backcolor = 74481808
- boolean enabled = false
- string text = "口令:"
- alignment alignment = right!
- boolean focusrectangle = false
- end type
- type st_3 from statictext within w_set_incept_sqlca
- integer x = 96
- integer y = 416
- integer width = 297
- integer height = 60
- integer textsize = -9
- integer weight = 400
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = variable!
- string facename = "宋体"
- long textcolor = 41943040
- long backcolor = 74481808
- boolean enabled = false
- string text = "用户ID:"
- alignment alignment = right!
- boolean focusrectangle = false
- end type
- type st_2 from statictext within w_set_incept_sqlca
- integer x = 96
- integer y = 592
- integer width = 297
- integer height = 60
- integer textsize = -9
- integer weight = 400
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = variable!
- string facename = "宋体"
- long textcolor = 41943040
- long backcolor = 74481808
- boolean enabled = false
- string text = "数据库:"
- alignment alignment = right!
- boolean focusrectangle = false
- end type
- type st_00 from statictext within w_set_incept_sqlca
- integer x = 96
- integer y = 328
- integer width = 297
- integer height = 60
- integer textsize = -9
- integer weight = 400
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = variable!
- string facename = "宋体"
- long backcolor = 79741120
- boolean enabled = false
- string text = "DBMS:"
- alignment alignment = right!
- boolean focusrectangle = false
- end type
- type st_7 from statictext within w_set_incept_sqlca
- integer x = 96
- integer y = 676
- integer width = 297
- integer height = 60
- integer textsize = -9
- integer weight = 400
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = variable!
- string facename = "宋体"
- long textcolor = 41943040
- long backcolor = 74481808
- boolean enabled = false
- string text = "服务器:"
- alignment alignment = right!
- boolean focusrectangle = false
- end type
- type ddplb_cnt from dropdownpicturelistbox within w_set_incept_sqlca
- integer x = 242
- integer y = 36
- integer width = 1595
- integer height = 908
- integer taborder = 20
- boolean bringtotop = true
- integer textsize = -9
- integer weight = 400
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = variable!
- string facename = "宋体"
- long textcolor = 33554432
- boolean vscrollbar = true
- borderstyle borderstyle = stylelowered!
- string picturename[] = {"Update!"}
- long picturemaskcolor = 553648127
- end type
- event selectionchanged;string arg_cntname,arg_dbms,arg_database,arg_userid,arg_dbpass,arg_logid,arg_logpassword,arg_servername,arg_dbparm,arg_msg
- int arg_cnt_no
- arg_cnt_no=integer(right(this.text,2))
- uo_rm_sqlca.Get_remote_sqlca(arg_cnt_no,arg_cntname,arg_dbms,arg_database,arg_userid,arg_dbpass,arg_logid,arg_logpassword,arg_servername,arg_dbparm,arg_msg)
- sle_cntname.Text = arg_cntname
- sle_dbms.Text = arg_dbms
- sle_database.Text = arg_database
- sle_userid.Text = arg_userid
- sle_dbpass.Text = arg_dbpass
- sle_logid.Text = arg_logid
- sle_logpass.Text = arg_logpassword
- sle_server.Text = arg_servername
- sle_dbparm.Text = arg_dbparm
- end event
- type cb_addcnt from commandbutton within w_set_incept_sqlca
- integer x = 91
- integer y = 1036
- integer width = 311
- integer height = 96
- integer taborder = 30
- boolean bringtotop = true
- integer textsize = -9
- integer weight = 400
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = variable!
- string facename = "宋体"
- string text = "增加连接"
- end type
- event clicked;uo_rm_sqlca.add_cntno()
- cb_refresh.triggerevent(clicked!)
- end event
- type st_8 from statictext within w_set_incept_sqlca
- integer x = 46
- integer y = 56
- integer width = 178
- integer height = 76
- boolean bringtotop = true
- 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 = "连接:"
- alignment alignment = right!
- boolean focusrectangle = false
- end type
- type cb_delcnt from commandbutton within w_set_incept_sqlca
- integer x = 402
- integer y = 1036
- integer width = 311
- integer height = 96
- integer taborder = 50
- boolean bringtotop = true
- integer textsize = -9
- integer weight = 400
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = variable!
- string facename = "宋体"
- string text = "减少连接"
- end type
- event clicked;uo_rm_sqlca.del_cntno()
- cb_refresh.triggerevent(clicked!)
- end event
- type sle_cntname from singlelineedit within w_set_incept_sqlca
- integer x = 398
- integer y = 220
- integer width = 1422
- integer height = 80
- integer taborder = 100
- integer textsize = -8
- integer weight = 400
- fontcharset fontcharset = ansi!
- fontpitch fontpitch = variable!
- fontfamily fontfamily = swiss!
- string facename = "MS Sans Serif"
- long textcolor = 41943040
- boolean autohscroll = false
- borderstyle borderstyle = stylelowered!
- end type
- type st_12 from statictext within w_set_incept_sqlca
- integer x = 96
- integer y = 232
- integer width = 297
- integer height = 60
- integer textsize = -9
- integer weight = 400
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = variable!
- string facename = "宋体"
- long backcolor = 79741120
- boolean enabled = false
- string text = "连接名称:"
- alignment alignment = right!
- boolean focusrectangle = false
- end type
- type cb_refresh from commandbutton within w_set_incept_sqlca
- integer x = 1920
- integer y = 36
- integer width = 311
- integer height = 96
- integer taborder = 50
- integer textsize = -9
- integer weight = 400
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = variable!
- string facename = "宋体"
- string text = "刷新"
- end type
- event clicked;
- int li
- string arg_cntname,arg_dbms,arg_database,arg_userid,arg_dbpass,arg_logid,arg_logpassword,arg_servername,arg_dbparm,arg_msg
- ddplb_cnt.reset()
- for li=1 to sys_remote_sqlca_p
- uo_rm_sqlca.Get_remote_sqlca(li,arg_cntname,arg_dbms,arg_database,arg_userid,arg_dbpass,arg_logid,arg_logpassword,arg_servername,arg_dbparm,arg_msg)
- ddplb_cnt.ADDItem(arg_cntname+string(li,'00'),1)
-
- next
- sle_cntname.Text = ''
- sle_dbms.Text = ''
- sle_database.Text = ''
- sle_userid.Text = ''
- sle_dbpass.Text = ''
- sle_logid.Text = ''
- sle_logpass.Text = ''
- sle_server.Text = ''
- sle_dbparm.Text = ''
- end event
- type gb_1 from groupbox within w_set_incept_sqlca
- integer x = 55
- integer y = 160
- integer width = 1829
- integer height = 1016
- integer taborder = 40
- integer textsize = -9
- integer weight = 400
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = variable!
- string facename = "宋体"
- long textcolor = 33554432
- long backcolor = 67108864
- string text = "设置信息:"
- end type
|