Пример #1
0
        private void btnModificaTorneo_Click(object sender, RoutedEventArgs e)
        {
            KeyValuePair <string, string> listTorneo = (KeyValuePair <string, string>)cmbtorneo.SelectedItem;
            string value = listTorneo.Key;

            if (value == "0")
            {
                MessageBox.Show("Favor de seleccionar un torneo a Modificar");
            }
            else
            {
                addTorneos modificarTorneo = new addTorneos();
                modificarTorneo.iIdTorneo             = Convert.ToInt32(value);
                modificarTorneo.sNombreTorneoAnterior = listTorneo.Value.ToString();
                modificarTorneo.Show();
                this.Close();
            }
        }
Пример #2
0
        private void btnAceptarTorneo_Click(object sender, RoutedEventArgs e)
        {
            KeyValuePair <string, string> listTorneo = (KeyValuePair <string, string>)cmbtorneo.SelectedItem;
            int iIdTorneo = Int32.Parse(listTorneo.Key);

            if (iIdTorneo == 0)
            {
                addTorneos agregarTorneo = new addTorneos();
                agregarTorneo.Show();
                this.Close();
            }
            else
            {
                //MessageBox.Show(value);
                MainWindow main = new MainWindow();
                main.iIdTorneo = iIdTorneo;
                main.Show();
                this.Close();
            }
        }