Esempio n. 1
0
 public ActionResult Search(string cardList)
 {
     if (ModelState.IsValid)
     {
         TriskaidekaphobiaLib.Models.MTGCardList MTGlist = mtgService.GetAllMagicCards();
         return(RedirectToAction("SearchResult", MTGlist));
     }
     else
     {
         return(View());
     }
 }
Esempio n. 2
0
        public ActionResult SearchResult(string q)
        {
            TriskaidekaphobiaLib.Models.MTGCardList MTGlist = new TriskaidekaphobiaLib.Models.MTGCardList();
            if (!String.IsNullOrEmpty(q))
            {
                MTGlist = mtgService.GetAllMagicCardsByTerm(q);
            }
            else
            {
                MTGlist = mtgService.GetAllMagicCards();
            }

            return(View(MTGlist));
        }
Esempio n. 3
0
 public ActionResult SearchResult(string Name = "", string SetCode = "", string LessGreaterEqual = null, int?CMC = null, string FlavorText = null, string Power = null, string Toughness = null, string Rarity = "", string Layout = "", string Type = "", string Subtype = "", string Text = null, string Color = "", string ColorIdentity = "", string Artist = "")
 {
     TriskaidekaphobiaLib.Models.MTGCardList cardList = new TriskaidekaphobiaLib.Models.MTGCardList();
     cardList = mtgService.AdvancedSearch(Name, SetCode, LessGreaterEqual, CMC, FlavorText, Power, Toughness, Rarity, Layout, Type, Subtype, Text, Color, ColorIdentity, Artist);
     return(View(cardList));
 }