private void pERSONELToolStripMenuItem_Click(object sender, EventArgs e) { dataGridView1.ContextMenuStrip = contextMenuStrip2; PersonelORM porm = new PersonelORM(); dataGridView1.DataSource = porm.Listele(); }
private void puanVerToolStripMenuItem1_Click(object sender, EventArgs e) { PersonelORM porm = new PersonelORM(); Personel per = new Personel(); int id = Convert.ToInt32(dataGridView1.CurrentRow.Cells["id"].Value); Araclar.PropertyDoldur <Personel>(per, dataGridView1); string ad = dataGridView1.CurrentRow.Cells["Adi"].Value.ToString(); try { per.Puan = Convert.ToInt32(Interaction.InputBox(string.Format("{0} Personeline Puan Ver", ad))); } catch { } porm.Guncelle(per, id); dataGridView1.DataSource = porm.Listele(); }
private void PersonelAktar() { Pdizi = new Personel[0]; DataTable pt = new DataTable(); PersonelORM porm = new PersonelORM(); pt = porm.Listele(); int satır = pt.Rows.Count; for (int i = 0; i < satır; i++) { Personel personel = new Personel(); Araclar.PropertyDoldur <Personel>(personel, pt, i); Array.Resize(ref Pdizi, Pdizi.Length + 1); Pdizi[i] = personel; } }