예제 #1
0
        private void DeaktivirajClick(object sender, EventArgs e)
        {
            DialogResult dr = MessageBox.Show("Jeste li sigurni?", "Provjera", MessageBoxButtons.YesNo);

            if (dr == DialogResult.Yes)
            {
                TipNeradnihDana tip = new TipNeradnihDana();
                tip.Id = int.Parse(dataGridView1.CurrentRow.Cells[0].Value.ToString());
                tip.Deaktiviraj();
                UcitajPodatke();
            }
        }
예제 #2
0
        private void DeaktivirajSveClick(object sender, EventArgs e)
        {
            DialogResult dr = MessageBox.Show("Jeste li sigurni da želite obrisati SVE?", "Provjera", MessageBoxButtons.YesNo);

            if (dr == DialogResult.Yes)
            {
                TipNeradnihDana tip = new TipNeradnihDana();
                foreach (DataGridViewRow row in dataGridView1.Rows)
                {
                    tip.Id = int.Parse(row.Cells[0].Value.ToString());
                    tip.Deaktiviraj();
                }
                UcitajPodatke();
            }
        }