public JsonResult AddShow(Show show) { int status = -99; try { if (ModelState.IsValid) { Common.Models.Show newShow = new Common.Models.Show(); newShow.Date = show.Date; newShow.IsFull = show.IsFull; newShow.MovieID = show.MovieId; newShow.ScreenID = show.ScreenId; newShow.ShowID = show.ShowId; newShow.Time = show.Time; status = adminBL.AddShow(newShow); } else { status = -98; } } catch (Exception) { status = -99; throw; } return(Json(status)); }
public bool UpdateShow(Common.Models.Show showCommon) { bool status; try { AdminRepository dalObj = new AdminRepository(); status = dalObj.UpdateShow(showCommon); } catch (Exception) { status = false; } return(status); }
public int AddShow(Common.Models.Show showCommon) { int status; try { AdminRepository dalObj = new AdminRepository(); status = dalObj.AddShow(showCommon); } catch (Exception) { status = -99; } return(status); }