public ActionResult Index() { try { RSVPProductMappingViewModels model = new RSVPProductMappingViewModels(); return(View(model)); } catch (Exception ex) { _logger.Error("RSVPProductMapping_Index: " + ex); return(new HttpStatusCodeResult(400, ex.Message)); } }
public ActionResult Search(RSVPProductMappingViewModels model) { try { var result = (List <SelectListItem>)ViewBag.ListStore; List <string> ListStoreId = result.Select(x => x.Value).ToList(); model.ListItem = _factoryRSVP.GetList(ListStoreId, CurrentUser.ListOrganizationId); model.ListItem.ForEach(x => { x.StoreName = result == null ? "" : result.Where(z => z.Value.Equals(x.StoreID)).FirstOrDefault().Text; }); } catch (Exception e) { _logger.Error("RSVPProductMapping_Search: " + e); return(new HttpStatusCodeResult(400, e.Message)); } return(PartialView("_ListData", model)); }