$PBExportHeader$w_fx_regcompany.srw
$PBExportComments$分销系统注册窗口
forward
global type w_fx_regcompany from w_publ_base
end type
type st_1 from statictext within w_fx_regcompany
end type
type sle_comname from singlelineedit within w_fx_regcompany
end type
type st_2 from statictext within w_fx_regcompany
end type
type sle_simplename from singlelineedit within w_fx_regcompany
end type
type st_3 from statictext within w_fx_regcompany
end type
type sle_custype from singlelineedit within w_fx_regcompany
end type
type st_4 from statictext within w_fx_regcompany
end type
type sle_tele from singlelineedit within w_fx_regcompany
end type
type st_5 from statictext within w_fx_regcompany
end type
type sle_address from singlelineedit within w_fx_regcompany
end type
type st_8 from statictext within w_fx_regcompany
end type
type sle_usercode from singlelineedit within w_fx_regcompany
end type
type st_9 from statictext within w_fx_regcompany
end type
type sle_psw from singlelineedit within w_fx_regcompany
end type
type st_10 from statictext within w_fx_regcompany
end type
type mle_dscrp from multilineedit within w_fx_regcompany
end type
type cbx_show from checkbox within w_fx_regcompany
end type
type st_6 from statictext within w_fx_regcompany
end type
type sle_legalperson from singlelineedit within w_fx_regcompany
end type
type st_13 from statictext within w_fx_regcompany
end type
type st_14 from statictext within w_fx_regcompany
end type
type sle_license from singlelineedit within w_fx_regcompany
end type
type sle_regaddress from singlelineedit within w_fx_regcompany
end type
type st_7 from statictext within w_fx_regcompany
end type
type mle_business from multilineedit within w_fx_regcompany
end type
type st_11 from statictext within w_fx_regcompany
end type
type p_license from picture within w_fx_regcompany
end type
type cb_1 from commandbutton within w_fx_regcompany
end type
end forward

global type w_fx_regcompany from w_publ_base
integer width = 3942
integer height = 1741
string title = "企业注册"
boolean minbox = false
boolean center = true
st_1 st_1
sle_comname sle_comname
st_2 st_2
sle_simplename sle_simplename
st_3 st_3
sle_custype sle_custype
st_4 st_4
sle_tele sle_tele
st_5 st_5
sle_address sle_address
st_8 st_8
sle_usercode sle_usercode
st_9 st_9
sle_psw sle_psw
st_10 st_10
mle_dscrp mle_dscrp
cbx_show cbx_show
st_6 st_6
sle_legalperson sle_legalperson
st_13 st_13
st_14 st_14
sle_license sle_license
sle_regaddress sle_regaddress
st_7 st_7
mle_business mle_business
st_11 st_11
p_license p_license
cb_1 cb_1
end type
global w_fx_regcompany w_fx_regcompany

type variables
string ins_fileDir // LOGO本地存放文件夹
string ins_licenseFileDir // 营业执照图片路径
end variables

on w_fx_regcompany.create
int iCurrent
call super::create
this.st_1=create st_1
this.sle_comname=create sle_comname
this.st_2=create st_2
this.sle_simplename=create sle_simplename
this.st_3=create st_3
this.sle_custype=create sle_custype
this.st_4=create st_4
this.sle_tele=create sle_tele
this.st_5=create st_5
this.sle_address=create sle_address
this.st_8=create st_8
this.sle_usercode=create sle_usercode
this.st_9=create st_9
this.sle_psw=create sle_psw
this.st_10=create st_10
this.mle_dscrp=create mle_dscrp
this.cbx_show=create cbx_show
this.st_6=create st_6
this.sle_legalperson=create sle_legalperson
this.st_13=create st_13
this.st_14=create st_14
this.sle_license=create sle_license
this.sle_regaddress=create sle_regaddress
this.st_7=create st_7
this.mle_business=create mle_business
this.st_11=create st_11
this.p_license=create p_license
this.cb_1=create cb_1
iCurrent=UpperBound(this.Control)
this.Control[iCurrent+1]=this.st_1
this.Control[iCurrent+2]=this.sle_comname
this.Control[iCurrent+3]=this.st_2
this.Control[iCurrent+4]=this.sle_simplename
this.Control[iCurrent+5]=this.st_3
this.Control[iCurrent+6]=this.sle_custype
this.Control[iCurrent+7]=this.st_4
this.Control[iCurrent+8]=this.sle_tele
this.Control[iCurrent+9]=this.st_5
this.Control[iCurrent+10]=this.sle_address
this.Control[iCurrent+11]=this.st_8
this.Control[iCurrent+12]=this.sle_usercode
this.Control[iCurrent+13]=this.st_9
this.Control[iCurrent+14]=this.sle_psw
this.Control[iCurrent+15]=this.st_10
this.Control[iCurrent+16]=this.mle_dscrp
this.Control[iCurrent+17]=this.cbx_show
this.Control[iCurrent+18]=this.st_6
this.Control[iCurrent+19]=this.sle_legalperson
this.Control[iCurrent+20]=this.st_13
this.Control[iCurrent+21]=this.st_14
this.Control[iCurrent+22]=this.sle_license
this.Control[iCurrent+23]=this.sle_regaddress
this.Control[iCurrent+24]=this.st_7
this.Control[iCurrent+25]=this.mle_business
this.Control[iCurrent+26]=this.st_11
this.Control[iCurrent+27]=this.p_license
this.Control[iCurrent+28]=this.cb_1
end on

