示例#1
0
        private void dataGridView1_CellClick(object sender, DataGridViewCellEventArgs e)
        {
            secilenId = Int32.Parse(dataGridView1.CurrentRow.Cells[1].Value.ToString());
            Ilce i = ft.ilceler.Find(secilenId);

            textBox1.Text = i.IlceAdi;
        }
示例#2
0
        private void btnEkle_Click(object sender, EventArgs e)
        {
            Ilce ilce = new Ilce();

            ilce.Ilid    = (int)comboBox1.SelectedValue;
            ilce.IlceAdi = textBox1.Text;
            ft.ilceler.Add(ilce);
            ft.SaveChanges();
            Listele();
        }
示例#3
0
 private void button3_Click(object sender, EventArgs e)
 {
     try
     {
         Ilce i = ft.ilceler.Find(secilenId);
         ft.ilceler.Remove(i);
         ft.SaveChanges();
         Listele();
     }
     catch (Exception)
     {
     }
 }
示例#4
0
 private void button2_Click(object sender, EventArgs e)
 {
     try
     {
         Ilce i = ft.ilceler.Find(secilenId);
         i.IlceAdi = textBox1.Text;
         ft.SaveChanges();
         Listele();
     }
     catch (Exception)
     {
     }
 }