| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073 |
- $PBExportHeader$w_sys_login_s_q6.srw
- $PBExportComments$Generated MDI frame window
- forward
- global type w_sys_login_s_q6 from w_publ_base
- end type
- type em_1 from editmask within w_sys_login_s_q6
- end type
- type sle_1 from singlelineedit within w_sys_login_s_q6
- end type
- type cb_1 from uo_imflatbutton within w_sys_login_s_q6
- end type
- type ddlb_acount from dropdownlistbox within w_sys_login_s_q6
- end type
- type cbx_pb from checkbox within w_sys_login_s_q6
- end type
- type p_1 from picture within w_sys_login_s_q6
- end type
- type cbx_saveuid from checkbox within w_sys_login_s_q6
- end type
- type st_version from statictext within w_sys_login_s_q6
- end type
- type shl_new from statichyperlink within w_sys_login_s_q6
- end type
- type st_1 from statictext within w_sys_login_s_q6
- end type
- type st_2 from statictext within w_sys_login_s_q6
- end type
- type st_3 from statictext within w_sys_login_s_q6
- end type
- end forward
- global type w_sys_login_s_q6 from w_publ_base
- integer width = 2245
- integer height = 1180
- string title = "企精灵5"
- 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_q6 w_sys_login_s_q6
- 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_q6.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_q6.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_q6
- 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_q6
- integer x = 1358
- 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_q6
- event key pbm_keydown
- integer x = 695
- integer y = 616
- 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_q6
- event key pbm_keydown
- integer x = 695
- integer y = 720
- 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_q6
- integer x = 553
- 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_q6
- event key pbm_dwnkey
- integer x = 695
- integer y = 512
- 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_q6
- 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_q6
- integer width = 2240
- integer height = 360
- boolean originalsize = true
- string picturename = "graphics\bar_dl_q6.bmp"
- boolean focusrectangle = false
- end type
- type cbx_saveuid from checkbox within w_sys_login_s_q6
- integer x = 667
- 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_q6
- 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_q6
- integer x = 1737
- integer y = 524
- 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_q6
- integer x = 402
- integer y = 528
- 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_q6
- integer x = 402
- integer y = 628
- 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_q6
- integer x = 402
- integer y = 732
- 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
|