Exemple #1
0
        protected void LinkButtonSearch_Click(object sender, EventArgs e)
        {
            int       number    = int.Parse(DropDownList1.SelectedValue);
            string    dateorder = txtSearchDateOrder.Text.Trim();
            DataTable dt        = new DataTable();

            if (number == 1)
            {
                dt = bus.SerchDateOrder(number, dateorder);
            }
            else if (number == 2)
            {
                dt = bus.SerchDateOrder(number, dateorder);
            }
            else
            {
                dt = bus.SerchDateOrder(number, dateorder);
            }
            if (dt.Rows.Count <= 0)
            {
                Response.Write("<script>alert('Không tìm thấy hóa hơn nào!')</script>");
            }
            else
            {
                GridView1.DataSource = dt;
                GridView1.DataBind();
            }
        }