public ActionResult PostRegistrationInterview(RegistrationInterviewRegister registrationInterviewRegister)
        {
            Account account = (Account)Session[CommonConstants.USER_SESSION];

            if (account == null || account.RoleId != 3)
            {
                return(RedirectToRoute("login"));
            }
            RegistrationPrice registrationPrice = (RegistrationPrice)Session[CommonConstants.REGISTRATION_PRICE];

            RegistrationInterview registrationInterview = registrationInterviewRepository.CreateRegistrationInterview(registrationInterviewRegister.CandidateName, registrationInterviewRegister.IdentifyCard, account.ManagementUnitId, registrationPrice.Value, account.Id);

            Session.Add(CommonConstants.REGISTED_INTERVIEW, registrationInterview);
            return(RedirectToRoute("inhoadon"));
        }
        public ActionResult Index()
        {
            Account usersession = (Account)Session[CommonConstants.USER_SESSION];

            if (usersession == null || usersession.RoleId != 3)
            {
                Session.RemoveAll();
                return(RedirectToRoute("login", null));
            }

            RegistrationPrice registrationPrice = registrationPriceRepository.GetRegistrationPriceByManagementUnitId(usersession.ManagementUnitId);
            ManagementUnit    managementUnit    = managementUnitRepository.GetManagementById(usersession.ManagementUnitId);

            Session.Add(CommonConstants.REGISTRATION_PRICE, registrationPrice);
            Session.Add(CommonConstants.MANAGEMENTUNIT, managementUnit);
            return(View(registrationPrice));
        }
Example #3
0
        public RegistrationPrice GetRegistrationPriceByManagementUnitId(int?managementUnitId)
        {
            RegistrationPrice registrationPrice = _db.RegistrationPrices.SingleOrDefault(s => s.ManagementUnitId == managementUnitId);

            return(registrationPrice);
        }