$PBExportHeader$w_inwaremx_buy_mod_buyqty_p.srw forward global type w_inwaremx_buy_mod_buyqty_p from w_publ_base end type type cb_ok from uo_imflatbutton within w_inwaremx_buy_mod_buyqty_p end type type dw_1 from datawindow within w_inwaremx_buy_mod_buyqty_p end type end forward global type w_inwaremx_buy_mod_buyqty_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_buy_mod_buyqty_p w_inwaremx_buy_mod_buyqty_p type variables s_edit_index_tran s_tran long ins_scid,ins_inwareid string ins_inwarecode end variables on w_inwaremx_buy_mod_buyqty_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_buy_mod_buyqty_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) dw_1.setfocus() end event type cb_func from w_publ_base`cb_func within w_inwaremx_buy_mod_buyqty_p boolean visible = false end type type cb_exit from w_publ_base`cb_exit within w_inwaremx_buy_mod_buyqty_p integer x = 2025 integer y = 1404 integer picsize = 16 end type type cb_ok from uo_imflatbutton within w_inwaremx_buy_mod_buyqty_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 lde_buyqty,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] lde_buyqty = dw_1.Object.u_inwaremx_buyqty[i] IF uo_ware.mod_buyqty(ins_scid,ins_inwareid,ll_printid,lde_buyqty,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_buy_mod_buyqty_p integer width = 3584 integer height = 1348 integer taborder = 30 boolean bringtotop = true string title = "none" string dataobject = "dw_inwaremx_buy_mod_buyqty_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