public ActionResult Index() { try { PromotionViewModels model = new PromotionViewModels(); model.StoreID = CurrentUser.StoreId; return(View(model)); } catch (Exception ex) { _logger.Error("Promotion_Index: " + ex); return(new HttpStatusCodeResult(400, ex.Message)); } }
public ActionResult Search(PromotionViewModels model) { try { var data = _factory.GetListPromotion(model.StoreID, CurrentUser.ListOrganizationId); foreach (var item in data) { item.ImageURL = string.IsNullOrEmpty(item.ImageURL) ? Commons.Image100_100 : item.ImageURL; } model.ListItem = data; } catch (Exception e) { _logger.Error("Promotion_Search: " + e); return(new HttpStatusCodeResult(400, e.Message)); } return(PartialView("_ListData", model)); }