$PBExportHeader$w_aifmb_cominfo_view.srw forward global type w_aifmb_cominfo_view from window end type type cb_2 from commandbutton within w_aifmb_cominfo_view end type type st_auditflag from statictext within w_aifmb_cominfo_view end type type cb_1 from commandbutton within w_aifmb_cominfo_view end type type st_3 from statictext within w_aifmb_cominfo_view end type type sle_usercode from singlelineedit within w_aifmb_cominfo_view end type type sle_address from multilineedit within w_aifmb_cominfo_view end type type st_14 from statictext within w_aifmb_cominfo_view end type type sle_dscrp from multilineedit within w_aifmb_cominfo_view end type type cb_exit from commandbutton within w_aifmb_cominfo_view end type type cb_edit from commandbutton within w_aifmb_cominfo_view end type type sle_comcode from singlelineedit within w_aifmb_cominfo_view end type type st_9 from statictext within w_aifmb_cominfo_view end type type sle_email from singlelineedit within w_aifmb_cominfo_view end type type st_7 from statictext within w_aifmb_cominfo_view end type type st_6 from statictext within w_aifmb_cominfo_view end type type sle_phone from singlelineedit within w_aifmb_cominfo_view end type type st_5 from statictext within w_aifmb_cominfo_view end type type sle_tele from singlelineedit within w_aifmb_cominfo_view end type type st_4 from statictext within w_aifmb_cominfo_view end type type st_2 from statictext within w_aifmb_cominfo_view end type type st_1 from statictext within w_aifmb_cominfo_view end type type sle_username from singlelineedit within w_aifmb_cominfo_view end type end forward global type w_aifmb_cominfo_view from window integer width = 2245 integer height = 1792 boolean titlebar = true string title = "电商注册信息" boolean controlmenu = true boolean minbox = true windowtype windowtype = popup! long backcolor = 16777215 string icon = "AppIcon!" boolean center = true cb_2 cb_2 st_auditflag st_auditflag cb_1 cb_1 st_3 st_3 sle_usercode sle_usercode sle_address sle_address st_14 st_14 sle_dscrp sle_dscrp cb_exit cb_exit cb_edit cb_edit sle_comcode sle_comcode st_9 st_9 sle_email sle_email st_7 st_7 st_6 st_6 sle_phone sle_phone st_5 st_5 sle_tele sle_tele st_4 st_4 st_2 st_2 st_1 st_1 sle_username sle_username end type global w_aifmb_cominfo_view w_aifmb_cominfo_view type variables boolean dw_edit_mode = false long ins_userid string ins_psw end variables forward prototypes public subroutine wf_face () public function integer wf_save (ref string arg_msg) end prototypes public subroutine wf_face ();cb_1.Enabled = Not dw_edit_mode sle_tele.Enabled = dw_edit_mode sle_phone.Enabled = dw_edit_mode sle_email.Enabled = dw_edit_mode sle_address.Enabled = dw_edit_mode sle_dscrp.Enabled = dw_edit_mode IF dw_edit_mode THEN cb_edit.Text = '保存' ELSE cb_edit.Text = '修改' END IF end subroutine public function integer wf_save (ref string arg_msg);Int rslt = 1 String ls_CusID uo_aifmbproxy ll_proxyfactory ll_proxyfactory = Create uo_aifmbproxy IF sys_email_sqlca.DBHandle() <= 0 THEN rslt = 0 arg_msg = '未设置邮件数据库' GOTO ext END IF oleobject lo_proxy IF ll_proxyfactory.getproxy(lo_proxy, arg_msg) <> 1 THEN rslt = 0 GOTO ext END IF oleobject request request = lo_proxy.NewModComRequest() request.userid = ins_userid request.psw = ins_psw request.tele = sle_tele.Text request.phone = sle_phone.Text request.address = sle_address.Text request.email = sle_email.Text request.dscrp = sle_dscrp.Text oleobject response response = lo_proxy.ModCom(request) IF Not IsNull(response.ErrMsg) THEN rslt = 0 arg_msg = response.ErrMsg GOTO ext END IF ext: destroy ll_proxyfactory return rslt end function on w_aifmb_cominfo_view.create this.cb_2=create cb_2 this.st_auditflag=create st_auditflag this.cb_1=create cb_1 this.st_3=create st_3 this.sle_usercode=create sle_usercode this.sle_address=create sle_address this.st_14=create st_14 this.sle_dscrp=create sle_dscrp this.cb_exit=create cb_exit this.cb_edit=create cb_edit this.sle_comcode=create sle_comcode this.st_9=create st_9 this.sle_email=create sle_email this.st_7=create st_7 this.st_6=create st_6 this.sle_phone=create sle_phone this.st_5=create st_5 this.sle_tele=create sle_tele this.st_4=create st_4 this.st_2=create st_2 this.st_1=create st_1 this.sle_username=create sle_username this.Control[]={this.cb_2,& this.st_auditflag,& this.cb_1,& this.st_3,& this.sle_usercode,& this.sle_address,& this.st_14,& this.sle_dscrp,& this.cb_exit,& this.cb_edit,& this.sle_comcode,& this.st_9,& this.sle_email,& this.st_7,& this.st_6,& this.sle_phone,& this.st_5,& this.sle_tele,& this.st_4,& this.st_2,& this.st_1,& this.sle_username} end on on w_aifmb_cominfo_view.destroy destroy(this.cb_2) destroy(this.st_auditflag) destroy(this.cb_1) destroy(this.st_3) destroy(this.sle_usercode) destroy(this.sle_address) destroy(this.st_14) destroy(this.sle_dscrp) destroy(this.cb_exit) destroy(this.cb_edit) destroy(this.sle_comcode) destroy(this.st_9) destroy(this.sle_email) destroy(this.st_7) destroy(this.st_6) destroy(this.sle_phone) destroy(this.st_5) destroy(this.sle_tele) destroy(this.st_4) destroy(this.st_2) destroy(this.st_1) destroy(this.sle_username) end on event open;Int rslt = 1 String arg_msg cb_1.Enabled = sys_power_issuper cb_2.Enabled = sys_power_issuper uo_aifmbproxy ll_proxyfactory ll_proxyfactory = Create uo_aifmbproxy String ls_CusID Long ll_rtn = 0 IF sys_email_sqlca.DBHandle() <= 0 THEN rslt = 0 arg_msg = '未设置邮件数据库' GOTO ext END IF Long ll_cnt SELECT COUNT(0) INTO :ll_cnt FROM LJFIEB_ComInfo Using sys_email_sqlca; IF sys_email_sqlca.SQLCode <> 0 THEN rslt = 0 arg_msg = '查询注册信息表失败,' + sys_email_sqlca.SQLErrText GOTO ext END IF IF ll_cnt = 0 THEN rslt = 0 arg_msg = '请更新供应链后台以初始化数据库' GOTO ext END IF IF ll_cnt > 1 THEN rslt = 0 arg_msg = '注册信息存在多条,异常' GOTO ext END IF SELECT CusID, userid, psw INTO :ls_CusID, :ins_userid, :ins_psw FROM LJFIEB_ComInfo Using sys_email_sqlca; IF sys_email_sqlca.SQLCode <> 0 THEN rslt = 0 arg_msg = '查询企业注册信息失败,' + sys_email_sqlca.SQLErrText GOTO ext END IF IF ins_userid <= 0 THEN reg: IF sys_power_issuper THEN Open(w_aifmb_regcom) ll_rtn = Message.DoubleParm END IF IF ll_rtn = 1 THEN SELECT CusID, userid, psw INTO :ls_CusID, :ins_userid, :ins_psw FROM LJFIEB_ComInfo Using sys_email_sqlca; IF sys_email_sqlca.SQLCode <> 0 THEN rslt = 0 arg_msg = '查询企业注册信息失败,' + sys_email_sqlca.SQLErrText GOTO ext END IF ELSE rslt = 0 arg_msg = '' GOTO ext END IF END IF oleobject lo_proxy IF ll_proxyfactory.getproxy(lo_proxy, arg_msg) <> 1 THEN rslt = 0 GOTO ext END IF oleobject request request = lo_proxy.NewGetComInfoRequest() request.UserID = ins_userid request.psw = ins_psw oleobject response response = lo_proxy.GetComInfo(request) IF Not IsNull(response.ErrMsg) THEN IF Pos(response.ErrMsg, "企业不存在") > 0 Or Pos(response.ErrMsg, "企业密码被修改") > 0 THEN MessageBox('ERROR', String(response.ErrMsg)) GOTO reg END IF rslt = 0 arg_msg = response.ErrMsg GOTO ext END IF sle_usercode.Text = response.usercode sle_username.Text = response.username sle_comcode.Text = response.comcode sle_tele.Text = response.tele sle_phone.Text = response.phone sle_email.Text = response.email sle_address.Text = response.Address sle_dscrp.Text = response.dscrp Long ll_auditflag ll_auditflag = response.auditflag IF ll_auditflag = 1 THEN st_auditflag.Text = '已审核' ELSE st_auditflag.Text = '未审核' END IF wf_face() ext: Destroy ll_proxyfactory IF rslt = 0 THEN IF arg_msg <> '' THEN MessageBox('ERROR', arg_msg) END IF cb_exit.PostEvent(Clicked!) END IF end event type cb_2 from commandbutton within w_aifmb_cominfo_view integer x = 174 integer y = 1572 integer width = 288 integer height = 100 integer taborder = 170 integer textsize = -9 integer weight = 400 fontcharset fontcharset = gb2312charset! fontpitch fontpitch = variable! string facename = "宋体" string text = "重新注册" end type event clicked;Open(w_aifmb_regcom) Long ll_rtn = 0 string arg_msg ll_rtn = Message.DoubleParm IF ll_rtn = 1 THEN uo_aifmb = create uo_aifmb uo_aifmb.uf_tryautologin(arg_msg) destroy uo_aifmb Close(Parent) END IF end event type st_auditflag from statictext within w_aifmb_cominfo_view integer x = 1335 integer y = 80 integer width = 233 integer height = 48 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_1 from commandbutton within w_aifmb_cominfo_view integer x = 398 integer y = 436 integer width = 274 integer height = 84 integer taborder = 140 integer textsize = -9 integer weight = 400 fontcharset fontcharset = gb2312charset! fontpitch fontpitch = variable! string facename = "宋体" string text = "修改密码" end type event clicked;String newpsw OpenWithParm(w_ljfieb_modpsw, ins_psw) s_ljfieb_modpsw s_rslt s_rslt = Message.PowerObjectParm IF s_rslt.ifok = 1 THEN newpsw = s_rslt.newpsw // DONE: 修改企业密码 uo_aifmb = Create uo_aifmb Int rslt = 1 String arg_msg IF uo_aifmb.uf_modentpsw(ins_psw, newpsw, arg_msg) <> 1 THEN rslt = 0 GOTO ext END IF ext: Destroy uo_aifmb IF rslt = 1 THEN ins_psw = newpsw MessageBox('OK', '修改成功') ELSE MessageBox('ERROR', arg_msg) END IF END IF end event type st_3 from statictext within w_aifmb_cominfo_view integer x = 101 integer y = 80 integer width = 279 integer height = 48 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 type sle_usercode from singlelineedit within w_aifmb_cominfo_view integer x = 398 integer y = 64 integer width = 855 integer height = 84 integer taborder = 140 integer textsize = -9 integer weight = 400 fontcharset fontcharset = gb2312charset! fontpitch fontpitch = variable! string facename = "宋体" long textcolor = 33554432 boolean enabled = false boolean displayonly = true borderstyle borderstyle = stylelowered! end type type sle_address from multilineedit within w_aifmb_cominfo_view integer x = 398 integer y = 932 integer width = 855 integer height = 592 integer taborder = 140 integer textsize = -9 integer weight = 400 fontcharset fontcharset = gb2312charset! fontpitch fontpitch = variable! string facename = "宋体" long textcolor = 33554432 boolean hscrollbar = true boolean vscrollbar = true boolean autohscroll = true boolean autovscroll = true borderstyle borderstyle = stylelowered! end type type st_14 from statictext within w_aifmb_cominfo_view integer x = 1335 integer y = 204 integer width = 279 integer height = 48 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 sle_dscrp from multilineedit within w_aifmb_cominfo_view integer x = 1303 integer y = 312 integer width = 855 integer height = 1212 integer taborder = 130 integer textsize = -9 integer weight = 400 fontcharset fontcharset = gb2312charset! fontpitch fontpitch = variable! string facename = "宋体" long textcolor = 33554432 boolean hscrollbar = true boolean vscrollbar = true boolean autohscroll = true boolean autovscroll = true borderstyle borderstyle = stylelowered! end type type cb_exit from commandbutton within w_aifmb_cominfo_view integer x = 1838 integer y = 1572 integer width = 288 integer height = 100 integer taborder = 160 integer textsize = -9 integer weight = 400 fontcharset fontcharset = gb2312charset! fontpitch fontpitch = variable! string facename = "宋体" string text = "退出" end type event clicked;close(parent) end event type cb_edit from commandbutton within w_aifmb_cominfo_view integer x = 1495 integer y = 1572 integer width = 288 integer height = 100 integer taborder = 150 integer textsize = -9 integer weight = 400 fontcharset fontcharset = gb2312charset! fontpitch fontpitch = variable! string facename = "宋体" string text = "修改" end type event clicked;String arg_msg IF dw_edit_mode THEN IF wf_save(arg_msg) <> 1 THEN MessageBox('ERROR', arg_msg) RETURN END IF END IF dw_edit_mode = Not dw_edit_mode wf_face() end event type sle_comcode from singlelineedit within w_aifmb_cominfo_view integer x = 398 integer y = 312 integer width = 855 integer height = 84 integer taborder = 20 integer textsize = -9 integer weight = 400 fontcharset fontcharset = gb2312charset! fontpitch fontpitch = variable! string facename = "宋体" long textcolor = 33554432 boolean enabled = false boolean displayonly = true borderstyle borderstyle = stylelowered! end type type st_9 from statictext within w_aifmb_cominfo_view integer x = 101 integer y = 328 integer width = 279 integer height = 48 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 type sle_email from singlelineedit within w_aifmb_cominfo_view integer x = 398 integer y = 808 integer width = 855 integer height = 84 integer taborder = 110 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_aifmb_cominfo_view integer x = 101 integer y = 824 integer width = 279 integer height = 48 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 type st_6 from statictext within w_aifmb_cominfo_view integer x = 101 integer y = 948 integer width = 279 integer height = 48 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 type sle_phone from singlelineedit within w_aifmb_cominfo_view integer x = 398 integer y = 684 integer width = 855 integer height = 84 integer taborder = 100 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_aifmb_cominfo_view integer x = 101 integer y = 700 integer width = 279 integer height = 48 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 type sle_tele from singlelineedit within w_aifmb_cominfo_view integer x = 398 integer y = 560 integer width = 855 integer height = 84 integer taborder = 90 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_aifmb_cominfo_view integer x = 101 integer y = 576 integer width = 279 integer height = 48 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 type st_2 from statictext within w_aifmb_cominfo_view integer x = 101 integer y = 452 integer width = 279 integer height = 48 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 type st_1 from statictext within w_aifmb_cominfo_view integer x = 101 integer y = 204 integer width = 279 integer height = 48 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 type sle_username from singlelineedit within w_aifmb_cominfo_view integer x = 398 integer y = 188 integer width = 855 integer height = 84 integer taborder = 10 integer textsize = -9 integer weight = 400 fontcharset fontcharset = gb2312charset! fontpitch fontpitch = variable! string facename = "宋体" long textcolor = 33554432 boolean enabled = false boolean displayonly = true borderstyle borderstyle = stylelowered! end type