Esempio n. 1
0
        public ActionResult SignUp(SignUp user)
        {
            if (ModelState.IsValid)
            {
                var Register = Mapper.Map <SignUp, Account>(user);
                UserBL.AddCustomer(Register);
                return(RedirectToAction("SignIn"));
            }

            //if (ModelState.IsValid)
            //{
            //    Account account = new Account();
            //    account.BloodGroup = user.BloodGroup;
            //    account.Name = user.Name;
            //    account.Sex = user.Sex;
            //    account.MailId = user.MailId;
            //    account.Dob = user.Dob;
            //    account.MobileNumber = user.MobileNumber;
            //    account.Password = user.Password;
            //    account.City = user.City;
            //    account.Role = user.Role;
            //    UserBL.AddCustomer(account);
            //    return RedirectToAction("SignIn");
            //}
            //TempData["message"] = "Register Successful";
            return(View());
        }