public void UpdateItemDate() { DisciplineEntities entity = (DisciplineEntities)CurrentModuleEntity; HRDisciplinesInfo mainObject = (HRDisciplinesInfo)entity.MainObject; entity.EmployeeDisciplinesList.ForEach(o1 => o1.HREmployeeDisciplineDate = mainObject.HRDisciplineFromDate); entity.EmployeeDisciplinesList.GridControl.RefreshDataSource(); }
public override void SetDefaultMainObject() { base.SetDefaultMainObject(); HRDisciplinesInfo objDisciplinesInfo = (HRDisciplinesInfo)MainObject; objDisciplinesInfo.FK_HREmployeeRequest = VinaApp.CurrentUserInfo.FK_HREmployeeID; objDisciplinesInfo.HRDisciplineStatus = DisciplineStatus.New.ToString(); }
public void SetDefaultValuesFromEmployee(HREmployeeDisciplinesInfo objEmployeeDisciplinesInfo, HREmployeesInfo objEmployeesInfo) { HRDisciplinesInfo objDisciplinesInfo = (HRDisciplinesInfo)MainObject; objEmployeeDisciplinesInfo.FK_HREmployeeID = objEmployeesInfo.HREmployeeID; objEmployeeDisciplinesInfo.HREmployeeDisciplineValue = objDisciplinesInfo.HRDisciplineValue; objEmployeeDisciplinesInfo.HREmployeeNo = objEmployeesInfo.HREmployeeNo; objEmployeeDisciplinesInfo.HREmployeeCardNumber = objEmployeesInfo.HREmployeeCardNumber; objEmployeeDisciplinesInfo.HREmployeeDisciplineDate = objDisciplinesInfo.HRDisciplineFromDate; }
public void CompleteTransaction() { HRDisciplinesInfo objDisciplinesInfo = (HRDisciplinesInfo)MainObject; HRDisciplinesController objDisciplinesController = new HRDisciplinesController(); HRDisciplinesInfo objReferrenceDisciplinesInfo = (HRDisciplinesInfo)objDisciplinesController.GetObjectByID(objDisciplinesInfo.HRDisciplineID); if (objReferrenceDisciplinesInfo != null) { objReferrenceDisciplinesInfo.HRDisciplineStatus = DisciplineStatus.Approved.ToString(); objDisciplinesController.UpdateObject(objReferrenceDisciplinesInfo); objDisciplinesInfo.HRDisciplineStatus = DisciplineStatus.Approved.ToString(); UpdateMainObjectBindingSource(); } }
public void UpdateValue() { decimal result = 0; DisciplineEntities entity = (DisciplineEntities)CurrentModuleEntity; HRDisciplinesInfo mainObject = (HRDisciplinesInfo)entity.MainObject; decimal DisciplineValue = 0; decimal.TryParse(mainObject.HRDisciplineValue, out DisciplineValue); entity.EmployeeDisciplinesList.ForEach(o1 => { o1.HREmployeeDisciplineValue = mainObject.HRDisciplineValue; o1.HREmployeeDisciplineValueAmount = DisciplineValue; }); entity.EmployeeDisciplinesList.GridControl.RefreshDataSource(); }
public override void InvalidateToolbar() { base.InvalidateToolbar(); DisciplineEntities entity = (DisciplineEntities)CurrentModuleEntity; HRDisciplinesInfo mainObject = (HRDisciplinesInfo)entity.MainObject; ParentScreen.SetEnableOfToolbarButton(BaseToolbar.ToolbarButtonEdit, true); if (mainObject.HRDisciplineID > 0) { if (mainObject.HRDisciplineStatus == DisciplineStatus.New.ToString()) { ParentScreen.SetEnableOfToolbarButton(BaseToolbar.ToolbarButtonEdit, true); ParentScreen.SetEnableOfToolbarButton(BaseToolbar.ToolbarButtonComplete, true); } else { ParentScreen.SetEnableOfToolbarButton(BaseToolbar.ToolbarButtonEdit, false); ParentScreen.SetEnableOfToolbarButton(BaseToolbar.ToolbarButtonComplete, false); } } }
public override void InitMainObject() { MainObject = new HRDisciplinesInfo(); SearchObject = new HRDisciplinesInfo(); }