//
        // GET: /AdminTVSeries/
        public ActionResult Index()
        {
            if (Session["UserID"] != null)
            {
                if (Session["Role"].Equals("member"))
                {
                    return RedirectToAction("Index", "Member");
                }
            }
            else
            {
                return RedirectToAction("Login", "Account");
            }
            AdminTVSeriesDAL dalObj = new AdminTVSeriesDAL();
            List<string> channelList = new List<string>();
            List<string> genreList = new List<string>();

            channelList = dalObj.ChannelList();
            genreList = dalObj.GenreList();

            ViewBag.ChannelList = channelList;
            ViewBag.GenreList = genreList;
            return View();
        }
        //
        // GET: /AdminScheduleTVSeries/
        public ActionResult Index()
        {
            if (Session["UserID"] != null)
            {
                if (Session["Role"].Equals("member"))
                {
                    return RedirectToAction("Index", "Member");
                }
            }
            else
            {
                return RedirectToAction("Login", "Account");
            }

            List<string> list =new List<string>();
            list.Add("Daily");
            list.Add("Weekly");
            list.Add("Fortnighty");

            ViewBag.broadcastList = list;

            AdminTVSeriesDAL dalObj = new AdminTVSeriesDAL();
            AdminScheduleTVSeries dateObj = new AdminScheduleTVSeries();
            //dateObj.StartDate= date.GetDateTimeFormats();
            dateObj.StartDate = DateTime.Today.AddDays(7);//new DateTime(DateTime.Today.Year - 1, DateTime.Today.Month, DateTime.Today.AddDays());
            dateObj.Duration = 35;
            //dateObj.SeasonNumber = null;
            List<string> seriesName = dalObj.SeriesName();
            if (seriesName != null)
                ViewBag.Seriesname = seriesName;

            return View(dateObj);
        }
        public ActionResult Index(string Name, string Channel, string TVSeriesGenre, int NoOfSeasonsOver, string CurrentSeasonState, int SeasonNumber, int NoOfEpisodes, int Cost,int NoOfDVDs)
        {
            if (ModelState.IsValid)
            {
                AdminTVSeriesDAL dalObj = new AdminTVSeriesDAL();
                if (dalObj.AddTVSeries(Name, Channel, TVSeriesGenre, NoOfSeasonsOver, CurrentSeasonState, SeasonNumber, NoOfEpisodes, Cost, NoOfDVDs))
                {
                    ViewBag.Message = "1";
                    //return View();
                    return Json(true,JsonRequestBehavior.AllowGet);
                }
                else
                {
                    ViewBag.Message = "-1";
                    //return View();
                    return Json(false, JsonRequestBehavior.AllowGet);
                }

            }
            return View();
        }
        public ActionResult Index(string SeriesName, int SeasonNumber, DateTime StartDate,DateTime EndDate, string FreqOfBroadcast, int Duration)
        {
            if (ModelState.IsValid)
            {
                AdminTVSeriesDAL dalObj = new AdminTVSeriesDAL();
                if (dalObj.AddScheduleTVSeries(SeriesName, SeasonNumber, StartDate, EndDate, FreqOfBroadcast, Duration))
                {
                    ViewBag.Message = "1";
                    //return View();
                    return Json(true, JsonRequestBehavior.AllowGet);
                }
                else
                {
                    ViewBag.Message = "-1";
                    //return View();
                    return Json(false, JsonRequestBehavior.AllowGet);
                }

            }
            return View();
        }