protected void btnCheckOrder_Click(object sender, EventArgs e) { txtSearchDateOrder.Text = ""; int number = int.Parse(DropDownList1.SelectedValue); DataTable dt = new DataTable(); if (number == 1) { dt = bus.ShowOrders(); } else if (number == 2) { dt = bus.ShowPendingOrders(); } else { dt = bus.ShowPendedOrders(); } GridView1.DataSource = dt; GridView1.DataBind(); }