Ejemplo n.º 1
0
 private void AddSupplier()
 {
     try
     {
         FrmInforTabProvider.isAdd = true;
         FrmInforTabProvider.id    = Int32.Parse(dgvSupplier.Rows[rowDgvSupplier].Cells[0].Value.ToString());
         FrmInforTabProvider frm = new FrmInforTabProvider();
         frm.StartPosition = FormStartPosition.CenterScreen;
         frm.ShowDialog();
         LoadTabSupplier();
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
     }
 }
Ejemplo n.º 2
0
 private void UpdateSupplier()
 {
     try
     {
         if (rowDgvSupplier < 0)
         {
             throw new Exception("Vui lòng chọn nhà cung cấp cần cập nhật!");
         }
         FrmInforTabProvider.isAdd = false;
         FrmInforTabProvider.id    = Int32.Parse(dgvSupplier.Rows[rowDgvSupplier].Cells[0].Value.ToString());
         FrmInforTabProvider frm = new FrmInforTabProvider();
         frm.StartPosition = FormStartPosition.CenterScreen;
         frm.ShowDialog();
         LoadTabSupplier();
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
     }
 }