on w_fx_regcompany.destroy
call super::destroy
destroy(this.st_1)
destroy(this.sle_comname)
destroy(this.st_2)
destroy(this.sle_simplename)
destroy(this.st_3)
destroy(this.sle_custype)
destroy(this.st_4)
destroy(this.sle_tele)
destroy(this.st_5)
destroy(this.sle_address)
destroy(this.st_8)
destroy(this.sle_usercode)
destroy(this.st_9)
destroy(this.sle_psw)
destroy(this.st_10)
destroy(this.mle_dscrp)
destroy(this.cbx_show)
destroy(this.st_6)
destroy(this.sle_legalperson)
destroy(this.st_13)
destroy(this.st_14)
destroy(this.sle_license)
destroy(this.sle_regaddress)
destroy(this.st_7)
destroy(this.mle_business)
destroy(this.st_11)
destroy(this.p_license)
destroy(this.cb_1)
end on

type cb_func from w_publ_base`cb_func within w_fx_regcompany
integer x = 1741
integer y = 1520
integer taborder = 100
string text = "注册"
end type

event cb_func::clicked;call super::clicked;if Trim(sle_comname.Text) = '' then
	MessageBox('提示', '企业名称不能为空')
	return
end if

if Trim(sle_simplename.Text) = '' then
	MessageBox('提示', '企业简称不能为空')
	return
end if

if Trim(sle_custype.Text) = '' then
	MessageBox('提示', '联系人不能为空')
	return
end if

if Trim(sle_tele.Text) = '' then
	MessageBox('提示', '联系电话不能为空')
	return
end if

if Trim(sle_usercode.Text) = '' then
	MessageBox('提示', '登陆名不能为空')
	return
end if

if Trim(sle_psw.Text) = '' then
	MessageBox('提示', '登陆密码不能为空')
	return
end if
if Trim(sle_LegalPerson.Text) = '' then
        MessageBox('提示', '企业法人不能为空')
        return
end if
if Trim(sle_RegAddress.Text) = '' then
        MessageBox('提示', '注册地址不能为空')
        return
end if
if Trim(mle_business.Text) = '' then
        MessageBox('提示', '经营范围不能为空')
        return
end if
if Trim(sle_license.Text) = '' then
        MessageBox('提示', '营业执照注册编号不能为空')
        return
end if



oleobject req
req = FXAppCom.CreatePbDictionary()

req.SetString('comname', sle_comname.Text)
req.SetString('simplename', sle_simplename.Text)
req.SetString('custype', sle_custype.Text)
req.SetString('tele', sle_tele.Text)
req.SetString('address', sle_address.Text)
req.SetString('dscrp', mle_dscrp.Text)
req.SetString('usercode', sle_usercode.Text)
req.SetString('psw', sle_psw.Text)
req.SetString('LegalPerson', sle_LegalPerson.Text)
req.SetString('RegAddress', sle_RegAddress.Text)
req.SetString('business', mle_business.Text)
req.SetString('license', sle_license.Text)
IF ins_licenseFileDir <> '' THEN
	req.SetFile('licensePic',ins_licenseFileDir)
	string licensePicName
	int slashIndex
	slashIndex=lastpos (ins_licenseFileDir, "\")
	licensePicName = Right(ins_licenseFileDir,Len(ins_licenseFileDir) - slashIndex)
	req.SetString('licensePicName', licensePicName)
END IF


oleObject response
string arg_msg
response = FXAppCom.DoExecute("RegCompany",req)
arg_msg = response.GetString('ErrMsg')

IF (arg_msg <> '') THEN
	MessageBox('提示', '注册失败:' + arg_msg)
ELSE
	MessageBox('提示', '注册成功')
	close(parent)
	return
END IF
end event

type cb_exit from w_publ_base`cb_exit within w_fx_regcompany
integer x = 2136
integer y = 1520
integer taborder = 110
end type

