$PBExportHeader$w_sendway_edit_ch.srw forward global type w_sendway_edit_ch from w_publ_edit_choice end type end forward global type w_sendway_edit_ch from w_publ_edit_choice integer width = 3689 integer height = 1592 string title = "短信通道" end type global w_sendway_edit_ch w_sendway_edit_ch type variables uo_spring_sendway ins_uo_sendway long ins_col_num = 5 s_spring_sendway ins_rslt end variables on w_sendway_edit_ch.create call super::create end on on w_sendway_edit_ch.destroy call super::destroy end on event open;call super::open;ins_uo_sendway = create uo_spring_sendway ins_uo_sendway.commit_transaction = sqlca ins_rslt.sendwayid = 0 end event event close;call super::close;Destroy ins_uo_sendway CloseWithReturn(This, ins_rslt) end event event resize;call super::resize; dw_uc.Width = This.WorkSpaceWidth() dw_uc.Height = This.WorkSpaceHeight() - dw_uc.Y end event type cb_func from w_publ_edit_choice`cb_func within w_sendway_edit_ch end type type cb_exit from w_publ_edit_choice`cb_exit within w_sendway_edit_ch integer x = 603 end type type cb_add from w_publ_edit_choice`cb_add within w_sendway_edit_ch boolean visible = false end type event cb_add::clicked;call super::clicked;Long ll_newid,i String errmsg IF dw_edit_mode THEN IF dw_uc.AcceptText() <> 1 THEN RETURN dw_uc.Object.sendwayname[dw_uc.GetRow()] = Trim(dw_uc.Object.sendwayname[dw_uc.GetRow()]) IF dw_uc.Object.sendwayname[dw_uc.GetRow()] = '' THEN MessageBox(publ_operator, '请输入通道名称') RETURN END IF END IF IF dw_edit_mode THEN s_spring_sendway s_sendway String ls_errmsg s_sendway.sendwayid = dw_uc.Object.sendwayid[dw_uc.GetRow()] s_sendway.sendwaytype = dw_uc.Object.sendwaytype[dw_uc.GetRow()] s_sendway.url = dw_uc.Object.url[dw_uc.GetRow()] s_sendway.sn = dw_uc.Object.sn[dw_uc.GetRow()] s_sendway.psw = dw_uc.Object.psw[dw_uc.GetRow()] s_sendway.sendwayname = dw_uc.Object.sendwayname[dw_uc.GetRow()] IF ins_uo_sendway.uf_save(Ref s_sendway, Ref ls_errmsg) <> 1 THEN MessageBox(publ_operator, ls_errmsg) RETURN END IF dw_uc.Object.sendwayid[dw_uc.GetRow()] = s_sendway.sendwayid FOR i = 1 To ins_col_num dw_uc.SetTabOrder ( i, 0 ) NEXT ELSE Long li_row, li_cur_row li_cur_row = dw_uc.GetRow() li_row = dw_uc.InsertRow (0) FOR i = 1 To ins_col_num 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_sendway_edit_ch boolean visible = false end type event cb_edit::clicked;call super::clicked;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 ins_col_num dw_uc.SetTabOrder ( i, 0 ) NEXT modifyrow_no = 0 ELSE modifyrow_no = dw_uc.GetRow() FOR i = 1 To ins_col_num 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_sendway_edit_ch boolean visible = false end type event cb_delet::clicked;call super::clicked;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.sendwayid[DW_UC.GetRow()] IF ins_uo_sendway.uf_del(LS_id, arg_msg) <> 1 THEN MessageBox(publ_operator, arg_msg) RETURN END IF DW_UC.SetRedraw (False) DW_UC.DeleteRow (0) DW_UC.TriggerEvent (RowFocusChanged!) DW_UC.SetRedraw (True) end event type cb_choice from w_publ_edit_choice`cb_choice within w_sendway_edit_ch integer x = 302 end type event cb_choice::clicked;call super::clicked;IF DW_UC.GetRow() <= 0 THEN MessageBox('','没有操作目标记录!') RETURN END IF ins_rslt.sendwayid = dw_uc.Object.sendwayid[dw_uc.GETROW()] ins_rslt.sendwaytype = dw_uc.Object.sendwaytype[dw_uc.GETROW()] ins_rslt.url = dw_uc.Object.url[dw_uc.GETROW()] ins_rslt.sn = dw_uc.Object.sn[dw_uc.GETROW()] ins_rslt.psw = dw_uc.Object.psw[dw_uc.GETROW()] ins_rslt.sendwayname = dw_uc.Object.sendwayname[dw_uc.GETROW()] close(parent) end event type dw_uc from w_publ_edit_choice`dw_uc within w_sendway_edit_ch integer width = 3666 integer height = 1304 string dataobject = "dw_sendway_ch" boolean hscrollbar = true end type type cb_rtr from w_publ_edit_choice`cb_rtr within w_sendway_edit_ch end type type cb_help from w_publ_edit_choice`cb_help within w_sendway_edit_ch integer x = 453 end type type ln_bar from w_publ_edit_choice`ln_bar within w_sendway_edit_ch end type type ln_bar2 from w_publ_edit_choice`ln_bar2 within w_sendway_edit_ch end type type r_bar from w_publ_edit_choice`r_bar within w_sendway_edit_ch end type