private void btnOK_Click(object sender, EventArgs e) { var item = inputVehicle.GetSelectedDataRow() as GiamSatXe_HoatDong; if (item == null || inputVehicle.EditValue == null) { lblThongBao.Text = "Phải nhập số hiệu xe"; inputVehicle.Focus(); return; } if (inputGioKhachLen.EditValue == null) { lblThongBao.Text = "Phải nhập giờ khách lên"; inputGioKhachLen.Focus(); return; } if (string.IsNullOrEmpty(txtDiaChiDon.Text)) { lblThongBao.Text = "Phải nhập địa chỉ đón khách"; txtDiaChiDon.Focus(); return; } var result = false; result = CuocGoi.EnVangVip_sp_TaoCuocGoiKhaiThac(item.SoHieuXe, ThoiDiemBao, MaLaiXe, lblDriverName.Text, txtDiaChiDon.Text, DiemDo, txtGhiChu.Text, inputGioKhachLen.EditValue.To <DateTime>(), ThongTinDangNhap.USER_ID, string.Empty, "0", KinhDo, ViDo); if (!result) { lblThongBao.Text = "Không tạo được cuộc gọi"; return; } Close(); }