// GET: Admin/SocialPages/AddCuratedPage/town
        public ActionResult EditCuratedPage(int id)
        {
            SocialPage page = new SocialPage();
            SocialSite site = page.GetPage(id);

            List <SelectListItem> typeList = new List <SelectListItem>();

            typeList.Add(new SelectListItem {
                Value = "Facebook", Text = "Facebook", Selected = (site.PageType == "Facebook")
            });
            typeList.Add(new SelectListItem {
                Value = "InstagramEmbed", Text = "InstagramEmbed", Selected = (site.PageType == "InstagramEmbed")
            });
            typeList.Add(new SelectListItem {
                Value = "InstagramTag", Text = "InstagramTag", Selected = (site.PageType == "InstagramTag")
            });
            typeList.Add(new SelectListItem {
                Value = "InstagramUser", Text = "InstagramUser", Selected = (site.PageType == "InstagramUser")
            });
            typeList.Add(new SelectListItem {
                Value = "PinterestBoard", Text = "PinterestBoard", Selected = (site.PageType == "PinterestBoard")
            });
            typeList.Add(new SelectListItem {
                Value = "PinterestPin", Text = "PinterestPin", Selected = (site.PageType == "PinterestPin")
            });
            ViewBag.PageType = typeList;

            return(View(site));
        }
        // GET: Admin/SocialPages/AddCuratedPage/town
        public ActionResult AddCuratedPage(string id)
        {
            List <SelectListItem> typeList = new List <SelectListItem>();

            typeList.Add(new SelectListItem {
                Value = "Facebook", Text = "Facebook", Selected = false
            });
            typeList.Add(new SelectListItem {
                Value = "InstagramEmbed", Text = "InstagramEmbed", Selected = false
            });
            typeList.Add(new SelectListItem {
                Value = "InstagramTag", Text = "InstagramTag", Selected = false
            });
            typeList.Add(new SelectListItem {
                Value = "InstagramUser", Text = "InstagramUser", Selected = false
            });
            typeList.Add(new SelectListItem {
                Value = "PinterestBoard", Text = "PinterestBoard", Selected = false
            });
            typeList.Add(new SelectListItem {
                Value = "PinterestPin", Text = "PinterestPin", Selected = false
            });
            ViewBag.PageType = typeList;

            SocialSite site = new SocialSite();

            site.Town = id;
            return(View(site));
        }
        public ActionResult EditCuratedPage(int id, SocialSite data)
        {
            SocialPage page = new SocialPage();

            page.EditCuratedPage(data);

            return(Redirect("/admin/socialpages/curatepages/" + data.Town));
        }
        public ActionResult AddCuratedPage(string id, SocialSite data)
        {
            SocialPage page = new SocialPage(id);

            data.Town = id;
            page.AddCuratedPage(data);

            return(Redirect("/admin/socialpages/curatepages/" + id));
        }
예제 #5
0
 public BreweryDb(string key)
 {
     _key         = key;
     Adjunct      = new Adjunct(_client, _baseAddress, _key);
     Brewery      = new Brewery(_client, _baseAddress, _key);
     Yeast        = new Yeast(_client, _baseAddress, _key);
     Style        = new Style(_client, _baseAddress, _key);
     SocialSite   = new SocialSite(_client, _baseAddress, _key);
     Ingredient   = new Ingredient(_client, _baseAddress, _key);
     Hop          = new Hop(_client, _baseAddress, _key);
     BeerCategory = new BeerCategory(_client, _baseAddress, _key);
     Beer         = new Beer(_client, _baseAddress, _key);
     Feature      = new Feature(_client, _baseAddress, _key);
     Fermentable  = new Fermentable(_client, _baseAddress, _key);
 }