public static int AddRating(FeedbackAndRating oFeedbackAndRating)
 {
     var oFeedback = new TMSDataLibrary.FeedbackAndRating();
     int result = oFeedback.AddRating(oFeedbackAndRating.Rating, oFeedbackAndRating.TransporterId,
                                         oFeedbackAndRating.BookingId);
     return result;
 }
 public static FeedbackAndRating GetRating(int transporterId)
 {
     var ofeedbackAndRating = new FeedbackAndRating();
     var oFeedback = new TMSDataLibrary.FeedbackAndRating();
     var dt = oFeedback.GetRating(transporterId);
     if (dt != null)
     {
         if (Convert.ToInt32(dt.Rows[0]["NumberOfUsers"]) > 0)
         {
             ofeedbackAndRating.TotalRating = Convert.ToDecimal(dt.Rows[0][Consts.FeedbackSelectColumnIndex.TotalRating]);
             ofeedbackAndRating.Raters = Convert.ToInt32(dt.Rows[0][Consts.FeedbackSelectColumnIndex.NumberOfUsers]);
         }
     }
     return ofeedbackAndRating;
 }
Beispiel #3
0
 private int InsertFeedback()
 {
     var oFeedback = new FeedbackAndRating();
     oFeedback.BookingId = _oBooking.BookingId;
     oFeedback.FeedbackText = txtFeedback.Text;
     return FeedbackAndRatingMethods.AddFeedback(oFeedback);
 }
 /// <summary>
 /// Adds feedback of the Booking And marks its status as completed.
 /// </summary>
 /// <param name="oFeedbackAndRating"></param>
 /// <returns></returns>
 public static int AddFeedback(FeedbackAndRating oFeedbackAndRating)
 {
     var odlFeedback = new TMSDataLibrary.FeedbackAndRating();
     return odlFeedback.AddFeedback(oFeedbackAndRating.BookingId, oFeedbackAndRating.FeedbackText);
 }