/// <summary> /// PDF Template For Document Detail Page /// </summary> /// <param name="id"></param> /// <returns></returns> // [Route("document/PDFTemplate/{id}")] public ActionResult PDFTemplate(string vID) { string id = vID.ToString(); Guid documentID = Guid.Empty; if (!string.IsNullOrEmpty(id)) { Guid.TryParse(id, out documentID); } if (documentID == null || documentID == Guid.Empty) { return(Redirect("/")); } var model = new DocumentDetailModel(); bool isExists = model.Populate(documentID, urlPathForDoc); if (!isExists) { return(Redirect("/")); } //Populate Share Link string currentURL = Request.Url.ToString(); model.PopulateShare(currentURL); ViewBag.PageTitle = model.RecordLanguage.Name; ViewBag.PageDescription = string.Empty; ViewBag.PageKeywords = string.Empty; return(View("~/Views/Document/PDFFormat.cshtml", model)); }
public ActionResult Index(string id, string urlFriendlyName) { Guid documentID = Guid.Empty; if (!string.IsNullOrEmpty(id)) { Guid.TryParse(id, out documentID); } if (documentID == null || documentID == Guid.Empty) { return(Redirect("/")); } urlPathForDoc = Request.Url.ToString(); try { string d = Request.UrlReferrer.ToString(); } catch { } var model = new DocumentDetailModel(); bool isExists = model.Populate(documentID, urlPathForDoc); if (!isExists) { return(Redirect("/")); } //Populate Share Link string currentURL = Request.Url.ToString(); model.PopulateShare(currentURL); ViewBag.PageTitle = model.RecordLanguage.Name; ViewBag.PageDescription = string.Empty; ViewBag.PageKeywords = string.Empty; return(View("~/Views/Document/Index.cshtml", model)); }