private void Giris_Load(object sender, EventArgs e) { textKullaniciAdi.Text = "ubey"; textSifre.Text = "1"; VeriTabani vt = new VeriTabani(); int sayi = vt.UserControl(); if (sayi == 0) { CalisanGuncelle form = new CalisanGuncelle(); form.GelenID = sayi; form.Text = "İlk Giriş İçin Hesap Oluşturma"; MessageBox.Show("Sisteme İlk kez giriş yaptığınızı görmüş bulunmaktayız\n" + "Sisteme giriş yapabilmeniz için üye tanımlanamız gereklidir\n", "UYARI", MessageBoxButtons.OK, MessageBoxIcon.Information); form.Show(); timerkontrol = 0; timer1.Enabled = true; } else { timerkontrol = 1; } }
private void btnGuncelle_Click(object sender, EventArgs e) { timer1.Enabled = true; int CALISAN_ID; try { CALISAN_ID = Convert.ToInt32((dataGridView1.Rows[dataGridView1.CurrentRow.Index].Cells[0].Value).ToString()); CalisanGuncelle a = new CalisanGuncelle(); a.GelenID = CALISAN_ID; a.TC = (dataGridView1.Rows[dataGridView1.CurrentRow.Index].Cells[1].Value).ToString(); a.ADI = (dataGridView1.Rows[dataGridView1.CurrentRow.Index].Cells[2].Value).ToString(); a.SOYADI = (dataGridView1.Rows[dataGridView1.CurrentRow.Index].Cells[3].Value).ToString(); a.ROL = Convert.ToInt32((dataGridView1.Rows[dataGridView1.CurrentRow.Index].Cells[4].Value).ToString()); a.KULLANICI_ADI = (dataGridView1.Rows[dataGridView1.CurrentRow.Index].Cells[6].Value).ToString(); a.SIFRE = (dataGridView1.Rows[dataGridView1.CurrentRow.Index].Cells[7].Value).ToString(); a.Show(); } catch (FormatException) { MessageBox.Show("Listeden Kayıt Seçmelisiniz", "UYARI", MessageBoxButtons.OK, MessageBoxIcon.Warning); } }