Beispiel #1
0
        private void Btn_seleccionar_Click(object sender, EventArgs e)
        {
            frm_adminCampeonatos adminCampeonatos = new frm_adminCampeonatos();


            OdbcCommand    sql      = new OdbcCommand("Select nombre_deporte from tbl_deportes where PK_idDeporte='" + Convert.ToInt16(Dgv_campeonatos.CurrentRow.Cells[4].Value) + "'", nueva.conectar());
            OdbcDataReader almacena = sql.ExecuteReader();

            while (almacena.Read() == true)
            {
                adminCampeonatos.Cbo_deportes.Text = almacena.GetString(0);
            }
            almacena.Close();

            adminCampeonatos.Txt_codigoCampeonato.Text      = Convert.ToString(Dgv_campeonatos.CurrentRow.Cells[0].Value);
            adminCampeonatos.Txt_nombreCampeonato.Text      = Convert.ToString(Dgv_campeonatos.CurrentRow.Cells[2].Value);
            adminCampeonatos.Txt_descripcionCampeonato.Text = Convert.ToString(Dgv_campeonatos.CurrentRow.Cells[3].Value);
            adminCampeonatos.Txt_precioCampeonato.Text      = Convert.ToString(Dgv_campeonatos.CurrentRow.Cells[4].Value);
            adminCampeonatos.Txt_cantidadEquipos.Text       = Convert.ToString(Dgv_campeonatos.CurrentRow.Cells[5].Value);
            this.Close();
            adminCampeonatos.Txt_codigoCampeonato.Enabled      = false;
            adminCampeonatos.Txt_nombreCampeonato.Enabled      = false;
            adminCampeonatos.Txt_descripcionCampeonato.Enabled = false;
            adminCampeonatos.Txt_precioCampeonato.Enabled      = false;
            adminCampeonatos.Txt_cantidadEquipos.Enabled       = false;
            adminCampeonatos.Gpb_estado.Enabled   = false;
            adminCampeonatos.Cbo_deportes.Enabled = false;
            adminCampeonatos.Show();
        }
Beispiel #2
0
        private void Btn_ingresarCampeonato_Click(object sender, EventArgs e)
        {
            this.Close();
            frm_adminCampeonatos adminCampeonatos = new frm_adminCampeonatos();

            adminCampeonatos.Show();
            adminCampeonatos.Btn_eliminar.Enabled  = false;
            adminCampeonatos.Btn_modificar.Enabled = false;
            adminCampeonatos.Gpb_estado.Enabled    = false;
        }