Exemplo n.º 1
0
 private void btnThem_Click(object sender, EventArgs e)
 {
     try
     {
         FrmNhapBoPhan frmNhapBoPhan = new FrmNhapBoPhan();
         frmNhapBoPhan.btnOK.Tag = "add";
         string strMaBP = cf.CreateId("MABP", "BOPHAN");
         frmNhapBoPhan.txtMaBP.Text = strMaBP;
         frmNhapBoPhan.ShowDialog();
         LoadBoPhan(dgvBoPhan);
     }
     catch { }
 }
Exemplo n.º 2
0
 private void btnCapNhat_Click(object sender, EventArgs e)
 {
     try
     {
         FrmNhapBoPhan frmNhapBoPhan = new FrmNhapBoPhan();
         frmNhapBoPhan.btnOK.Tag = "up";
         int    index   = dgvBoPhan.SelectedRows[0].Index;
         string strMaBP = dgvBoPhan.Rows[index].Cells["colMaBoPhan"].Value.ToString();
         frmNhapBoPhan.txtMaBP.Text = strMaBP;
         string strTenBP = dgvBoPhan.Rows[index].Cells["colTenBoPhan"].Value.ToString();
         frmNhapBoPhan.txtTenBP.Text = strTenBP;
         frmNhapBoPhan.ShowDialog();
         LoadBoPhan(dgvBoPhan);
     }
     catch { }
 }
Exemplo n.º 3
0
 private void btnCapNhat_Click(object sender, EventArgs e)
 {
     try
     {
         FrmNhapBoPhan frmNhapBoPhan = new FrmNhapBoPhan();
         frmNhapBoPhan.btnOK.Tag = "up";
         int index = dgvBoPhan.SelectedRows[0].Index;
         string strMaBP = dgvBoPhan.Rows[index].Cells["colMaBoPhan"].Value.ToString();
         frmNhapBoPhan.txtMaBP.Text = strMaBP;
         string strTenBP = dgvBoPhan.Rows[index].Cells["colTenBoPhan"].Value.ToString();
         frmNhapBoPhan.txtTenBP.Text = strTenBP;
         frmNhapBoPhan.ShowDialog();
         LoadBoPhan(dgvBoPhan);
     }
     catch { }
 }
Exemplo n.º 4
0
 private void btnThem_Click(object sender, EventArgs e)
 {
     try
     {
         FrmNhapBoPhan frmNhapBoPhan = new FrmNhapBoPhan();
         frmNhapBoPhan.btnOK.Tag = "add";
         string strMaBP = cf.CreateId("MABP", "BOPHAN");
         frmNhapBoPhan.txtMaBP.Text = strMaBP;
         frmNhapBoPhan.ShowDialog();
         LoadBoPhan(dgvBoPhan);
     }
     catch { }
 }