private void btnTop5BestSeller_Click(object sender, EventArgs e) { this.pnTop5BestSeller.Visible = true; this.pnTop5Seller.Visible = false; this.pnTop5Customer.Visible = false; this.pnStatisticReveneu.Visible = false; this.btnTop5BestSeller.BaseColor = Color.DarkGray; this.btnTop5Seller.BaseColor = Color.Silver; this.btnTop5Customer.BaseColor = Color.Silver; this.btnStatisticReveneu.BaseColor = Color.Silver; DataTable dtTop5BestSeller = StatisticController.Top5BestSeller().Tables[0]; dtGVTop5BestSeller.Rows.Clear(); foreach (DataRow dr in dtTop5BestSeller.Rows) { string ItemName = dr["ItemName"].ToString(); string ImageTemp = Application.StartupPath.Substring(0, (Application.StartupPath.Length - 10)) + @"\images\imagesProduct\" + dr["Image"].ToString(); image = Image.FromFile(ImageTemp); image = new Bitmap(image, new Size(70, 70)); string Description = dr["Description"].ToString(); string SalePrice = dr["SalePrice"].ToString(); string Origin = dr["Orgin"].ToString(); string SumOrder = dr["SumOrder"].ToString(); dtGVTop5BestSeller.Rows.Add(ItemName, image, Description, SalePrice, Origin, SumOrder); } }