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

            if (frmLookUp.ShowDialog() == DialogResult.OK)
            {
                bteSanPham.EditValue = String.Empty;
                bteSanPham.Tag       = frmLookUp.SelectedItem;
                bteSanPham.Text      = frmLookUp.SelectedItem.MaSanPham;
                //foreach (DMSanPhamInfo selectedItem in frmLookUp.SelectedItems)
                //{
                //    bteSanPham.EditValue += selectedItem.MaSanPham + ",";
                //}
                //LoadDataGridSanPham();
            }
        }
Пример #2
0
 private void bteSanPham_KeyDown(object sender, KeyEventArgs e)
 {
     if (e.KeyCode == Keys.Enter)
     {
         frmLookUp_SanPham_CauHinh frmLookUp = new frmLookUp_SanPham_CauHinh(false, String.Format("%{0}%", bteSanPham.Text));
         if (frmLookUp.ShowDialog() == DialogResult.OK)
         {
             bteSanPham.Tag  = frmLookUp.SelectedItem;
             bteSanPham.Text = frmLookUp.SelectedItem.MaSanPham;
             //foreach (DMSanPhamInfo selectedItem in frmLookUp.SelectedItems)
             //{
             //    bteSanPham.EditValue += selectedItem.MaSanPham + ",";
             //}
             //LoadDataGridSanPham();
         }
     }
 }