Пример #1
0
 private static Feedback CreateInternal(Guid from, Guid to, FeedbackType type, string note, int sellingHistoryId)
 {
     Feedback v = new Feedback();
     v.FromUserId = from;
     v.ToUserId = to;
     v.FeedbackType = type;
     v.Comment = note;
     v.SellingHistoryId = sellingHistoryId;
     return v;
 }
Пример #2
0
 public string AddFeedback(Feedback feedback)
 {
     string result = string.Empty;
     if (null != feedback)
     {
         try
         {
             feedback.FromUserId = Credentials.UserId;
             UserRatingFacade.AddFeedback(feedback);
             result = CommonResources.AddFeedbackSuccess;
         }
         catch (Exception e)
         {
             AssistLogger.Log<ExceptionHolder>(e);
             result = CommonResources.AddFeedbackFailure;
         }
     }
     else
     {
         throw new NullReferenceException();
     }
     return result;
 }
Пример #3
0
 public static Feedback LeaveFeedback(Feedback v)
 {
     return new Feedback().Load<Feedback>(UserRatingDataAdapter.AddFeedback(v));
 }
Пример #4
0
 protected void btnLeave_Click(object sender, EventArgs e)
 {
     Page.Validate();
       if (Page.IsValid && UnusedFeedback != null)
       {
     var user = UnusedFeedback.ToUserId;
     var type = TypeConverter.ToEnumMember<FeedbackType>(rblFeedbackType.SelectedValue);
     var comment = txtComment.Text;
     var f = new Feedback() { Comment = comment, FeedbackType = type, FromUserId = Credentials.UserId, ToUserId = user, SellingHistoryId = UnusedFeedback.SellingHistoryId };
     UserRatingFacade.LeaveFeedback(f);
     Response.Redirect(string.IsNullOrEmpty(ReturnUrl) == false
       ? ReturnUrl
       : string.Format("/UserRating/FeedbackViewer.aspx?{0}={1}", FeedbackFilterParams.ForOthers, true)
     , true);
       }
 }