コード例 #1
0
ファイル: frmBreeds.cs プロジェクト: IraJyliaLena/OPRIS
 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);
     }
 }
コード例 #2
0
ファイル: frmPets.cs プロジェクト: IraJyliaLena/OPRIS
 private void btnAddBreed_Click(object sender, EventArgs e)
 {
     frmBreedsACD fbr = new frmBreedsACD(myConnection, "add", dgvP, null);
     fbr.ShowDialog(this);
 }