private void btnThem_Click(object sender, EventArgs e)
        {
            isInsert = true;

            cmMaNCC.Focus();
            txtSoHopDong.Enabled      = false;
            grThongTinHopDong.Enabled = true;
            btnHuy.Enabled            = true;
            btnLuu.Enabled            = true;
            btnThem.Enabled           = false;
            btnSua.Enabled            = false;

            txtSoHopDong.Text = dbHopDong.SetNewPrimaryKey();
            cmMaNCC.ResetText();
            dtpNgayKy.ResetText();
            dtpThoiHanHopDong.ResetText();
            this.ActiveControl = cmMaNCC;
        }
Exemple #2
0
 private void SetMaHopDong()
 {
     dbHopDong = new DBHopDong();
     txtSoPhieu.Text = dbHopDong.SetNewPrimaryKey();
 }