Esempio n. 1
0
 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();
 }
Esempio n. 2
0
 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();
 }
Esempio n. 3
0
        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;
        }
Esempio n. 4
0
        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
        }
Esempio n. 5
0
 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();
 }