示例#1
0
        public async Task <ActionResult> Index()
        {
            var model = new ImprovementsViewModel();

            model.Complaints = await db.GetComplaintsByUser(User.Identity.GetUserId());

            return(View(model));
        }
示例#2
0
        public async Task <PartialViewResult> GetComplaints(ImprovementsViewModel model)
        {
            model.Complaints = await db.GetComplaintsByUser(User.Identity.GetUserId());

            if (model.StatusCheck.Count() > 0)
            {
                model.Complaints = model.Complaints.Where(x => model.StatusCheck.Contains(x.StatusId));
            }

            return(PartialView("_ComplaintsPartial", model));
        }