private void reportForm_Load_1(object sender, EventArgs e) { CustomerReview reviews = new CustomerReview(); List <CustomerReview> reviewList = reviews.List(); TotalReviewsCountLbl.Text = reviewList.Count.ToString(); DataTable dt = ReportsPage.ConvertToDataTable(reviews.List()); AllReviewsTable.DataSource = dt; Dictionary <string, int> chartData1 = ReportsPage.chartData1(reviewList); foreach (KeyValuePair <string, int> entry in chartData1) { numberOfRatingChart.Series["Number of Reviews"].Points.AddXY(entry.Key, entry.Value); } Dictionary <string, double> chartData2 = ReportsPage.chartData2(reviewList); foreach (KeyValuePair <string, double> entry in chartData2) { AverageRating.Series["Average Rating"].Points.AddXY(entry.Key, entry.Value); } }
private void btnReset_Click(object sender, EventArgs e) { CustomerReview reviews = new CustomerReview(); List <CustomerReview> reviewList = reviews.List(); TotalReviewsCountLbl.Text = reviewList.Count.ToString(); DataTable dt = ReportsPage.ConvertToDataTable(reviews.List()); AllReviewsTable.DataSource = dt; }
private void btnSortRating_Click(object sender, EventArgs e) { CustomerReview reviews = new CustomerReview(); List <CustomerReview> reviewList = reviews.List(); DataTable dt = ReportsPage.ConvertToDataTable(CustomerReview.SortByDate(reviews.List())); AllReviewsTable.DataSource = dt; }