コード例 #1
0
 private void cmbCapQuyetDinh_KeyDown(object sender, KeyEventArgs e)
 {
     if (e.KeyCode == Keys.F5)
     {
         frmDMCapKhenThuong frm = new frmDMCapKhenThuong(null, null, null, this);
         frm.ShowDialog();
         if (IDDM_CapQuyetDinh > 0)
         {
             cmbCapQuyetDinh.Properties.DataSource = LoadCapKhenThuong();
             cmbCapQuyetDinh.EditValue             = IDDM_CapQuyetDinh;
         }
     }
     if (e.KeyCode == Keys.Delete)
     {
         cmbCapQuyetDinh.EditValue = null;
     }
 }
コード例 #2
0
 private void cmbCapKhenThuong_KeyDown(object sender, KeyEventArgs e)
 {
     if (e.KeyCode == Keys.F5)
     {
         frmDMCapKhenThuong frm = new frmDMCapKhenThuong(this, null, null, null);
         frm.ShowDialog();
         if (IDDM_CapKhenThuong > 0)
         {
             cmbCapKhenThuong.Properties.DataSource = LoadCapKhenThuong();
             reposCapKhenThuong.DataSource          = LoadCapKhenThuong();
             cmbCapKhenThuong.EditValue             = IDDM_CapKhenThuong;
         }
     }
     if (e.KeyCode == Keys.Delete)
     {
         cmbCapKhenThuong.EditValue = null;
     }
 }