예제 #1
0
        public ActionResult Registration(Guest register)
        {
            int count = 0;

            if (ModelState.IsValid)
            {
                count = dao.AddGuest(register);
                if (count > 0)
                {
                    TempData["success"] = "Registration Successful. Please Login.";
                    return(RedirectToAction("Login", "Guest"));
                }
                else
                {
                    ViewBag.Message = "Error " + dao.message;
                }
                ModelState.Clear();
                return(View());
            }
            else
            {
                return(View(register));
            }
        }