type st_1 from statictext within w_fx_regcompany
integer x = 48
integer y = 74
integer width = 260
integer height = 48
boolean bringtotop = true
integer textsize = -9
integer weight = 400
fontcharset fontcharset = gb2312charset!
fontpitch fontpitch = variable!
string facename = "宋体"
long textcolor = 33554432
long backcolor = 134217739
string text = "*企业名称"
alignment alignment = right!
long bordercolor = 134217739
boolean focusrectangle = false
end type

type sle_comname from singlelineedit within w_fx_regcompany
integer x = 322
integer y = 58
integer width = 600
integer height = 83
integer taborder = 10
boolean bringtotop = true
integer textsize = -9
integer weight = 400
fontcharset fontcharset = gb2312charset!
fontpitch fontpitch = variable!
string facename = "宋体"
long textcolor = 33554432
borderstyle borderstyle = stylelowered!
end type

type st_2 from statictext within w_fx_regcompany
integer x = 1028
integer y = 74
integer width = 260
integer height = 48
boolean bringtotop = true
integer textsize = -9
integer weight = 400
fontcharset fontcharset = gb2312charset!
fontpitch fontpitch = variable!
string facename = "宋体"
long textcolor = 33554432
long backcolor = 134217739
string text = "*企业简称"
alignment alignment = right!
long bordercolor = 134217739
boolean focusrectangle = false
end type

type sle_simplename from singlelineedit within w_fx_regcompany
integer x = 1313
integer y = 58
integer width = 600
integer height = 83
integer taborder = 20
boolean bringtotop = true
integer textsize = -9
integer weight = 400
fontcharset fontcharset = gb2312charset!
fontpitch fontpitch = variable!
string facename = "宋体"
long textcolor = 33554432
borderstyle borderstyle = stylelowered!
end type

type st_3 from statictext within w_fx_regcompany
integer x = 48
integer y = 378
integer width = 252
integer height = 48
boolean bringtotop = true
integer textsize = -9
integer weight = 400
fontcharset fontcharset = gb2312charset!
fontpitch fontpitch = variable!
string facename = "宋体"
long textcolor = 33554432
long backcolor = 134217739
string text = "*联系人"
alignment alignment = right!
long bordercolor = 134217739
boolean focusrectangle = false
end type

type sle_custype from singlelineedit within w_fx_regcompany
integer x = 322
integer y = 362
integer width = 600
integer height = 83
integer taborder = 30
boolean bringtotop = true
integer textsize = -9
integer weight = 400
fontcharset fontcharset = gb2312charset!
fontpitch fontpitch = variable!
string facename = "宋体"
long textcolor = 33554432
borderstyle borderstyle = stylelowered!
end type

type st_4 from statictext within w_fx_regcompany
integer x = 1028
integer y = 378
integer width = 260
integer height = 48
boolean bringtotop = true
integer textsize = -9
integer weight = 400
fontcharset fontcharset = gb2312charset!
fontpitch fontpitch = variable!
string facename = "宋体"
long textcolor = 33554432
long backcolor = 134217739
string text = "*联系电话"
alignment alignment = right!
long bordercolor = 134217739
boolean focusrectangle = false
end type

type sle_tele from singlelineedit within w_fx_regcompany
integer x = 1313
integer y = 362
integer width = 600
integer height = 83
integer taborder = 40
boolean bringtotop = true
integer textsize = -9
integer weight = 400
fontcharset fontcharset = gb2312charset!
fontpitch fontpitch = variable!
string facename = "宋体"
long textcolor = 33554432
borderstyle borderstyle = stylelowered!
end type

