Ejemplo n.º 1
0
        public void Delete(object sender, EventArgs e)
        {
            if (ugdShema.ActiveRow != null)
            {
                BusinessLogic.Obracuni.pIDShema = Convert.ToInt32(ugdShema.ActiveRow.Cells["ID"].Value);

                if (MessageBox.Show(string.Format("Obrisati shemu '{0}-{1}'?", BusinessLogic.Obracuni.pIDShema, ugdShema.ActiveRow.Cells["Naziv"].Value),
                                    "Brisanje sheme", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
                {
                    BusinessLogic.Obracuni obracuni = new BusinessLogic.Obracuni();
                    obracuni.DeleteShema();
                    LoadGridShema();
                }
            }
        }