private void rdTrangThai_SelectedIndexChanged(object sender, EventArgs e) { try { if (DesignMode || LicenseManager.UsageMode == LicenseUsageMode.Designtime) { return; } int cindex = grvGiamSatXe.FocusedRowHandle; int tindex = grvGiamSatXe.TopRowIndex; SetTrangThai(); if (txtSoHieu.Text.Trim() == "" || txtSoHieu.Text.Trim() == "Số xe") { grcGiamSatXe.DataSource = lienlac.GetGiamSatXeByTrangThai(TrangThai).ToDataTableEnVang("SoHieuXe"); } else { grcGiamSatXe.DataSource = lienlac.GetGiamSatXe(txtSoHieu.Text, TrangThai).ToDataTableEnVang("SoHieuXe"); } grvGiamSatXe.FocusedRowHandle = cindex; grvGiamSatXe.TopRowIndex = tindex; grcGiamSatXe.Update(); } catch (Exception ex) { LogError.WriteLogError("rdTrangThai_SelectedIndexChanged", ex); } }