示例#1
0
        protected void BtnQuery_Click(object sender, EventArgs e)
        {
            string orderDateFilterValue = ddlOrderDate.SelectedValue == "" ? "Last 6 Months" : ddlOrderDate.SelectedValue;
            string customerId           = txtBoxCustomerID.Text == "" ? null : txtBoxCustomerID.Text;
            string custName             = txtBoxUserName.Text == "" ? null : txtBoxUserName.Text;
            string salesMgr             = ddlSalesManager.SelectedValue == "" ? null : ddlSalesManager.SelectedValue;

            OrdersDAL orders = new OrdersDAL();
            DataSet   ds     = orders.GetOrdersWithFilterOptions(orderDateFilterValue, customerId, custName, salesMgr);

            gvOrders.DataSource = ds;
            gvOrders.DataBind();
        }