Пример #1
0
 public static object ReasonNamesForImportPage()
 {
     return(BaseItems
            .Where(r => r.Group != GroupName.Unreadable && r.Group != GroupName.Unidentifiable)
            .Select(r => new
     {
         r.Group,
         r.Description
     }));
 }
Пример #2
0
        public static HtmlString ForHtmlList(string currentState = "", bool showAll = true)
        {
            const string liTemplate = "<span data-state='{0}' class='state Active_{2} {0}'>{1}</span>";
            var          mainList   = BaseItems
                                      .Where(bi => bi.Visible)
                                      .Where(bi => showAll || ShowAsSelected(bi, currentState))
                                      .Select(bi => liTemplate.FilledWith(bi.Value, bi.Text, ShowAsSelected(bi, currentState)))
                                      .JoinedAsString();

            return(mainList.AsRawHtml());
        }