public bool DeleteReview(long resourceId, long reviewId) { var dataReview = new DataClassReview(); var bResult = dataReview.DeleteReview(resourceId, reviewId); if (!bResult) { SetResponseStatus(HttpStatusCode.InternalServerError, "Unable to delete review"); } return(bResult); }
public long?AddReview(long resourceId, ApiClassReview review) { var dataReview = new DataClassReview(); var lResult = dataReview.SaveReview(resourceId, review); if (lResult == null) { SetResponseStatus(HttpStatusCode.InternalServerError, "Unable to add review"); } return(lResult); }
public bool UpdateReview(long resourceId, long reviewId, ApiClassReview review) { review.ID = review.ID; var dataReview = new DataClassReview(); var bResult = dataReview.UpdateReview(resourceId, reviewId, review); if (!bResult) { SetResponseStatus(HttpStatusCode.InternalServerError, "Unable to update review"); } return(bResult); }
public List <ApiClassReview> GetReviews(long resourceId) { var reviews = new List <ApiClassReview>(); try { var dataReview = new DataClassReview(); dataReview.LoadReviewList(resourceId, reviews); } catch { reviews.Clear(); } return(reviews); }