$PBExportHeader$w_warebalc_cmpl.srw forward global type w_warebalc_cmpl from w_publ_base end type type cb_ok from uo_imflatbutton within w_warebalc_cmpl end type type dw_1 from datawindow within w_warebalc_cmpl end type type dw_2 from datawindow within w_warebalc_cmpl end type type ln_bar from line within w_warebalc_cmpl end type type ln_bar2 from line within w_warebalc_cmpl end type type r_bar from rectangle within w_warebalc_cmpl end type end forward global type w_warebalc_cmpl from w_publ_base integer width = 3616 integer height = 2380 string title = "结存重算" boolean minbox = false windowtype windowtype = response! cb_ok cb_ok dw_1 dw_1 dw_2 dw_2 ln_bar ln_bar ln_bar2 ln_bar2 r_bar r_bar end type global w_warebalc_cmpl w_warebalc_cmpl type variables s_edit_index_tran s_tran long ins_scid,ins_inwareid string ins_inwarecode end variables on w_warebalc_cmpl.create int iCurrent call super::create this.cb_ok=create cb_ok this.dw_1=create dw_1 this.dw_2=create dw_2 this.ln_bar=create ln_bar this.ln_bar2=create ln_bar2 this.r_bar=create r_bar iCurrent=UpperBound(this.Control) this.Control[iCurrent+1]=this.cb_ok this.Control[iCurrent+2]=this.dw_1 this.Control[iCurrent+3]=this.dw_2 this.Control[iCurrent+4]=this.ln_bar this.Control[iCurrent+5]=this.ln_bar2 this.Control[iCurrent+6]=this.r_bar end on on w_warebalc_cmpl.destroy call super::destroy destroy(this.cb_ok) destroy(this.dw_1) destroy(this.dw_2) destroy(this.ln_bar) destroy(this.ln_bar2) destroy(this.r_bar) end on event open;call super::open;dw_1.settransobject(sqlca) s_tran=Message.PowerObjectParm ins_scid = s_tran.b_long ins_inwareid = s_tran.c_long ins_inwarecode = s_tran.c_string dw_1.retrieve( ins_scid,ins_inwareid) dw_1.setfocus() end event event resize;call super::resize;ln_bar.EndX = THIS.Width ln_bar2.EndX = THIS.Width r_bar.Width = THIS.Width //ln_1.EndX = THIS.Width //ln_2.EndX = THIS.Width //ln_3.EndX = THIS.Width //ln_4.EndX = THIS.Width end event type cb_func from w_publ_base`cb_func within w_warebalc_cmpl boolean visible = false end type type cb_exit from w_publ_base`cb_exit within w_warebalc_cmpl integer x = 567 integer width = 165 integer height = 164 integer picsize = 16 toolbaralignment pic_align = alignattop! boolean border = false end type type cb_ok from uo_imflatbutton within w_warebalc_cmpl integer width = 165 integer height = 164 integer taborder = 20 boolean bringtotop = true string normalpicname = "ok.bmp" integer picsize = 16 toolbaralignment pic_align = alignattop! boolean border = false end type event clicked;call super::clicked; Long rslt = 1 Long i long ll_printid Decimal ld_uprice,ld_jgprice, lde_rebate, lde_tax String arg_msg dw_1.AcceptText() uo_inware uo_ware uo_ware = create uo_inware uo_ware.commit_transaction = sqlca i = dw_1.GetNextModified(0 , Primary!) IF i = 0 THEN arg_msg = "单价没有修改" rslt = 0 GOTO ext END IF DO WHILE i > 0 ll_printid = dw_1.Object.u_inwaremx_printid[i] ld_uprice = dw_1.Object.u_inwaremx_uprice[i] ld_jgprice = 0 lde_rebate = dw_1.Object.u_inwaremx_rebate[i] lde_tax = dw_1.Object.u_inwaremx_tax[i] IF uo_ware.mod_price(ins_scid,ins_inwareid,ll_printid,ld_uprice,ld_jgprice,lde_rebate, lde_tax,arg_msg,false) = 0 THEN arg_msg = "行:"+string(i)+","+arg_msg rslt = 0 GOTO ext END IF i = dw_1.GetNextModified(i, Primary!) LOOP ext: destroy uo_ware IF rslt = 0 THEN ROLLBACK; MessageBox('错误',arg_msg, StopSign!, OK! ) RETURN ELSE COMMIT; MessageBox('提示','修改单价成功!', Information!, OK! ) Close(Parent) END IF end event type dw_1 from datawindow within w_warebalc_cmpl integer y = 188 integer width = 3584 integer height = 488 integer taborder = 30 boolean bringtotop = true string title = "none" string dataobject = "dw_inwaremx_buy_mod_price_p" boolean hscrollbar = true boolean vscrollbar = true boolean hsplitscroll = true boolean livescroll = true borderstyle borderstyle = stylelowered! end type event constructor;f_title_change(this) end event type dw_2 from datawindow within w_warebalc_cmpl integer y = 684 integer width = 3584 integer height = 1596 integer taborder = 10 boolean bringtotop = true string title = "none" string dataobject = "dw_inwaremx_buy_mod_price_p" boolean hscrollbar = true boolean vscrollbar = true boolean hsplitscroll = true boolean livescroll = true borderstyle borderstyle = stylelowered! end type event constructor;f_title_change(this) end event type ln_bar from line within w_warebalc_cmpl long linecolor = 268435456 integer linethickness = 4 integer beginy = 176 integer endx = 3323 integer endy = 176 end type type ln_bar2 from line within w_warebalc_cmpl long linecolor = 16777215 integer linethickness = 4 integer beginy = 180 integer endx = 3323 integer endy = 180 end type type r_bar from rectangle within w_warebalc_cmpl long linecolor = 16777215 long fillcolor = 1073741824 integer x = 2473 integer width = 73 integer height = 172 end type event constructor;this.fillcolor = 14215660 this.linecolor = 14215660 this.x = -1 this.y = -1 this.height = ln_bar2.beginy - 5 end event