protected override MBaseModel createObject() { mv = new MVOTDocument(new CTable("")); mv.EmployeeType = loadParam.GenericType; mv.DocumentStatus = "1"; mv.DocumentDate = DateTime.Now; return(mv); }
protected override bool isEditable() { mv = (MVOTDocument)loadParam.ActualView; if (mv != null) { return(mv.IsEditable); } return(true); }
public WinAddEditPayrollExpenseItem(CWinLoadParam param) : base(param) { accessRightName = "HR_EXPENSE_EDIT"; mvParent = (MVOTDocument)loadParam.ActualParentView; InitializeComponent(); //Need to be after InitializeComponent registerValidateControls(lblExpense, cboExpense, false); registerValidateControls(lblQuantity, txtQuantity, false); registerValidateControls(lblPrice, txtPrice, false); }
public WinAddEditPayrollDeductItem(CWinLoadParam param) : base(param) { accessRightName = "HR_DEDUCTION_EDIT"; mvParent = (MVOTDocument)loadParam.ActualParentView; InitializeComponent(); //Need to be after InitializeComponent registerValidateControls(lblDeduction, cboDeduction, false); registerValidateControls(lblQuantity, txtDuration, false); registerValidateControls(lblNote, txtNote, false); }
public void ShowEditWindowEx(MVOTDocument actDoc) { if (!CHelper.VerifyAccessRight("HR_OT_VIEW")) { return; } CWinLoadParam param = new CWinLoadParam(); param.Caption = CLanguage.getValue("edit") + " " + CLanguage.getValue("hr_ot_form"); param.Mode = "E"; param.GenericType = actDoc.EmployeeType; param.ActualView = actDoc; FactoryWindow.ShowWindow("WinAddEditOtDoc", param); }
public WinAddEditOtDocItem2(CWinLoadParam param) : base(param) { accessRightName = "HR_OT_EDIT"; mvParent = (MVOTDocument)loadParam.ActualParentView; InitializeComponent(); otRates = HRUtils.ConstructOtRates(); //Need to be after InitializeComponent registerValidateControls(lblFromDate, txtFromHour, false); registerValidateControls(lblFromDate, txtFromMin, false); registerValidateControls(lblToDate, txtToHour, false); registerValidateControls(lblToDate, txtToMin, false); }
public override Tuple <CTable, ObservableCollection <MBaseModel> > QueryData() { MVOTDocument ad = (model as MVOTDocument); items = OnixWebServiceAPI.GetListAPI("GetOtDocList", "OT_DOC_LIST", ad.GetDbObject()); lastObjectReturned = OnixWebServiceAPI.GetLastObjectReturned(); itemSources.Clear(); int idx = 0; foreach (CTable o in items) { MVOTDocument v = new MVOTDocument(o); v.RowIndex = idx; itemSources.Add(v); idx++; } Tuple <CTable, ObservableCollection <MBaseModel> > tuple = new Tuple <CTable, ObservableCollection <MBaseModel> >(lastObjectReturned, itemSources); return(tuple); }
protected override void addSubItem() { MVOTDocument parent = (MVOTDocument)loadParam.ActualParentView; parent.AddOTDocItem(mv); }