$PBExportHeader$w_inwaremx_wfjg_mod_price_p.srw forward global type w_inwaremx_wfjg_mod_price_p from w_publ_base end type type cb_ok from uo_imflatbutton within w_inwaremx_wfjg_mod_price_p end type type dw_1 from datawindow within w_inwaremx_wfjg_mod_price_p end type end forward global type w_inwaremx_wfjg_mod_price_p from w_publ_base integer width = 3616 integer height = 1628 string title = "外协收货单明细单价修改" boolean minbox = false windowtype windowtype = response! cb_ok cb_ok dw_1 dw_1 end type global w_inwaremx_wfjg_mod_price_p w_inwaremx_wfjg_mod_price_p type variables s_edit_index_tran s_tran long ins_scid,ins_inwareid string ins_inwarecode end variables on w_inwaremx_wfjg_mod_price_p.create int iCurrent call super::create this.cb_ok=create cb_ok this.dw_1=create dw_1 iCurrent=UpperBound(this.Control) this.Control[iCurrent+1]=this.cb_ok this.Control[iCurrent+2]=this.dw_1 end on on w_inwaremx_wfjg_mod_price_p.destroy call super::destroy destroy(this.cb_ok) destroy(this.dw_1) 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,sys_option_2unit) dw_1.setfocus() end event type cb_func from w_publ_base`cb_func within w_inwaremx_wfjg_mod_price_p boolean visible = false end type type cb_exit from w_publ_base`cb_exit within w_inwaremx_wfjg_mod_price_p integer x = 2025 integer y = 1404 integer picsize = 16 end type type cb_ok from uo_imflatbutton within w_inwaremx_wfjg_mod_price_p integer x = 1458 integer y = 1404 integer width = 311 integer height = 96 integer taborder = 20 boolean bringtotop = true string normalpicname = "ok.bmp" integer picsize = 16 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_wfjg uo_ware uo_ware = Create uo_inware_wfjg 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.ow_wfjgmx_in_aft_printid[i] ld_uprice = dw_1.Object.ow_wfjgmx_in_aft_fprice[i] ld_jgprice = dw_1.Object.ow_wfjgmx_in_aft_jgprice[i] lde_rebate = -1 lde_tax = -1 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_inwaremx_wfjg_mod_price_p integer width = 3584 integer height = 1348 integer taborder = 30 boolean bringtotop = true string title = "none" string dataobject = "dw_inwaremx_wfjg_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