public ActionResult Contact() { ContentAction objContent = new ContentAction(); Content contactContent = objContent.GetContentByType("Contact"); ViewData["ContactContent"] = contactContent != null ? contactContent.Value1 : "Page is under construction, please visit again"; return View(); }
public ActionResult About() { ContentAction objContent = new ContentAction(); Content aboutContent = objContent.GetContentByType("AboutUs"); ViewData["AboutContent"] = aboutContent != null ? aboutContent.Value1 : "Page is under construction, please visit again"; return View(); }
public ActionResult EditContent(Guid id, string Value1, string Value2) { ContentAction objContent = new ContentAction(); if (!string.IsNullOrEmpty(Value1) && !string.IsNullOrEmpty(Value2)) { if (objContent.ManageFAQs(id, Value1, Value2)) Response.Redirect("/Admin/ManageContent/" + id + "?Grid-mode=update"); else ViewData["Result"] = "Error in Update."; } else { ViewData["Result"] = "Please enter question/answer"; GetContent(); } ViewData["index"] = 0; return View("ManageContent"); }
public ActionResult ManageContent(string aboutText, string newsText, string contactText) { ContentAction objContent = new ContentAction(); bool isCompleted = false; if (!string.IsNullOrEmpty(aboutText)) { isCompleted = objContent.ManageContent("AboutUs", aboutText); ViewData["index"] = 1; } if (!string.IsNullOrEmpty(newsText)) { isCompleted = objContent.ManageContent("News", newsText); ViewData["index"] = 2; } if (!string.IsNullOrEmpty(contactText)) { isCompleted = objContent.ManageContent("Contact", contactText); ViewData["index"] = 3; } GetContent(); return View(); }
public void GetContent() { ContentAction objContent = new ContentAction(); Content mngContent = objContent.GetContentByType("AboutUs"); if (mngContent != null) ViewData["AboutUs"] = mngContent.Value1; mngContent = objContent.GetContentByType("News"); if (mngContent != null) ViewData["News"] = mngContent.Value1; mngContent = objContent.GetContentByType("Contact"); if (mngContent != null) ViewData["Contact"] = mngContent.Value1; IList<Content> mngFAQ = objContent.GetFAQ(); if (mngFAQ != null) ViewData["FAQs"] = mngFAQ; }
public ActionResult FAQ() { ContentAction objContent = new ContentAction(); IList<Content> faqContent = objContent.GetFAQ(); ViewData["FAQContent"] = faqContent; return View(); }
public ActionResult Contact(string Name, string Phone, string Email, string Address, string Company, string Comments) { #region //send automated email - content of email will be decided later // Creating array list for token ArrayList arrTokens = new ArrayList(); arrTokens.Add(Name); if (!string.IsNullOrEmpty(Phone)) arrTokens.Add(Phone); else arrTokens.Add("Not Applicable"); arrTokens.Add(Email); arrTokens.Add(Address); if (!string.IsNullOrEmpty(Company)) arrTokens.Add(Company); else arrTokens.Add("Not Applicable"); arrTokens.Add(Comments); // Filling mail object SendMail objSendMail = new SendMail(); objSendMail.ToEmailId = System.Configuration.ConfigurationManager.AppSettings["AdminMail"].ToString(); objSendMail.Subject = "email.contactUs.subject.content"; objSendMail.MsgBody = "email.contactUs.body.content"; objSendMail.ChangesInMessage = arrTokens; objSendMail.SendEmail(objSendMail); ViewData["ContactInfo"] = "Thank you for sharing your contact information"; ContentAction objContent = new ContentAction(); Content contactContent = objContent.GetContentByType("Contact"); ViewData["ContactContent"] = contactContent != null ? contactContent.Value1 : "Page is under construction, please visit again"; return View(); #endregion }
public ActionResult News() { ContentAction objContent = new ContentAction(); Content newsContent = objContent.GetContentByType("News"); ViewData["NewsContent"] = newsContent != null ? newsContent.Value1 : "Page is under construction, please visit again"; return View(); }