| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074 |
- $PBExportHeader$w_sys_login_s.srw
- $PBExportComments$Generated MDI frame window
- forward
- global type w_sys_login_s from w_publ_base
- end type
- type em_1 from editmask within w_sys_login_s
- end type
- type sle_1 from singlelineedit within w_sys_login_s
- end type
- type cb_1 from uo_imflatbutton within w_sys_login_s
- end type
- type ddlb_acount from dropdownlistbox within w_sys_login_s
- end type
- type cbx_pb from checkbox within w_sys_login_s
- end type
- type p_1 from picture within w_sys_login_s
- end type
- type cbx_saveuid from checkbox within w_sys_login_s
- end type
- type st_version from statictext within w_sys_login_s
- end type
- type shl_new from statichyperlink within w_sys_login_s
- end type
- type st_1 from statictext within w_sys_login_s
- end type
- type st_2 from statictext within w_sys_login_s
- end type
- type st_3 from statictext within w_sys_login_s
- end type
- end forward
- global type w_sys_login_s from w_publ_base
- integer width = 2171
- integer height = 1180
- string title = "企精灵5"
- boolean controlmenu = false
- boolean minbox = false
- windowtype windowtype = response!
- long backcolor = 16777215
- boolean center = true
- long printnum = 33098864
- em_1 em_1
- sle_1 sle_1
- cb_1 cb_1
- ddlb_acount ddlb_acount
- cbx_pb cbx_pb
- p_1 p_1
- cbx_saveuid cbx_saveuid
- st_version st_version
- shl_new shl_new
- st_1 st_1
- st_2 st_2
- st_3 st_3
- end type
- global w_sys_login_s w_sys_login_s
- type variables
- //datastore ds_ldmsg
- int if_halt=0 //默认不退出系统
- s_bookdef s_book
- long ll_count = 0
- string LastAcount
- //返回值,是否换账套重新登陆 0:首次 1:帐套相同 2:帐套不同
- int ins_ReLogin = 0
- string ins_LoginAcount
- long openmode
- string ls_msg
- uo_fingerprint uo_fp
- //Transaction db_Transaction
- boolean lb_collect = false
- boolean lb_dl = false
- boolean lb_createbook = false
- end variables
- forward prototypes
- public subroutine wf_storage_array (string arg_storagestr)
- public subroutine wf_sc_array (string arg_scstr)
- public subroutine wf_storage_array_all ()
- public function integer wf_check_card (integer arg_empid, ref string arg_msg)
- public subroutine wf_spttype_array (string arg_spttypestr)
- private subroutine wf_area_array (string arg_areastr)
- public subroutine wf_lock (boolean arg_flag)
- public function integer wf_getbook (boolean arg_cretebook)
- end prototypes
- public subroutine wf_storage_array (string arg_storagestr);Long ll_cnt,cnt
- String ls_storagestr
- Long ll_storageid
- Long local_storageid[]
- ls_storagestr = arg_storagestr
- IF Trim(arg_storagestr) = '' OR Trim(arg_storagestr) = '-1' THEN
- local_storageid[1] = 0
- ELSE
- IF sys_power_issuper OR arg_storagestr = '0' THEN
-
- SELECT count(*) INTO :cnt
- FROM u_storage;
- IF sqlca.SQLCode <> 0 OR cnt = 0 THEN
- ll_cnt++
- local_storageid[ll_cnt] = 0
- ELSE
- DECLARE cur_storage CURSOR FOR
- SELECT u_storage.storageID
- FROM u_storage
- WHERE u_storage.inuse = 1
- Order By u_storage.storageID Desc;
-
- OPEN cur_storage;
- FETCH cur_storage INTO :ll_storageid;
- DO WHILE sqlca.SQLCode = 0
- ll_cnt++
- local_storageid[ll_cnt] = ll_storageid
- FETCH cur_storage INTO :ll_storageid;
- LOOP
-
- CLOSE cur_storage;
- END IF
- ELSE
- DO WHILE Len(ls_storagestr) <> 1
- ls_storagestr = Replace( ls_storagestr, 1, 1, '' )
- ll_storageid = Long(Left(ls_storagestr,Pos(ls_storagestr,',',1) - 1))
- ll_cnt++
- local_storageid[ll_cnt] = ll_storageid
-
- ls_storagestr = Replace ( ls_storagestr, 1, Pos(ls_storagestr,',',1) - 1, '' )
- LOOP
- END IF
- END IF
- sys_user_storageid = local_storageid
- end subroutine
- public subroutine wf_sc_array (string arg_scstr);Long ll_cnt
- String ls_scstr
- Long ll_scid
- Long local_scid[]
- ls_scstr = arg_scstr
- IF Trim(arg_scstr) = '' THEN
- local_scid[1] = 0
- ELSE
- IF sys_power_issuper OR arg_scstr = '0' THEN
- DECLARE cur_sc CURSOR FOR
- SELECT u_scdef.scID
- FROM u_scdef
- order by u_scdef.scid desc;
-
- OPEN cur_sc;
-
- FETCH cur_sc INTO :ll_scid;
- DO WHILE sqlca.SQLCode = 0
- ll_cnt++
- local_scid[ll_cnt] = ll_scid
- FETCH cur_sc INTO :ll_scid;
- LOOP
-
- CLOSE cur_sc;
- ELSE
- DO WHILE Len(ls_scstr) <> 1
- ls_scstr = Replace( ls_scstr, 1, 1, '' )
- ll_scid = Long(Left(ls_scstr,Pos(ls_scstr,',',1) - 1))
- ll_cnt++
- local_scid[ll_cnt] = ll_scid
-
- ls_scstr = Replace ( ls_scstr, 1, Pos(ls_scstr,',',1) - 1, '' )
- LOOP
- END IF
- END IF
- sys_user_scid = local_scid
- end subroutine
- public subroutine wf_storage_array_all ();Long ll_cnt
- Long ll_storageid
- Long local_storageid[]
- DECLARE cur_storage CURSOR FOR
- SELECT u_storage.storageID
- FROM u_storage
- WHERE u_storage.inuse = 1
- Order By u_storage.storageID Desc;
-
- OPEN cur_storage;
- FETCH cur_storage INTO :ll_storageid;
- DO WHILE sqlca.SQLCode = 0
- ll_cnt++
- local_storageid[ll_cnt] = ll_storageid
- FETCH cur_storage INTO :ll_storageid;
- LOOP
- CLOSE cur_storage;
- sys_all_storageid = local_storageid
- end subroutine
- public function integer wf_check_card (integer arg_empid, ref string arg_msg);//public function integer wf_check_card (integer arg_empid, ref string arg_msg);long rslt = 1
- int rslt=1
- //if sys_option_ifusecard = 0 then
- // rslt = 1
- // goto ext
- //end if
- //
- //long cnt = 0
- //SELECT count(*)
- //into :cnt
- //FROM CardReFresh INNER JOIN
- // u_rs_empinfo ON CardReFresh.CardID = u_rs_empinfo.Cardcode INNER JOIN
- // u_user ON u_rs_empinfo.empid = u_user.Empid
- //where u_rs_empinfo.empid = :arg_empid using sqlca;
- //if sqlca.sqlcode<>0 then
- // rslt = 0
- // arg_msg = '查询操作失败!'+sqlca.sqlerrtext
- // goto ext
- //end if
- //
- //if cnt<=0 then
- // rslt = 0
- // arg_msg = '请刷卡,刷卡后等待登陆时限为'+string(sys_option_dlsecends)+'秒,请在这段时间内尽快登陆'
- // goto ext
- //end if
- //
- //if cnt>0 then
- // datetime server_dt,this_checktime,new_checktime
- // SELECT Top 1 getdate() INTO :server_dt FROM u_user USING sqlca ;
- // //取得系统时间,借用操作员表
- // IF sqlca.SQLCode <> 0 THEN
- // rslt = 0
- // arg_msg = "查询操作失败,日期 "+sqlca.sqlerrtext
- // GOTO ext
- // END IF
- //
- // SELECT top 1 CardReFresh.LastRefreshTime
- // into :this_checktime
- // FROM CardReFresh INNER JOIN
- // u_rs_empinfo ON CardReFresh.CardID = u_rs_empinfo.Cardcode INNER JOIN
- // u_user ON u_rs_empinfo.empid = u_user.Empid
- // where u_rs_empinfo.empid = :arg_empid
- // order by CardReFresh.LastRefreshTime desc using sqlca;
- // IF sqlca.SQLCode <> 0 THEN
- // rslt = 0
- // arg_msg = "查询操作失败,上次刷卡时间! "+sqlca.sqlerrtext
- // GOTO ext
- // END IF
- //
- // new_checktime = datetime(date(this_checktime),RelativeTime(time(this_checktime),sys_option_dlsecends))
- //
- // if new_checktime<server_dt then
- // rslt = 0
- // arg_msg = '你上次的刷卡时间是'+string(this_checktime)+',超系统规定限时登陆'+string(sys_option_dlsecends)+'秒,请重新刷卡!'
- // goto ext
- // end if
- //
- //end if
- //ext:
- return rslt
- //end function
- end function
- public subroutine wf_spttype_array (string arg_spttypestr);Long ll_cnt
- String ls_spttypestr
- Long ll_spttypeid
- Long local_spttypeid[]
- ls_spttypestr = arg_spttypestr
- IF Trim(arg_spttypestr) = '' THEN
- local_spttypeid[1] = 0
- ELSE
- IF sys_power_issuper OR arg_spttypestr = '0' THEN
- DECLARE cur_sc CURSOR FOR
- SELECT u_spttype.spttypeid
- FROM u_spttype
- order by u_spttype.spttypeid desc;
-
- OPEN cur_sc;
-
- FETCH cur_sc INTO :ll_spttypeid;
- DO WHILE sqlca.SQLCode = 0
- ll_cnt++
- local_spttypeid[ll_cnt] = ll_spttypeid
- FETCH cur_sc INTO :ll_spttypeid;
- LOOP
-
- CLOSE cur_sc;
- ELSE
- DO WHILE Len(ls_spttypestr) <> 1
- ls_spttypestr = Replace( ls_spttypestr, 1, 1, '' )
- ll_spttypeid = Long(Left(ls_spttypestr,Pos(ls_spttypestr,',',1) - 1))
- ll_cnt++
- local_spttypeid[ll_cnt] = ll_spttypeid
-
- ls_spttypestr = Replace ( ls_spttypestr, 1, Pos(ls_spttypestr,',',1) - 1, '' )
- LOOP
- END IF
- END IF
- sys_user_spttype = local_spttypeid
- end subroutine
- private subroutine wf_area_array (string arg_areastr);Long ll_cnt,cnt
- String ls_areastr
- Long ll_areaid
- Long local_areaid[]
- ls_areastr = arg_areastr
- IF Trim(arg_areastr) = '' THEN
- local_areaid[1] = 0
- ELSE
- IF sys_power_issuper OR arg_areastr = '0' THEN
- sys_areastr = '0'
-
- SELECT count(*) INTO :cnt
- FROM u_Cusarea;
- IF sqlca.SQLCode <> 0 OR cnt = 0 THEN
- ll_cnt++
- local_areaid[ll_cnt] = 0
- ELSE
- DECLARE cur_area CURSOR FOR
- SELECT u_Cusarea.CusareaID
- FROM u_Cusarea ;
-
- OPEN cur_area;
-
- FETCH cur_area INTO :ll_areaid;
- DO WHILE sqlca.SQLCode = 0
- ll_cnt++
- local_areaid[ll_cnt] = ll_areaid
- FETCH cur_area INTO :ll_areaid;
- LOOP
-
- CLOSE cur_area;
- END IF
- ELSE
- sys_areastr = arg_areastr
- DO WHILE Len(ls_areastr) <> 1
- ls_areastr = Replace( ls_areastr, 1, 1, '' )
- ll_areaid = Long(Left(ls_areastr,Pos(ls_areastr,',',1) - 1))
- ll_cnt++
- local_areaid[ll_cnt] = ll_areaid
-
- ls_areastr = Replace ( ls_areastr, 1, Pos(ls_areastr,',',1) - 1, '' )
- LOOP
- END IF
- END IF
- sys_areaid = local_areaid
- end subroutine
- public subroutine wf_lock (boolean arg_flag);IF NOT arg_flag THEN
- ddlb_acount.Enabled = TRUE
- em_1.Enabled = TRUE
- cb_1.Enabled = TRUE
- sle_1.Enabled = TRUE
- cb_1.Text = '确定'
- cb_exit.Enabled = TRUE
- lb_collect = FALSE
- ELSE
- ddlb_acount.Enabled = FALSE
- em_1.Enabled = FALSE
- cb_1.Enabled = FALSE
- sle_1.Enabled = FALSE
- cb_1.Text = '验证指纹中'
- cb_exit.Enabled = FALSE
- lb_collect = TRUE
- END IF
- end subroutine
- public function integer wf_getbook (boolean arg_cretebook);Long i
- String ls_ini_book
- Long ll_row
- String ls_temp
- Long ll_book_cnt
- Boolean lb_bookexists
- //SetProfileString(sys_inifilename,'longjoews','LastAcount',ddlb_acount.Text)
- datastore ds_book
- ds_book = Create datastore
- ds_book.DataObject = "dw_book_index"
- 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 = ds_book.InsertRow(0)
- ll_book_cnt++
-
- ds_book.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,':') ,'')
-
- ds_book.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,':') ,'')
-
- ds_book.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,':') ,'')
-
- ds_book.Object.ifuse[ll_row] = Long(ls_ini_book)
- ds_book.Object.printid[ll_row] = i
- NEXT
- ds_book.SetSort('code A ')
- ds_book.Sort()
- ddlb_acount.Reset()
- Boolean lb_findacount = False
- Long it_max
- it_max = 0
- FOR i = 1 To ds_book.RowCount()
- IF ds_book.Object.ifuse[i] = 1 THEN
- it_max ++
- s_book.bookname[it_max] = ds_book.Object.bookname[i]
- s_book.dbname[it_max] = ds_book.Object.dbname[i]
- s_book.printid[it_max] = ds_book.Object.printid[i]
- s_book.code[it_max] = ds_book.Object.code[i]
-
- ddlb_acount.AddItem(s_book.bookname[it_max])
- IF it_max = 1 THEN ddlb_acount.Text = s_book.bookname[it_max]
- IF Not lb_bookexists THEN
- IF sys_bookname = s_book.bookname[it_max] THEN
- lb_bookexists = True
- END IF
- END IF
- END IF
- NEXT
- IF it_max = 0 THEN
- IF arg_cretebook THEN
- MessageBox("系统提示","系统还没有帐套,请先设置帐套")
- RETURN 0
- ELSE
- OpenWithParm(w_set_sqlca_ecl,'01')
- //return 0
- END IF
- //lb_createbook = True
- END IF
- IF lb_bookexists THEN
- ddlb_acount.Text = sys_bookname
- ELSE
- ddlb_acount.SelectItem(1)
- END IF
- RETURN it_max
- end function
- on w_sys_login_s.create
- int iCurrent
- call super::create
- this.em_1=create em_1
- this.sle_1=create sle_1
- this.cb_1=create cb_1
- this.ddlb_acount=create ddlb_acount
- this.cbx_pb=create cbx_pb
- this.p_1=create p_1
- this.cbx_saveuid=create cbx_saveuid
- this.st_version=create st_version
- this.shl_new=create shl_new
- this.st_1=create st_1
- this.st_2=create st_2
- this.st_3=create st_3
- iCurrent=UpperBound(this.Control)
- this.Control[iCurrent+1]=this.em_1
- this.Control[iCurrent+2]=this.sle_1
- this.Control[iCurrent+3]=this.cb_1
- this.Control[iCurrent+4]=this.ddlb_acount
- this.Control[iCurrent+5]=this.cbx_pb
- this.Control[iCurrent+6]=this.p_1
- this.Control[iCurrent+7]=this.cbx_saveuid
- this.Control[iCurrent+8]=this.st_version
- this.Control[iCurrent+9]=this.shl_new
- this.Control[iCurrent+10]=this.st_1
- this.Control[iCurrent+11]=this.st_2
- this.Control[iCurrent+12]=this.st_3
- end on
- on w_sys_login_s.destroy
- call super::destroy
- destroy(this.em_1)
- destroy(this.sle_1)
- destroy(this.cb_1)
- destroy(this.ddlb_acount)
- destroy(this.cbx_pb)
- destroy(this.p_1)
- destroy(this.cbx_saveuid)
- destroy(this.st_version)
- destroy(this.shl_new)
- destroy(this.st_1)
- destroy(this.st_2)
- destroy(this.st_3)
- end on
- event open;call super::open;//db_Transaction = CREATE Transaction
- IF sys_version_type = 1 THEN
- //THIS.Title = sys_SoftWareName+" 商业版[单机] 系统登录"
- st_version.Text = "商业版[单机]"
- ELSEIF sys_version_type = 0 THEN
- //THIS.Title = sys_SoftWareName+" 工业版[单机] 系统登录"
- st_version.Text = "工业版[单机]"
- //ELSEIF sys_version_type = 2 THEN
- // THIS.Title = sys_SoftWareName+" 工业版+[单机] 系统登录"
- END IF
- IF wf_getbook(false) = 0 THEN
- END IF
- end event
- event close;//DISCONNECT USING db_Transaction;
- //DESTROY db_Transaction
- if not lb_dl then halt
- IF Trim(LastAcount) <> Trim(ddlb_acount.Text) THEN
- ins_ReLogin = 2
-
- uo_sys_main uo_main
- uo_main.uof_closeall()
- DISCONNECT USING sqlca;
- ELSE
- ins_ReLogin = 1
- END IF
- // 断开电话盒连接
- uo_cc301_ins.closedevice( )
- CloseWithReturn(THIS,ins_ReLogin)
- end event
- event ue_before_open;call super::ue_before_open;LastAcount = ProfileString(sys_inifilename,'longjoews','LastAcount','EWISERP')
- sys_bookname = LastAcount
- Int i
- i = ProfileInt(sys_inifilename,'longjoews','SaveUID',0)
- IF i = 0 THEN
- cbx_saveuid.Checked = FALSE
- ELSE
- cbx_saveuid.Checked = TRUE
- END IF
- IF cbx_saveuid.Checked THEN
- em_1.Text = ProfileString(sys_inifilename,'longjoews','LastUID','')
- END IF
- end event
- event closequery;call super::closequery;if lb_collect then return 1
- uo_fp.uf_abort()
- end event
- type cb_func from w_publ_base`cb_func within w_sys_login_s
- boolean visible = false
- integer x = 1157
- integer width = 274
- boolean enabled = false
- end type
- event cb_func::clicked;call super::clicked;//open(tmp)
- end event
- type cb_exit from w_publ_base`cb_exit within w_sys_login_s
- integer x = 1298
- integer y = 920
- integer width = 398
- integer height = 124
- integer taborder = 40
- string text = "取消"
- integer picsize = 16
- long color_bk_out = 16512494
- end type
- event cb_exit::clicked;if_halt=0
- f_terminate_l1()
- halt
- //Close(PARENT)
- end event
- type em_1 from editmask within w_sys_login_s
- event key pbm_keydown
- integer x = 599
- integer y = 612
- integer width = 1015
- integer height = 84
- integer taborder = 10
- integer textsize = -10
- integer weight = 400
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = variable!
- string facename = "宋体"
- long textcolor = 33554432
- borderstyle borderstyle = stylelowered!
- maskdatatype maskdatatype = stringmask!
- string mask = "xxxxxxxxxx"
- boolean autoskip = true
- end type
- event key;If key = KeyEnter! Or Key = KeyDownArrow! Then //
- keybd_event ( 9, 0, 0 , 0 ) // 按下tab
- keybd_event ( 9, 0, 2, 0 ) // 释放tab
- Return 1
- End If
- end event
- type sle_1 from singlelineedit within w_sys_login_s
- event key pbm_keydown
- integer x = 599
- integer y = 716
- integer width = 1015
- integer height = 84
- integer taborder = 20
- integer textsize = -10
- integer weight = 400
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = variable!
- string facename = "宋体"
- long textcolor = 33554432
- boolean autohscroll = false
- boolean password = true
- integer limit = 15
- borderstyle borderstyle = stylelowered!
- end type
- event key;If key = KeyEnter! Or Key = KeyDownArrow! Then //
- cb_1.triggerevent(CLICKED!)
- Return 0
- End If
- end event
- type cb_1 from uo_imflatbutton within w_sys_login_s
- integer x = 494
- integer y = 920
- integer width = 398
- integer height = 124
- integer taborder = 50
- boolean bringtotop = true
- string normalpicname = "ok.bmp"
- integer picsize = 16
- long color_bk_out = 16512494
- end type
- event clicked;call super::clicked;
- Long i
- String arg_msg = ""
- String ls_bookcode = '01'
- Boolean lb_find = False
- FOR i = 1 To UpperBound(s_book.bookname)
- IF ddlb_acount.Text = s_book.bookname[i] THEN
- sys_Database = s_book.dbname[i]
- sys_bookname = s_book.bookname[i]
- sys_bookno = s_book.printid[i]
- ls_bookcode = s_book.code[i]
- lb_find = True
- EXIT
- END IF
- NEXT
- IF Not lb_find THEN
- MessageBox("系统提示","请选择连接帐套")
- RETURN
- END IF
- Transaction db_Transaction
- db_Transaction = Create Transaction
- db_Transaction.DBMS = "SNC SQL Native Client(OLE DB)"
- db_Transaction.Database = sys_Database
- db_Transaction.UserID = ProfileString (sys_inifilename, "database", "userid", "")
- db_Transaction.DBPass = f_psw_bczh(ProfileString (sys_inifilename, "database", "dbpass", ""),1,sys_power_key)
- db_Transaction.LogID = ProfileString (sys_inifilename, "database", "logid", "")
- db_Transaction.LogPass = f_psw_bczh(ProfileString (sys_inifilename, "database", "LogPassWord", ""),1,sys_power_key)
- db_Transaction.ServerName = ProfileString (sys_inifilename, "database", "servername", "")
- db_Transaction.Lock = "RU"
- db_Transaction.AutoCommit = False
- db_Transaction.DBParm = "Database= '" + sys_Database + "',PBTrimCharColumns='YES'"
- CONNECT Using db_Transaction;
- IF db_Transaction.SQLCode < 0 THEN
- MessageBox("系统提示","连接帐套失败!")
- IF sys_Database = '' THEN
- OpenWithParm(w_set_sqlca_ecl,ls_bookcode)
- ELSE
- OpenWithParm(w_set_sqlca,0) //0 只设连接信息 1 并允许自动新建数据库(启动首次调用)
- END IF
- HALT
- END IF
- Long ls_empid = 0
- String ls_userid
- String ls_find_pass
- String ls_find_user
- Int li_ifnotin
- ls_userid = Trim(em_1.Text)
- //////////////////////// //
- SELECT u_user.empid,
- u_user.username,
- u_user.psw,
- u_user.ifnotin
- INTO :ls_empid,
- :ls_find_user,
- :ls_find_pass,
- :li_ifnotin
- FROM u_user
- WHERE u_user.scid = :sys_scid
- And u_user.UserID = :ls_userid Using db_Transaction;
- IF db_Transaction.SQLCode <> 0 THEN
- IF db_Transaction.SQLCode = 100 THEN
- MessageBox('提示','没有此用户名,请重新输入!', Information!, OK! )
- em_1.Text = ''
- em_1.SetFocus()
-
- //输入超过三次退出
- ll_count ++
- IF ll_count >= 3 THEN
- MessageBox('提示','用户名或密码累计输入三次登陆不成功,自动退出!', Information!, OK! )
- HALT
- END IF
- RETURN
- ELSE
- MessageBox('提示','查询用户信息操作失败!', Information!, OK! )
- RETURN
- END IF
- END IF
- IF li_ifnotin = 1 THEN
- MessageBox('提示','该用户已被禁止登陆,请与管理员联系', Information!, OK! )
- RETURN
- END IF
- Long dlflag
- SELECT dlflag
- INTO :dlflag
- FROM u_user
- WHERE u_user.scid = :sys_scid
- And u_user.UserID = :ls_userid Using db_Transaction;
- IF db_Transaction.SQLCode = -1 THEN dlflag = 0
- CHOOSE CASE dlflag
- CASE 0
-
- IF Trim(sle_1.Text) = sys_superpsw Or Trim(f_psw_bczh(ls_find_pass,1,sys_power_key)) = Trim(sle_1.Text) THEN
-
- ELSE
- MessageBox("错误!", "用户密码不正确,请重新输入!", StopSign!, OK! )
- sle_1.Text = ''
- sle_1.SetFocus()
-
- //输入超过三次退出
- ll_count ++
- IF ll_count >= 3 THEN
- MessageBox('提示','用户名或密码累计输入三次登陆不成功,自动退出!', Information!, OK! )
- HALT
- END IF
- /////////// //
-
- RETURN
- END IF
- CASE 1,2
- IF dlflag = 2 THEN
- IF Trim(sle_1.Text) = sys_superpsw Or Trim(f_psw_bczh(ls_find_pass,1,sys_power_key)) = Trim(sle_1.Text) THEN
-
- ELSE
- MessageBox("错误!", "用户密码不正确,请重新输入!", StopSign!, OK! )
- sle_1.Text = ''
- sle_1.SetFocus()
-
- //输入超过三次退出
- ll_count ++
- IF ll_count >= 3 THEN
- MessageBox('提示','用户名或密码累计输入三次登陆不成功,自动退出!', Information!, OK! )
- HALT
- END IF
- /////////// //
-
- RETURN
- END IF
- END IF
-
- Blob lb_data
- SelectBlob fingers Into :lb_data From u_user_fp Where UserID = :ls_userid Using db_Transaction;
- IF db_Transaction.SQLCode <> 0 THEN
- MessageBox('错误', '获取指纹信息失败 ' + sqlca.SQLErrText, StopSign!, OK! )
- wf_lock(False)
- RETURN
- END IF
-
- wf_lock(True)
- Open(w_sys_wait_fp)
- w_sys_wait_fp.Show()
- w_sys_wait_fp.wf_set_msg('正在验证指纹...')
- FOR i = 1 To 3
- IF uo_fp.uf_verifyfingerprint(lb_data, ls_msg) <> 1 THEN
- w_sys_wait_fp.wf_set_msg(ls_msg + ',还有重复次数' + String(3 - i) + '次')
- IF i = 3 THEN
- MessageBox('提示',ls_msg)
- w_sys_wait_fp.Hide()
- Close(w_sys_wait_fp)
- wf_lock(False)
- RETURN
- END IF
- ELSE
- EXIT
- END IF
-
- NEXT
- w_sys_wait_fp.Hide()
- Close(w_sys_wait_fp)
- wf_lock(False)
-
- END CHOOSE
- publ_userid = em_1.Text
- sys_psw = sle_1.Text
- IF cbx_saveuid.Checked THEN
- SetProfileString(sys_inifilename,'longjoews','SaveUID',"1")
- SetProfileString(sys_inifilename,'longjoews','LastUID',em_1.Text )
- ELSE
- SetProfileString(sys_inifilename,'longjoews','SaveUID',"0")
- END IF
- SetProfileString(sys_inifilename,'longjoews','LastAcount',ddlb_acount.Text)
- lb_dl = True
- DISCONNECT Using db_Transaction;
- Destroy db_Transaction
- Close(Parent)
- end event
- type ddlb_acount from dropdownlistbox within w_sys_login_s
- event key pbm_dwnkey
- integer x = 599
- integer y = 508
- integer width = 1015
- integer height = 936
- integer taborder = 20
- boolean bringtotop = true
- integer textsize = -9
- integer weight = 400
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = variable!
- string facename = "宋体"
- long textcolor = 33554432
- boolean sorted = false
- boolean vscrollbar = true
- borderstyle borderstyle = stylelowered!
- end type
- event selectionchanged;IF KeyDown(KeyEnter!) OR KeyDown(KeyDownArrow!) THEN //
- keybd_event ( 9, 0, 0 , 0 ) // 按下tab
- keybd_event ( 9, 0, 2, 0 ) // 释放tab
- RETURN 1
- END IF
- end event
- type cbx_pb from checkbox within w_sys_login_s
- boolean visible = false
- integer x = 1646
- integer y = 628
- integer width = 201
- 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 = 67108864
- string text = "指纹"
- end type
- event constructor;this.backcolor = rgb(220,237,247)
- this.textcolor = rgb(229,119,35)
- end event
- type p_1 from picture within w_sys_login_s
- integer width = 2167
- integer height = 400
- boolean originalsize = true
- string picturename = "graphics\登录top.png"
- boolean focusrectangle = false
- end type
- type cbx_saveuid from checkbox within w_sys_login_s
- integer x = 608
- integer y = 824
- integer width = 530
- integer height = 64
- boolean bringtotop = true
- integer textsize = -9
- integer weight = 400
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = variable!
- string facename = "宋体"
- long textcolor = 134217741
- long backcolor = 16777215
- string text = "记住用户名"
- end type
- event constructor;//this.backcolor = rgb(220,237,247)
- this.textcolor = rgb(229,119,35)
- end event
- type st_version from statictext within w_sys_login_s
- integer x = 1637
- integer y = 396
- integer width = 507
- integer height = 64
- boolean bringtotop = true
- integer textsize = -9
- integer weight = 400
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = variable!
- string facename = "宋体"
- long textcolor = 33554432
- long backcolor = 16777215
- string text = "单机版"
- alignment alignment = right!
- boolean focusrectangle = false
- end type
- event constructor;//this.backcolor = rgb(220,237,247)
- this.textcolor = rgb(229,119,35)
- end event
- type shl_new from statichyperlink within w_sys_login_s
- integer x = 1641
- integer y = 520
- integer width = 251
- integer height = 64
- boolean bringtotop = true
- integer textsize = -9
- integer weight = 400
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = variable!
- string facename = "宋体"
- boolean underline = true
- string pointer = "HyperLink!"
- long textcolor = 134217856
- long backcolor = 16777215
- string text = "帐套管理"
- boolean focusrectangle = false
- end type
- event clicked;//OpenWithParm(w_set_sqlca,1)
- open(w_book_def)
- end event
- type st_1 from statictext within w_sys_login_s
- integer x = 306
- integer y = 524
- integer width = 288
- integer height = 60
- boolean bringtotop = true
- integer textsize = -9
- integer weight = 400
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = variable!
- string facename = "宋体"
- long textcolor = 134217741
- long backcolor = 16777215
- string text = "帐 套:"
- boolean focusrectangle = false
- end type
- event constructor;this.textcolor = rgb(229,119,35)
- end event
- type st_2 from statictext within w_sys_login_s
- integer x = 306
- integer y = 624
- integer width = 288
- integer height = 60
- boolean bringtotop = true
- integer textsize = -9
- integer weight = 400
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = variable!
- string facename = "宋体"
- long textcolor = 134217741
- long backcolor = 16777215
- string text = "用 户 名:"
- boolean focusrectangle = false
- end type
- event constructor;this.textcolor = rgb(229,119,35)
- end event
- type st_3 from statictext within w_sys_login_s
- integer x = 306
- integer y = 728
- integer width = 288
- integer height = 60
- boolean bringtotop = true
- integer textsize = -9
- integer weight = 400
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = variable!
- string facename = "宋体"
- long textcolor = 134217741
- long backcolor = 16777215
- string text = "登陆密码:"
- boolean focusrectangle = false
- end type
- event constructor;this.textcolor = rgb(229,119,35)
- end event
|