Пример #1
0
        public ActionResult Register(UsersVM user)
        {
            if (ModelState.IsValid)
            {
                userbll.AddUser(user);
            }
            List <qualificationVM> lstQualifications = qualificationbll.getQualifications();
            SelectList             QualificationList = new SelectList(lstQualifications, "qualification_id", "qualification_name");

            ViewBag.QualificationList = QualificationList; return(View());
        }
Пример #2
0
        public ActionResult Register(UsersVM user)
        {
            // if (ModelState.IsValid)
            //  {

            bool isAdded = userbll.AddUser(user);

            if (isAdded)
            {
                Session["user_id"] = user.user_id;

                List <qualificationVM> lstQualifications = qualificationbll.getQualifications();
                SelectList             QualificationList = new SelectList(lstQualifications, "qualification_id", "qualification_name");
                ViewBag.QualificationList = QualificationList;

                return(RedirectToAction("LoginUser", "Home", new { area = "UserArea" }));
            }
            else
            {
                ViewBag.exist = false;
                return(RedirectToAction("Register", "Home", new { area = "UserArea" }));
            }
        }