public ActionResult DisplayHelp() { InstanceInfo instanceinfo = db.InstanceInfoes.Find(1); string url = instanceinfo.URL; HelpModules helpmodule = new HelpModules(); string urlref = Request.UrlReferrer.ToString(); if (urlref.Contains("/") == true) { string cont = urlref.Substring(urlref.LastIndexOf("/") + 1); if (Common.IsNumeric(cont) == true) { urlref = urlref.Substring(url.Length + 1); urlref = urlref.Substring(0, urlref.Length - cont.ToString().Length - 1); } else { urlref = urlref.Substring(url.Length + 1); } var objhelpcontent = db.HelpContents.Where(hc => hc.ModuleSectionURL == urlref).FirstOrDefault(); if (objhelpcontent != null) { helpmodule.ModuleTitle = objhelpcontent.ModuleTitle; helpmodule.ModuleContent = objhelpcontent.ModuleContent; } else { helpmodule.ModuleTitle = "No Help"; helpmodule.ModuleContent = "Help Not exists for this module"; } } else { helpmodule.ModuleTitle = "No Help"; helpmodule.ModuleContent = "Help Not exists for this module"; } return(PartialView("_Help", helpmodule)); }
internal static Uri GetPageUri(HelpModules modules, string docFileName) { var path = Path.Combine(PagesDir, modules.ToString(), $"{docFileName}.html"); return(new Uri(path)); }