Exemplo n.º 1
0
 private void butAdd_Click(object sender, EventArgs e)
 {
     frmBreedsACD br1 = new frmBreedsACD(myConnection, "add", dgvBreeds, null);
     br1.ShowDialog();
     string connectionString = @"Data Source=.;Initial Catalog=PetShopO;user id=sa; password=1;";
     myConnection = new SqlConnection(connectionString);
     try
     {
         myConnection.Open();
     }
     catch (SqlException ex)
     {
         MessageBox.Show(ex.Message);
     }
 }
Exemplo n.º 2
0
 private void btnAddBreed_Click(object sender, EventArgs e)
 {
     frmBreedsACD fbr = new frmBreedsACD(myConnection, "add", dgvP, null);
     fbr.ShowDialog(this);
 }