Example #1
0
        public void GetEmployeesList()
        {
            RewardEntities        entity = (RewardEntities)CurrentModuleEntity;
            HREmployeesController objEmployeesController = new HREmployeesController();

            entity.EmployeesList = objEmployeesController.GetAllEmployees();
        }
Example #2
0
        public override void ActionComplete()
        {
            RewardEntities entity = (RewardEntities)CurrentModuleEntity;

            entity.CompleteTransaction();
            InvalidateToolbar();
        }
Example #3
0
 public RewardModule()
 {
     CurrentModuleName          = "Reward";
     CurrentModuleEntity        = new RewardEntities();
     CurrentModuleEntity.Module = this;
     InitializeModule();
     GetEmployeesList();
 }
Example #4
0
        public void UpdateItemDate()
        {
            RewardEntities entity     = (RewardEntities)CurrentModuleEntity;
            HRRewardsInfo  mainObject = (HRRewardsInfo)entity.MainObject;

            entity.EmployeeRewardsList.ForEach(o1 => o1.HREmployeeRewardDate = mainObject.HRRewardFromDate);
            entity.EmployeeRewardsList.GridControl.RefreshDataSource();
        }
Example #5
0
        public override void InitGridControlDataSource()
        {
            RewardEntities entity = (RewardEntities)((BaseModuleERP)Screen.Module).CurrentModuleEntity;
            BindingSource  bds    = new BindingSource();

            bds.DataSource  = entity.EmployeeRewardsList;
            this.DataSource = bds;
        }
Example #6
0
        public void UpdateValue()
        {
            decimal        result      = 0;
            RewardEntities entity      = (RewardEntities)CurrentModuleEntity;
            HRRewardsInfo  mainObject  = (HRRewardsInfo)entity.MainObject;
            decimal        rewardValue = 0;

            decimal.TryParse(mainObject.HRRewardValue, out rewardValue);
            entity.EmployeeRewardsList.ForEach(o1 =>
            {
                o1.HREmployeeRewardValue       = mainObject.HRRewardValue;
                o1.HREmployeeRewardValueAmount = rewardValue;
            });
            entity.EmployeeRewardsList.GridControl.RefreshDataSource();
        }
Example #7
0
        public void AddEmployee()
        {
            RewardEntities entity = (RewardEntities)CurrentModuleEntity;

            List <HREmployeesInfo> employeesList = entity.EmployeesList.Where(o1 => entity.EmployeeRewardsList.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)
                {
                    HREmployeeRewardsInfo objEmployeeRewardsInfo = new HREmployeeRewardsInfo();
                    entity.SetDefaultValuesFromEmployee(objEmployeeRewardsInfo, objEmployeesInfo);
                    entity.EmployeeRewardsList.Add(objEmployeeRewardsInfo);
                }
                entity.EmployeeRewardsList.GridControl.RefreshDataSource();
            }
        }
Example #8
0
        public override void InvalidateToolbar()
        {
            base.InvalidateToolbar();
            RewardEntities entity     = (RewardEntities)CurrentModuleEntity;
            HRRewardsInfo  mainObject = (HRRewardsInfo)entity.MainObject;

            ParentScreen.SetEnableOfToolbarButton(BaseToolbar.ToolbarButtonEdit, true);
            if (mainObject.HRRewardID > 0)
            {
                if (mainObject.HRRewardStatus == RewardStatus.New.ToString())
                {
                    ParentScreen.SetEnableOfToolbarButton(BaseToolbar.ToolbarButtonEdit, true);
                    ParentScreen.SetEnableOfToolbarButton(BaseToolbar.ToolbarButtonComplete, true);
                }
                else
                {
                    ParentScreen.SetEnableOfToolbarButton(BaseToolbar.ToolbarButtonEdit, false);
                    ParentScreen.SetEnableOfToolbarButton(BaseToolbar.ToolbarButtonComplete, false);
                }
            }
        }
Example #9
0
        public void RemoveSelectedItemFromRewardItemList()
        {
            RewardEntities entity = (RewardEntities)CurrentModuleEntity;

            entity.EmployeeRewardsList.RemoveSelectedRowObjectFromList();
        }
Example #10
0
        public override int ActionSave()
        {
            RewardEntities entity = (RewardEntities)CurrentModuleEntity;

            return(base.ActionSave());
        }