type st_5 from statictext within w_fx_regcompany
integer x = 48
integer y = 522
integer width = 252
integer height = 48
boolean bringtotop = true
integer textsize = -9
integer weight = 400
fontcharset fontcharset = gb2312charset!
fontpitch fontpitch = variable!
string facename = "宋体"
long textcolor = 33554432
long backcolor = 134217739
string text = " 地址"
alignment alignment = right!
long bordercolor = 134217739
boolean focusrectangle = false
end type

type sle_address from singlelineedit within w_fx_regcompany
integer x = 322
integer y = 506
integer width = 1591
integer height = 83
integer taborder = 50
boolean bringtotop = true
integer textsize = -9
integer weight = 400
fontcharset fontcharset = gb2312charset!
fontpitch fontpitch = variable!
string facename = "宋体"
long textcolor = 33554432
borderstyle borderstyle = stylelowered!
end type

type st_8 from statictext within w_fx_regcompany
integer x = 48
integer y = 218
integer width = 252
integer height = 48
boolean bringtotop = true
integer textsize = -9
integer weight = 400
fontcharset fontcharset = gb2312charset!
fontpitch fontpitch = variable!
string facename = "宋体"
long textcolor = 33554432
long backcolor = 134217739
string text = "*登陆名"
alignment alignment = right!
long bordercolor = 134217739
boolean focusrectangle = false
end type

type sle_usercode from singlelineedit within w_fx_regcompany
integer x = 322
integer y = 202
integer width = 600
integer height = 83
integer taborder = 80
boolean bringtotop = true
integer textsize = -9
integer weight = 400
fontcharset fontcharset = gb2312charset!
fontpitch fontpitch = variable!
string facename = "宋体"
long textcolor = 33554432
borderstyle borderstyle = stylelowered!
end type

type st_9 from statictext within w_fx_regcompany
integer x = 1028
integer y = 218
integer width = 260
integer height = 48
boolean bringtotop = true
integer textsize = -9
integer weight = 400
fontcharset fontcharset = gb2312charset!
fontpitch fontpitch = variable!
string facename = "宋体"
long textcolor = 33554432
long backcolor = 134217739
string text = "*登陆密码"
alignment alignment = right!
long bordercolor = 134217739
boolean focusrectangle = false
end type

type sle_psw from singlelineedit within w_fx_regcompany
integer x = 1313
integer y = 202
integer width = 600
integer height = 83
integer taborder = 90
boolean bringtotop = true
integer textsize = -9
integer weight = 400
fontcharset fontcharset = gb2312charset!
fontpitch fontpitch = variable!
string facename = "宋体"
long textcolor = 33554432
boolean password = true
borderstyle borderstyle = stylelowered!
end type

type st_10 from statictext within w_fx_regcompany
integer x = 48
integer y = 666
integer width = 260
integer height = 48
boolean bringtotop = true
integer textsize = -9
integer weight = 400
fontcharset fontcharset = gb2312charset!
fontpitch fontpitch = variable!
string facename = "宋体"
long textcolor = 33554432
long backcolor = 134217739
string text = " 简介备注"
alignment alignment = right!
boolean focusrectangle = false
end type

type mle_dscrp from multilineedit within w_fx_regcompany
integer x = 322
integer y = 650
integer width = 1591
integer height = 787
integer taborder = 60
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!
end type

type cbx_show from checkbox within w_fx_regcompany
integer x = 1609
integer y = 294
integer width = 304
integer height = 61
boolean bringtotop = true
integer textsize = -9
integer weight = 400
fontcharset fontcharset = gb2312charset!
fontpitch fontpitch = variable!
string facename = "宋体"
long textcolor = 33554432
long backcolor = 134217739
string text = "显示密码"
end type

event clicked;sle_psw.Password = not this.Checked
end event

type st_6 from statictext within w_fx_regcompany
integer x = 1968
integer y = 70
integer width = 263
integer height = 48
boolean bringtotop = true
integer textsize = -9
integer weight = 400
fontcharset fontcharset = gb2312charset!
fontpitch fontpitch = variable!
string facename = "宋体"
long textcolor = 33554432
long backcolor = 134217739
string text = "*企业法人"
long bordercolor = 134217739
boolean focusrectangle = false
end type

