//For the case that you are selecting a review to edit in the sort page. public ReviewPage(LocalDataManager LocalData, ReviewObject Review_To_Edit, Edit_Window Edit_Window) { InitializeComponent(); this.LocalData = LocalData; Parent_Window = Edit_Window; //Make the right buuttons visible. Submit_Button.Visibility = Visibility.Hidden; Update_Button.Visibility = Visibility.Visible; //Since this is the update constructor we need to store old info. oldReview = new ReviewObject(Review_To_Edit); currentReview = Review_To_Edit; //Set the field values ot be equual to the review so you are "viewing" the contents of the review. TitleBox.Text = Review_To_Edit.Title; AlbumName.Text = Review_To_Edit.Album; YearBox.Text = Review_To_Edit.Release_Date.ToString(); Artist_NameBox.Text = Review_To_Edit.Artist; ReviewBox.Text = Review_To_Edit.Review; FileNameLabel.Content = Review_To_Edit.File_Path; ScoreBox.Text = Review_To_Edit.Rating.ToString(); //Update the Tags list; UpdateReviewTags(); }
public ReviewPage(LocalDataManager LocalData) { InitializeComponent(); this.LocalData = LocalData; Submit_Button.Visibility = Visibility.Visible; Update_Button.Visibility = Visibility.Hidden; oldReview = new ReviewObject(); currentReview = new ReviewObject(); }
public void AddReview(ReviewObject givenReview) { this.DBManager.AddReview(givenReview); if (this.SortPage != null) { this.SortPage.Local_Reviews.Add(new Review_Reference(givenReview)); this.SortPage.TableView.Items.Refresh(); } }
public ActionResult GetReviewersList(int?id) { var model = new List <ReviewObject>(); if (id.HasValue) { model = ReviewObject.GetReviews(id.Value); } return(PartialView("Partials/_reviewList", model)); }
public ActionResult SendReminderEmail(int?id) { if (id.HasValue) { var review = ReviewObject.GetReview(id.Value); if (review != null) { review.SendReminderEmail(); return(GetReviewersList(review.MainId)); } } return(null); }
public ActionResult SendIndividualReminder(int?id) { if (id.HasValue) { var review = ReviewObject.GetReview(id.Value); if (review != null) { review.SendReminderEmail(); return(RedirectToAction("OutstandingReviews", new { sent = true })); } } return(RedirectToAction("OutstandingReviews", new { sent = false })); }
public TagginWindow(LocalDataManager LocalData, ReviewObject givenReview, ReviewPage Parent_Page) { InitializeComponent(); //Keep a list of all tags that are selected to be "submitted" to the review later. SelectedTags = new List <TagObject>(givenReview.getTags()); this.Parent_Page = Parent_Page; this.LocalData = LocalData; AdvanceSearchWindow = null; CreateTagBoxes(givenReview.getTags()); }
// Constructor containing the employee ID and tip amount to be sent PostReviewRequest(string OrderID, string EmployeeID, int rating1, string reason1, int rating2, string reason2, int rating3, string reason3) { ReviewObject r = new ReviewObject(); r.order_id = OrderID; r.employee_id = EmployeeID; r.question01_rating = rating1; r.question01_reason = reason1; r.question02_rating = rating2; r.question02_reason = reason2; r.question03_rating = rating3; r.question03_reason = reason3; Body = r; }
public ActionResult ReactivateReviewer(int?id) { int mid = 0; if (id.HasValue) { var review = ReviewObject.GetReview(id.Value); if (review != null) { mid = review.MainId; if (MainObject.CheckUserHasWriteAccess(mid)) { review.ReActivate(); } } } return(GetReviewersList(mid)); }
private void TableView_PreviewMouseDoubleClick(object sender, MouseButtonEventArgs e) { ListView View = (sender as ListView); if (View.SelectedItem is Review_Reference) { ReviewObject Review_To_Edit = this.LocalData.DBManager.GetReview((View.SelectedItem as Review_Reference)); Review_To_Edit.setTags(LocalData.DBManager.GetTagsForReview(View.SelectedItem as Review_Reference)); if (Review_To_Edit != null) //This can happen if you double on the main page but not on a row of the table. { Edit_Window Edit_Window = new Edit_Window(this.LocalData, Review_To_Edit); Edit_Window.ShowDialog(); Edit_Window = null; GC.Collect(); GC.WaitForFullGCComplete(); } Review_To_Edit = null; } }
public OutstandingReviewsModel() { Reviews = ReviewObject.GetAllActiveReviews(); }
public Edit_Window(LocalDataManager LocalData, ReviewObject SentReview) { InitializeComponent(); this.Content = new ReviewPage(LocalData, SentReview, this); }