private void button2_Click(object sender, EventArgs e) { bilgileri_duzenle ac = new bilgileri_duzenle(); ac.Show(); this.Hide(); }
public void button1_Click(object sender, EventArgs e) { try { baglan.Open(); SqlCommand komut = new SqlCommand("insert into firma_tanimlari (firma_adi,yetkili,telefon1,telefon2,telefon3,tc,vergi_no,adres) values ('" + textBox1.Text.ToString() + "','" + textBox2.Text.ToString() + "','" + textBox3.Text.ToString() + "','" + textBox4.Text.ToString() + "','" + textBox5.Text.ToString() + "','" + textBox6.Text.ToString() + "','" + textBox7.Text.ToString() + "','" + textBox8.Text.ToString() + "')", baglan); komut.ExecuteNonQuery(); baglan.Close(); MessageBox.Show("Kayıt Başarılı!"); textBox1.Clear(); textBox2.Clear(); textBox3.Clear(); textBox4.Clear(); textBox5.Clear(); textBox6.Clear(); textBox7.Clear(); textBox8.Clear(); } catch (Exception) { MessageBox.Show("Bir hata oluştu. Lütfen tekrar deneyiniz."); bilgileri_duzenle ne = new bilgileri_duzenle(); ne.Show(); this.Hide(); } }