// // GET: /Contact/ public ActionResult Index(string page = "contact", string defaultvalue = "") { CurtDevDataContext db = new CurtDevDataContext(); List<string> errors = (List<string>)TempData["errors"]; ViewBag.first_name = ((string)TempData["first_name"] != null) ? (string)TempData["first_name"] : ""; ViewBag.last_name = ((string)TempData["last_name"] != null) ? (string)TempData["last_name"] : ""; ViewBag.email = ((string)TempData["email"] != null) ? (string)TempData["email"] : ""; ViewBag.type = ((string)TempData["type"] != null) ? (string)TempData["type"] : ""; ViewBag.phone = ((string)TempData["phone"] != null) ? (string)TempData["phone"] : ""; ViewBag.address1 = ((string)TempData["address1"] != null) ? (string)TempData["address1"] : ""; ViewBag.address2 = ((string)TempData["address2"] != null) ? (string)TempData["address2"] : ""; ViewBag.city = ((string)TempData["city"] != null) ? (string)TempData["city"] : ""; ViewBag.state = (TempData["state"] != null) ? (int)TempData["state"] : 0; ViewBag.postalcode = ((string)TempData["postalcode"] != null) ? (string)TempData["postalcode"] : ""; ViewBag.subject = ((string)TempData["subject"] != null) ? (string)TempData["subject"] : ""; ViewBag.contactmessage = ((string)TempData["contactmessage"] != null) ? (string)TempData["contactmessage"] : ""; ViewBag.errors = (errors == null) ? new List<string>() : errors; try { ContentPage content = new SiteContentModel().Get(page); ViewBag.content = content; } catch { ViewBag.content = null; } List<FullCountry> countries = DealerModel.GetCountries(); ViewBag.countries = countries; List<ContactType> types = db.ContactTypes.OrderBy(x => x.name).ToList<ContactType>(); ViewBag.types = types; if(ViewBag.type == "") ViewBag.type = defaultvalue; return View(); }
// // GET: /Content/ //[OutputCache(CacheProfile="5mins")] public ActionResult Index(string name = "", int menuid = 0) { bool authenticated = false; if (AuthenticateModel.checkAuth(Request.Cookies.Get("customerID"))) { authenticated = true; } ContentPage content = new SiteContentModel().Get(name, menuid, authenticated); if (content.contentID > 0 && content.published) { ViewBag.content = content; if (content.requireAuthentication && !authenticated) { string message = "Authentication is required to view that content. Please login using the form below."; return RedirectToAction("Login", "Dealer", new { message = message }); } return View(); } else { return RedirectToAction("Index","_404"); } }
// // GET: /Index/ public ActionResult Index() { ContentPage content = new ContentPage(); content = new SiteContentModel().GetPrimary(); ViewBag.content = content; List<NewsItem> news = new List<NewsItem>(); news = NewsModel.GetLatest(); ViewBag.news = news; List<Testimonial> testimonials = new List<Testimonial>(); testimonials = TestimonialModel.GetRandomFive(); ViewBag.testimonials = testimonials; /*List<APIPart> parts = new List<APIPart>(); parts = Hitch_API.getLatestParts(); ViewBag.parts = parts;*/ return View(); }
// // GET: /FAQ/ public ActionResult Index() { List<menuWithContent> sitemap = new MenuModel().GetSitemap(); ViewBag.sitemap = sitemap; List<ContentPage> contents = new SiteContentModel().GetSitemap(); ViewBag.contents = contents; List<NewsItem> news = NewsModel.GetAll(); ViewBag.news = news; List<PostWithCategories> posts = PostModel.GetSitemap(); ViewBag.posts = posts; List<curtmfg.Models.Category> categories = curtmfg.Models.Category.GetAllCategories(); ViewBag.categories = UDF.generateCategorySitemap(categories); List<curtmfg.Models.Category> lifestyles = Hitch_API.GetLifestyles(); ViewBag.lifestyles = lifestyles; return View(); }
public ActionResult page(string name = "") { if (!AuthenticateModel.checkAuth(Request.Cookies.Get("customerID"))) { string message = "You are not logged in!"; return RedirectToAction("Login", new { message = message }); } ContentPage content = new SiteContentModel().Get(name); ViewBag.content = content; menuWithContent dealermenu = new MenuModel().Get("dealerarea"); ViewBag.dealermenu = dealermenu; return View("index"); }