public JsonResult JsonDelete(Guid id) { try { RemoveFromQueue(id); var request = new GetPropertiesRequest(); var queue = _cookieStorageService.Retrieve<QueueViewModel>("ws"); request.Ids = queue.QueuedItems.Where(x => x.Id != id).Select(x => x.Id); GetPropertiesResponse<MultipleFamilyViewModel> response = _multipleFamilyService.GetProperties(request); if (!response.Success) { TempData["message"] = response.Message; return Json(TempData["message"]); } QueueResultViewModel viewModel = GetQueueResultViewFrom(response); return Json(viewModel); } catch { return Json(null); } }
// // GET: /Queue/ public ActionResult Index() { var request = new GetPropertiesRequest(); var queue = _cookieStorageService.Retrieve<QueueViewModel>("ws"); if (queue != null) { request.Ids = queue.QueuedItems.Select(x => x.Id); } GetPropertiesResponse<MultipleFamilyViewModel> response = _multipleFamilyService.GetProperties(request); if (!response.Success) { TempData["message"] = response.Message; return View(); } QueueResultViewModel viewModel = GetQueueResultViewFrom(response); return View(viewModel); }