Example #1
0
        private void button1_Click(object sender, EventArgs e)
        {
            var f = new MusteriEkle();

            var kontrol = f.ShowDialog();

            if (kontrol == DialogResult.OK)
            {
                var sql        = "select * from Musteriler";
                var musteriler = _db.SelectTable(sql);
                dataGridView1.DataSource         = musteriler;
                dataGridView1.Columns[0].Visible = false;
            }
        }
Example #2
0
 private void button2_Click(object sender, EventArgs e)
 {
     if (dataGridView1.CurrentRow != null)
     {
         var musteriId = dataGridView1.CurrentRow.Cells[0].Value.ToString();
         var f         = new MusteriEkle(int.Parse(musteriId));
         var kontrol   = f.ShowDialog();
         if (kontrol == DialogResult.OK)
         {
             var sql        = "select * from Musteriler";
             var musteriler = _db.SelectTable(sql);
             dataGridView1.DataSource         = musteriler;
             dataGridView1.Columns[0].Visible = false;
         }
     }
     else
     {
         MessageBox.Show("Muşteri seçiniz!!");
     }
 }