public ActionResult AddToFeatured(string href, string href_mobile, string name, string image, int plstType, int ContID, string ContType)
 {
     if (Session["Roles"] != null && Session["Roles"].Equals("Admin"))
     {
         hypster_tv_DAL.homeSlideshowManager slideshowManager = new hypster_tv_DAL.homeSlideshowManager();
         hypster_tv_DAL.homeSlideshow        slideshow        = new hypster_tv_DAL.homeSlideshow();
         slideshow = slideshowManager.homeSlideshowByID(ContID);
         hypster_tv_DAL.Image_Resize_Manager image_resizer = new hypster_tv_DAL.Image_Resize_Manager();
         image_resizer.Resize_Image(System.Configuration.ConfigurationManager.AppSettings["homeSlideshowStorage_Path"] + "\\" + image, 800, -1, System.Drawing.Imaging.ImageFormat.Jpeg, System.Configuration.ConfigurationManager.AppSettings["homeSlideshowStorage_Path"] + "\\" + "sm_" + image);
         hypster_tv_DAL.featuredContentManagement fc_manager = new hypster_tv_DAL.featuredContentManagement();
         hypster_tv_DAL.FeaturedContent           fc_add     = new hypster_tv_DAL.FeaturedContent();
         fc_add.fc_active      = true;
         fc_add.fc_href        = href;
         fc_add.fc_href_mobile = href_mobile;
         fc_add.fc_name        = name;
         fc_add.fc_image       = "sm_" + image; // need to resize
         fc_add.fc_type        = plstType;
         fc_manager.hyDB.FeaturedContents.AddObject(fc_add);
         fc_manager.hyDB.SaveChanges();
         return(RedirectPermanent("/WebsiteManagement/manageFeatured"));
     }
     else
     {
         return(RedirectPermanent("/home/"));
     }
 }
 public ActionResult deleteFC(int id)
 {
     if (Session["Roles"] != null && Session["Roles"].Equals("Admin"))
     {
         hypster_tv_DAL.featuredContentManagement fc_manager = new hypster_tv_DAL.featuredContentManagement();
         fc_manager.delete_fc(id);
         return(RedirectPermanent("/WebsiteManagement/manageFeatured"));
     }
     else
     {
         return(RedirectPermanent("/home/"));
     }
 }
        //
        // GET: /WebsiteManagement/manageFeatured/
        public ActionResult Index()
        {
            if (Session["Roles"] != null && Session["Roles"].Equals("Admin"))
            {
                string contType = "";
                if (Request.QueryString["contType"] != null)
                {
                    contType = Request.QueryString["contType"].ToString();
                }
                hypster_tv_DAL.featuredContentManagement fc_manager = new hypster_tv_DAL.featuredContentManagement();
                List <hypster_tv_DAL.FeaturedContent>    model      = new List <hypster_tv_DAL.FeaturedContent>();

                switch (contType)
                {
                case "SP":
                    ViewBag.contType = "Seasonal Playlists";
                    model            = fc_manager.ReturnFeaturedContent((int)hypster_tv_DAL.fc_Type.Seasonal_Playlists);
                    break;

                case "AP":
                    ViewBag.contType = "Artist Playlists";
                    model            = fc_manager.ReturnFeaturedContent((int)hypster_tv_DAL.fc_Type.Artist_Playlists);
                    break;

                case "OT":
                    ViewBag.contType = "Other";
                    model            = fc_manager.ReturnFeaturedContent((int)hypster_tv_DAL.fc_Type.Other);
                    break;

                default:
                    ViewBag.contType = "Seasonal Playlists";
                    model            = fc_manager.ReturnFeaturedContent((int)hypster_tv_DAL.fc_Type.Seasonal_Playlists);
                    break;
                }
                return(View(model));
            }
            else
            {
                return(RedirectPermanent("/home/"));
            }
        }