public async Task <ActionResult> Create([Bind(Include = "Movie_Id,M_ID,Movie_Name,Movie_Description,Movie_Rating")] Movie_Info movie_Info) { if (ModelState.IsValid) { db.Movie_Info.Add(movie_Info); await db.SaveChangesAsync(); return(RedirectToAction("Index")); } return(View(movie_Info)); }
public async Task <ActionResult> Create([Bind(Include = "Employee_Id,E_ID,Employee_Name,Theater_Id,Password,Email,Phone_No,Address")] Employee_Info employee_Info) { if (ModelState.IsValid) { db.Employee_Info.Add(employee_Info); await db.SaveChangesAsync(); return(RedirectToAction("Index")); } ViewBag.Theater_Id = new SelectList(db.Theater_Info, "Theater_Id", "T_ID", employee_Info.Theater_Id); return(View(employee_Info)); }
public async Task <ActionResult> Create([Bind(Include = "Show_Id,S_ID,Theater_Id,Movie_Id,Show_Date,Start_Time,Price,Employee_Id")] Show_Info show_Info) { if (ModelState.IsValid) { db.Show_Info.Add(show_Info); await db.SaveChangesAsync(); return(RedirectToAction("Index")); } ViewBag.Movie_Id = new SelectList(db.Movie_Info, "Movie_Id", "M_ID", show_Info.Movie_Id); ViewBag.Theater_Id = new SelectList(db.Theater_Info, "Theater_Id", "T_ID", show_Info.Theater_Id); ViewBag.Employee_Id = new SelectList(db.Employee_Info, "Employee_Id", "E_ID", show_Info.Employee_Id); return(View(show_Info)); }