public virtual ActionResult GetAllMarketImages([DataSourceRequest] DataSourceRequest request, int?market, string marketplaceId, string keywords, bool onlyIgnored) { LogI("GetAllMarketImages, market=" + market + ", marketplaceId=" + marketplaceId + ", keywords=" + keywords + ", onlyIgnored=" + onlyIgnored); request.Sorts = BuildFrom(this.Request.Params); var items = MarketImageViewModel.GetAll(Db, (MarketType)(market ?? (int)MarketType.Walmart), marketplaceId, keywords, onlyIgnored); var dataSource = items.ToDataSourceResult(request); return(new JsonResult { Data = dataSource, JsonRequestBehavior = JsonRequestBehavior.AllowGet }); }
public virtual ActionResult ReplaceStyleImage(long id) { LogI("ReplaceStyleImage, itemImageId=" + id); var result = MarketImageViewModel.ReplaceStyleImage(Db, LogService, id, Time.GetAppNowTime(), AccessManager.UserId); if (result.IsSuccess) { return(JsonGet(ValueResult <string> .Success(result.Data))); } return(JsonGet(ValueResult <string> .Error(result.Message))); }
public virtual ActionResult ToggleIgnoreItemImage(long id, bool isIgnored) { MarketImageViewModel.ToggleIgnoreItemImage(Db, LogService, id, isIgnored); return(JsonGet(MessageResult.Success())); }
public virtual ActionResult ResetItemImageDiff(long id) { MarketImageViewModel.ResetItemImageDiff(Db, LogService, id); return(JsonGet(MessageResult.Success())); }
public virtual ActionResult ResetItemLargeIncludeParentImage(long id) { MarketImageViewModel.ResetItemLargeImage(Db, LogService, id, true); return(JsonGet(MessageResult.Success())); }