Пример #1
0
        private void bteChung_ButtonClick(object sender, DevExpress.XtraEditors.Controls.ButtonPressedEventArgs e)
        {
            frmLookUp_Chung frmLookUp = new frmLookUp_Chung(String.Format("%{0}%", bteChung.Text));

            if (frmLookUp.ShowDialog(this) == DialogResult.OK)
            {
                bteChung.Text = frmLookUp.SelectedItem.Ten;
                bteChung.Tag  = frmLookUp.SelectedItem;
            }
        }
Пример #2
0
 private void bteChung_KeyDown(object sender, KeyEventArgs e)
 {
     if (e.KeyCode == Keys.Enter)
     {
         frmLookUp_Chung frmLookUp = new frmLookUp_Chung(String.Format("%{0}%", bteChung.Text));
         if (frmLookUp.ShowDialog(this) == DialogResult.OK)
         {
             bteChung.Text = frmLookUp.SelectedItem.Ten;
             bteChung.Tag  = frmLookUp.SelectedItem;
         }
     }
 }