123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456 |
- $PBExportHeader$w_aifmb_myproductcode_pics.srw
- forward
- global type w_aifmb_myproductcode_pics from window
- end type
- type lv_1 from uo_piclistview within w_aifmb_myproductcode_pics
- end type
- type st_3 from statictext within w_aifmb_myproductcode_pics
- end type
- type em_pageindex from editmask within w_aifmb_myproductcode_pics
- end type
- type st_2 from statictext within w_aifmb_myproductcode_pics
- end type
- type st_1 from statictext within w_aifmb_myproductcode_pics
- end type
- type em_pagesize from editmask within w_aifmb_myproductcode_pics
- end type
- type cb_reflash from uo_imflatbutton within w_aifmb_myproductcode_pics
- end type
- type cb_del from uo_imflatbutton within w_aifmb_myproductcode_pics
- end type
- type cb_add from uo_imflatbutton within w_aifmb_myproductcode_pics
- end type
- type cb_exit from uo_imflatbutton within w_aifmb_myproductcode_pics
- end type
- type r_bar from rectangle within w_aifmb_myproductcode_pics
- end type
- type ln_bar from line within w_aifmb_myproductcode_pics
- end type
- type ln_bar2 from line within w_aifmb_myproductcode_pics
- end type
- end forward
- global type w_aifmb_myproductcode_pics from window
- integer width = 3488
- integer height = 1848
- boolean titlebar = true
- string title = "产品图片"
- boolean controlmenu = true
- boolean minbox = true
- boolean maxbox = true
- boolean resizable = true
- long backcolor = 67108864
- string icon = "AppIcon!"
- boolean center = true
- event ue_page ( )
- lv_1 lv_1
- st_3 st_3
- em_pageindex em_pageindex
- st_2 st_2
- st_1 st_1
- em_pagesize em_pagesize
- cb_reflash cb_reflash
- cb_del cb_del
- cb_add cb_add
- cb_exit cb_exit
- r_bar r_bar
- ln_bar ln_bar
- ln_bar2 ln_bar2
- end type
- global w_aifmb_myproductcode_pics w_aifmb_myproductcode_pics
- type variables
- long ins_relationid
- string ins_mtrlname
- end variables
- event ue_page();Long ll_pageindex
- Long ll_pagesize
- uo_aifmb = Create uo_aifmb
- lv_1.SetRedraw(false)
- ll_pageindex = Long(em_pageindex.Text)
- ll_pagesize = Long(em_pagesize.Text)
- Int rslt = 1
- String arg_msg
- s_aifmb_SearchProductAnnex arr_annex[]
- IF uo_aifmb.uf_searchproductannexlist(ins_relationid, ll_pageindex, ll_pagesize, arr_annex, arg_msg) <> 1 THEN
- rslt = 0
- GOTO ext
- END IF
- lv_1.uf_clear()
- Long i
- s_piclistview_parm s_parm
- FOR i = 1 To UpperBound(arr_annex)
- s_parm.Label = arr_annex[i].annexname
- s_parm.Data = arr_annex[i].Pic
- s_parm.a_any = arr_annex[i].AnnexID
- s_parm.tmppath = sys_cur_path + 'aifmb_tmp\Annex_min_' + String(arr_annex[i].AnnexID) + '.png'
-
- IF lv_1.uf_AddItem(s_parm, arg_msg) <> 1 THEN
- rslt = 0
- GOTO ext
- END IF
-
- NEXT
- ext:
- lv_1.SetRedraw(true)
- Destroy uo_aifmb
- IF rslt = 0 THEN
- MessageBox('ERROR', arg_msg)
- END IF
- end event
- on w_aifmb_myproductcode_pics.create
- this.lv_1=create lv_1
- this.st_3=create st_3
- this.em_pageindex=create em_pageindex
- this.st_2=create st_2
- this.st_1=create st_1
- this.em_pagesize=create em_pagesize
- this.cb_reflash=create cb_reflash
- this.cb_del=create cb_del
- this.cb_add=create cb_add
- this.cb_exit=create cb_exit
- this.r_bar=create r_bar
- this.ln_bar=create ln_bar
- this.ln_bar2=create ln_bar2
- this.Control[]={this.lv_1,&
- this.st_3,&
- this.em_pageindex,&
- this.st_2,&
- this.st_1,&
- this.em_pagesize,&
- this.cb_reflash,&
- this.cb_del,&
- this.cb_add,&
- this.cb_exit,&
- this.r_bar,&
- this.ln_bar,&
- this.ln_bar2}
- end on
- on w_aifmb_myproductcode_pics.destroy
- destroy(this.lv_1)
- destroy(this.st_3)
- destroy(this.em_pageindex)
- destroy(this.st_2)
- destroy(this.st_1)
- destroy(this.em_pagesize)
- destroy(this.cb_reflash)
- destroy(this.cb_del)
- destroy(this.cb_add)
- destroy(this.cb_exit)
- destroy(this.r_bar)
- destroy(this.ln_bar)
- destroy(this.ln_bar2)
- end on
- event resize;ln_bar.EndX = THIS.Width
- ln_bar2.EndX = THIS.Width
- r_bar.Width = THIS.Width
- lv_1.Width = this.WorkSpaceWidth() - lv_1.X
- lv_1.Height = this.WorkSpaceHeight() - lv_1.Y
- end event
- event open;s_aifmb_myproductcode_pics_parm s_parm
- s_parm = Message.PowerObjectParm
- ins_relationid = s_parm.relationid
- ins_mtrlname = s_parm.mtrlname
- this.title = '产品图片-' + ins_mtrlname
- lv_1.uf_setsize(100, 100)
- triggerevent('ue_page')
- end event
- type lv_1 from uo_piclistview within w_aifmb_myproductcode_pics
- integer y = 188
- integer taborder = 40
- end type
- type st_3 from statictext within w_aifmb_myproductcode_pics
- integer x = 1239
- integer y = 92
- integer width = 151
- integer height = 48
- integer textsize = -9
- integer weight = 400
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = variable!
- string facename = "宋体"
- long textcolor = 33554432
- long backcolor = 67108864
- string text = "页"
- boolean focusrectangle = false
- end type
- event constructor;this.backcolor = 14215660
- end event
- type em_pageindex from editmask within w_aifmb_myproductcode_pics
- integer x = 1033
- integer y = 76
- integer width = 201
- integer height = 84
- integer taborder = 30
- integer textsize = -9
- integer weight = 400
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = variable!
- string facename = "宋体"
- long textcolor = 33554432
- string text = "1"
- alignment alignment = right!
- borderstyle borderstyle = stylelowered!
- string mask = "#####"
- boolean spin = true
- end type
- event modified;parent.TriggerEvent('ue_page')
- end event
- type st_2 from statictext within w_aifmb_myproductcode_pics
- integer x = 736
- integer y = 92
- integer width = 288
- integer height = 48
- integer textsize = -9
- integer weight = 400
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = variable!
- string facename = "宋体"
- long textcolor = 33554432
- long backcolor = 67108864
- string text = "第"
- alignment alignment = right!
- boolean focusrectangle = false
- end type
- event constructor;this.backcolor = 14215660
- end event
- type st_1 from statictext within w_aifmb_myproductcode_pics
- integer x = 736
- integer y = 16
- integer width = 288
- integer height = 48
- integer textsize = -9
- integer weight = 400
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = variable!
- string facename = "宋体"
- long textcolor = 33554432
- long backcolor = 67108864
- string text = "每页项数"
- alignment alignment = right!
- boolean focusrectangle = false
- end type
- event constructor;this.backcolor = 14215660
- end event
- type em_pagesize from editmask within w_aifmb_myproductcode_pics
- integer x = 1033
- integer width = 201
- integer height = 84
- integer taborder = 20
- integer textsize = -9
- integer weight = 400
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = variable!
- string facename = "宋体"
- long textcolor = 33554432
- string text = "100"
- alignment alignment = right!
- borderstyle borderstyle = stylelowered!
- string mask = "#####"
- end type
- type cb_reflash from uo_imflatbutton within w_aifmb_myproductcode_pics
- integer x = 302
- integer width = 151
- integer height = 164
- integer taborder = 40
- string text = "刷新"
- string normalpicname = "refresh.BMP"
- integer picsize = 16
- toolbaralignment pic_align = alignattop!
- boolean border = false
- end type
- event clicked;call super::clicked;parent.triggerevent('ue_page')
- end event
- type cb_del from uo_imflatbutton within w_aifmb_myproductcode_pics
- integer x = 151
- integer width = 151
- integer height = 164
- integer taborder = 30
- string text = "删除"
- string normalpicname = "delete.BMP"
- integer picsize = 16
- toolbaralignment pic_align = alignattop!
- boolean border = false
- end type
- event clicked;call super::clicked;Long i
- longlong arr_AnnexID[]
- Long k = 0
- ListViewItem lvi
- FOR i = 1 To lv_1.TotalItems()
- IF lv_1.GetItem(i, lvi) = 1 THEN
- IF lvi.Selected THEN
- k++
- arr_AnnexID[k] = lvi.Data
- END IF
- END IF
- NEXT
- Int rslt = 1
- String arg_msg
- uo_aifmb = Create uo_aifmb
- IF uo_aifmb.uf_delproductannex(arr_AnnexID, arg_msg) <> 1 THEN
- rslt = 0
- GOTO ext
- END IF
- ext:
- Destroy uo_aifmb
- IF rslt = 0 THEN
- MessageBox('ERROR', arg_msg)
- ELSE
- MessageBox('OK', '删除成功')
- Parent.TriggerEvent('ue_page')
- END IF
- end event
- type cb_add from uo_imflatbutton within w_aifmb_myproductcode_pics
- integer width = 151
- integer height = 164
- integer taborder = 20
- string text = "新建"
- string normalpicname = "new.BMP"
- integer picsize = 16
- toolbaralignment pic_align = alignattop!
- boolean border = false
- end type
- event clicked;call super::clicked;String ls_path
- String arr_files[]
- IF GetFileOpenName('上传图片', ls_path, arr_files, 'bmp', '图片 (*.bmp;*.gif;*.jpg;*.jpeg;*.png),*.bmp;*.gif;*.jpg;*.jpeg;*.png') <> 1 THEN
- RETURN
- END IF
- IF UpperBound(arr_files) <= 0 THEN
- RETURN
- END IF
- Int rslt = 1
- String arg_msg
- uo_aifmb = Create uo_aifmb
- IF UpperBound(arr_files) = 1 THEN
- ls_path = Mid(ls_path, 1, Len(ls_path) - Len(arr_files[1]))
- END IF
- IF Right(ls_path, 1) <> '\' THEN
- ls_path += '\'
- END IF
- Long i
- s_aifmb_productannexdata s_parm[]
- Long k = 0
- FOR i = 1 To UpperBound(arr_files)
- k++
- s_parm[k].Annexname = arr_files[i]
- IF f_filetoblob(ls_path + arr_files[i], s_parm[k].Pic, arg_msg) <> 1 THEN
- rslt = 0
- GOTO ext
- END IF
- NEXT
- IF uo_aifmb.uf_addproductannex(ins_relationid, s_parm, arg_msg) <> 1 THEN
- rslt = 0
- GOTO ext
- END IF
- ext:
- Destroy uo_aifmb
- IF rslt = 0 THEN
- MessageBox('ERROR', arg_msg)
- ELSE
- MessageBox('OK', '上传成功')
- parent.triggerevent('ue_page')
- END IF
- end event
- type cb_exit from uo_imflatbutton within w_aifmb_myproductcode_pics
- integer x = 453
- integer width = 151
- integer height = 164
- integer taborder = 10
- string text = "退出"
- boolean cancel = true
- string normalpicname = "exit.bmp"
- integer picsize = 16
- toolbaralignment pic_align = alignattop!
- boolean border = false
- end type
- event clicked;call super::clicked;Close(PARENT)
- end event
- type r_bar from rectangle within w_aifmb_myproductcode_pics
- long linecolor = 16777215
- integer linethickness = 4
- long fillcolor = 1073741824
- integer x = 2139
- integer width = 146
- integer height = 68
- end type
- event constructor;this.fillcolor = 14215660
- this.linecolor = 14215660
- this.x = -1
- this.y = -1
- this.height = ln_bar.beginy - 5
- end event
- type ln_bar from line within w_aifmb_myproductcode_pics
- long linecolor = 268435456
- integer linethickness = 4
- integer beginy = 172
- integer endx = 2007
- integer endy = 172
- end type
- type ln_bar2 from line within w_aifmb_myproductcode_pics
- long linecolor = 16777215
- integer linethickness = 4
- integer beginy = 176
- integer endx = 2039
- integer endy = 176
- end type
|