Ejemplo n.º 1
0
 public static void validateRewardPoint(EditReward editReward)
 {
     if (editReward.DriverId == 0)
     {
         throw new DataValidationException($"DriverId does not exists");
     }
     if (editReward.RewardPoint == 0)
     {
         throw new DataValidationException($"RewardPoint does not exists");
     }
 }
Ejemplo n.º 2
0
 public IActionResult EditRewardPoint(EditReward editReward)
 {
     try
     {
         Validator.validateRewardPoint(editReward);
         DADriver dADriver = new DADriver();
         return(this.OKResponse(dADriver.EditRewardPoint(_context, editReward, User.ToAppUser()) == true ? "Updated Successfully" : "Updation Failed"));
     }
     catch (DataValidationException ex)
     {
         return(this.KnowOperationError(ex.Message));
     }
 }