コード例 #1
0
        public void GetEmployeesList()
        {
            AllowanceEntities     entity = (AllowanceEntities)CurrentModuleEntity;
            HREmployeesController objEmployeesController = new HREmployeesController();

            entity.EmployeesList = objEmployeesController.GetAllEmployees();
        }
コード例 #2
0
        public override void ActionComplete()
        {
            AllowanceEntities entity = (AllowanceEntities)CurrentModuleEntity;

            entity.CompleteTransaction();
            InvalidateToolbar();
        }
コード例 #3
0
        public override void InitGridControlDataSource()
        {
            AllowanceEntities entity = (AllowanceEntities)((BaseModuleERP)Screen.Module).CurrentModuleEntity;
            BindingSource     bds    = new BindingSource();

            bds.DataSource  = entity.EmployeeAllowancesList;
            this.DataSource = bds;
        }
コード例 #4
0
 public AllowanceModule()
 {
     CurrentModuleName          = "Allowance";
     CurrentModuleEntity        = new AllowanceEntities();
     CurrentModuleEntity.Module = this;
     InitializeModule();
     GetEmployeesList();
 }
コード例 #5
0
        public void UpdateItemDate()
        {
            AllowanceEntities entity     = (AllowanceEntities)CurrentModuleEntity;
            HRAllowancesInfo  mainObject = (HRAllowancesInfo)entity.MainObject;

            entity.EmployeeAllowancesList.ForEach(o1 => o1.HREmployeeAllowanceDate = mainObject.HRAllowanceFromDate);
            entity.EmployeeAllowancesList.GridControl.RefreshDataSource();
        }
コード例 #6
0
        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();
        }
コード例 #7
0
        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();
            }
        }
コード例 #8
0
        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);
                //}
            }
        }
コード例 #9
0
        public void RemoveSelectedItemFromAllowanceItemList()
        {
            AllowanceEntities entity = (AllowanceEntities)CurrentModuleEntity;

            entity.EmployeeAllowancesList.RemoveSelectedRowObjectFromList();
        }
コード例 #10
0
        public override int ActionSave()
        {
            AllowanceEntities entity = (AllowanceEntities)CurrentModuleEntity;

            return(base.ActionSave());
        }