Пример #1
0
        private void buttonSil_Click(object sender, EventArgs e)
        {
            int selected_f = DAO_Proje_Guncelle.IdEkle(comboBoxProje, "Project", "P_Name");

            baglanti.Open();
            SqlCommand komut_f = new SqlCommand($"delete from PersonelProject where Project_ID = '{selected_f}';", baglanti);

            komut_f.ExecuteNonQuery();
            baglanti.Close();
            baglanti.Open();
            string     selected = comboBoxProje.GetItemText(comboBoxProje.SelectedItem);
            SqlCommand komut    = new SqlCommand($"delete from Project where P_Name = '{selected}';", baglanti);

            komut.ExecuteNonQuery();
            baglanti.Close();
        }
Пример #2
0
 public ProjeGuncelle()
 {
     InitializeComponent();
     baglanti = new SqlConnection("Data Source=SQL7004.site4now.net;Initial Catalog=DB_A43BB8_vtysproje;User Id=DB_A43BB8_vtysproje_admin;Password=vtysproje18;");
     DAO_Proje_Guncelle.cagir(comboBoxProje);
 }