Esempio n. 1
0
        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));
        }
Esempio n. 2
0
        public bool UpdateShow(Common.Models.Show showCommon)
        {
            bool status;

            try
            {
                AdminRepository dalObj = new AdminRepository();
                status = dalObj.UpdateShow(showCommon);
            }
            catch (Exception)
            {
                status = false;
            }
            return(status);
        }
Esempio n. 3
0
        public int AddShow(Common.Models.Show showCommon)
        {
            int status;

            try
            {
                AdminRepository dalObj = new AdminRepository();
                status = dalObj.AddShow(showCommon);
            }
            catch (Exception)
            {
                status = -99;
            }
            return(status);
        }