コード例 #1
0
        private void btnTimKiem_Click(object sender, EventArgs e)
        {
            if (dateThoiGian.EditValue == null)
            {
                lblmsg.Text = ("Bạn chưa chọn ngày"); return;
            }
            if (txtSoHieu.Text.Trim() == "")
            {
                lblmsg.Text = ("Bạn chưa nhập số hiệu"); return;
            }
            DataTable dt = lienlac.GetHanhTrinhXe(dateThoiGian.DateTime, txtSoHieu.Text);

            //if (dt == null || dt.Rows.Count == 0) { lblmsg.Text = ("Không tìm thấy hành trình xe"); }
            grcHanhTrinhXe.DataSource = dt;
            grcHanhTrinhXe.Update();
        }