public void ChoseDTCha() { frmLookUp_KhachHang frm = new frmLookUp_KhachHang(); if (frm.ShowDialog() == DialogResult.OK) { View.IdCha = frm.SelectedItem.IdCha; } }
private void bteKhachHang_ButtonClick(object sender, DevExpress.XtraEditors.Controls.ButtonPressedEventArgs e) { frmLookUp_KhachHang frmLookUp = new frmLookUp_KhachHang(String.Format("%{0}%", bteKhachHang.Text)); if (frmLookUp.ShowDialog(this) == DialogResult.OK) { bteKhachHang.Text = frmLookUp.SelectedItem.TenDoiTuong; bteKhachHang.Tag = frmLookUp.SelectedItem; } }
private void bteKhachHang_KeyDown(object sender, KeyEventArgs e) { if (e.KeyCode == Keys.Enter) { frmLookUp_KhachHang frmLookUp = new frmLookUp_KhachHang(String.Format("%{0}%", bteKhachHang.Text)); if (frmLookUp.ShowDialog(this) == DialogResult.OK) { bteKhachHang.Text = frmLookUp.SelectedItem.TenDoiTuong; bteKhachHang.Tag = frmLookUp.SelectedItem; } } }