123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223 |
- $PBExportHeader$w_cust_plan_add.srw
- forward
- global type w_cust_plan_add from w_publ_base
- end type
- type dw_1 from datawindow within w_cust_plan_add
- end type
- type cb_2 from uo_imflatbutton within w_cust_plan_add
- end type
- type cb_1 from uo_imflatbutton within w_cust_plan_add
- end type
- end forward
- global type w_cust_plan_add from w_publ_base
- integer width = 1979
- integer height = 1672
- string title = "客户工作计划"
- boolean minbox = false
- windowtype windowtype = response!
- dw_1 dw_1
- cb_2 cb_2
- cb_1 cb_1
- end type
- global w_cust_plan_add w_cust_plan_add
- type variables
- s_cust_plan s_plan_open
- uo_crm uo_cus
- end variables
- forward prototypes
- public function integer wf_save ()
- public function integer wf_insertrow ()
- end prototypes
- public function integer wf_save ();Int rslt = 1
- Long li_row
- dw_1.AcceptText()
- li_row = dw_1.GetRow()
- IF li_row <= 0 THEN
- MessageBox('提示','记录错误',information!,ok!)
- rslt = 0
- GOTO ext
- END IF
- s_cust_plan s_plan
- String arg_msg
-
- s_plan.planid = dw_1.Object.planid[li_row]
- s_plan.cusid = dw_1.Object.cusid[li_row]
- s_plan.saler = Trim(dw_1.Object.saler[li_row])
- s_plan.plandate = dw_1.Object.plandate[li_row]
- s_plan.planrep = Trim(dw_1.Object.planrep[li_row])
- s_plan.plancontent = Trim(dw_1.Object.plancontent[li_row])
- s_plan.planaccomplishdate = dw_1.Object.planaccomplishdate[li_row]
- s_plan.accomplishdate = dw_1.Object.accomplishdate[li_row]
- s_plan.accomplishrslt = Trim(dw_1.Object.accomplishrslt[li_row])
- s_plan.dscrp = Trim(dw_1.Object.dscrp[li_row])
- IF uo_cus.uof_add_plan(s_plan,publ_operator,arg_msg,TRUE) = 0 THEN
- MessageBox('错误',arg_msg,stopsign!,ok!)
- rslt = 0
- GOTO ext
- END IF
- ext:
- RETURN rslt
- end function
- public function integer wf_insertrow ();Long ll_row
- ll_row = dw_1.InsertRow(0)
- dw_1.Object.cusid[ll_row] = s_plan_open.cusid
- dw_1.SetFocus()
- dw_1.SetColumn('saler')
- RETURN 1
- end function
- on w_cust_plan_add.create
- int iCurrent
- call super::create
- this.dw_1=create dw_1
- this.cb_2=create cb_2
- this.cb_1=create cb_1
- iCurrent=UpperBound(this.Control)
- this.Control[iCurrent+1]=this.dw_1
- this.Control[iCurrent+2]=this.cb_2
- this.Control[iCurrent+3]=this.cb_1
- end on
- on w_cust_plan_add.destroy
- call super::destroy
- destroy(this.dw_1)
- destroy(this.cb_2)
- destroy(this.cb_1)
- end on
- event open;call super::open;dw_1.SetTransObject(sqlca)
- s_plan_open = Message.PowerObjectParm
- uo_cus = CREATE uo_crm
- IF s_plan_open.planid = 0 THEN
- wf_insertrow()
- ELSE
- dw_1.Retrieve(s_plan_open.planid)
- END IF
- end event
- event close;call super::close;destroy uo_cus
- end event
- type cb_func from w_publ_base`cb_func within w_cust_plan_add
- boolean visible = false
- integer x = 1056
- integer y = 580
- boolean enabled = false
- end type
- type cb_exit from w_publ_base`cb_exit within w_cust_plan_add
- integer x = 1349
- integer y = 1456
- integer taborder = 30
- string text = "取消"
- end type
- type dw_1 from datawindow within w_cust_plan_add
- event key pbm_dwnkey
- event dwnkey pbm_dwnkey
- integer x = 91
- integer y = 32
- integer width = 1783
- integer height = 1368
- integer taborder = 10
- boolean bringtotop = true
- string dataobject = "dw_cust_crm_plan_add"
- boolean livescroll = true
- borderstyle borderstyle = stylelowered!
- end type
- event dwnkey;IF Key = KeyDownArrow! THEN RETURN 1
- IF Key = keyenter! OR Key = KeyDownArrow! THEN //
- keybd_event ( 9, 0, 0 , 0 ) // 按下tab
- keybd_event ( 9, 0, 2, 0 ) // 释放tab
- RETURN 0
- ELSEIF Key = keyuparrow! THEN
- keybd_event ( 16, 0, 0 , 0 )
- keybd_event ( 9, 0, 0 , 0 )
- keybd_event ( 9, 0, 2, 0 )
- keybd_event ( 16, 0, 2, 0 )
- RETURN 0
- END IF
- end event
- event rbuttondown;Long ll_row,ll_column
- ll_row = THIS.GetRow()
- ll_column = THIS.GetColumn()
- IF ll_row <= 0 THEN RETURN
- IF ll_column <= 0 THEN RETURN
- IF Left( THIS.Describe( dwo.Name+ ".coltype"),4) = 'date' THEN
- s_calender_arg s_calender
-
- s_calender.PointerX = THIS.PointerX()
- s_calender.PointerY = THIS.PointerY()
- s_calender.X = THIS.X + PARENT.X
- s_calender.Y = THIS.Y + PARENT.Y
-
- OpenWithParm(w_calendar,s_calender)
- THIS.SetItem(ll_row,ll_column,id_date_selected)
- end if
- end event
- type cb_2 from uo_imflatbutton within w_cust_plan_add
- integer x = 777
- integer y = 1456
- integer width = 407
- integer height = 96
- integer taborder = 40
- string text = "保存[C^+S]"
- string normalpicname = "save.bmp"
- end type
- event clicked;call super::clicked;if wf_save() = 0 then return
- close(parent)
- end event
- type cb_1 from uo_imflatbutton within w_cust_plan_add
- integer x = 123
- integer y = 1456
- integer width = 489
- integer height = 96
- integer taborder = 40
- string text = "保存&新增[&S]"
- string normalpicname = "save.bmp"
- end type
- event clicked;call super::clicked;IF wf_save() = 0 THEN RETURN
- wf_insertrow()
- end event
|