123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264 |
- $PBExportHeader$w_cuscomm_edit_ljfieb.srw
- forward
- global type w_cuscomm_edit_ljfieb from w_publ_edit_choice
- end type
- end forward
- global type w_cuscomm_edit_ljfieb from w_publ_edit_choice
- integer width = 3611
- integer height = 2028
- string title = "电子商务通信设置"
- boolean minbox = true
- windowtype windowtype = popup!
- end type
- global w_cuscomm_edit_ljfieb w_cuscomm_edit_ljfieb
- type variables
- boolean inb_ifnew = false
- end variables
- on w_cuscomm_edit_ljfieb.create
- call super::create
- end on
- on w_cuscomm_edit_ljfieb.destroy
- call super::destroy
- end on
- event open;dw_UC.SetTransObject (sys_email_sqlca)
- this.triggerevent('retrieve_uc')
- end event
- type cb_func from w_publ_edit_choice`cb_func within w_cuscomm_edit_ljfieb
- end type
- type cb_exit from w_publ_edit_choice`cb_exit within w_cuscomm_edit_ljfieb
- integer x = 987
- end type
- type cb_add from w_publ_edit_choice`cb_add within w_cuscomm_edit_ljfieb
- end type
- event cb_add::clicked;call super::clicked;IF Not f_power_ind(1559) THEN
- MessageBox(publ_operator,sys_msg_pow)
- RETURN
- END IF
- Long ll_newid,i
- String errmsg
- Long ll_cnt
- Long ll_cuscommid
- IF dw_edit_mode THEN
- dw_uc.AcceptText()
- IF dw_uc.GetNextModified(0, Primary!) = 0 THEN
- MessageBox(publ_operator,'没有任何修改,不可以保存!')
- RETURN
- END IF
-
- ll_cuscommid = dw_uc.Object.cuscommid[dw_uc.GetRow()]
-
- IF dw_uc.Object.cuscommid[dw_uc.GetRow()] <= 0 THEN
- MessageBox(publ_operator,'请输入正确的企业编号!')
- RETURN
- END IF
-
- IF dw_uc.Object.custype[dw_uc.GetRow()] = 0 THEN
- SELECT count(*)
- INTO :ll_cnt
- FROM LJFIEB_CusComm
- WHERE custype = 0
- And cuscommid <> :ll_cuscommid Using sys_email_sqlca;
- IF sys_email_sqlca.SQLCode <> 0 THEN
- MessageBox('Error','查询通信设置失败,'+sys_email_sqlca.SQLErrText)
- RETURN
- END IF
-
- IF ll_cnt > 0 THEN
- MessageBox('系统提示','不能设置多个类型为"自己"的信息,请检查')
- RETURN
- END IF
- END IF
-
- dw_uc.Object.cuscode[dw_uc.GetRow()] = Trim(dw_uc.Object.cuscode[dw_uc.GetRow()])
- dw_uc.Object.cusname[dw_uc.GetRow()] = Trim(dw_uc.Object.cusname[dw_uc.GetRow()])
- dw_uc.Object.ip[dw_uc.GetRow()] = Trim(dw_uc.Object.ip[dw_uc.GetRow()])
- dw_uc.Object.port1[dw_uc.GetRow()] = Trim(dw_uc.Object.port1[dw_uc.GetRow()])
-
- IF dw_uc.Object.cuscode[dw_uc.GetRow()] = '' THEN
- MessageBox(publ_operator,'请输入企业代码!')
- RETURN
- END IF
-
- IF dw_uc.Object.cusname[dw_uc.GetRow()] = '' THEN
- MessageBox(publ_operator,'请输入企业名称')
- RETURN
- END IF
-
- IF dw_uc.Object.ip[dw_uc.GetRow()] = '' THEN
- MessageBox(publ_operator,'请输入服务器IP!')
- RETURN
- END IF
-
- IF dw_uc.Object.port1[dw_uc.GetRow()] = '' THEN
- MessageBox(publ_operator,'请输入端口!')
- RETURN
- END IF
- END IF
- IF dw_edit_mode THEN
- String ls_errmsg
-
- dw_uc.AcceptText()
-
- IF dw_uc.Update() = -1 THEN
- IF Pos(ins_sqlerrtext,"Cannot insert duplicate key row") > 0 THEN
- ls_errmsg = "关键内容重复"
- ELSE
- ls_errmsg = "因为网络或其他原因>"+ins_sqlerrtext
- END IF
- inb_ifnew = False
- ROLLBACK using sys_email_sqlca;
- MessageBox (publ_operator,ls_errmsg+",保存操作失败!",Exclamation!,OK!)
- LS_UPDATE_FLAG = False
- RETURN
- ELSE
- COMMIT using sys_email_sqlca;
- FOR i = 1 To 8
- dw_uc.SetTabOrder ( i, 0 )
- NEXT
- LS_UPDATE_FLAG = True
- END IF
- ins_sqlerrtext = ""
- ELSE
- Long li_row, li_cur_row
- li_cur_row = dw_uc.GetRow()
- li_row = dw_uc.InsertRow (0)
- FOR i = 1 To 8
- dw_uc.SetTabOrder ( i, i*10 )
- NEXT
- dw_uc.SelectRow(0,False)
- dw_uc.ScrollToRow (li_row)
- dw_uc.SelectRow(li_row,True)
- dw_uc.SetFocus()
- modifyrow_no = li_row
- END IF
- dw_edit_mode = Not dw_edit_mode
- WF_FACE_CHANGE()
- end event
- type cb_edit from w_publ_edit_choice`cb_edit within w_cuscomm_edit_ljfieb
- end type
- event cb_edit::clicked;call super::clicked;IF NOT f_power_ind(1559) THEN
- MessageBox(publ_operator,sys_msg_pow)
- RETURN
- END IF
- Long i
- IF dw_edit_mode THEN
- IF dw_uc.GetItemStatus(dw_uc.GetRow(), 0, Primary!) = NewModified! OR dw_uc.GetItemStatus(dw_uc.GetRow(), 0, Primary!) = New! THEN
- dw_uc.DeleteRow(dw_uc.GetRow())
- ELSE
- dw_uc.ReselectRow(dw_uc.GetRow())
- END IF
- FOR i = 1 TO 8
- dw_uc.SetTabOrder ( i, 0 )
- NEXT
- modifyrow_no = 0
- ELSE
- modifyrow_no = dw_uc.GetRow()
- FOR i = 1 TO 8
- dw_uc.SetTabOrder ( i, i*10 )
- NEXT
- dw_uc.SetFocus()
-
- dw_uc.SelectRow(0,FALSE)
- dw_uc.ScrollToRow (modifyrow_no)
- dw_uc.SelectRow(modifyrow_no,TRUE)
-
- END IF
- dw_edit_mode = NOT dw_edit_mode
- WF_FACE_CHANGE()
- end event
- type cb_delet from w_publ_edit_choice`cb_delet within w_cuscomm_edit_ljfieb
- end type
- event cb_delet::clicked;call super::clicked;IF NOT f_power_ind(1559) THEN
- MessageBox(publ_operator,sys_msg_pow)
- RETURN
- END IF
- IF MessageBox (publ_operator,"是否确定要删除当前记录?(选择确定后记录将不可恢复)",question!,yesno! ) = 2 THEN
- RETURN
- END IF
- Long ls_id
- Long ls_long = 0
- String ls_code,arg_msg
- IF dw_uc.GetRow() <= 0 THEN
- MessageBox('','没有操作目标记录!')
- RETURN
- END IF
- ls_id = dw_uc.Object.cuscommid[dw_uc.GetRow()]
- dw_uc.SetRedraw (FALSE)
- dw_uc.DeleteRow (0)
- dw_uc.TriggerEvent (RowFocusChanged!)
- IF dw_uc.Update() = -1 THEN
- ROLLBACK using sys_email_sqlca;
- MessageBox (publ_operator,"删除记录操作失败!",exclamation!,ok!)
- ELSE
- COMMIT using sys_email_sqlca;
- END IF
- dw_uc.SetRedraw (TRUE)
- end event
- type cb_choice from w_publ_edit_choice`cb_choice within w_cuscomm_edit_ljfieb
- boolean visible = false
- integer x = 878
- integer width = 165
- boolean enabled = false
- end type
- type dw_uc from w_publ_edit_choice`dw_uc within w_cuscomm_edit_ljfieb
- integer width = 3584
- integer height = 1764
- string dataobject = "dw_cuscomm_edit_index_ljfieb"
- boolean hscrollbar = true
- end type
- type cb_rtr from w_publ_edit_choice`cb_rtr within w_cuscomm_edit_ljfieb
- end type
- type cb_help from w_publ_edit_choice`cb_help within w_cuscomm_edit_ljfieb
- integer x = 837
- end type
- type ln_bar from w_publ_edit_choice`ln_bar within w_cuscomm_edit_ljfieb
- end type
- type ln_bar2 from w_publ_edit_choice`ln_bar2 within w_cuscomm_edit_ljfieb
- end type
- type r_bar from w_publ_edit_choice`r_bar within w_cuscomm_edit_ljfieb
- end type
|