$PBExportHeader$w_del_data.srw forward global type w_del_data from w_publ_base end type type cb_1 from uo_imflatbutton within w_del_data end type type em_1 from editmask within w_del_data end type type st_4 from statictext within w_del_data end type type st_1 from statictext within w_del_data end type type st_2 from statictext within w_del_data end type end forward global type w_del_data from w_publ_base integer width = 1289 integer height = 744 string title = "数据删除" cb_1 cb_1 em_1 em_1 st_4 st_4 st_1 st_1 st_2 st_2 end type global w_del_data w_del_data type variables long del_type end variables on w_del_data.create int iCurrent call super::create this.cb_1=create cb_1 this.em_1=create em_1 this.st_4=create st_4 this.st_1=create st_1 this.st_2=create st_2 iCurrent=UpperBound(this.Control) this.Control[iCurrent+1]=this.cb_1 this.Control[iCurrent+2]=this.em_1 this.Control[iCurrent+3]=this.st_4 this.Control[iCurrent+4]=this.st_1 this.Control[iCurrent+5]=this.st_2 end on on w_del_data.destroy call super::destroy destroy(this.cb_1) destroy(this.em_1) destroy(this.st_4) destroy(this.st_1) destroy(this.st_2) end on event open;call super::open;del_type = message.doubleparm end event type cb_func from w_publ_base`cb_func within w_del_data integer x = 46 integer y = 904 boolean enabled = false end type type cb_exit from w_publ_base`cb_exit within w_del_data integer x = 759 integer y = 484 integer width = 302 integer height = 100 string text = "取消" end type type cb_1 from uo_imflatbutton within w_del_data integer x = 279 integer y = 484 integer taborder = 30 boolean bringtotop = true boolean default = true end type event clicked;call super::clicked;string msg datetime del_date msg = "是否确定要删除 "+string(em_1.text)+" 之前单据吗?数据删除后将不能恢复!" IF MessageBox ("询问",msg,Question!,YesNo! ) = 2 THEN RETURN del_date = datetime(date(em_1.text),time('23:59:59')) w_sys_wait.show() if del_type = 0 then delete from u_cusamt where cusdate <= :del_date and flag = 1; if sqlca.sqlcode <> 0 then rollback; messagebox('错误','数据删除失败,'+sqlca.sqlerrtext,stopsign!,ok!) w_sys_wait.hide() return end if else delete from u_rap_money where takedate <= :del_date and accountid = :del_type and rapmoneyid not in (select rapmoneyid from v_max_rapid); if sqlca.sqlcode <> 0 then rollback; messagebox('错误','数据删除失败,'+sqlca.sqlerrtext,stopsign!,ok!) w_sys_wait.hide() return end if end if commit; w_sys_wait.hide() messagebox('提示','数据删除成功',information!,ok!) end event type em_1 from editmask within w_del_data integer x = 375 integer y = 304 integer width = 443 integer height = 84 integer taborder = 10 boolean bringtotop = true integer textsize = -10 integer weight = 400 fontcharset fontcharset = gb2312charset! fontpitch fontpitch = variable! string facename = "宋体" long textcolor = 33554432 string text = "none" borderstyle borderstyle = stylelowered! maskdatatype maskdatatype = datemask! string mask = "yyyy-mm-dd" boolean spin = true end type event constructor;this.text = string(today(),'yyyy-mm-dd') end event type st_4 from statictext within w_del_data integer x = 73 integer y = 84 integer width = 1115 integer height = 76 boolean bringtotop = true integer textsize = -9 integer weight = 400 fontcharset fontcharset = gb2312charset! fontpitch fontpitch = variable! string facename = "宋体" long textcolor = 16711680 long backcolor = 134217739 boolean enabled = false string text = "提示:确定要删除以下日期之前的数据吗?" boolean focusrectangle = false end type type st_1 from statictext within w_del_data integer x = 183 integer y = 320 integer width = 183 integer height = 48 boolean bringtotop = true integer textsize = -9 integer weight = 400 fontcharset fontcharset = gb2312charset! fontpitch fontpitch = variable! string facename = "宋体" long backcolor = 134217739 string text = "日期:" boolean focusrectangle = false end type type st_2 from statictext within w_del_data integer x = 73 integer y = 188 integer width = 1115 integer height = 48 boolean bringtotop = true integer textsize = -9 integer weight = 400 fontcharset fontcharset = gb2312charset! fontpitch fontpitch = variable! string facename = "宋体" long textcolor = 16711680 long backcolor = 134217739 string text = " 数据删除后将不能恢复!" boolean focusrectangle = false end type