示例#1
0
        private void bteLoai_ButtonClick(object sender, DevExpress.XtraEditors.Controls.ButtonPressedEventArgs e)
        {
            frmLookUp_Loai frmLookUp = new frmLookUp_Loai(String.Format("%{0}%", bteLoai.Text));

            if (frmLookUp.ShowDialog(this) == DialogResult.OK)
            {
                bteLoai.Text = frmLookUp.SelectedItem.Ten;
                bteLoai.Tag  = frmLookUp.SelectedItem;
            }
        }
示例#2
0
 private void bteLoai_KeyDown(object sender, KeyEventArgs e)
 {
     if (e.KeyCode == Keys.Enter)
     {
         frmLookUp_Loai frmLookUp = new frmLookUp_Loai(String.Format("%{0}%", bteLoai.Text));
         if (frmLookUp.ShowDialog(this) == DialogResult.OK)
         {
             bteLoai.Text = frmLookUp.SelectedItem.Ten;
             bteLoai.Tag  = frmLookUp.SelectedItem;
         }
     }
 }