示例#1
0
 private void button2_Click(object sender, EventArgs e)
 {
     try
     {
         Ilce ilce = db.ilce.Find(secilenId);
         ilce.IlceAdi = txtBxIlce.Text;
         db.SaveChanges();
         Listele();
     }
     catch (Exception)
     {
         MessageBox.Show("İL Seçmeniz Gerekmektedir.");
     }
 }
示例#2
0
 private void button3_Click(object sender, EventArgs e)
 {
     try
     {
         Ilce ilce = db.ilce.Find(secilenId);
         db.ilce.Remove(ilce);
         db.SaveChanges();
         Listele();
     }
     catch (Exception)
     {
         MessageBox.Show("İLÇE Seçmeniz Gerekmektedir.");
     }
 }
示例#3
0
 private void button2_Click(object sender, EventArgs e)
 {
     try
     {
         Ilce ilce = db.ilceler.Find(secilenId);
         db.ilceler.Remove(ilce);
         db.SaveChanges();
         Listele();
     }
     catch
     {
         MessageBox.Show("Ilce secin");
     }
 }
示例#4
0
 private void button3_Click(object sender, EventArgs e)
 {
     try
     {
         Ilce ilce = db.ilceler.Find(secilenId);
         ilce.IlceAdi = txtilceAdi.Text;
         ilce.ILId    = int.Parse(comboBox1.SelectedValue.ToString());
         db.SaveChanges();
         Listele();
     }
     catch (Exception)
     {
         MessageBox.Show("Ilce secmeniz gerekiyor!");
     }
 }
示例#5
0
 private void button1_Click(object sender, EventArgs e)
 {
     try
     {
         Ilce ilce = new Ilce();
         ilce.IlceAdi = txtBxIlce.Text;
         ilce.ILId    = (int)comboBox1.SelectedValue;
         db.ilce.Add(ilce);
         db.SaveChanges();
     }
     catch (Exception ex)
     {
         string str = ex.Message;
     }
     Listele();
 }
示例#6
0
 private void button1_Click(object sender, EventArgs e)
 {
     try
     {
         Ilce ilce = new Ilce();
         ilce.IlceAdi = txtilceAdi.Text;
         ilce.ILId    = int.Parse(comboBox1.SelectedValue.ToString());
         db.ilceler.Add(ilce);
         db.SaveChanges();
         Listele();
     }
     catch (Exception)
     {
         throw;
     }
 }