Exemplo n.º 1
0
 /// <summary>
 /// 使用积分
 /// </summary>
 /// <param name="vipId"></param>
 /// <returns></returns>
 public bool UsePoint(Vip vip, int score)
 {
     if (vip != null)
     {
         return(_pointRepository.UpdatePoint(vip.VipId, score, "兑换优惠券"));
     }
     return(false);
 }
Exemplo n.º 2
0
 public Point UpdatePoint(Point point)
 {
     try
     {
         var pointUpdated = _PointRepo.UpdatePoint(point);
         return(pointUpdated);
     }
     catch (ArgumentOutOfRangeException e)
     {
         //catches error from DataAccessLayer and wraps it with a more specific error
         throw new InvalidPointException("Longitude/Latitude value invalid.", e);
     }
 }