public async Task <IActionResult> Get() { try { var query = await _couponService.Get(); return(Ok(await _couponService.Get())); } catch (Exception e) { _loggerManager.LogError($"Ocurrio un error al obtener los cupones: {e}"); throw new ApiException(AppResources.BadRequest, HttpStatusCode.BadRequest); } }
public ActionResult Edit(int id = 0) { CouponDetailDto coupon = new CouponDetailDto(); if (id > 0) { coupon = _couponService.Get(id).ToCouponDetailDto(); if (coupon != null) { } } return(View(coupon)); }
private PromotionInfoResponse IsR(PromotionInfoResponse response, UserModel currentAuthUser, int entityId) { if (response == null || currentAuthUser == null) { return(response); } //是否收藏 var favoriteEntity = _favoriteService.Get(currentAuthUser.Id, entityId, SourceType.Promotion); if (favoriteEntity != null) { response.CurrentUserIsFavorited = true; } //是否获取过优惠码 var list = _couponService.Get(currentAuthUser.Id, entityId, SourceType.Promotion); if (list != null && list.Count > 0) { response.CurrentUserIsReceived = true; } return(response); }
public IHttpActionResult Get() { return(Ok(_service.Get())); }
public List <CouponEntity> Get(CouponSearchEntity SearchCouponEntity) { return(CouponService.Get(EmployeeEntity, SearchCouponEntity)); }
public ActionResult Picture(int id) { return(View(s.Get(id))); }