public ActionResult Search(InteCategoriesViewModels model) { try { var datas = _factory.GetListCategorOfCate(model.ListStoreID, null, null, CurrentUser.ListOrganizationId, CurrentUser.ListStoreID); foreach (var item in datas) { item.ProductTypeName = _productTypeFactory.GetProductTypeName(item.Type); item.ImageURL = string.IsNullOrEmpty(item.ImageURL) ? Commons.Image100_100 : item.ImageURL; item.ListCategoryOnStore = item.ListCategoryOnStore.OrderBy(s => s.StoreName).ToList(); item.StoreName = string.Join(", ", item.ListCategoryOnStore.Select(z => z.StoreName).ToList()); } model.ListItem = datas; } catch (Exception e) { _logger.Error("Categories_Search: " + e); return(new HttpStatusCodeResult(400, e.Message)); } return(PartialView("_ListData", model)); }