123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414 |
- $PBExportHeader$w_rp_post_propel_index.srw
- forward
- global type w_rp_post_propel_index from w_publ_easyq
- end type
- type dw_mx from u_dw_rbtnfilter within w_rp_post_propel_index
- end type
- type cb_edit from uo_imflatbutton within w_rp_post_propel_index
- end type
- type cb_del from uo_imflatbutton within w_rp_post_propel_index
- end type
- type cb_post from uo_imflatbutton within w_rp_post_propel_index
- end type
- end forward
- global type w_rp_post_propel_index from w_publ_easyq
- string title = "公告推送列表"
- event ue_retrieve_mx ( )
- dw_mx dw_mx
- cb_edit cb_edit
- cb_del cb_del
- cb_post cb_post
- end type
- global w_rp_post_propel_index w_rp_post_propel_index
- type variables
- uo_ljfieb uo_fieb
- Transaction tr_eb_sqlca
- end variables
- event ue_retrieve_mx();long ll_row
- ll_row = dw_1.getrow()
- if ll_row <= 0 then
- dw_mx.reset()
- return
- end if
- long ll_postid
- ll_postid = dw_1.object.postid[ll_row]
- dw_mx.retrieve(ll_postid)
- end event
- on w_rp_post_propel_index.create
- int iCurrent
- call super::create
- this.dw_mx=create dw_mx
- this.cb_edit=create cb_edit
- this.cb_del=create cb_del
- this.cb_post=create cb_post
- iCurrent=UpperBound(this.Control)
- this.Control[iCurrent+1]=this.dw_mx
- this.Control[iCurrent+2]=this.cb_edit
- this.Control[iCurrent+3]=this.cb_del
- this.Control[iCurrent+4]=this.cb_post
- end on
- on w_rp_post_propel_index.destroy
- call super::destroy
- destroy(this.dw_mx)
- destroy(this.cb_edit)
- destroy(this.cb_del)
- destroy(this.cb_post)
- end on
- event ue_before_open;call super::ue_before_open;
- tr_eb_sqlca = sys_email_sqlca // 电子商务连接
- uo_fieb = create uo_ljfieb
- uo_fieb.commit_transaction = tr_eb_sqlca
- dw_mx.settransobject(sqlca)
- end event
- event resize;ln_bar.endx = this.width
- ln_bar2.endx = this.width
- ln_1.endx = this.width
- ln_2.endx = this.width
- ln_3.endx = this.width
- ln_4.endx = this.width
- r_bar.width = this.width
- dw_1.width=this.width - dw_1.x - 40 - dw_mx.width - 5
- dw_1.height=this.height - dw_1.y - 150
- dw_mx.x = dw_1.x + dw_1.width + 5
- dw_mx.height = dw_1.height
- end event
- event open;call super::open;cb_1.TriggerEvent(Clicked!)
- end event
- type cb_func from w_publ_easyq`cb_func within w_rp_post_propel_index
- boolean visible = false
- end type
- type cb_exit from w_publ_easyq`cb_exit within w_rp_post_propel_index
- integer x = 750
- end type
- type cb_2 from w_publ_easyq`cb_2 within w_rp_post_propel_index
- boolean visible = false
- end type
- type cb_psetup from w_publ_easyq`cb_psetup within w_rp_post_propel_index
- boolean visible = false
- end type
- type cb_1 from w_publ_easyq`cb_1 within w_rp_post_propel_index
- end type
- event cb_1::clicked;call super::clicked;DateTime first_date,end_date
- first_date = DateTime(Date(em_1.Text),Time(0))
- end_date = DateTime(Date(em_2.Text),Time('23:59:59'))
- dw_1.retrieve(first_date,end_date)
- parent.triggerevent('ue_retrieve_mx')
- end event
- type st_3 from w_publ_easyq`st_3 within w_rp_post_propel_index
- integer width = 315
- string text = "开始日期从:"
- end type
- type st_4 from w_publ_easyq`st_4 within w_rp_post_propel_index
- integer x = 855
- end type
- type em_1 from w_publ_easyq`em_1 within w_rp_post_propel_index
- integer x = 347
- end type
- type em_2 from w_publ_easyq`em_2 within w_rp_post_propel_index
- integer x = 960
- end type
- type ddlb_yl from w_publ_easyq`ddlb_yl within w_rp_post_propel_index
- boolean visible = false
- end type
- type cbx_yl from w_publ_easyq`cbx_yl within w_rp_post_propel_index
- boolean visible = false
- end type
- type dw_1 from w_publ_easyq`dw_1 within w_rp_post_propel_index
- integer y = 308
- integer width = 2322
- string dataobject = "dw_rp_post_propel_index"
- end type
- event dw_1::rowfocuschanged;call super::rowfocuschanged;parent.triggerevent('ue_retrieve_mx')
- end event
- event dw_1::doubleclicked;call super::doubleclicked;cb_edit.triggerevent(clicked!)
- end event
- type sle_mtrl from w_publ_easyq`sle_mtrl within w_rp_post_propel_index
- end type
- type sle_cust from w_publ_easyq`sle_cust within w_rp_post_propel_index
- end type
- type st_mtrl from w_publ_easyq`st_mtrl within w_rp_post_propel_index
- end type
- type st_cust from w_publ_easyq`st_cust within w_rp_post_propel_index
- end type
- type cbx_loginretr from w_publ_easyq`cbx_loginretr within w_rp_post_propel_index
- end type
- type pb_em1 from w_publ_easyq`pb_em1 within w_rp_post_propel_index
- integer x = 763
- end type
- type pb_em2 from w_publ_easyq`pb_em2 within w_rp_post_propel_index
- integer x = 1376
- end type
- type pb_2 from w_publ_easyq`pb_2 within w_rp_post_propel_index
- integer x = 1486
- end type
- type cb_help from w_publ_easyq`cb_help within w_rp_post_propel_index
- boolean visible = false
- end type
- type cb_copyself from w_publ_easyq`cb_copyself within w_rp_post_propel_index
- boolean visible = false
- end type
- type gb_1 from w_publ_easyq`gb_1 within w_rp_post_propel_index
- end type
- type ln_bar from w_publ_easyq`ln_bar within w_rp_post_propel_index
- end type
- type ln_bar2 from w_publ_easyq`ln_bar2 within w_rp_post_propel_index
- end type
- type r_bar from w_publ_easyq`r_bar within w_rp_post_propel_index
- end type
- type ln_1 from w_publ_easyq`ln_1 within w_rp_post_propel_index
- end type
- type ln_2 from w_publ_easyq`ln_2 within w_rp_post_propel_index
- end type
- type ln_3 from w_publ_easyq`ln_3 within w_rp_post_propel_index
- boolean visible = false
- end type
- type ln_4 from w_publ_easyq`ln_4 within w_rp_post_propel_index
- boolean visible = false
- end type
- type dw_mx from u_dw_rbtnfilter within w_rp_post_propel_index
- integer x = 2327
- integer y = 308
- integer width = 1257
- integer height = 1820
- integer taborder = 20
- boolean bringtotop = true
- string dataobject = "dw_rp_post_propel_mx"
- boolean hscrollbar = true
- boolean vscrollbar = true
- end type
- event rowfocuschanged;call super::rowfocuschanged;IF currentrow > 0 THEN
- THIS.SelectRow(0,FALSE)
- THIS.SelectRow(currentrow,TRUE)
- END IF
- end event
- type cb_edit from uo_imflatbutton within w_rp_post_propel_index
- integer x = 425
- integer width = 151
- integer height = 164
- integer taborder = 30
- boolean bringtotop = true
- string text = "编辑"
- string normalpicname = "OPEN.BMP"
- integer picsize = 16
- toolbaralignment pic_align = alignattop!
- boolean border = false
- end type
- event clicked;call super::clicked;IF Not f_power_ind(3400) THEN
- MessageBox(publ_operator,sys_msg_pow)
- RETURN
- END IF
- long ll_row
- long ll_postid
- ll_row = dw_1.getrow()
- if ll_row <= 0 then
- messagebox('系统提示','请先选择要编辑的公告')
- return
- end if
- ll_postid = dw_1.object.postid[ll_row]
- openwithparm(w_post_propel_edit_ljfieb,ll_postid)
- cb_1.triggerevent(clicked!)
- end event
- type cb_del from uo_imflatbutton within w_rp_post_propel_index
- integer x = 581
- integer width = 165
- integer height = 164
- integer taborder = 50
- boolean bringtotop = true
- string text = "删除"
- string normalpicname = "DELETE.BMP"
- integer picsize = 16
- toolbaralignment pic_align = alignattop!
- boolean border = false
- end type
- event clicked;call super::clicked;If Not f_power_ind(3401) Then
- MessageBox(publ_operator,sys_msg_pow)
- Return
- End If
- Long ll_row,ll_i
- Long ll_postid
- ll_row = dw_1.GetRow()
- If ll_row <= 0 Then
- MessageBox('系统提示','请先选择要删除的公告')
- Return
- End If
- If MessageBox('询问','是否确定要删除选中的公告?',question!,yesno!) = 2 Then Return
- ll_postid = dw_1.Object.postid[ll_row]
- dw_mx.Retrieve(ll_postid)
- Long ll_sendcuscommid,ll_receivecuscommid
- String arg_msg_err,arg_msg_tmp
- String ls_commcode, ls_commsccode, ls_commname
- String ls_RelatedCode
- String ls_SerialNum
- Long ll_suc,ll_fail
- Select CusCommID
- Into :ll_sendcuscommid
- From LJFIEB_CusComm
- Where CusType = 0 Using tr_eb_sqlca;
- If tr_eb_sqlca.SQLCode <> 0 Then
- MessageBox('Error','查询本公司企业编号失败,'+tr_eb_sqlca.SQLErrText)
- Return
- End If
- ls_RelatedCode = String(ll_sendcuscommid) + '_' + String(ll_postid)
- For ll_i = 1 To dw_mx.RowCount()
-
- ls_commcode = dw_mx.Object.commcode[ll_i]
- ls_commsccode = dw_mx.Object.commsccode[ll_i]
- ls_commname = dw_mx.Object.commname[ll_i]
-
-
- Select TOP 1 NEWID() Into :ls_SerialNum
- From u_user Using sqlca;
- If sqlca.SQLCode <> 0 Then
- Rollback Using sqlca;
- MessageBox('Error', '第'+String(ll_i)+'行明细,生成序列号失败,'+sqlca.SQLErrText)
- Return
- End If
-
- Select CusCommID
- Into :ll_receivecuscommid
- From LJFIEB_CusComm
- Where cuscode = :ls_commcode Using tr_eb_sqlca;
- If tr_eb_sqlca.SQLCode <> 0 Then
- ll_receivecuscommid = 0
- End If
-
- If ll_receivecuscommid = 0 Then
- arg_msg_err = arg_msg_err + '第'+String(ll_i)+'行明细,'+ls_commname+',找不到对应的企业编号,请检查' + '~r~n'
- Continue
- End If
-
- If uo_fieb.add_packet(ls_SerialNum,'',ll_sendcuscommid,'',ll_receivecuscommid,ls_commsccode,20,'','','','',ls_RelatedCode,0,arg_msg_tmp,True) = 0 Then
- arg_msg_err = arg_msg_err + '第'+String(ll_i)+'行明细,'+ls_commname+',发送删除公告指令失败,'+arg_msg_tmp + '~r~n'
- ll_fail++
- Continue
- End If
-
- Next
- Delete From u_post_propel
- Where postid = :ll_postid Using sqlca;
- If sqlca.SQLCode <> 0 Then
- Rollback Using sqlca;
- MessageBox('error','删除公告失败,'+sqlca.SQLErrText)
- Return
- End If
- Delete From u_post_propel_mx
- Where postid = :ll_postid Using sqlca;
- If sqlca.SQLCode <> 0 Then
- Rollback Using sqlca;
- MessageBox('error','删除公告推送列表失败,'+sqlca.SQLErrText)
- Return
- End If
- Commit Using sqlca;
- If ll_fail > 0 Then
- OpenWithParm(w_message_err,arg_msg_err)
- End If
- cb_1.TriggerEvent(Clicked!)
- end event
- type cb_post from uo_imflatbutton within w_rp_post_propel_index
- integer x = 151
- integer width = 274
- integer height = 164
- integer taborder = 40
- boolean bringtotop = true
- string text = "发布公告"
- string normalpicname = "new.BMP"
- integer picsize = 16
- toolbaralignment pic_align = alignattop!
- boolean border = false
- end type
- event clicked;call super::clicked;IF Not f_power_ind(3400) THEN
- MessageBox(publ_operator,sys_msg_pow)
- RETURN
- END IF
- openwithparm(w_post_propel_edit_ljfieb,0)
- cb_1.triggerevent(clicked!)
- end event
|