Exemple #1
0
        public ActionResult Hilfe(string actionName, string controllerName, string areaName)
        {
            string cultureCode = Thread.CurrentThread.CurrentUICulture.TwoLetterISOLanguageName;

            var languageIndependentHelpFilePath = HelpFileMappingStore.GetHelpFilePath(GetHelpFileKey(actionName, controllerName, areaName), cultureCode);

            string helpFilePath = null;

            if (!string.IsNullOrEmpty(languageIndependentHelpFilePath))
            {
                helpFilePath = string.Format("~/Help/{0}/{1}", cultureCode, languageIndependentHelpFilePath);
            }

            if (helpFilePath == null)
            {
                helpFilePath = GetHelpFilePath(cultureCode, actionName, controllerName, areaName);
            }

            if (!System.IO.File.Exists(Server.MapPath(helpFilePath)))
            {
                helpFilePath = string.Format("~/Help/{0}/{1}", cultureCode, HelpFileMappingStore.GetContentsPath(cultureCode));
            }

            ViewBag.HelpUrl = new UrlHelper(ControllerContext.RequestContext).Content(helpFilePath);
            return(View());
        }
Exemple #2
0
        public ActionResult UploadMasterHelpSystem(IEnumerable <HttpPostedFileBase> uploadMasterHelpSystemFiles)
        {
            var httpPostedFileBase = uploadMasterHelpSystemFiles.First();

            sessionService.LastUploadErrorList = helpSystemService.UploadMasterHelpSystem(httpPostedFileBase.InputStream);
            HelpFileMappingStore.RefreshMappingDictionary();
            hilfeSucheService.ReloadHelp();
            return(Content(""));
        }