Esempio n. 1
0
        public ActionResult Create(EventObj eventobj)
        {
            if (ModelState.IsValid)
            {
                db.Events.Add(eventobj);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(eventobj));
        }
Esempio n. 2
0
        public ActionResult Create([Bind(Include = "EventID,EventType,DateOfEvent,Venue,NoOfGuest")] EventOrder eventOrder)
        {
            if (ModelState.IsValid)
            {
                db.EventOrder.Add(eventOrder);
                db.SaveChanges();
                ViewBag.IsSuccess = "Event Order Successfully";
                return(View());
            }

            return(View(eventOrder));
        }
Esempio n. 3
0
 public ActionResult Signup(Clients model)
 {
     using (var context = new EventPlannerEntities())
     {
         context.Clients.Add(model);
         context.SaveChanges();
     }
     return(RedirectToAction("Login"));
 }