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

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