123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720 |
- $PBExportHeader$w_rp1.srw
- forward
- global type w_rp1 from w_publ_base
- end type
- type cb_save_add from uo_imflatbutton within w_rp1
- end type
- type cb_save_exit from uo_imflatbutton within w_rp1
- end type
- type cb_save_delet from uo_imflatbutton within w_rp1
- end type
- type st_1 from statictext within w_rp1
- end type
- type st_2 from statictext within w_rp1
- end type
- type st_3 from statictext within w_rp1
- end type
- type st_4 from statictext within w_rp1
- end type
- type st_5 from statictext within w_rp1
- end type
- type st_6 from statictext within w_rp1
- end type
- type st_7 from statictext within w_rp1
- end type
- type st_8 from statictext within w_rp1
- end type
- type sle_1 from singlelineedit within w_rp1
- end type
- type sle_2 from singlelineedit within w_rp1
- end type
- type sle_4 from singlelineedit within w_rp1
- end type
- type sle_5 from singlelineedit within w_rp1
- end type
- type sle_6 from singlelineedit within w_rp1
- end type
- type sle_7 from singlelineedit within w_rp1
- end type
- type sle_8 from singlelineedit within w_rp1
- end type
- type ddlb_1 from dropdownlistbox within w_rp1
- end type
- type r_bar from rectangle within w_rp1
- end type
- type s_u_rp from structure within w_rp1
- end type
- end forward
- type s_u_rp from structure
- string rpcode
- string rpname
- integer rptype
- string col1name1
- string col1name2
- string col2name1
- string col2name2
- end type
- global type w_rp1 from w_publ_base
- integer width = 1847
- integer height = 1012
- string title = "报表设定"
- cb_save_add cb_save_add
- cb_save_exit cb_save_exit
- cb_save_delet cb_save_delet
- st_1 st_1
- st_2 st_2
- st_3 st_3
- st_4 st_4
- st_5 st_5
- st_6 st_6
- st_7 st_7
- st_8 st_8
- sle_1 sle_1
- sle_2 sle_2
- sle_4 sle_4
- sle_5 sle_5
- sle_6 sle_6
- sle_7 sle_7
- sle_8 sle_8
- ddlb_1 ddlb_1
- r_bar r_bar
- end type
- global w_rp1 w_rp1
- type variables
- public:
- long rpid
- private:
- s_u_rp ss_u_rp
- Boolean IT_NEWBEGIN = FALSE //新建标志
- Boolean IT_UPDATEBEGIN = FALSE//修改标志
- end variables
- forward prototypes
- public function integer acceptmx (string arg_rpcode, string arg_rpname, integer arg_rptype, string arg_col1name1, string arg_col1name2, string arg_col2name1, string arg_col2name2)
- public subroutine p_clearmx ()
- public function integer save (ref string arg_msg)
- end prototypes
- public function integer acceptmx (string arg_rpcode, string arg_rpname, integer arg_rptype, string arg_col1name1, string arg_col1name2, string arg_col2name1, string arg_col2name2);Int rslt = 1
- IF Trim(arg_rpcode) = "" THEN arg_rpcode = ""
- IF Trim(arg_rpname) = "" THEN arg_rpname = ""
- IF Trim(arg_col1name1) = "" THEN arg_col1name1 = ""
- IF Trim(arg_col1name2) = "" THEN arg_col1name2 = ""
- IF Trim(arg_col2name1) = "" THEN arg_col2name1 = ""
- IF Trim(arg_col2name2) = "" THEN arg_col2name2 = ""
- IF arg_rpcode = "" THEN
- MessageBox("Error","报表编码不能为空")
- rslt = 0
- GOTO ext
- END IF
- IF arg_rpname = "" THEN
- MessageBox("Error","报表名称不能为空")
- rslt = 0
- GOTO ext
- END IF
- ss_u_rp.rpcode = arg_rpcode
- ss_u_rp.rpname = arg_rpname
- ss_u_rp.rptype = arg_rptype
- ss_u_rp.col1name1 = arg_col1name1
- ss_u_rp.col1name2 = arg_col1name2
- ss_u_rp.col2name1 = arg_col2name1
- ss_u_rp.col2name2 = arg_col2name2
-
- ext:
- IF rslt = 0 THEN p_clearmx()
- RETURN rslt
- end function
- public subroutine p_clearmx ();ss_u_rp.rpcode = ""
- ss_u_rp.rpname =""
- ss_u_rp.rptype =0
- ss_u_rp.col1name1 =""
- ss_u_rp.col1name2 = ""
- ss_u_rp.col2name1 =""
- ss_u_rp.col2name2 = ""
- end subroutine
- public function integer save (ref string arg_msg);Int rslt = 1,i
- IF IT_NEWBEGIN = True THEN
- rpid = f_sys_scidentity(0,"u_rp","rpid",arg_msg,True,sqlca) //数据commit事务)
- IF rpid <= 0 THEN
- rslt = 0
- GOTO ext
- END IF
-
- INSERT INTO u_rp
- (rpid,
- rpcode,
- rpname,
- rptype,
- col1name1,
- col1name2,
- col2name1,
- col2name2
- )
- VALUES (
- :rpid,
- :ss_u_rp.rpcode ,
- :ss_u_rp.rpname ,
- :ss_u_rp.rptype,
- :ss_u_rp.col1name1 ,
- :ss_u_rp.col1name2 ,
- :ss_u_rp.col2name1,
- :ss_u_rp.col2name2
-
- ) Using sqlca;
- IF sqlca.SQLCode <> 0 THEN
-
- rslt = 0
- arG_MSG = "因网络或其它原因导致插入明细操作失败"+"~n"+sqlca.SQLErrText
- ROLLBACK Using sqlca;
- GOTO ext
- END IF
-
-
-
-
-
- END IF
- IF IT_UPDATEBEGIN = True THEN
-
-
- END IF
- ext:
- IF rslt = 0 THEN
- p_clearmx()
- ROLLBACK Using sqlca;
- ELSEIF rslt = 1 THEN
- COMMIT Using sqlca;
- END IF
- RETURN rslt
- end function
- on w_rp1.create
- int iCurrent
- call super::create
- this.cb_save_add=create cb_save_add
- this.cb_save_exit=create cb_save_exit
- this.cb_save_delet=create cb_save_delet
- this.st_1=create st_1
- this.st_2=create st_2
- this.st_3=create st_3
- this.st_4=create st_4
- this.st_5=create st_5
- this.st_6=create st_6
- this.st_7=create st_7
- this.st_8=create st_8
- this.sle_1=create sle_1
- this.sle_2=create sle_2
- this.sle_4=create sle_4
- this.sle_5=create sle_5
- this.sle_6=create sle_6
- this.sle_7=create sle_7
- this.sle_8=create sle_8
- this.ddlb_1=create ddlb_1
- this.r_bar=create r_bar
- iCurrent=UpperBound(this.Control)
- this.Control[iCurrent+1]=this.cb_save_add
- this.Control[iCurrent+2]=this.cb_save_exit
- this.Control[iCurrent+3]=this.cb_save_delet
- this.Control[iCurrent+4]=this.st_1
- this.Control[iCurrent+5]=this.st_2
- this.Control[iCurrent+6]=this.st_3
- this.Control[iCurrent+7]=this.st_4
- this.Control[iCurrent+8]=this.st_5
- this.Control[iCurrent+9]=this.st_6
- this.Control[iCurrent+10]=this.st_7
- this.Control[iCurrent+11]=this.st_8
- this.Control[iCurrent+12]=this.sle_1
- this.Control[iCurrent+13]=this.sle_2
- this.Control[iCurrent+14]=this.sle_4
- this.Control[iCurrent+15]=this.sle_5
- this.Control[iCurrent+16]=this.sle_6
- this.Control[iCurrent+17]=this.sle_7
- this.Control[iCurrent+18]=this.sle_8
- this.Control[iCurrent+19]=this.ddlb_1
- this.Control[iCurrent+20]=this.r_bar
- end on
- on w_rp1.destroy
- call super::destroy
- destroy(this.cb_save_add)
- destroy(this.cb_save_exit)
- destroy(this.cb_save_delet)
- destroy(this.st_1)
- destroy(this.st_2)
- destroy(this.st_3)
- destroy(this.st_4)
- destroy(this.st_5)
- destroy(this.st_6)
- destroy(this.st_7)
- destroy(this.st_8)
- destroy(this.sle_1)
- destroy(this.sle_2)
- destroy(this.sle_4)
- destroy(this.sle_5)
- destroy(this.sle_6)
- destroy(this.sle_7)
- destroy(this.sle_8)
- destroy(this.ddlb_1)
- destroy(this.r_bar)
- end on
- event open;call super::open;IT_NEWBEGIN = True
- IT_UPDATEBEGIN = False
- end event
- type cb_func from w_publ_base`cb_func within w_rp1
- boolean visible = false
- integer x = 2592
- integer y = 280
- end type
- type cb_exit from w_publ_base`cb_exit within w_rp1
- boolean visible = false
- integer x = 2363
- integer y = 104
- end type
- type cb_save_add from uo_imflatbutton within w_rp1
- integer x = 46
- integer y = 788
- integer width = 329
- integer height = 132
- integer taborder = 160
- boolean bringtotop = true
- string text = "保存并新增"
- boolean default = true
- string normalpicname = "new.bmp"
- integer picsize = 16
- toolbaralignment pic_align = alignattop!
- boolean border = false
- end type
- event clicked;call super::clicked;Integer rp_type
- string arg_msg
- IF ddlb_1.Text = "单列" THEN
- rp_type = 0
- sle_7.Text = ""
- sle_8.Text = ""
- ELSE
- rp_type = 1
- END IF
- IF acceptmx(Trim(sle_2.Text),Trim(sle_4.Text), rp_type,Trim(sle_5.Text),Trim(sle_6.Text),Trim(sle_7.Text),Trim(sle_8.Text)) = 0 THEN
- GOTO ext
- END IF
- arg_msg = ""
- IF Save(arg_msg ) = 0 THEN //i 为printid
- MessageBox('Error!',arg_msg)
- RETURN
- END IF
- MessageBox(publ_operator,'保存操作成功!')
- sle_2.text=""
- sle_4.text=""
- sle_5.text=""
- sle_6.text=""
- sle_7.text=""
- sle_8.text=""
- ext:
- RETURN
- end event
- type cb_save_exit from uo_imflatbutton within w_rp1
- integer x = 759
- integer y = 788
- integer width = 329
- integer height = 132
- integer taborder = 170
- boolean bringtotop = true
- string text = "保存并退出"
- boolean default = true
- string normalpicname = "open.bmp"
- integer picsize = 16
- toolbaralignment pic_align = alignattop!
- boolean border = false
- end type
- type cb_save_delet from uo_imflatbutton within w_rp1
- integer x = 1454
- integer y = 788
- integer width = 329
- integer height = 132
- integer taborder = 180
- boolean bringtotop = true
- string text = "退出"
- boolean default = true
- string normalpicname = "delete.bmp"
- integer picsize = 16
- toolbaralignment pic_align = alignattop!
- boolean border = false
- end type
- type st_1 from statictext within w_rp1
- boolean visible = false
- integer x = 32
- integer y = 36
- integer width = 507
- integer height = 80
- boolean bringtotop = true
- integer textsize = -9
- integer weight = 400
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = variable!
- string facename = "宋体"
- long textcolor = 33554432
- long backcolor = 67108864
- string text = "报表id:"
- alignment alignment = right!
- boolean focusrectangle = false
- end type
- type st_2 from statictext within w_rp1
- integer x = 32
- integer y = 28
- integer width = 507
- integer height = 80
- boolean bringtotop = true
- 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
- type st_3 from statictext within w_rp1
- integer x = 32
- integer y = 160
- integer width = 507
- integer height = 80
- boolean bringtotop = true
- 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
- type st_4 from statictext within w_rp1
- integer x = 1042
- integer y = 156
- integer width = 261
- integer height = 80
- boolean bringtotop = true
- 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
- type st_5 from statictext within w_rp1
- integer x = 32
- integer y = 284
- integer width = 507
- integer height = 80
- boolean bringtotop = true
- integer textsize = -9
- integer weight = 400
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = variable!
- string facename = "宋体"
- long textcolor = 33554432
- long backcolor = 67108864
- string text = "左边第1列统计标题:"
- alignment alignment = right!
- boolean focusrectangle = false
- end type
- type st_6 from statictext within w_rp1
- integer x = 32
- integer y = 408
- integer width = 507
- integer height = 80
- boolean bringtotop = true
- integer textsize = -9
- integer weight = 400
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = variable!
- string facename = "宋体"
- long textcolor = 33554432
- long backcolor = 67108864
- string text = "左边第2列统计标题:"
- alignment alignment = right!
- boolean focusrectangle = false
- end type
- type st_7 from statictext within w_rp1
- integer x = 32
- integer y = 532
- integer width = 507
- integer height = 80
- boolean bringtotop = true
- integer textsize = -9
- integer weight = 400
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = variable!
- string facename = "宋体"
- long textcolor = 33554432
- long backcolor = 67108864
- string text = "右边第1列统计标题:"
- alignment alignment = right!
- boolean focusrectangle = false
- end type
- type st_8 from statictext within w_rp1
- integer x = 32
- integer y = 656
- integer width = 507
- integer height = 80
- boolean bringtotop = true
- integer textsize = -9
- integer weight = 400
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = variable!
- string facename = "宋体"
- long textcolor = 33554432
- long backcolor = 67108864
- string text = "右边第2列统计标题:"
- alignment alignment = right!
- boolean focusrectangle = false
- end type
- type sle_1 from singlelineedit within w_rp1
- boolean visible = false
- integer x = 535
- integer y = 20
- integer width = 494
- integer height = 84
- integer taborder = 10
- boolean bringtotop = true
- integer textsize = -9
- integer weight = 400
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = variable!
- string facename = "宋体"
- long textcolor = 33554432
- boolean enabled = false
- boolean border = false
- end type
- type sle_2 from singlelineedit within w_rp1
- integer x = 283
- integer y = 20
- integer width = 1495
- integer height = 84
- integer taborder = 20
- boolean bringtotop = true
- integer textsize = -9
- integer weight = 400
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = variable!
- string facename = "宋体"
- long textcolor = 33554432
- boolean border = false
- end type
- type sle_4 from singlelineedit within w_rp1
- integer x = 283
- integer y = 148
- integer width = 731
- integer height = 84
- integer taborder = 20
- boolean bringtotop = true
- integer textsize = -9
- integer weight = 400
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = variable!
- string facename = "宋体"
- long textcolor = 33554432
- boolean border = false
- end type
- type sle_5 from singlelineedit within w_rp1
- integer x = 535
- integer y = 260
- integer width = 1253
- integer height = 84
- integer taborder = 20
- boolean bringtotop = true
- integer textsize = -9
- integer weight = 400
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = variable!
- string facename = "宋体"
- long textcolor = 33554432
- boolean border = false
- end type
- type sle_6 from singlelineedit within w_rp1
- integer x = 535
- integer y = 392
- integer width = 1253
- integer height = 84
- integer taborder = 20
- boolean bringtotop = true
- integer textsize = -9
- integer weight = 400
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = variable!
- string facename = "宋体"
- long textcolor = 33554432
- boolean border = false
- end type
- type sle_7 from singlelineedit within w_rp1
- integer x = 535
- integer y = 524
- integer width = 1253
- integer height = 84
- integer taborder = 20
- boolean bringtotop = true
- integer textsize = -9
- integer weight = 400
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = variable!
- string facename = "宋体"
- long textcolor = 33554432
- boolean border = false
- end type
- type sle_8 from singlelineedit within w_rp1
- integer x = 535
- integer y = 648
- integer width = 1253
- integer height = 84
- integer taborder = 20
- boolean bringtotop = true
- integer textsize = -9
- integer weight = 400
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = variable!
- string facename = "宋体"
- long textcolor = 33554432
- boolean border = false
- end type
- type ddlb_1 from dropdownlistbox within w_rp1
- integer x = 1307
- integer y = 156
- integer width = 480
- integer height = 300
- integer taborder = 30
- boolean bringtotop = true
- integer textsize = -9
- integer weight = 400
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = variable!
- string facename = "宋体"
- long textcolor = 33554432
- string text = "双列"
- string item[] = {"单列","双列"}
- borderstyle borderstyle = stylelowered!
- end type
- event selectionchanged;IF ddlb_1.Text = "双列" THEN
- st_7.Visible = True
- st_8.Visible = True
- sle_7.Visible = True
- sle_8.Visible= True
- // cb_save_add.y=cb_save_add.y + 300
- // cb_save_exit.y=cb_save_exit.y + 300
- // cb_save_delet.y=cb_save_delet.y + 300
- END IF
- IF ddlb_1.Text = "单列" THEN
- st_7.Visible = False
- st_8.Visible = False
- sle_7.Visible = False
- sle_8.Visible = False
- // cb_save_add.y=cb_save_add.y - 300
- // cb_save_exit.y=cb_save_exit.y - 300
- // cb_save_delet.y=cb_save_delet.y -300
-
- END IF
- end event
- type r_bar from rectangle within w_rp1
- boolean visible = false
- long linecolor = 16777215
- integer linethickness = 4
- long fillcolor = 1073741824
- integer x = 4530
- integer y = 544
- 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
|