private void loadGrid_Report(DateTime startDate, DateTime endDate) { SaleInvoice repository = new SaleInvoice(); var result = repository.getProductByTime(startDate, endDate); if (result.Count > 0) { gridProduct.DataSource = result; gridProduct.DataBind(); gridProduct.Visible = true; } else { gridProduct.Visible = false; this.ShowWarningNotification("No data found"); } }