代码功能:当用户点击审核时,方框内打上勾并获取审核人和审核时间。
在窗口的clicked事件中写如下代码
//定义变量
Long ll_row, ll_confDatetime dm
String ls_cfm
Choose Case dw_basic.dataobject
Case'd_cust_list_new_new'
Choose Case String(dwo.name)
Case 'confirmed'
ll_row = row
IF ll_row = 0 THEN RETURN
ls_cfm=''
ls_cfm = gnv_app.of_getusername()
ll_conf = this.GetItemNumber(ll_row,'confirmed')
IF ll_conf = 1 THEN
IF MessageBox('提问','您确认要取消审核吗?',&
Question!,YesNo!,1) <> 1 THEN
RETURN
end if
setNull(dm)
setNull(ls_cfm)
this.SetItem(ll_row,'confirmed',0 )
this.SetItem(ll_row,'confirm_by' ,ls_cfm)
this.SetItem(ll_row,'confirm_date',dm)
//event pfc_save( )
this.update( )
ELSE
this.SetItem(ll_row,'confirmed' ,1)
this.SetItem( ll_row,'confirm_by' ,ls_cfm)
this.SetItem( ll_row,'confirm_date',f_gettime())
//event pfc_save( )
this.update( )
END IF
End Choose
End Choose