public void GetEmployeesList() { AllowanceEntities entity = (AllowanceEntities)CurrentModuleEntity; HREmployeesController objEmployeesController = new HREmployeesController(); entity.EmployeesList = objEmployeesController.GetAllEmployees(); }
public override void ActionComplete() { AllowanceEntities entity = (AllowanceEntities)CurrentModuleEntity; entity.CompleteTransaction(); InvalidateToolbar(); }
public override void InitGridControlDataSource() { AllowanceEntities entity = (AllowanceEntities)((BaseModuleERP)Screen.Module).CurrentModuleEntity; BindingSource bds = new BindingSource(); bds.DataSource = entity.EmployeeAllowancesList; this.DataSource = bds; }
public AllowanceModule() { CurrentModuleName = "Allowance"; CurrentModuleEntity = new AllowanceEntities(); CurrentModuleEntity.Module = this; InitializeModule(); GetEmployeesList(); }
public void UpdateItemDate() { AllowanceEntities entity = (AllowanceEntities)CurrentModuleEntity; HRAllowancesInfo mainObject = (HRAllowancesInfo)entity.MainObject; entity.EmployeeAllowancesList.ForEach(o1 => o1.HREmployeeAllowanceDate = mainObject.HRAllowanceFromDate); entity.EmployeeAllowancesList.GridControl.RefreshDataSource(); }
public void UpdateValue() { decimal result = 0; AllowanceEntities entity = (AllowanceEntities)CurrentModuleEntity; HRAllowancesInfo mainObject = (HRAllowancesInfo)entity.MainObject; decimal AllowanceValue = 0; decimal.TryParse(mainObject.HRAllowanceValue, out AllowanceValue); entity.EmployeeAllowancesList.ForEach(o1 => { o1.HREmployeeAllowanceValueAmount = mainObject.HRAllowanceConfigValue; }); entity.EmployeeAllowancesList.GridControl.RefreshDataSource(); }
public void AddEmployee() { AllowanceEntities entity = (AllowanceEntities)CurrentModuleEntity; List <HREmployeesInfo> employeesList = entity.EmployeesList.Where(o1 => entity.EmployeeAllowancesList.FirstOrDefault(o2 => o2.FK_HREmployeeID == o1.HREmployeeID) == null).ToList(); guiSearchEmployee guiSearchEmployee = new guiSearchEmployee(employeesList); guiSearchEmployee.Module = this; if (guiSearchEmployee.ShowDialog() == DialogResult.OK) { List <HREmployeesInfo> result = (List <HREmployeesInfo>)guiSearchEmployee.SelectedObjects; foreach (HREmployeesInfo objEmployeesInfo in result) { HREmployeeAllowancesInfo objEmployeeAllowancesInfo = new HREmployeeAllowancesInfo(); entity.SetDefaultValuesFromEmployee(objEmployeeAllowancesInfo, objEmployeesInfo); entity.EmployeeAllowancesList.Add(objEmployeeAllowancesInfo); } entity.EmployeeAllowancesList.GridControl.RefreshDataSource(); } }
public override void InvalidateToolbar() { base.InvalidateToolbar(); AllowanceEntities entity = (AllowanceEntities)CurrentModuleEntity; HRAllowancesInfo mainObject = (HRAllowancesInfo)entity.MainObject; ParentScreen.SetEnableOfToolbarButton(BaseToolbar.ToolbarButtonEdit, true); if (mainObject.HRAllowanceID > 0) { //if(mainObject.HRAllowanceStatus == AllowanceStatus.New.ToString()) //{ // ParentScreen.SetEnableOfToolbarButton(BaseToolbar.ToolbarButtonEdit, true); // ParentScreen.SetEnableOfToolbarButton(BaseToolbar.ToolbarButtonComplete, true); //} //else //{ // ParentScreen.SetEnableOfToolbarButton(BaseToolbar.ToolbarButtonEdit, false); // ParentScreen.SetEnableOfToolbarButton(BaseToolbar.ToolbarButtonComplete, false); //} } }
public void RemoveSelectedItemFromAllowanceItemList() { AllowanceEntities entity = (AllowanceEntities)CurrentModuleEntity; entity.EmployeeAllowancesList.RemoveSelectedRowObjectFromList(); }
public override int ActionSave() { AllowanceEntities entity = (AllowanceEntities)CurrentModuleEntity; return(base.ActionSave()); }