Ejemplo n.º 1
0
        private void button2_Click(object sender, EventArgs e)
        {
            OgrenciModel o = new OgrenciModel();

            o.Id = int.Parse(textBox2.Text);

            SqliteDataAccess.OgrenciSil(o);

            textBox2.Text = "";
        }
Ejemplo n.º 2
0
        private void button1_Click(object sender, EventArgs e)
        {
            OgrenciModel o = new OgrenciModel();

            o.Ad = textBox1.Text;

            if (radioButton1.Checked == true)
            {
                SqliteDataAccess.SekizOgrenciKaydet(o);
                textBox1.Text = "";
            }
            else if (radioButton2.Checked == true)
            {
                SqliteDataAccess.YediOgrenciKaydet(o);
                textBox1.Text = "";
            }
        }
Ejemplo n.º 3
0
 public static void OgrenciSil(OgrenciModel ogrenci)
 {
     if (ogrenci.Id < 8000)
     {
         using (IDbConnection cnn = new SQLiteConnection(LoadConnectionString()))
         {
             cnn.Execute("delete from YediListe where OgrenciID= (@Id)", ogrenci);
         }
     }
     else if (ogrenci.Id > 7000)
     {
         using (IDbConnection cnn = new SQLiteConnection(LoadConnectionString()))
         {
             cnn.Execute("delete from SekizListe where OgrenciID= (@Id)", ogrenci);
         }
     }
 }