forward
global type w_logo from window
end type
type st_7 from statictext within w_logo
end type
type dw_2 from datawindow within w_logo
end type
type st_6 from statictext within w_logo
end type
type st_1 from uo_statictext within w_logo
end type
type st_5 from uo_statictext within w_logo
end type
type st_3 from uo_statictext within w_logo
end type
type p_1 from picture within w_logo
end type
type dw_1 from datawindow within w_logo
end type
type cb_4 from uo_xpbutton within w_logo
end type
type cb_3 from uo_xpbutton within w_logo
end type
type st_4 from statictext within w_logo
end type
type cb_2 from commandbutton within w_logo
end type
type cb_1 from commandbutton within w_logo
end type
type gb_1 from groupbox within w_logo
end type
type st_2 from statictext within w_logo
end type
type sle_2 from singlelineedit within w_logo
end type
type gb_2 from groupbox within w_logo
end type
type variables
datastore ids_users
datastore ids_users1
end variables
forward prototypes
Public function long wf_get_computer (string as_dmbh)
end prototypes
Public function long wf_get_computer (string as_dmbh);//Public function wf_get_computer (string as_dmbh) returns long
//string as_dmbh
ulong i_size=255
string s_name
string disksn
string ls_computercnt
integer li_computercnt
integer li_out
DECLARE sp_proc PROCEDURE FOR up_get_computercnt :as_dmbh USING sqlca;
DECLARE sp_proc1 PROCEDURE FOR up_generate_workuser :as_dmbh , :s_name , :disksn , :li_computercnt , @as_out =:li_out output USING sqlca;
s_name = space(i_size)
getcomputername(s_name,i_size)
disksn = space(100)
getdisksn(0,disksn)
EXECUTE sp_proc;
FETCH sp_proc INTO :ls_computercnt;
CLOSE sp_proc;
ls_computercnt = mid(f_um_unencrypt(ls_computercnt),5,2)
li_computercnt = long(ls_computercnt)
EXECUTE sp_proc1;
FETCH sp_proc1 INTO :li_out;
CLOSE sp_proc1;
RETURN li_out
end function
event pfc_preopen;//pfc_preopen (none) returns (none)
datawindowchild ldwc_users
string ls_code
dw_2.settransobject(sqlca)
dw_1.settransobject(sqlca)
THIS.ids_users = CREATE datastore
THIS.ids_users.dataobject = "d_list_users1"
ids_users.settransobject(sqlca)
ids_users.retrieve()
IF dw_2.getchild("user_name",ldwc_users) = 1 THEN //6
ids_users.sharedata(ldwc_users)
END IF //6
dw_2.insertrow(0)
event open;//open (none) returns long [pbm_open]
//SHU_ERROR: Only for highlight,Maybe SomeThing Error
long ll_len
long ll_mid
long ll_pos
string ls_str1
EVENT pfc_preopen()
dw_2.settransobject(sqlca)
dw_1.settransobject(sqlca)
THIS.st_5.text = gnv_app.of_getversion()
ll_len = len(gnv_app.iapp_object.SHU_ERROR_PRO_2_3_91_10)
IF ll_len > 0 THEN //5
ll_pos = pos(gnv_app.iapp_object.SHU_ERROR_PRO_2_3_91_10,"电脑")
IF ll_pos > 1 THEN //7
ls_str1 = mid(gnv_app.iapp_object.SHU_ERROR_PRO_2_3_91_10,1,ll_pos - 1)
END IF //7
END IF //5
THIS.st_3.text = ls_str1
dw_2.insertrow(0)
dw_1.insertrow(0)
RETURN
end event
type st_7 from statictext within w_logo
integer x=293
integer y=496
integer width=398
integer height=92
boolean bringtotop=TRUE
integer textsize=-11
integer weight=700
fontcharset fontcharset=gb2312charset!
fontpitch fontpitch=fixed!
fontfamily fontfamily=modern!
string facename="幼圆"
long textcolor=33554432
long backcolor=12632256
string text="用户名:"
alignment alignment=right!
long bordercolor=30001609
boolean focusrectangle=FALSE
end type
type dw_2 from datawindow within w_logo
integer x=690
integer y=324
integer width=686
integer height=108
integer taborder=10
string title="none"
string dataobject="d_chooseuser"
boolean border=FALSE
boolean livescroll=TRUE
end type
event itemchanged;//itemchanged (long row,dwobject dwo,string data) returns long [pbm_dwnitemchange]
//long row
//dwobject dwo
//string data
datawindowchild ldwc_users1
string ls_code
PARENT.dw_1.settransobject(sqlca)
accepttext()
ls_code = getitemstring(getrow(),"user_name")
PARENT.ids_users1 = CREATE datastore
PARENT.ids_users1.dataobject = "d_list_users11"
PARENT.ids_users1.settransobject(sqlca)
PARENT.ids_users1.retrieve(ls_code)
IF PARENT.dw_1.getchild("user_name",ldwc_users1) = 1 THEN //7
PARENT.ids_users1.sharedata(ldwc_users1)
END IF //7
PARENT.dw_1.setfocus()
RETURN
end event
type st_6 from statictext within w_logo
integer x=283
integer y=348
integer width=407
integer height=96
boolean bringtotop=TRUE
integer textsize=-11
integer weight=700
fontcharset fontcharset=gb2312charset!
fontpitch fontpitch=fixed!
fontfamily fontfamily=modern!
string facename="幼圆"
long textcolor=33554432
long backcolor=12632256
string text="机构名称:"
alignment alignment=right!
long bordercolor=30001609
boolean focusrectangle=FALSE
end type
type st_1 from uo_statictext within w_logo
integer x=699
integer y=128
integer width=613
integer textsize=-14
string facename="华文新魏"
long textcolor
string text="电脑管理系统"
alignment alignment=center!
end type
type st_5 from uo_statictext within w_logo
integer x=1307
integer y=160
integer width=297
integer textsize=-10
string facename="华文新魏"
long textcolor
string text="1.0"
end type
type st_3 from uo_statictext within w_logo
integer x=297
integer y=28
integer width=1527
integer height=96
integer textsize=-14
string facename="华文新魏"
long textcolor
string text="技术开发有限公司"
alignment alignment=center!
end type
type p_1 from picture within w_logo
integer width=1829
integer height=236
string picturename="PIC\HEAD.bmp"
boolean focusrectangle=FALSE
end type
type dw_1 from datawindow within w_logo
integer x=690
integer y=472
integer width=686
integer height=124
integer taborder=20
string title="none"
string dataobject="d_chooseuser"
boolean border=FALSE
boolean livescroll=TRUE
event ue_key pbm_dwnkey
end type
event ue_key;//ue_key (keycode key,ulong keyflags) returns long [pbm_dwnkey]
//keycode key
//ulong keyflags
IF key = keyenter! THEN //0
CHOOSE CASE key //1
CASE keyenter! //1
send(handle(THIS),256,9,long(0,0))
END CHOOSE //1
RETURN 1
END IF //0
RETURN
end event
event itemchanged;//itemchanged (long row,dwobject dwo,string data) returns long [pbm_dwnitemchange]
//long row
//dwobject dwo
//string data
PARENT.sle_2.setfocus()
RETURN
end event
type cb_4 from uo_xpbutton within w_logo
integer x=1074
integer y=892
integer taborder=50
integer textsize=-10
fontpitch fontpitch=fixed!
fontfamily fontfamily=modern!
string facename="幼圆"
string text="取消[&C]"
integer buttonstyle=1
end type
event clicked;call super::clicked;//clicked (none) returns long [pbm_bnclicked]
//long ancestorreturnvalue
PARENT.cb_2.triggerevent(clicked!)
RETURN
end event
type cb_3 from uo_xpbutton within w_logo
integer x=709
integer y=892
integer taborder=60
integer textsize=-10
fontpitch fontpitch=fixed!
fontfamily fontfamily=modern!
string facename="幼圆"
string text="确定[&D]"
integer buttonstyle=1
end type
event clicked;call super::clicked;//clicked (none) returns long [pbm_bnclicked]
//long ancestorreturnvalue
PARENT.cb_1.triggerevent(clicked!)
RETURN
end event
type st_4 from statictext within w_logo
boolean visible
integer x=69
integer y=116
integer width=169
integer height=60
integer textsize=-9
integer weight=400
fontcharset fontcharset=gb2312charset!
fontpitch fontpitch=variable!
string facename="宋体"
long textcolor=33554432
long backcolor=16777215
string text="版本:"
boolean focusrectangle=FALSE
end type
type cb_2 from commandbutton within w_logo
boolean visible=FALSE
integer x=1029
integer y=632
integer width=293
integer height=92
integer textsize=-9
integer weight=400
fontcharset fontcharset=gb2312charset!
fontpitch fontpitch=variable!
string facename="宋体"
string text="取 消"
end type
event clicked;//clicked (none) returns long [pbm_bnclicked]
close(PARENT)
RETURN
end event
type cb_1 from commandbutton within w_logo
boolean visible=FALSE
integer x=640
integer y=632
integer width=293
integer height=92
integer textsize=-9
integer weight=400
fontcharset fontcharset=gb2312charset!
fontpitch fontpitch=variable!
string facename="宋体"
string text="确 定"
PARENT.dw_1.accepttext()
ls_usercode = trim(PARENT.dw_1.getitemstring(1,1))
IF (isnull(ls_usercode) OR ls_usercode = "") THEN //2
messagebox("提示","请输入用户编号!")
RETURN
END IF //2
ls_jgcode = trim(PARENT.dw_2.getitemstring(1,"user_name"))
IF (isnull(ls_jgcode) OR ls_jgcode = "") THEN //6
messagebox("提示","请输入机构名称!")
RETURN
END IF //6
ll_row = PARENT.ids_users1.find("dmbh = '" + ls_usercode + "'",1,PARENT.ids_users1.rowcount())
IF ll_row <= 0 THEN //10
messagebox("提示","不存在的用户!")
RETURN
END IF //10
ls_loginid = PARENT.ids_users1.object.dmbh[ll_row]
li_out = PARENT.wf_get_computer(left(ls_loginid,3))
IF li_out = -100 THEN //15 (如果在这里设成不等,能进入系统,就是进入系统后没有用户名了,有些功能不能用.)
messagebox("信息","分店电脑数量超限,请与软件供应商联系!")
RETURN
END IF //15
//SHU_ERROR:DEMO_SCRIPT_LIMIT.
end event
type gb_1 from groupbox within w_logo
boolean visible=FALSE
integer y=652
integer width=1618
integer height=8
integer textsize=-9
integer weight=400
fontcharset fontcharset=ansi!
fontpitch fontpitch=variable!
fontfamily fontfamily=swiss!
string facename="Arial"
long textcolor=33554432
long backcolor=67108864
end type
type st_2 from statictext within w_logo
integer x=325
integer y=640
integer width=366
integer height=92
boolean bringtotop=TRUE
integer textsize=-11
integer weight=700
fontcharset fontcharset=gb2312charset!
fontpitch fontpitch=fixed!
fontfamily fontfamily=modern!
string facename="幼圆"
long textcolor=33554432
long backcolor=12632256
string text="密 码:"
alignment alignment=right!
long bordercolor=30001609
boolean focusrectangle=FALSE
end type
type sle_2 from singlelineedit within w_logo
integer x=695
integer y=620
integer width=663
integer height=92
integer taborder=30
boolean bringtotop=TRUE
integer textsize=-9
integer weight=400
fontcharset fontcharset=ansi!
fontpitch fontpitch=variable!
fontfamily fontfamily=swiss!
string facename="Arial"
long textcolor=33554432
boolean password=TRUE
borderstyle borderstyle=stylelowered!
event key pbm_keydown
end type
event key;//key (keycode key,ulong keyflags) returns long [pbm_keydown]
//keycode key
//ulong keyflags
IF key = keyenter! THEN //0
PARENT.cb_1.EVENT clicked()
END IF //0
RETURN
end event
event getfocus;//getfocus (none) returns long [pbm_ensetfocus]
selecttext(1,len(THIS.text))
RETURN
end event
type gb_2 from groupbox within w_logo
integer x=14
integer y=220
integer width=1787
integer height=564
integer taborder=40
integer textsize=-10
integer weight=700
fontcharset fontcharset=gb2312charset!
fontpitch fontpitch=variable!
string facename="宋体"
long textcolor=33554432
long backcolor=12632256
我在程序里找了很久也没找到up_get_computercnt 这个函数,到是在数据库的“存储过程”中倒是有这个up_get_computercnt 打开它的属性,只有下面。
CREATE procedure up_get_computercnt @as_dmbh char(6)
as
select computercnt from qx_xtgl_user1 where rtrim(dmbh) = @as_dmbh
return
GO