protected void btnGuardar_Click(object sender, EventArgs e)
    {
        if (txtCorreo.Text != string.Empty)
        {
            Boolean correo = email_bien_escrito(txtCorreo.Text.Trim());

            if (correo == true)
            {
                BL_RRHH_SOL_FORMATIVO obj      = new BL_RRHH_SOL_FORMATIVO();
                DataTable             dt       = new DataTable();
                DataTable             dtCorreo = new DataTable();
                dt       = obj.uspSEL_RRHH_FORMATIVO_PROCESAR_AREAS(Convert.ToInt32(lblCodigo.Text), txtComentarios.Text, lblvalor.Text, Session["IDE_USUARIO"].ToString());
                dtCorreo = obj.SP_CORREO_FORMATIVO_APROBACIONES(Convert.ToInt32(lblCodigo.Text), "A2", txtCorreo.Text);
                if (dtCorreo.Rows.Count > 0)
                {
                    string cleanMessage = "Solicitud enviada";
                    ScriptManager.RegisterStartupScript(this, typeof(Page), "invocarfuncion", "doAlert('" + cleanMessage + "');", true);
                }
            }
            else
            {
                string cleanMessage = "Error! verificar correo";
                ScriptManager.RegisterStartupScript(this, typeof(Page), "invocarfuncion", "doAlert('" + cleanMessage + "');", true);
            }
        }
        else
        {
            string cleanMessage = "Falta ingresar correo";
            ScriptManager.RegisterStartupScript(this, typeof(Page), "invocarfuncion", "doAlert('" + cleanMessage + "');", true);
        }
    }
    protected void btnProcesar_Click(object sender, EventArgs e)
    {
        BL_RRHH_SOL_FORMATIVO obj      = new BL_RRHH_SOL_FORMATIVO();
        DataTable             dt       = new DataTable();
        DataTable             dtCorreo = new DataTable();
        string valor = string.Empty;

        if (rdoOpcion.SelectedValue != string.Empty)
        {
            if (rdoOpcion.SelectedValue == "APROBADO")
            {
                valor = Session["ESTADO"].ToString();
            }
            else
            {
                valor = "R";
            }

            dt = obj.uspSEL_RRHH_FORMATIVO_PROCESAR_AREAS(Convert.ToInt32(lblCodigo.Text), txtObservaciones.Text, valor, Session["IDE_USUARIO"].ToString());

            if (Session["ESTADO"].ToString() == "A2" && valor != "R")
            {
                valor = "A3";
            }

            dtCorreo = obj.SP_CORREO_FORMATIVO_APROBACIONES(Convert.ToInt32(lblCodigo.Text), valor, "");

            string cleanMessage = "Solicitud enviada a la Gerencia de RRHH";
            ScriptManager.RegisterStartupScript(this, typeof(Page), "invocarfuncion", "doAlert('" + cleanMessage + "');", true);
            Datos(lblCodigo.Text);
        }
        else
        {
            string cleanMessage = "Indicar situación de la solicitud";
            ScriptManager.RegisterStartupScript(this, typeof(Page), "invocarfuncion", "doAlert('" + cleanMessage + "');", true);
        }
    }