Пример #1
0
        //Evento
        protected void btnEvaluarSolucion_Click(object sender, EventArgs e)
        {
            lblRestriccionIdSolucion.Visible = false;           //Se hace invisible un label

            //Verifica si
            if (listaIdSoluciones.Contains(txtIdSolucion.Text))
            {
                cargarInterfaz();

                hdfIdSolucion.Value = txtIdSolucion.Text;
                solucion.idSolucion = Int32.Parse(hdfIdSolucion.Value);

                DataTable tableSolucion = solucion.solucionEspecificaJuez();
                txtTitulo.Text      = tableSolucion.Rows[0][0].ToString();
                txtDescripcion.Text = tableSolucion.Rows[0][1].ToString();
                txtFecha.Text       = tableSolucion.Rows[0][2].ToString().Substring(0, 10);
                byte[] bytesFoto    = (byte[])tableSolucion.Rows[0][3];
                string base64String = Convert.ToBase64String(bytesFoto, 0, bytesFoto.Length);
                imgSolucion.ImageUrl = "data:image/png;base64," + base64String;
            }
            else
            {
                lblRestriccionIdSolucion.Visible = true;
            }
        }