コード例 #1
0
 //Расширенный поиск
 public ActionResult exSearch(string id)
 {
     if (id != null)
     {
         var Search = new Search();
         Search.typeId = id;
         var exSearch      = new ExtandedSearchModel();
         var availItems    = new List <checkBoxListModel>();
         var selectedItems = new List <checkBoxListModel>();
         var claims        = applicationDAO.getAllCardClaims().Where(c => c.published == true);
         int count         = 0;
         foreach (var item in claims)
         {
             if (item.ClaimType != "TYPE")
             {
                 availItems.Add(new checkBoxListModel(count, item.ClaimValue, item.ClaimType));
             }
             count++;
         }
         Search.availItems          = availItems;
         Session["itemTypeSession"] = id;
         var cards = applicationDAO.getItemLayouts(id).Where(c => c.published == true);
         foreach (var i in cards)
         {
             Search.Cards.Add(i);
         }
         return(View(Search));
     }
     else
     {
         return(RedirectToAction("ItemTypes"));
     }
 }