private void btnTop5Customer_Click(object sender, EventArgs e) { this.pnTop5Seller.Visible = false; this.pnTop5BestSeller.Visible = false; this.pnTop5Customer.Visible = true; this.pnStatisticReveneu.Visible = false; this.btnTop5BestSeller.BaseColor = Color.Silver; this.btnTop5Seller.BaseColor = Color.Silver; this.btnTop5Customer.BaseColor = Color.DarkGray; this.btnStatisticReveneu.BaseColor = Color.Silver; DataTable dtTop5Customer = StatisticController.Top5Customer().Tables[0]; dtGVTop5Customer.Rows.Clear(); foreach (DataRow dr in dtTop5Customer.Rows) { string Account = dr["UserName"].ToString(); string ImageTemp = Application.StartupPath.Substring(0, (Application.StartupPath.Length - 10)) + @"\images\imagesUser\" + dr["Image"].ToString(); image = Image.FromFile(ImageTemp); image = new Bitmap(image, new Size(70, 70)); string FullName = dr["FullName"].ToString(); string TotalPrice = dr["TotalPrice"].ToString(); string PhoneNumber = dr["PhoneNumber"].ToString(); string Email = dr["Email"].ToString(); dtGVTop5Customer.Rows.Add(Account, FullName, image, TotalPrice, PhoneNumber, Email); } }