Esempio n. 1
0
        public AllowanceAllowEnum IsAllowanceActive(int AllowanceID)
        {
            AllowanceAllowEnum result    = AllowanceAllowEnum.NotAllowedBecauseOfStoped;
            AllowancesBLL      allowance = GetAllowances().SingleOrDefault(x => x.AllowanceID.Equals(AllowanceID) && x.IsActive);

            if (allowance != null)
            {
                if (allowance.AllowanceID > 0)
                {
                    result = AllowanceAllowEnum.Done;
                }
            }
            return(result);
        }
Esempio n. 2
0
        public ActionResult HiringNewEmployee()
        {
            HiringNewEmployeesViewModel HiringNewEmployeesViewModel = new HiringNewEmployeesViewModel();
            List <AllowancesBLL>        allowances = new HCMBLL.AllowancesBLL().GetAllowances();

            HiringNewEmployeesViewModel.Allowances = new List <AllowancesBLL>();
            foreach (var allowance in allowances)
            {
                if (allowance.AllowanceID == (int)AllowancesEnum.AllowanceForTheNatureOfCadresWork || allowance.AllowanceID == (int)AllowancesEnum.AllowanceForWorkHoursDiffrence)
                {
                    HiringNewEmployeesViewModel.Allowances.Add(allowance);
                }
            }

            return(View(HiringNewEmployeesViewModel));
        }