type sle_legalperson from singlelineedit within w_fx_regcompany
integer x = 2231
integer y = 54
integer width = 600
integer height = 83
integer taborder = 10
boolean bringtotop = true
integer textsize = -9
integer weight = 400
fontcharset fontcharset = gb2312charset!
fontpitch fontpitch = variable!
string facename = "宋体"
long textcolor = 33554432
borderstyle borderstyle = stylelowered!
end type

type st_13 from statictext within w_fx_regcompany
integer x = 1964
integer y = 358
integer width = 263
integer height = 48
boolean bringtotop = true
integer textsize = -9
integer weight = 400
fontcharset fontcharset = gb2312charset!
fontpitch fontpitch = variable!
string facename = "宋体"
long textcolor = 33554432
long backcolor = 134217739
string text = "*经营范围"
long bordercolor = 134217739
boolean focusrectangle = false
end type

type st_14 from statictext within w_fx_regcompany
integer x = 1964
integer y = 675
integer width = 483
integer height = 48
boolean bringtotop = true
integer textsize = -9
integer weight = 400
fontcharset fontcharset = gb2312charset!
fontpitch fontpitch = variable!
string facename = "宋体"
long textcolor = 33554432
long backcolor = 134217739
string text = "*营业执照注册编号"
long bordercolor = 134217739
boolean focusrectangle = false
end type

type sle_license from singlelineedit within w_fx_regcompany
integer x = 2447
integer y = 653
integer width = 1375
integer height = 83
integer taborder = 90
boolean bringtotop = true
integer textsize = -9
integer weight = 400
fontcharset fontcharset = gb2312charset!
fontpitch fontpitch = variable!
string facename = "宋体"
long textcolor = 33554432
borderstyle borderstyle = stylelowered!
end type

type sle_regaddress from singlelineedit within w_fx_regcompany
integer x = 2227
integer y = 202
integer width = 1591
integer height = 83
integer taborder = 60
boolean bringtotop = true
integer textsize = -9
integer weight = 400
fontcharset fontcharset = gb2312charset!
fontpitch fontpitch = variable!
string facename = "宋体"
long textcolor = 33554432
borderstyle borderstyle = stylelowered!
end type

type st_7 from statictext within w_fx_regcompany
integer x = 1964
integer y = 214
integer width = 263
integer height = 48
boolean bringtotop = true
integer textsize = -9
integer weight = 400
fontcharset fontcharset = gb2312charset!
fontpitch fontpitch = variable!
string facename = "宋体"
long textcolor = 33554432
long backcolor = 134217739
string text = "*注册地址"
long bordercolor = 134217739
boolean focusrectangle = false
end type

type mle_business from multilineedit within w_fx_regcompany
integer x = 2227
integer y = 346
integer width = 1591
integer height = 250
integer taborder = 70
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!
end type

type st_11 from statictext within w_fx_regcompany
integer x = 1957
integer y = 806
integer width = 263
integer height = 48
boolean bringtotop = true
integer textsize = -9
integer weight = 400
fontcharset fontcharset = gb2312charset!
fontpitch fontpitch = variable!
string facename = "宋体"
long textcolor = 33554432
long backcolor = 134217739
string text = "营业执照"
alignment alignment = right!
long bordercolor = 134217739
boolean focusrectangle = false
end type

type p_license from picture within w_fx_regcompany
integer x = 2235
integer y = 915
integer width = 1587
integer height = 522
boolean bringtotop = true
boolean focusrectangle = false
end type

type cb_1 from commandbutton within w_fx_regcompany
integer x = 2235
integer y = 787
integer width = 413
integer height = 83
integer taborder = 100
boolean bringtotop = true
integer textsize = -9
integer weight = 400
fontcharset fontcharset = gb2312charset!
fontpitch fontpitch = variable!
string facename = "宋体"
string text = "选择图片"
end type

event clicked;string ls_pathname, ls_name
if (GetFileOpenName('请选择图片', ls_pathname, ls_name) = 1) then
	ins_licenseFileDir = ls_pathname
	p_license.picturename = ins_licenseFileDir
end if
end event

