Exemplo n.º 1
0
        private void buttonNew_Click(object sender, EventArgs e)
        {
            SupplierCard supplierCard = new SupplierCard();
            Supplier     supplier     = new Supplier();

            supplierCard.SetParameters(true, supplier);
            supplierCard.ShowDialog();
            InsertDataIntoTable();
        }
Exemplo n.º 2
0
 private void buttonOpen_Click(object sender, EventArgs e)
 {
     if (suppliersTable.SelectedRows.Count > 0)
     {
         int      id       = Convert.ToInt32(suppliersTable.SelectedRows[0].Cells["Id"].Value.ToString());
         Supplier supplier = new Supplier();
         supplier = supplierRepository.GetSupplierById(id);
         SupplierCard supplierCard = new SupplierCard();
         supplierCard.SetParameters(false, supplier);
         supplierCard.ShowDialog();
         InsertDataIntoTable();
     }
 }