123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481 |
- $PBExportHeader$w_reg_apply.srw
- $PBExportComments$Generated About window
- forward
- global type w_reg_apply from window
- end type
- type em_1 from editmask within w_reg_apply
- end type
- type ddlb_1 from dropdownlistbox within w_reg_apply
- end type
- type st_5 from statictext within w_reg_apply
- end type
- type mle_dscrp from multilineedit within w_reg_apply
- end type
- type st_4 from statictext within w_reg_apply
- end type
- type em_phonecount from editmask within w_reg_apply
- end type
- type em_basecount from editmask within w_reg_apply
- end type
- type st_3 from statictext within w_reg_apply
- end type
- type sle_cusname from singlelineedit within w_reg_apply
- end type
- type cb_1 from commandbutton within w_reg_apply
- end type
- type st_2 from statictext within w_reg_apply
- end type
- type st_1 from statictext within w_reg_apply
- end type
- type dw_1 from datawindow within w_reg_apply
- end type
- end forward
- global type w_reg_apply from window
- integer x = 777
- integer y = 436
- integer width = 3095
- integer height = 2340
- boolean titlebar = true
- string title = "注册申请"
- boolean controlmenu = true
- windowtype windowtype = response!
- long backcolor = 16777215
- em_1 em_1
- ddlb_1 ddlb_1
- st_5 st_5
- mle_dscrp mle_dscrp
- st_4 st_4
- em_phonecount em_phonecount
- em_basecount em_basecount
- st_3 st_3
- sle_cusname sle_cusname
- cb_1 cb_1
- st_2 st_2
- st_1 st_1
- dw_1 dw_1
- end type
- global w_reg_apply w_reg_apply
- on w_reg_apply.create
- this.em_1=create em_1
- this.ddlb_1=create ddlb_1
- this.st_5=create st_5
- this.mle_dscrp=create mle_dscrp
- this.st_4=create st_4
- this.em_phonecount=create em_phonecount
- this.em_basecount=create em_basecount
- this.st_3=create st_3
- this.sle_cusname=create sle_cusname
- this.cb_1=create cb_1
- this.st_2=create st_2
- this.st_1=create st_1
- this.dw_1=create dw_1
- this.Control[]={this.em_1,&
- this.ddlb_1,&
- this.st_5,&
- this.mle_dscrp,&
- this.st_4,&
- this.em_phonecount,&
- this.em_basecount,&
- this.st_3,&
- this.sle_cusname,&
- this.cb_1,&
- this.st_2,&
- this.st_1,&
- this.dw_1}
- end on
- on w_reg_apply.destroy
- destroy(this.em_1)
- destroy(this.ddlb_1)
- destroy(this.st_5)
- destroy(this.mle_dscrp)
- destroy(this.st_4)
- destroy(this.em_phonecount)
- destroy(this.em_basecount)
- destroy(this.st_3)
- destroy(this.sle_cusname)
- destroy(this.cb_1)
- destroy(this.st_2)
- destroy(this.st_1)
- destroy(this.dw_1)
- end on
- event open;string arg_msg
- f_init_yunregcom(ref arg_msg)
- if (arg_msg <> '') then
- MessageBox('提示', '加载云注册模块失败:' + arg_msg)
- Close(this)
- return
- end if
- DataStore ds_module
- ds_module = Create DataStore
- ds_module.DataObject = 'ds_sys_module_kf'
- ds_module.RowsCopy(1, ds_module.RowCount(), Primary!, dw_1, 1, Primary!)
- destroy ds_module
- oleObject curRegMsg
- curRegMsg = Message.PowerObjectParm
- IF NOT IsValid(curRegMsg) THEN RETURN
- oleObject moduleinfos,item
- Long i, row
- em_basecount.Text = String(curRegMsg.GetInt('basecount'))
- em_phonecount.Text = String(curRegMsg.GetInt('phonecount'))
- moduleinfos = curRegMsg.GetPBArray('moduleinfos')
- IF moduleinfos.Count = 0 THEN RETURN
- FOR i = 1 TO moduleinfos.Count
- item = moduleinfos.GetPBDictionary(i - 1)
- row = dw_1.Find("moduleid = "+String(item.GetInt('ModuleID')),1,dw_1.RowCount())
- IF row > 0 THEN
- dw_1.Object.ch[row] = 1
- dw_1.Object.overdate[row] = String(item.GetDateTime('overdate'),'yyyy-MM-dd')
- END IF
- NEXT
- end event
- type em_1 from editmask within w_reg_apply
- event ue_keyup pbm_keyup
- integer x = 1001
- integer y = 400
- integer width = 457
- integer height = 84
- integer taborder = 70
- integer textsize = -9
- integer weight = 400
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = variable!
- string facename = "宋体"
- long textcolor = 33554432
- string text = "1900-01-01"
- borderstyle borderstyle = stylelowered!
- maskdatatype maskdatatype = datemask!
- string mask = "yyyy-MM-dd"
- boolean spin = true
- end type
- event ue_keyup;this.post event modified( )
- end event
- event modified;string temp
- temp = Trim(this.Text)
- long i
- if (temp = '') then
- dw_1.SetRedraw(false)
- for i = 1 to dw_1.RowCount()
- dw_1.Object.overdate[i] = ''
- next
- dw_1.SetRedraw(true)
- return
- end if
- if (not IsDate(temp)) then return
- datetime dt
- dt = datetime(temp)
- temp = string(dt, 'yyyy-MM-dd')
- dw_1.SetRedraw(false)
- for i = 1 to dw_1.RowCount()
- dw_1.Object.overdate[i] = temp
- next
- dw_1.SetRedraw(true)
- end event
- event constructor;this.Text = String(Today(),'yyyy-MM-dd')
- end event
- type ddlb_1 from dropdownlistbox within w_reg_apply
- integer x = 416
- integer y = 400
- integer width = 549
- integer height = 668
- integer taborder = 60
- integer textsize = -9
- integer weight = 400
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = variable!
- string facename = "宋体"
- long textcolor = 33554432
- boolean autohscroll = true
- boolean sorted = false
- borderstyle borderstyle = stylelowered!
- end type
- event selectionchanged;datetime dtNow
- dtNow = datetime(today())
- string temp
- temp = Trim(this.Text)
- long days
- if (temp = '30天') then
- days = 30
- elseif (temp = '90天') then
- days = 90
- elseif (temp = '180天') then
- days = 180
- elseif (temp = '365天') then
- days = 365
- elseif (temp = '两年') then
- days = 365*2
- elseif (temp = '三年') then
- days = 365*3
- else
- return
- end if
- em_1.Text = string(RelativeDate(today(), days), 'yyyy-MM-dd')
- em_1.post event modified( )
- end event
- event constructor;this.Reset()
- this.InsertItem(' 30天', 0)
- this.InsertItem(' 90天', 0)
- this.InsertItem('180天', 0)
- this.InsertItem('365天', 0)
- this.InsertItem(' 两年', 0)
- this.InsertItem(' 三年', 0)
- end event
- type st_5 from statictext within w_reg_apply
- integer x = 41
- integer y = 416
- integer width = 347
- integer height = 56
- integer textsize = -9
- integer weight = 400
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = variable!
- string facename = "宋体"
- long backcolor = 16777215
- string text = "期限(批设置)"
- alignment alignment = right!
- boolean focusrectangle = false
- end type
- type mle_dscrp from multilineedit within w_reg_apply
- integer x = 416
- integer y = 152
- integer width = 2661
- integer height = 204
- integer taborder = 50
- 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_reg_apply
- integer x = 229
- integer y = 168
- integer width = 160
- integer height = 48
- integer textsize = -9
- integer weight = 400
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = variable!
- string facename = "宋体"
- long textcolor = 33554432
- string text = "备注"
- alignment alignment = right!
- boolean focusrectangle = false
- end type
- type em_phonecount from editmask within w_reg_apply
- integer x = 978
- integer y = 32
- integer width = 160
- integer height = 84
- integer taborder = 40
- integer textsize = -9
- integer weight = 400
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = variable!
- string facename = "宋体"
- long textcolor = 33554432
- string text = "0"
- alignment alignment = right!
- borderstyle borderstyle = stylelowered!
- string mask = "########0"
- end type
- type em_basecount from editmask within w_reg_apply
- integer x = 416
- integer y = 32
- integer width = 160
- integer height = 84
- integer taborder = 40
- integer textsize = -9
- integer weight = 400
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = variable!
- string facename = "宋体"
- long textcolor = 33554432
- string text = "0"
- alignment alignment = right!
- borderstyle borderstyle = stylelowered!
- string mask = "########0"
- end type
- type st_3 from statictext within w_reg_apply
- integer x = 1198
- integer y = 48
- integer width = 160
- integer height = 48
- integer textsize = -9
- integer weight = 400
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = variable!
- string facename = "宋体"
- long textcolor = 33554432
- string text = "公司"
- alignment alignment = right!
- boolean focusrectangle = false
- end type
- type sle_cusname from singlelineedit within w_reg_apply
- integer x = 1381
- integer y = 28
- integer width = 1691
- integer height = 84
- integer taborder = 10
- integer textsize = -9
- integer weight = 400
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = variable!
- string facename = "宋体"
- long textcolor = 33554432
- borderstyle borderstyle = stylelowered!
- end type
- type cb_1 from commandbutton within w_reg_apply
- integer x = 2656
- integer y = 2164
- integer width = 411
- integer height = 84
- integer taborder = 30
- integer textsize = -9
- integer weight = 400
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = variable!
- string facename = "宋体"
- string text = "申请"
- end type
- event clicked;IF Integer(em_basecount.Text) = 0 THEN
- MessageBox('ERROR', '请填写基础站点')
- RETURN
- END IF
- IF sle_cusname.Text = '' THEN
- MessageBox('ERROR', '请填写公司')
- RETURN
- END IF
- String arg_msg
- oleobject getNewRegInfoRequest,getNewRegInfoResponse
- getNewRegInfoRequest = RegCom.NewPBDictionary()
- getNewRegInfoResponse = RegCom.DoExecute('GetNewRegInfo',getNewRegInfoRequest)
- arg_msg = getNewRegInfoResponse.getString('ErrMsg')
- IF arg_msg <> '' THEN
- MessageBox('ERROR', '申请失败:' + arg_msg)
- RETURN
- END IF
- oleobject newRegRequest,newRegResponse
- newRegRequest = getNewRegInfoResponse.GetPBDictionary('newRegInfo')
- newRegRequest.SetString('cusname',sle_cusname.Text)
- newRegRequest.SetInt('basecount',Integer(em_basecount.Text))
- newRegRequest.SetInt('phonecount',Integer(em_phonecount.Text))
- newRegRequest.SetString('dscrp',mle_dscrp.Text)
- oleobject list, Item
- list = YunRegCom.NewPBArray()
- DateTime maxDate
- maxDate = DateTime(Today())
- Long i, cnt = 0
- FOR i = 1 To dw_1.RowCount()
- If (dw_1.Object.ch[i] <> 1) THEN CONTINUE
- cnt ++
- Item = YunRegCom.NewPBDictionary()
- Item.SetInt('ModuleID', dw_1.Object.moduleid[i])
- Item.SetString('overdate', dw_1.Object.overdate[i])
- list.AddObject(Item)
- NEXT
- If (cnt <= 0) THEN
- MessageBox('ERROR','请选中至少一个模块')
- RETURN
- END IF
- newRegRequest.SetObject('moduleinfos', list)
- getNewRegInfoResponse = YunRegCom.DoExecute('NewReg',newRegRequest)
- arg_msg = getNewRegInfoResponse.getString('ErrMsg')
- IF arg_msg <> '' THEN
- MessageBox('ERROR', '申请失败:' + arg_msg)
- RETURN
- END IF
- oleobject saveRegMsgResponse
- saveRegMsgResponse = RegCom.DoExecute('SaveRegMsg', getNewRegInfoResponse)
- arg_msg = saveRegMsgResponse.getString('ErrMsg')
- IF arg_msg <> '' THEN
- MessageBox('ERROR', '保存注册申请信息失败:' + arg_msg)
- RETURN
- END IF
- MessageBox('ERROR', '申请成功!')
- Close(Parent)
- end event
- type st_2 from statictext within w_reg_apply
- integer x = 649
- integer y = 48
- integer width = 302
- integer height = 48
- integer textsize = -9
- integer weight = 400
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = variable!
- string facename = "宋体"
- long textcolor = 33554432
- string text = "手机站点"
- alignment alignment = right!
- boolean focusrectangle = false
- end type
- type st_1 from statictext within w_reg_apply
- integer x = 91
- integer y = 48
- integer width = 302
- integer height = 48
- integer textsize = -9
- integer weight = 400
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = variable!
- string facename = "宋体"
- long textcolor = 33554432
- string text = "基础站点"
- alignment alignment = right!
- boolean focusrectangle = false
- end type
- type dw_1 from datawindow within w_reg_apply
- integer x = 9
- integer y = 520
- integer width = 3063
- integer height = 1624
- integer taborder = 10
- string title = "none"
- string dataobject = "dw_reg_sys_module"
- boolean hscrollbar = true
- boolean vscrollbar = true
- boolean livescroll = true
- borderstyle borderstyle = stylelowered!
- end type
|