Exemplo n.º 1
0
        private void pERSONELToolStripMenuItem_Click(object sender, EventArgs e)
        {
            dataGridView1.ContextMenuStrip = contextMenuStrip2;
            PersonelORM porm = new PersonelORM();

            dataGridView1.DataSource = porm.Listele();
        }
Exemplo n.º 2
0
        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();
        }
Exemplo n.º 3
0
        bool Sil(object a)
        {
            int id = Convert.ToInt32(dataGridView1.CurrentRow.Cells["id"].Value);

            if (a is Personel)
            {
                PersonelORM porm = new PersonelORM();
                return(porm.Sil(id));
            }

            else
            {
                OtelORM oorm = new OtelORM();
                return(oorm.Sil(id));
            }
        }
Exemplo n.º 4
0
        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;
            }
        }