コード例 #1
0
        // GET: My/Contacts
        public ActionResult Index(MemberFilterClass? c)
        {
            List<MemberFilter> ff = DbContext.MemberFilters.OrderBy(x => x.Title).ToList();

            if (c != null)
            {
                ff = ff
                    .Where(x => x.FilterClass == c.Value)
                    .OrderBy(x => x.Title)
                    .ToList();
            }

            return View(ff);
        }
コード例 #2
0
        public ActionResult CreateFilter(MemberFilterClass c)
        {
            MemberFilter f = new MemberFilter()
            {
                FilterClass = c,
                Category = FilterCategories.Contacts,
                AntecedentId = new Guid(CurrentUser.Id),
                FilterId = Guid.NewGuid()
            };

            return View(f);
        }