public static DataTable GetFeedbacksForUser(Guid userId, int count) { var filter = new FeedbackSearchFilter(); filter.ToUserId = userId; filter.Count = count; return UserRatingDataAdapter.SearchFeedbacks(filter); }
public static Feedback[] GetFeedbacksForUserAsCollection(Guid userId) { var filter = new FeedbackSearchFilter(); filter.ToUserId = userId; filter.Count = int.MaxValue; DataTable dt = UserRatingDataAdapter.SearchFeedbacks(filter); if(dt != null) { return Array.ConvertAll(UserRatingDataAdapter.SearchFeedbacks(filter).Select() , dr => new Feedback().Load<Feedback>(dr)); } else { return new Feedback[] {}; } }
public void TestSearchByToSellerId() { var v = AddOnCancelAcceptedOffer(); var f = new FeedbackSearchFilter(); f.ToBuyerId = v.ToUserId; var feedbacks = UserRatingFacade.SearchFeedbacks(f); Assert.IsTrue(Array.Exists(feedbacks, e => e.ToUserId.Equals(v.ToUserId))); }
public void TestSearchByFeedbackTypes() { var v = AddOnCancelAcceptedOffer(); var f = new FeedbackSearchFilter(); f = new FeedbackSearchFilter(); f.FeedbackTypeCollection.Add(v.FeedbackTypeId); f.FeedbackTypeCollection.Add((int)FeedbackType.Positive); var feedbacks = UserRatingFacade.SearchFeedbacks(f); Assert.IsTrue(Array.Exists(feedbacks, e => f.FeedbackTypeCollection.Contains(e.FeedbackTypeId))); }
public static DataTable SearchFeedbacksAsDataTable(FeedbackSearchFilter filter) { return UserRatingDataAdapter.SearchFeedbacks(filter); }
public static Feedback[] SearchFeedbacks(FeedbackSearchFilter filter) { return Array.ConvertAll(UserRatingDataAdapter.SearchFeedbacks(filter).Select() , dr => new Feedback().Load<Feedback>(dr)); }