Exemplo n.º 1
0
        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);
            }
        }
Exemplo n.º 2
0
        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;
        }
Exemplo n.º 3
0
        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;
        }