Ejemplo n.º 1
0
        private void btn_AddEstadio_Click(object sender, EventArgs e)
        {
            var frm = new frmEditEstadio(false, null);

            frm.ShowDialog();

            Refresh();
        }
Ejemplo n.º 2
0
        private void btn_EditEstadio_Click(object sender, EventArgs e)
        {
            if (lbEstadios.SelectedIndex == -1)
            {
                var msgBox = new CustomMsgBox("Ops!", $"Selecione um estádio para editar.", MessageBoxType.E_OK);
                var result = msgBox.ShowDialog();
                return;
            }

            int id = (int)lbEstadios.SelectedItem;

            var frm = new frmEditEstadio(true, Manager.Instance.dBEstadios.Estadios.Find(x => x.ID == id));

            frm.ShowDialog();

            Refresh();
        }