Пример #1
0
        // GET: Stats
        public ActionResult Index(List <string> filterlist)
        {
            MonsterRepo repo = new MonsterRepo(new MonsterSQLContext());

            if (filterlist == null)
            {
                filterlist = new List <string>();
                for (int i = 0; i < 7; i++)
                {
                    filterlist.Add("");
                }
            }

            List <string>         statList        = repo.MonsterFilter(filterlist);
            List <List <string> > statsfilterList = repo.getfilterlist(filterlist);

            statsfilterList[0].Insert(0, "");
            Session["filterresult"] = statList;
            for (int i = 1; i < 6; i++)
            {
                List <int> intlist = statsfilterList[i].Select(int.Parse).ToList();
                intlist.Sort();
                statsfilterList[i] = intlist.ConvertAll <string>(k => k.ToString());
                statsfilterList[i].Insert(0, "");
            }
            Session["newfilters"] = statsfilterList;
            return(View());
        }
Пример #2
0
        public string applyFilter(string filterstring)
        {
            MonsterRepo   repo       = new MonsterRepo(new MonsterSQLContext());
            List <string> filterlist = filterstring.Split(',').ToList();
            List <string> statList   = repo.MonsterFilter(filterlist);
            string        obj        = System.Web.Helpers.Json.Encode(statList);

            return(obj);
        }