コード例 #1
0
ファイル: ReviewAdder.xaml.cs プロジェクト: fengyu25/comp5348
        private void Button_Click(object sender, RoutedEventArgs e)
        {
            Review lReview = new Review()
            {
                MediaItemTitle = this.MediaTitleInput.Text,
                ReviewTitle = this.ReviewTitleInput.Text,
                Comments = this.CommentInput.Text,
                UPC = this.UPCInput.Text
            };

            Model.AddReview(lReview);
        }
コード例 #2
0
 public void AddReview(Review pReview)
 {
     Provider.AddReview(pReview);
 }
コード例 #3
0
 /// <summary>
 /// Deprecated Method for adding a new object to the Reviews EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToReviews(Review review)
 {
     base.AddObject("Reviews", review);
 }
コード例 #4
0
ファイル: ReviewProvider.cs プロジェクト: fengyu25/comp5348
 public void AddReview(Review pReview)
 {
     sReviewCollection.Add(pReview);
 }
コード例 #5
0
 /// <summary>
 /// Create a new Review object.
 /// </summary>
 /// <param name="id">Initial value of the Id property.</param>
 /// <param name="reviewTitle">Initial value of the ReviewTitle property.</param>
 /// <param name="comments">Initial value of the Comments property.</param>
 /// <param name="mediaItemTitle">Initial value of the MediaItemTitle property.</param>
 /// <param name="uPC">Initial value of the UPC property.</param>
 public static Review CreateReview(global::System.Int32 id, global::System.String reviewTitle, global::System.String comments, global::System.String mediaItemTitle, global::System.String uPC)
 {
     Review review = new Review();
     review.Id = id;
     review.ReviewTitle = reviewTitle;
     review.Comments = comments;
     review.MediaItemTitle = mediaItemTitle;
     review.UPC = uPC;
     return review;
 }