$PBExportHeader$w_currency_ch.srw forward global type w_currency_ch from w_publ_edit_choice end type end forward global type w_currency_ch from w_publ_edit_choice integer width = 1330 integer height = 1620 string title = "币种选择" long backcolor = 81324524 end type global w_currency_ch w_currency_ch type variables s_currency s_ch end variables on w_currency_ch.create call super::create end on on w_currency_ch.destroy call super::destroy end on event retrieve_uc;dw_UC.Retrieve(sys_accsetid) end event event close;CloseWithReturn(THIS,s_ch) end event event open;call super::open;s_ch.moneyid = 0 end event type cb_func from w_publ_edit_choice`cb_func within w_currency_ch integer x = 0 end type type cb_exit from w_publ_edit_choice`cb_exit within w_currency_ch integer x = 329 end type type cb_add from w_publ_edit_choice`cb_add within w_currency_ch boolean visible = false integer y = 372 boolean enabled = false end type event cb_add::clicked;//Long ll_newid,i //String errmsg //IF dw_edit_mode THEN // dw_uc.AcceptText() // IF dw_uc.GetNextModified(0, Primary!) = 0 THEN // MessageBox(publ_operator,'没有任何修改,不可以保存!') // RETURN // END IF // dw_uc.Object.Name[dw_uc.GetRow()] = Trim(dw_uc.Object.Name[dw_uc.GetRow()]) // // IF dw_uc.Object.Name[dw_uc.GetRow()] = '' THEN // MessageBox(publ_operator,'请输入币种名称!') // RETURN // END IF // dw_uc.Object.accsetid[dw_uc.GetRow()] = sys_accsetid // // // IF dw_uc.Object.moneyid[dw_uc.GetRow()] = 0 THEN // ll_newid = f_sys_scidentity(sys_accsetid,"cw_currency","moneyid",errmsg,FALSE) // IF ll_newid <= 0 THEN // MessageBox(publ_operator,errmsg) // RETURN // ELSE // dw_uc.Object.moneyid[dw_uc.GetRow()] = ll_newid // END IF // 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 = "关键内容重复" // ELSE // ls_errmsg = "因为网络或其他原因>"+ins_sqlerrtext // END IF // ROLLBACK; // MessageBox (publ_operator,ls_errmsg+",保存操作失败!",Exclamation!,OK!) // LS_UPDATE_FLAG = FALSE // RETURN // ELSE // COMMIT; // FOR i = 1 TO 4 // 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 4 // 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_currency_ch boolean visible = false integer y = 372 boolean enabled = false end type event cb_edit::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 4 // dw_UC.SetTabOrder ( i, 0 ) // next // modifyrow_no = 0 //ELSE // if dw_uc.object.native[dw_uc.getrow()]=1 then // messagebox(publ_operator,'帐套本位币,不能修改') // return // end if // modifyrow_no = dw_UC.getrow() // for i=1 to 4 // 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_currency_ch boolean visible = false integer y = 372 boolean enabled = false end type event cb_delet::clicked;//IF MessageBox (publ_operator,"是否确定要删除当前记录?(选择确定后记录将不可恢复)",Question!,YesNo! ) = 2 THEN //RETURN //END IF // // //IF DW_UC.GETROW()<=0 THEN // MESSAGEBOX(publ_operator,'没有操作目标记录!') // RETURN //END IF // //if dw_uc.object.native[dw_uc.getrow()]=1 then // messagebox(publ_operator,'帐套本位币,不能删除') // return //end if // //long cnt=0,ls_moneyid //ls_moneyid=dw_uc.object.moneyid[dw_uc.getrow()] //select count(moneyid) into :cnt from cw_subject //where accsetid=:sys_accsetid // and hswb=1 // and moneyid=:ls_moneyid; //if sqlca.sqlcode<>0 then // messagebox(publ_operator,'查询外币是否在往来业务中使用失败,不能删除') // return //end if // //if cnt>0 then // messagebox(publ_operator,'该外币已经在往来业务中使用,不能删除') // return //end if // //dw_uc.SetRedraw (false) //dw_UC.DeleteRow (0) //dw_UC.TriggerEvent (rowfocuschanged!) // //if dw_UC.Update() = -1 then // rollback; // MessageBox (publ_operator,"删除记录操作失败!",Exclamation!,OK!) //else // commit; //end if //dw_uc.SetRedraw (true) end event type cb_choice from w_publ_edit_choice`cb_choice within w_currency_ch integer x = 165 end type type dw_uc from w_publ_edit_choice`dw_uc within w_currency_ch integer width = 1307 integer height = 1344 string dataobject = "dw_currency_ch" end type 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::doubleclicked;//cb_1.PostEvent(Clicked!) end event type ln_bar from w_publ_edit_choice`ln_bar within w_currency_ch end type type ln_bar2 from w_publ_edit_choice`ln_bar2 within w_currency_ch end type type r_bar from w_publ_edit_choice`r_bar within w_currency_ch integer x = 695 end type