예제 #1
0
        public ActionResult Index()
        {
            ContactUsModel model = new ContactUsModel();

            //Check if document ID exists or not In Query string
            if (Request.QueryString["document"] != null)
            {
                Guid documentID = Guid.Empty;
                Guid.TryParse(Request.QueryString["document"].ToString(), out documentID);
                if (documentID != null && documentID != Guid.Empty)
                {
                    model.PopulateDocument(documentID, TSMContext.CurrentLanguageID);
                }
            }

            //Populate Model
            model.Populate(TSMContext.CurrentPage, TSMContext.CurrentLanguageID);
            ViewBag.PageTitle       = model.Page_Language.PageTitle;
            ViewBag.PageDescription = model.Page_Language.PageMetadata;
            ViewBag.PageKeywords    = model.Page_Language.PageKeywords;
            ViewBag.SendMail        = false;
            ViewBag.ShowForm        = true;
            return(View("~/Views/ContactUs/ContactUs.cshtml", model));
        }