protected void drlMailGroup_SelectedIndexChanged(object sender, EventArgs e) { try { countBUS = new CountBuyBUS(); int categoryID = int.Parse(this.drlMailGroup.SelectedValue.ToString()); DataTable tblCustomer = new DataTable(); if (categoryID == -1) { customerBus = new CustomerBUS(); tblCustomer = customerBus.GetByCountBuy(1); } else if (categoryID == -2) { customerBus = new CustomerBUS(); tblCustomer = customerBus.GetByCountBuy(2); } else { tblCustomer = countBUS.GetByCategoryID(categoryID); } lblCountCustomer.Text = "Hiện có " + tblCustomer.Rows.Count + " khách hàng trong nhóm này !"; } catch (Exception) { lblCountCustomer.Text = "Lỗi chọn nhóm người nhận"; } }