$PBExportHeader$w_billpic_fileclass_edit.srw forward global type w_billpic_fileclass_edit from w_publ_edit_choice end type end forward global type w_billpic_fileclass_edit from w_publ_edit_choice integer width = 1490 integer height = 1836 string title = "单据打印图片类别" boolean minbox = true windowtype windowtype = popup! end type global w_billpic_fileclass_edit w_billpic_fileclass_edit on w_billpic_fileclass_edit.create call super::create end on on w_billpic_fileclass_edit.destroy call super::destroy end on event retrieve_uc;dw_UC.retrieve() end event type cb_func from w_publ_edit_choice`cb_func within w_billpic_fileclass_edit end type type cb_exit from w_publ_edit_choice`cb_exit within w_billpic_fileclass_edit integer x = 987 end type type cb_add from w_publ_edit_choice`cb_add within w_billpic_fileclass_edit end type event cb_add::clicked;call super::clicked;IF NOT f_power_ind(1353) THEN MessageBox('提示','你没有使用权限!', Information!, OK! ) RETURN END IF Long ll_newid,i String errmsg IF dw_edit_mode THEN dw_uc.AcceptText() IF dw_uc.GetNextModified(0, Primary!) = 0 THEN MessageBox('提示','没有任何修改,不可以保存!', Information!, OK! ) RETURN END IF IF dw_uc.Object.billtype[dw_uc.GetRow()] = 0 THEN MessageBox('提示','请选择单据!', Information!, OK! ) RETURN END IF IF dw_uc.Object.classid[dw_uc.GetRow()] = 0 THEN MessageBox('提示','请选择附件分类!', Information!, OK! ) RETURN END IF END IF IF dw_edit_mode THEN String ls_errmsg IF dw_uc.Update() = -1 THEN IF Pos(ins_sqlerrtext,"Cannot insert duplicate key row") > 0 THEN ls_errmsg = "关键内容重复" elseif Pos(ins_sqlerrtext,'PK_u_billpic_fileclass') > 0 then ls_errmsg = '一种单据只能指定一种附件分类' ELSE ls_errmsg = "因为网络或其他原因>"+ins_sqlerrtext END IF ROLLBACK; MessageBox ('提示',ls_errmsg+",保存操作失败!",Exclamation!,OK!) LS_UPDATE_FLAG = FALSE RETURN ELSE COMMIT; FOR i = 1 TO 1 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 1 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_billpic_fileclass_edit end type event cb_edit::clicked;call super::clicked;IF NOT f_power_ind(1353) THEN MessageBox(publ_operator,'你没有使用权限!') 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 1 dw_uc.SetTabOrder ( i, 0 ) NEXT modifyrow_no = 0 ELSE modifyrow_no = dw_uc.GetRow() FOR i = 1 TO 1 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_billpic_fileclass_edit end type event cb_delet::clicked;call super::clicked;IF NOT f_power_ind(1353) THEN MessageBox('提示','你没有使用权限!', Information!, OK! ) RETURN END IF IF MessageBox ('询问',"是否确定要删除当前记录?(选择确定后记录将不可恢复)",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('提示','没有操作目标记录!', Information!, OK! ) RETURN END IF ls_id = dw_uc.Object.billtype[dw_uc.GetRow()] dw_uc.SetRedraw (FALSE) dw_uc.DeleteRow (0) dw_uc.TriggerEvent (RowFocusChanged!) IF dw_uc.Update() = -1 THEN ROLLBACK; MessageBox ('提示',"删除记录操作失败!", Information!, OK! ) ELSE COMMIT; END IF dw_uc.SetRedraw (TRUE) end event type cb_choice from w_publ_edit_choice`cb_choice within w_billpic_fileclass_edit boolean visible = false boolean enabled = false end type type dw_uc from w_publ_edit_choice`dw_uc within w_billpic_fileclass_edit event ue_dwndropdown pbm_dwndropdown integer width = 1422 integer height = 1516 string dataobject = "dw_billpic_fileclass_edit" boolean rbutton_filter_use = true boolean titleclick_sort_use = true end type event dw_uc::ue_dwndropdown;//long ll_billtype //long ll_x,ll_y,ll_height //long ll_row //ll_row = this.getrow() //if ll_row <= 0 then return //IF THIS.GetColumnName() = 'classid' THEN // IF NOT IsValid(w_fileclass_ch) THEN // Openwithparm(w_fileclass_ch,ll_billtype) // ll_x = Long(this.Describe('classid.x')) // ll_y = long(this.describe('classid.y')) // ll_height = long(this.describe('classid.height')) // ll_y = ll_y + (ll_row + 1 ) * ll_height // w_fileclass_ch.x = parent.x + this.x + ll_x // w_fileclass_ch.y = parent.y + this.y + ll_y + 76 // ELSE // Close(w_fileclass_ch) // END IF //END IF // // // //RETURN 0 // end event event dw_uc::rowfocuschanged;call super::rowfocuschanged;if currentrow>0 then this.selectrow(0,false) this.selectrow(currentrow,true) end if end event event dw_uc::dwnkey;call super::dwnkey;IF Key = KeyEnter! THEN // keybd_event ( 9, 0, 0 , 0 ) // 按下tab keybd_event ( 9, 0, 2, 0 ) // 释放tab RETURN 1 END IF end event event dw_uc::doubleclicked;call super::doubleclicked;IF dw_edit_mode THEN IF dwo.Name = 'classid' THEN Long ll_billtype,ll_row ll_row = dw_uc.GetRow() IF ll_row <= 0 THEN RETURN // ll_billtype = dw_uc.Object.billtype[ll_row] // // IF ll_billtype = 0 THEN // MessageBox('系统提示','请先选择单据名称') // RETURN // END IF ll_billtype = 201 OpenWithParm(w_fileclass_ch,ll_billtype) Long ll_classid ll_classid = Message.DoubleParm IF ll_classid > 0 THEN dw_uc.Object.classid[ll_row] = ll_classid END IF END IF END IF end event event dw_uc::itemchanged;call super::itemchanged;IF row > 0 THEN IF dwo.Name = 'billtype' THEN dw_uc.Object.classid[row] = 0 END IF END IF end event type cb_rtr from w_publ_edit_choice`cb_rtr within w_billpic_fileclass_edit end type type cb_help from w_publ_edit_choice`cb_help within w_billpic_fileclass_edit integer x = 837 end type type ln_bar from w_publ_edit_choice`ln_bar within w_billpic_fileclass_edit end type type ln_bar2 from w_publ_edit_choice`ln_bar2 within w_billpic_fileclass_edit end type type r_bar from w_publ_edit_choice`r_bar within w_billpic_fileclass_edit integer x = 1394 end type