コード例 #1
0
 public string ExportModule(Module Module)
 {
     string content = "";
     HtmlTextInfo htmltext = htmltexts.GetHtmlText(Module.ModuleId);
     if (htmltext != null)
     {
         content = WebUtility.HtmlEncode(htmltext.Content);
     }
     return content;
 }
コード例 #2
0
        public string ExportModule(Module module)
        {
            string content  = "";
            var    htmlText = _htmlText.GetHtmlText(module.ModuleId);

            if (htmlText != null)
            {
                content = WebUtility.HtmlEncode(htmlText.Content);
            }
            return(content);
        }
コード例 #3
0
        public HtmlTextInfo Get(int id)
        {
            HtmlTextInfo HtmlText = null;

            if (EntityId == id)
            {
                HtmlText = htmltext.GetHtmlText(id);
            }
            return(HtmlText);
        }
コード例 #4
0
 public Models.HtmlText Get(int id)
 {
     if (AuthEntityId(EntityNames.Module) == id)
     {
         return(_htmlText.GetHtmlText(id));
     }
     else
     {
         _logger.Log(LogLevel.Error, this, LogFunction.Security, "Unauthorized HtmlText Get Attempt {ModuleId}", id);
         HttpContext.Response.StatusCode = (int)HttpStatusCode.Forbidden;
         return(null);
     }
 }
コード例 #5
0
 public HtmlTextInfo Get(int id)
 {
     try
     {
         HtmlTextInfo HtmlText = null;
         if (_entityId == id)
         {
             HtmlText = _htmlText.GetHtmlText(id);
         }
         return(HtmlText);
     }
     catch (Exception ex)
     {
         _logger.Log(LogLevel.Error, this, LogFunction.Read, ex, "Get Error {Error}", ex.Message);
         throw;
     }
 }
コード例 #6
0
        public List <Models.HtmlText> Get(int id)
        {
            var list = new List <Models.HtmlText>();

            try
            {
                Models.HtmlText htmlText = null;
                if (_authEntityId[EntityNames.Module] == id)
                {
                    htmlText = _htmlText.GetHtmlText(id);
                    list.Add(htmlText);
                }
            }
            catch (Exception ex)
            {
                _logger.Log(LogLevel.Error, this, LogFunction.Read, ex, "Get Error {Error}", ex.Message);
                throw;
            }
            return(list);
        }
コード例 #7
0
        public List <HtmlTextInfo> Get(int id)
        {
            var list = new List <HtmlTextInfo>();

            try
            {
                HtmlTextInfo htmlText = null;
                if (_entityId == id)
                {
                    htmlText = _htmlText.GetHtmlText(id);
                    list.Add(htmlText);
                }
            }
            catch (Exception ex)
            {
                _logger.Log(LogLevel.Error, this, LogFunction.Read, ex, "Get Error {Error}", ex.Message);
                throw;
            }
            return(list);
        }
コード例 #8
0
 public HtmlTextInfo Get(int id)
 {
     return(htmltext.GetHtmlText(id));
 }
コード例 #9
0
 public IEnumerable <HtmlTextInfo> Get()
 {
     return(htmltext.GetHtmlText());
 }