private void button3_Click(object sender, EventArgs e) { if (!um.IsLoogedin()) { MessageBox.Show("You must Login/Sign up to be able to post a review."); return; } string username = um.getCurrentUser().getUserName(); string recipeID = recipe.ID1; string review = Review_richTextBox.Text.ToString(); DateTime dt = DateTime.Now; rv = new RecipeReview(username, recipeID, review, dt); //rrm.AddRecipeReview(rv); UserManager.getInstance().postReview(rrm, rv); rrm.saveReviews(); List <string> newReview = new List <string>(); newReview.Add(username); newReview.Add(review); newReview.Add(dt.ToString()); Reviews_dgv.Rows.Add(newReview.ToArray()); }
public abstract void postReview(RecipeReviewStorageManager rm, RecipeReview rv);
public override void postReview(RecipeReviewStorageManager rm, RecipeReview rv) { rv.setUsername(um.getCurrentUser().getUserName()); rm.AddRecipeReview(rv); }
public override void postReview(RecipeReviewStorageManager rm, RecipeReview rv) { throw new NotLoggedInException(); }
public void postReview(RecipeReviewStorageManager rm, RecipeReview rv) { currentState.postReview(rm, rv); }
public void AddRecipeReview(RecipeReview recipeReview) { allRecipeReviews.Add(recipeReview); }