예제 #1
0
        public ExecuteResult <PromotionInfoResponse> DestroyPromotion(DestroyPromotionRequest request)
        {
            if (request == null)
            {
                return(new ExecuteResult <PromotionInfoResponse>(null)
                {
                    StatusCode = StatusCode.ClientError, Message = "参数错误"
                });
            }

            var entity = _promotionRepository.GetItem(request.PromotionId);

            if (entity == null)
            {
                return(new ExecuteResult <PromotionInfoResponse>(null)
                {
                    StatusCode = StatusCode.ClientError, Message = "参数错误,没有找到指定promotion"
                });
            }

            entity.UpdatedDate = DateTime.Now;
            entity.UpdatedUser = request.AuthUid;
            entity.Status      = (int)DataStatus.Deleted;

            _promotionRepository.Delete(entity);

            return(new ExecuteResult <PromotionInfoResponse>(MappingManager.PromotionResponseMapping(entity)));
        }
예제 #2
0
 public JsonResult Delete(PromotionModel.PromotionSaveModel model)
 {
     _promotionRepository.Delete(o => o.id_ == model.id_);
     _promotionRepository.ClearBannerCache();
     _unitOfWork.Commit();
     return(Json(new {}, JsonRequestBehavior.AllowGet));
 }
 public Promotion Delete(Promotion promotion)
 {
     return(_promotionRepository.Delete(promotion));
 }
예제 #4
0
 public void Delete(int id)
 {
     _promotionRepository.Delete(id);
 }
예제 #5
0
 public bool Delete(int id)
 {
     return(_repo.Delete(id));
 }
예제 #6
0
 public Promotion Delete(Promotion entity)
 {
     return(_promotion.Delete(entity));
 }
예제 #7
0
 public bool Delete(int id)
 {
     return(_promotionRepository.Delete(id));
 }
예제 #8
0
 public async Task <ActionsResult> Delete(int id)
 {
     return(await promotionRepository.Delete(id));
 }
예제 #9
0
 public ResultMessage <Promotion> Delete(int id)
 {
     return(_promotionRepository.Delete(id));
 }