예제 #1
0
        public ActionResult Save(Hall hall)
        {
            if (!ModelState.IsValid)
            {
                return(View("HallAdd", hall));
            }

            var hallId = int.Parse(Request["HallID"]);

            hall.HallID = hallId;

            if (hall.HallID == 0)
            {
                HallDAO.Create(hall);
            }
            else
            {
                HallDAO.Update(hall);
            }

            return(RedirectToAction("HallList"));
        }
예제 #2
0
 public string Create(Hall hall)
 {
     HallDAO.Create(hall);
     return("Hall Created");
 }