コード例 #1
0
        private void bt_yakitEkle_Click(object sender, EventArgs e)
        {
            YakitEkle ye = new YakitEkle();

            ye.ShowDialog();
            dt = VeriIslemleri.TabloDoldur("Yakit", VeriIslemleri.BilgileriGetir("Yakit", "YakitID"));
            dataGridView1.DataSource = dt;
            dataGridView1.Update();
            if (dataGridView1.Rows[0].Cells[0].Value != null)
            {
                id    = dataGridView1.Rows[0].Cells[0].Value.ToString();
                daire = dataGridView1.Rows[0].Cells[1].Value.ToString();
            }
        }
コード例 #2
0
 private void bt_duzenle_Click(object sender, EventArgs e)
 {
     if (id == null)
     {
         MessageBox.Show("Lütfen tablodan düzeltilecek değeri seçiniz!");
     }
     else
     {
         YakitEkle ye = new YakitEkle(VeriIslemleri.BilgileriAl("Yakit", "YakitID", id));
         ye.ShowDialog();
         dt = VeriIslemleri.TabloDoldur("Yakit", VeriIslemleri.BilgileriGetir("Yakit", "YakitID"));
         dataGridView1.DataSource = dt;
         dataGridView1.Update();
     }
 }