protected void SeleccionarPremio(object sender, EventArgs e)
    {
        Button       btnPremio   = ((Button)sender);
        int          item        = Convert.ToInt32(btnPremio.CommandArgument);
        ListViewItem CommentItem = btnPremio.NamingContainer as ListViewItem;
        decimal      pto         = (Decimal)ListView1.DataKeys[CommentItem.DisplayIndex].Values["Puntos"];



        BL_RRHH_COMPETENCIAS_EVAL obj = new BL_RRHH_COMPETENCIAS_EVAL();
        DataTable dtResultado         = new DataTable();

        dtResultado = obj.SEL_RRHH_PERSONAL_EMPRESA_POR_ID(Session["IDE_USUARIO"].ToString());
        decimal puntos = Convert.ToDecimal(dtResultado.Rows[0]["PUNTO_BRAVO"].ToString());

        if (puntos < pto)
        {
            string cleanMessage = "Puntos insuficiente";
            ScriptManager.RegisterStartupScript(this, typeof(Page), "invocarfuncion", "doAlert('" + cleanMessage + "');", true);
        }
        else
        {
            string cleanMessage = "Pronto te avisaremos cuándo puedes recoger tu premio, gracias";
            ScriptManager.RegisterStartupScript(this, typeof(Page), "invocarfuncion", "doAlert('" + cleanMessage + "');", true);
            obj.KARDEX_PRODUCTO_SOLICITA(Session["IDE_USUARIO"].ToString(), item, "SALIDA", 0, Decimal.ToInt32(pto));
            bravo();
        }
    }
    protected void ListarProductos()
    {
        BL_RRHH_COMPETENCIAS_EVAL obj = new BL_RRHH_COMPETENCIAS_EVAL();
        DataTable dt = new DataTable();

        if (ddlProductos.SelectedIndex > 0)
        {
            dt = obj.SEL_RRHH_PRODUCTO_POR_PUNTOS(Convert.ToDecimal(ddlProductos.SelectedValue));
            if (dt.Rows.Count > 0)
            {
                ListView1.DataSource = dt;
                ListView1.DataBind();
            }
            else
            {
                ListView1.DataSource = dt;
                ListView1.DataBind();
            }
        }
        else
        {
            ListView1.DataSource = dt;
            ListView1.DataBind();
        }
    }
    protected void gerencias()
    {
        BL_RRHH_COMPETENCIAS_EVAL obj = new BL_RRHH_COMPETENCIAS_EVAL();
        DataTable dtResultado         = new DataTable();

        dtResultado = obj.uspLISTAR_GERENCIA_CENTROS(1, "", Convert.ToInt32(ddlEmpresa.SelectedValue));

        if (dtResultado.Rows.Count > 0)
        {
            ddlGerencia.DataSource     = dtResultado;
            ddlGerencia.DataTextField  = dtResultado.Columns["NOMBRE"].ToString();
            ddlGerencia.DataValueField = dtResultado.Columns["IDE_GERENCIA"].ToString();
            ddlGerencia.DataBind();
            centros();
            PersonalCargo(2);
            PersonalCargo(3);
        }
        else
        {
            ddlGerencia.DataSource = dtResultado;
            ddlGerencia.DataBind();

            ddlCentro.DataSource = dtResultado;
            ddlCentro.DataBind();
        }
    }
Ejemplo n.º 4
0
    protected void Personal()
    {
        BL_RRHH_COMPETENCIAS_EVAL obj = new BL_RRHH_COMPETENCIAS_EVAL();
        DataTable dtResultado         = new DataTable();

        //dtResultado = obj.ListarPersonal_mando(Session["IDE_USUARIO"].ToString ());
        dtResultado = obj.uspSEL_RRHH_PERSONAL_EMPRESA_TODO();
        if (dtResultado.Rows.Count > 0)
        {
            ddlPersonal.DataSource     = dtResultado;
            ddlPersonal.DataTextField  = "NOMBRE_COMPLETO";
            ddlPersonal.DataValueField = "ID_DNI";
            ddlPersonal.DataBind();
            ddlPersonal.Items.Insert(0, new ListItem("--- Seleccionar ---", ""));
            btnIngresar.Visible = true;


            //cboCountry.DataSource = dtResultado;
            //cboCountry.DataTextField = "NOMBRE_COMPLETO";
            //cboCountry.DataValueField = "ID_DNI";
            //cboCountry.DataBind();
            //cboCountry.Items.Insert(0, new ListItem("--- Seleccionar ---", ""));
        }
        else
        {
            ddlPersonal.Items.Insert(0, new ListItem("--- Seleccionar ---", ""));
            btnIngresar.Visible = false;

            string cleanMessage = "No existe personal a reconocer";
            ScriptManager.RegisterStartupScript(this, typeof(Page), "invocarfuncion", "doAlert('" + cleanMessage + "');", true);
        }
    }
Ejemplo n.º 5
0
    protected void Listar()
    {
        string estado = string.Empty;

        if (ddlEstados.SelectedIndex == 0)
        {
            estado = string.Empty;
        }
        else
        {
            estado = ddlEstados.SelectedValue.ToString();
        }
        BL_RRHH_COMPETENCIAS_EVAL obj = new BL_RRHH_COMPETENCIAS_EVAL();
        DataTable dtResultado         = new DataTable();

        dtResultado = obj.ListarRequerimiento(estado);
        if (dtResultado.Rows.Count > 0)
        {
            GridView1.DataSource = dtResultado;
            GridView1.DataBind();
        }
        else
        {
            GridView1.DataSource = dtResultado;
            GridView1.DataBind();
        }
    }
    protected void ValorProducto()
    {
        BL_RRHH_COMPETENCIAS_EVAL obj = new BL_RRHH_COMPETENCIAS_EVAL();
        DataTable dtResultado         = new DataTable();

        ddlProductos.DataSource     = obj.SEL_RRHH_PRODUCTO_TIPOS();
        ddlProductos.DataTextField  = "Puntos";
        ddlProductos.DataValueField = "Puntos";
        ddlProductos.DataBind();

        ddlProductos.Items.Insert(0, new ListItem("--- Seleccionar ---", ""));
    }
    protected void Personal()
    {
        BL_RRHH_COMPETENCIAS_EVAL obj = new BL_RRHH_COMPETENCIAS_EVAL();
        DataTable dtResultado         = new DataTable();

        dtResultado = obj.uspSEL_RRHH_PERSONAL_TIPO_TODO("01");
        if (dtResultado.Rows.Count > 0)
        {
            ddlPersonal.DataSource     = dtResultado;
            ddlPersonal.DataTextField  = "NOMBRE_COMPLETO";
            ddlPersonal.DataValueField = "ID_DNI";
            ddlPersonal.DataBind();
            ddlPersonal.Items.Insert(0, new ListItem("--- Seleccionar ---", ""));
        }
    }
    protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
    {
        BL_RRHH_COMPETENCIAS_EVAL obj = new BL_RRHH_COMPETENCIAS_EVAL();
        BL_PERSONAL ObjEstado         = new BL_PERSONAL();
        DataTable   dtResultado       = new DataTable();

        if (e.Row.RowType == DataControlRowType.DataRow)
        {
            dtResultado = ObjEstado.ListarParametros("ESTADO", "RRHH_COMPETENCIAS_EVAL");
            if (dtResultado.Rows.Count > 0)
            {
                RadioButtonList rblShippers = (RadioButtonList)e.Row.FindControl("rdoOpcion");
                rblShippers.Items.FindByValue((e.Row.FindControl("lblEstado") as Label).Text).Selected = true;
            }
        }
    }
    protected void bravo()
    {
        BL_RRHH_COMPETENCIAS_EVAL obj = new BL_RRHH_COMPETENCIAS_EVAL();
        DataTable dtResultado         = new DataTable();

        dtResultado = obj.SEL_RRHH_PERSONAL_EMPRESA_POR_ID(Session["IDE_USUARIO"].ToString());
        if (dtResultado.Rows.Count > 0)
        {
            txtPunto.Text     = dtResultado.Rows[0]["PUNTO_BRAVO"].ToString();
            ListView1.Enabled = true;
        }
        else
        {
            ListView1.Enabled = false;
        }
    }
    protected void Listar()
    {
        BL_RRHH_COMPETENCIAS_EVAL obj = new BL_RRHH_COMPETENCIAS_EVAL();
        DataTable dtResultado         = new DataTable();

        dtResultado = obj.SEL_RRHH_KARDEX_PRODUCTOS(ddlEstados.SelectedValue);
        if (dtResultado.Rows.Count > 0)
        {
            GridView1.DataSource = dtResultado;
            GridView1.DataBind();
        }
        else
        {
            GridView1.DataSource = dtResultado;
            GridView1.DataBind();
        }
    }
    protected void ProcesarReconocimiento(object sender, ImageClickEventArgs e)
    {
        ImageButton btnProcesar = ((ImageButton)sender);
        GridViewRow row         = btnProcesar.NamingContainer as GridViewRow;
        string      pk          = GridView1.DataKeys[row.RowIndex].Values[0].ToString();



        BL_RRHH_COMPETENCIAS_EVAL obj = new BL_RRHH_COMPETENCIAS_EVAL();
        DataTable dt = new DataTable();

        dt = obj.ProcesarEntregaPremio(Convert.ToInt32(pk));

        string cleanMessage = "Registro Procesado";

        ScriptManager.RegisterStartupScript(this, typeof(Page), "invocarfuncion", "doAlert('" + cleanMessage + "');", true);

        Listar();
    }
Ejemplo n.º 12
0
    protected void Actualizar_Sustento(object sender, ImageClickEventArgs e)
    {
        BL_RRHH_COMPETENCIAS_EVAL obj = new BL_RRHH_COMPETENCIAS_EVAL();
        DataTable dtResultado         = new DataTable();

        ImageButton btnEditar = ((ImageButton)sender);
        GridViewRow row       = btnEditar.NamingContainer as GridViewRow;

        string  pk          = GridView1.DataKeys[row.RowIndex].Values[0].ToString();
        TextBox txtSustento = (TextBox)row.FindControl("txtSustento");


        obj.uspUPD_RRHH_COMPETENCIAS_EVAL_SUSTENTO(Convert.ToInt32(pk), txtSustento.Text);
        string cleanMessage = "Sustento actualizado";

        ScriptManager.RegisterStartupScript(this, typeof(Page), "invocarfuncion", "doAlert('" + cleanMessage + "');", true);

        Listar();
    }
Ejemplo n.º 13
0
    protected void btnIngresar_Click(object sender, EventArgs e)
    {
        string cleanMessage = string.Empty;

        if (ddlPersonal.SelectedIndex < 1)
        {
            cleanMessage = "Seleccionar personal";
            ScriptManager.RegisterStartupScript(this, typeof(Page), "invocarfuncion", "doAlert('" + cleanMessage + "');", true);
        }
        else if (ddlCompetencia.SelectedIndex < 1)
        {
            cleanMessage = "Seleccionar competencia";
            ScriptManager.RegisterStartupScript(this, typeof(Page), "invocarfuncion", "doAlert('" + cleanMessage + "');", true);
        }
        else if (txtSustento.Text.Trim() == string.Empty)
        {
            cleanMessage = "Ingresar sustento";
            ScriptManager.RegisterStartupScript(this, typeof(Page), "invocarfuncion", "doAlert('" + cleanMessage + "');", true);
        }
        else
        {
            BE_RRHH_COMPETENCIAS_EVAL oBESol = new BE_RRHH_COMPETENCIAS_EVAL();
            oBESol.IDE_COMPETENCIA = 0;
            oBESol.DNI_EVALUADO    = ddlPersonal.SelectedValue.ToString();
            oBESol.DNI_SUPERVISOR  = Session["IDE_USUARIO"].ToString();
            oBESol.IDE_FACTOR      = Convert.ToInt32(ddlCompetencia.SelectedValue);
            oBESol.SUSTENTO        = txtSustento.Text.Trim();

            int dtrpta = 0;
            dtrpta = new BL_RRHH_COMPETENCIAS_EVAL().Mant_Insert_Reconocimiento(oBESol);
            if (dtrpta > 0)
            {
                BL_RRHH_COMPETENCIAS_EVAL ob = new BL_RRHH_COMPETENCIAS_EVAL();
                ob.EnviarCorreoCompetencia(dtrpta);
                cleanMessage = "Registro exitoso, en poco tiempo estaremos informando sobre la situación de este reconocimiento, gracias";
                ScriptManager.RegisterStartupScript(this, typeof(Page), "invocarfuncion", "doAlert('" + cleanMessage + "');", true);

                Limipiar();
            }
        }

        //ScriptManager.RegisterStartupScript(this, typeof(Page), "invocarfuncion", "JSFunction();", true);
    }
Ejemplo n.º 14
0
    protected void SUPERVISOR()
    {
        BL_RRHH_COMPETENCIAS_EVAL obj = new BL_RRHH_COMPETENCIAS_EVAL();
        DataTable dtResultado         = new DataTable();

        CECOS_GESTOR = Request.QueryString["CECOS_GESTOR"].ToString();
        dtResultado  = obj.uspSEL_RRHH_PERSONAL_GERENCIA_TIPO(CECOS_GESTOR, "01");


        if (dtResultado.Rows.Count > 0)
        {
            ddlSupervisor.DataSource = dtResultado;

            ddlSupervisor.DataTextField  = "NOMBRE_COMPLETO";
            ddlSupervisor.DataValueField = "ID_DNI";
            ddlSupervisor.DataBind();

            ddlSupervisor.Items.Insert(0, new ListItem("---", ""));
        }
    }
Ejemplo n.º 15
0
    protected void centros()
    {
        BL_RRHH_COMPETENCIAS_EVAL obj = new BL_RRHH_COMPETENCIAS_EVAL();
        DataTable dtResultado         = new DataTable();

        dtResultado = obj.uspLISTAR_GERENCIA_CENTROS(5, ddlGerenciaDestino.SelectedValue.ToString(), Convert.ToInt32(BL_Session.ID_EMPRESA));

        if (dtResultado.Rows.Count > 0)
        {
            ddlCentro.DataSource     = dtResultado;
            ddlCentro.DataTextField  = dtResultado.Columns["NOMBRE"].ToString();
            ddlCentro.DataValueField = dtResultado.Columns["CENTRO_COSTO"].ToString();
            ddlCentro.DataBind();
        }
        else
        {
            ddlCentro.DataSource = dtResultado;
            ddlCentro.DataBind();
        }
    }
Ejemplo n.º 16
0
    protected void btnGuardar_Click(object sender, EventArgs e)
    {
        BL_RRHH_COMPETENCIAS_EVAL obj = new BL_RRHH_COMPETENCIAS_EVAL();
        DataTable dt = new DataTable();

        if (txtSustento.Text != string.Empty)
        {
            dt = obj.ProcesarKardex_Competencia(Convert.ToInt32(lblCodigo.Text), "R", 100, txtSustento.Text.Trim());

            string cleanMessage = "Registro procesado";
            ScriptManager.RegisterStartupScript(this, typeof(Page), "invocarfuncion", "doAlert('" + cleanMessage + "');", true);

            Listar();
        }
        else
        {
            string cleanMessage = "ingresar sustento de rechazo";
            ScriptManager.RegisterStartupScript(this, typeof(Page), "invocarfuncion", "doAlert('" + cleanMessage + "');", true);
        }
    }
    protected void centros()
    {
        BL_RRHH_COMPETENCIAS_EVAL obj = new BL_RRHH_COMPETENCIAS_EVAL();
        DataTable dtResultado         = new DataTable();

        dtResultado = obj.uspLISTAR_GERENCIA_CENTROS(3, "", 1);

        if (dtResultado.Rows.Count > 0)
        {
            ddlCentro.DataSource     = dtResultado;
            ddlCentro.DataTextField  = dtResultado.Columns["NOMBRE"].ToString();
            ddlCentro.DataValueField = dtResultado.Columns["CENTRO_COSTO"].ToString();
            ddlCentro.DataBind();
        }
        else
        {
            ddlCentro.DataSource = dtResultado;
            ddlCentro.DataBind();
        }
    }
Ejemplo n.º 18
0
    protected void centros()
    {
        BL_RRHH_COMPETENCIAS_EVAL obj = new BL_RRHH_COMPETENCIAS_EVAL();
        DataTable dtResultado         = new DataTable();

        //dtResultado = obj.uspLISTAR_GERENCIA_CENTROS(2, ddlGerencia.SelectedValue.ToString(), 1);
        dtResultado = obj.uspLISTAR_GERENCIA_X_CENTROS(ddlGerencia.SelectedValue.ToString(), Convert.ToInt32(ddlEmpresas.SelectedValue));

        if (dtResultado.Rows.Count > 0)
        {
            ddlCentro.DataSource     = dtResultado;
            ddlCentro.DataTextField  = dtResultado.Columns["NOMBRE"].ToString();
            ddlCentro.DataValueField = dtResultado.Columns["COD_CENTRO"].ToString();
            ddlCentro.DataBind();
        }
        else
        {
            ddlCentro.DataSource = dtResultado;
            ddlCentro.DataBind();
        }
    }
Ejemplo n.º 19
0
    protected void Personal()
    {
        BL_RRHH_COMPETENCIAS_EVAL obj = new BL_RRHH_COMPETENCIAS_EVAL();
        DataTable dtResultado         = new DataTable();

        CECOS_GESTOR = Request.QueryString["CECOS_GESTOR"].ToString();
        dtResultado  = obj.uspSEL_RRHH_PERSONAL_EMPRESA_CC(CECOS_GESTOR);
        //dtResultado = obj.uspSEL_RRHH_PERSONAL_TIPO_TODO("01");
        if (dtResultado.Rows.Count > 0)
        {
            ddlPersonal.Items.Clear();
            ddlPersonal.DataSource     = dtResultado;
            ddlPersonal.DataTextField  = "NOMBRE_COMPLETO";
            ddlPersonal.DataValueField = "ID_DNI";
            ddlPersonal.DataBind();
            ddlPersonal.Items.Insert(0, new ListItem("--- Seleccionar ---", ""));
        }
        else
        {
            ddlPersonal.Items.Insert(0, new ListItem("--- Seleccionar ---", ""));
        }
    }
Ejemplo n.º 20
0
    protected void gerenciasResponsable()
    {
        BL_RRHH_COMPETENCIAS_EVAL obj = new BL_RRHH_COMPETENCIAS_EVAL();
        DataTable dtResultado         = new DataTable();

        dtResultado = obj.uspLISTAR_GERENCIA_CENTROS(1, "", Convert.ToInt32(ddlEmpresa.SelectedValue));

        if (dtResultado.Rows.Count > 0)
        {
            ddlGerenciaResponsable.DataSource     = dtResultado;
            ddlGerenciaResponsable.DataTextField  = dtResultado.Columns["DES_GERENCIA"].ToString();
            ddlGerenciaResponsable.DataValueField = dtResultado.Columns["IDE_GERENCIA"].ToString();
            ddlGerenciaResponsable.DataBind();
            ddlGerenciaResponsable.Items.Insert(0, new ListItem("--- TODOS ---", ""));

            ListarResponsables();
        }
        else
        {
            ddlGerenciaResponsable.DataSource = dtResultado;
            ddlGerenciaResponsable.DataBind();
        }
    }
Ejemplo n.º 21
0
    protected void ProcesarReconocimiento(object sender, ImageClickEventArgs e)
    {
        ImageButton btnProcesar = ((ImageButton)sender);
        GridViewRow row         = btnProcesar.NamingContainer as GridViewRow;
        string      pk          = GridView1.DataKeys[row.RowIndex].Values[0].ToString();

        RadioButtonList rb       = (RadioButtonList)row.FindControl("rdoOpcion");
        TextBox         txtPunto = (TextBox)row.FindControl("txtPunto");


        //string z= pk + " - " + rb.SelectedValue;
        BL_RRHH_COMPETENCIAS_EVAL obj = new BL_RRHH_COMPETENCIAS_EVAL();
        DataTable dt = new DataTable();

        if (rb.SelectedValue == "R")
        {
            ModalRegistro.Show();
            lblCodigo.Text = pk.ToString();
        }
        else if (rb.SelectedValue == "A")
        {
            if (txtPunto.Text == string.Empty)
            {
                string cleanMessage = "Ingresar puntaje de reconocimiento";
                ScriptManager.RegisterStartupScript(this, typeof(Page), "invocarfuncion", "doAlert('" + cleanMessage + "');", true);
            }
            else
            {
                dt = obj.ProcesarKardex_Competencia(Convert.ToInt32(pk), rb.SelectedValue, Convert.ToInt32(txtPunto.Text), "");

                string cleanMessage = "Registro procesado";
                ScriptManager.RegisterStartupScript(this, typeof(Page), "invocarfuncion", "doAlert('" + cleanMessage + "');", true);

                Listar();
            }
        }
    }
Ejemplo n.º 22
0
    protected void Personal()
    {
        BL_RRHH_COMPETENCIAS_EVAL obj = new BL_RRHH_COMPETENCIAS_EVAL();
        DataTable dtResultado         = new DataTable();

        dtResultado = obj.uspSEL_RRHH_PERSONAL_TIPO_TODO("01");
        if (dtResultado.Rows.Count > 0)
        {
            ddlPersonal.DataSource     = dtResultado;
            ddlPersonal.DataTextField  = "NOMBRE_COMPLETO";
            ddlPersonal.DataValueField = "ID_DNI";
            ddlPersonal.DataBind();
            ddlPersonal.Items.Insert(0, new ListItem("--- Seleccionar ---", ""));


            ddlJefe.DataSource     = dtResultado;
            ddlJefe.DataTextField  = "NOMBRE_COMPLETO";
            ddlJefe.DataValueField = "ID_DNI";
            ddlJefe.DataBind();
            ddlJefe.Items.Insert(0, new ListItem("--- Seleccionar ---", ""));


            ddlAprobador.DataSource     = dtResultado;
            ddlAprobador.DataTextField  = "NOMBRE_COMPLETO";
            ddlAprobador.DataValueField = "ID_DNI";
            ddlAprobador.DataBind();
            ddlAprobador.Items.Insert(0, new ListItem("--- Seleccionar ---", ""));
        }
        else
        {
            ddlPersonal.Items.Insert(0, new ListItem("--- Seleccionar ---", ""));


            string cleanMessage = "No existe personal";
            ScriptManager.RegisterStartupScript(this, typeof(Page), "invocarfuncion", "doAlert('" + cleanMessage + "');", true);
        }
    }
Ejemplo n.º 23
0
    protected void gerencias()
    {
        BL_RRHH_COMPETENCIAS_EVAL obj = new BL_RRHH_COMPETENCIAS_EVAL();
        DataTable dtResultado         = new DataTable();

        dtResultado = obj.uspLISTAR_GERENCIA_CENTROS(4, "", Convert.ToInt32(BL_Session.ID_EMPRESA));

        if (dtResultado.Rows.Count > 0)
        {
            ddlGerenciaDestino.DataSource     = dtResultado;
            ddlGerenciaDestino.DataTextField  = dtResultado.Columns["DES_GERENCIA"].ToString();
            ddlGerenciaDestino.DataValueField = dtResultado.Columns["IDE_GERENCIA"].ToString();
            ddlGerenciaDestino.DataBind();
            centros();
        }
        else
        {
            ddlGerenciaDestino.DataSource = dtResultado;
            ddlGerenciaDestino.DataBind();

            //ddlCentro.DataSource = dtResultado;
            //ddlCentro.DataBind();
        }
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        HiddenField1.Value = Request.QueryString["Usuario"];

        string Requ_Numero      = Request.QueryString["Requ_Numero"];
        string Reqd_CodLinea    = Request.QueryString["Reqd_CodLinea"];
        string Reqs_Correlativo = Request.QueryString["Reqs_Correlativo"];

        Boolean correo = email_bien_escrito(HiddenField1.Value);

        if (correo == true)
        {
            BL_RRHH_COMPETENCIAS_EVAL obj = new BL_RRHH_COMPETENCIAS_EVAL();
            DataTable dtResultado         = new DataTable();
            dtResultado = obj.uspSEL_RRHH_PERSONAL_EMPRESA_POR_CORREO(HiddenField1.Value);
            if (dtResultado.Rows.Count > 0)
            {
                //Session["IDE_USUARIO"] =

                string     pMesajeResp = string.Empty;
                BE_Usuario oBE_Usuario = new BE_Usuario();
                oBE_Usuario.f_Usuario_E = dtResultado.Rows[0]["ID_DNI"].ToString();

                BE_Usuario objUsuario_R = new BE_Usuario();

                BL_Seguridad obj_Usuario = new BL_Seguridad();
                objUsuario_R = new BL_Seguridad().f_LogeoUsuarioExterno(oBE_Usuario, ref pMesajeResp);
                if (string.IsNullOrEmpty(objUsuario_R.f_Usuario_E))
                {
                    UC_MessageBox.Show(Page, this.GetType(), pMesajeResp);
                }
                else
                {
                    Session["IDE_USUARIO"] = objUsuario_R.f_Usuario_E.ToString();


                    Response.Redirect("~/CAREMENOR/PDC_Adjunto.aspx?Requ_Numero='" + Requ_Numero.Trim() + "'&Reqd_CodLinea='" + Reqd_CodLinea.Trim() + "'&Reqs_Correlativo='" + Reqs_Correlativo + "'");
                }
            }
            else
            {
                Response.Redirect("~/RRHH/Contacto.aspx");
            }
        }
        else
        {
            string     pMesajeResp = string.Empty;
            BE_Usuario oBE_Usuario = new BE_Usuario();
            oBE_Usuario.f_Usuario_E = HiddenField1.Value;

            BE_Usuario objUsuario_R = new BE_Usuario();

            BL_Seguridad obj_Usuario = new BL_Seguridad();
            objUsuario_R = new BL_Seguridad().f_LogeoUsuarioExterno(oBE_Usuario, ref pMesajeResp);
            if (string.IsNullOrEmpty(objUsuario_R.f_Usuario_E))
            {
                UC_MessageBox.Show(Page, this.GetType(), pMesajeResp);
            }
            else
            {
                Session["IDE_USUARIO"] = objUsuario_R.f_Usuario_E.ToString();

                Response.Redirect("~/CAREMENOR/PDC_Adjunto.aspx?Requ_Numero=" + Requ_Numero.Trim() + "&Reqd_CodLinea=" + Reqd_CodLinea.Trim() + "&Reqs_Correlativo=" + Reqs_Correlativo);
            }
        }
    }
    protected void btnRegistro_Click(object sender, EventArgs e)
    {
        string cleanMessage = string.Empty;
        int    dtrpta       = 0;
        int    cantidad     = 0;

        if (GridView1.Rows.Count > 0)
        {
            foreach (GridViewRow row in GridView1.Rows)
            {
                string evaluado;
                string evaluador;
                string competencia;
                int    CODIGO;
                string sustento;
                evaluador   = Server.HtmlDecode(((string)(row.Cells[2].Text.Replace(" ", String.Empty))).Trim());
                evaluado    = Server.HtmlDecode(((string)(row.Cells[4].Text.Replace(" ", String.Empty))).Trim());
                competencia = Server.HtmlDecode(((string)(row.Cells[6].Text)).Trim());
                sustento    = Server.HtmlDecode(((string)(row.Cells[7].Text)).Trim());



                if (evaluado == string.Empty)
                {
                    cleanMessage = "Ingresar número de DNI del Reconocedor";
                    ScriptManager.RegisterStartupScript(this, typeof(Page), "invocarfuncion", "doAlert('" + cleanMessage + "');", true);
                }
                else if (evaluado == string.Empty)
                {
                    cleanMessage = "Ingresar número de DNI Reconocido";
                    ScriptManager.RegisterStartupScript(this, typeof(Page), "invocarfuncion", "doAlert('" + cleanMessage + "');", true);
                }
                else if (competencia == string.Empty)
                {
                    cleanMessage = "Ingresar competencia";
                    ScriptManager.RegisterStartupScript(this, typeof(Page), "invocarfuncion", "doAlert('" + cleanMessage + "');", true);
                }
                else if (sustento == string.Empty)
                {
                    cleanMessage = "Ingresar sustento";
                    ScriptManager.RegisterStartupScript(this, typeof(Page), "invocarfuncion", "doAlert('" + cleanMessage + "');", true);
                }
                else
                {
                    //Regex replace_a_Accents = new Regex("[á|à|ä|â]", RegexOptions.Compiled);
                    //competencia = replace_a_Accents.Replace(competencia, "a");

                    //Regex replace_e_Accents = new Regex("[é|è|ë|ê]", RegexOptions.Compiled);
                    //competencia = replace_a_Accents.Replace(competencia, "e");

                    //Regex replace_i_Accents = new Regex("[í|ì|ï|î]", RegexOptions.Compiled);
                    //competencia = replace_a_Accents.Replace(competencia, "i");

                    //Regex replace_o_Accents = new Regex("[ó|ò|ö|ô]", RegexOptions.Compiled);
                    //competencia = replace_a_Accents.Replace(competencia, "o");

                    //Regex replace_u_Accents = new Regex("[ú|ù|ü|û]", RegexOptions.Compiled);
                    //competencia = replace_a_Accents.Replace(competencia, "u");

                    CODIGO = ConsultaCompetencia(competencia);
                    BE_RRHH_COMPETENCIAS_EVAL oBESol = new BE_RRHH_COMPETENCIAS_EVAL();
                    oBESol.IDE_COMPETENCIA = 0;
                    oBESol.DNI_EVALUADO    = evaluado;
                    oBESol.DNI_SUPERVISOR  = evaluador;
                    oBESol.IDE_FACTOR      = CODIGO;
                    oBESol.SUSTENTO        = sustento;


                    dtrpta = new BL_RRHH_COMPETENCIAS_EVAL().Mant_Insert_Reconocimiento(oBESol);
                    if (dtrpta > 0)
                    {
                        cantidad++;
                    }
                }
            }
            if (dtrpta > 0)
            {
                BL_RRHH_COMPETENCIAS_EVAL ob = new BL_RRHH_COMPETENCIAS_EVAL();

                cleanMessage = "Registro exitoso, total (" + cantidad.ToString() + ")";
                ScriptManager.RegisterStartupScript(this, typeof(Page), "invocarfuncion", "doAlert('" + cleanMessage + "');", true);
            }
        }
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        lblCorreo.Text = Request.QueryString["Usuario"];
        IDE_CARTA      = Request.QueryString["IDE_CARTA"];
        IDE_APROBACION = Request.QueryString["IDE_APROBACION"];
        Boolean correo = email_bien_escrito(lblCorreo.Text);

        if (correo == true)
        {
            BL_RRHH_COMPETENCIAS_EVAL obj = new BL_RRHH_COMPETENCIAS_EVAL();
            DataTable dtResultado         = new DataTable();
            dtResultado = obj.uspSEL_RRHH_PERSONAL_EMPRESA_POR_CORREO(lblCorreo.Text);
            if (dtResultado.Rows.Count > 0)
            {
                //Session["IDE_USUARIO"] =

                string     pMesajeResp = string.Empty;
                BE_Usuario oBE_Usuario = new BE_Usuario();
                oBE_Usuario.f_Usuario_E = dtResultado.Rows[0]["ID_DNI"].ToString();

                BE_Usuario objUsuario_R = new BE_Usuario();

                BL_Seguridad obj_Usuario = new BL_Seguridad();
                objUsuario_R = new BL_Seguridad().f_LogeoUsuarioExterno(oBE_Usuario, ref pMesajeResp);
                if (string.IsNullOrEmpty(objUsuario_R.f_Usuario_E))
                {
                    UC_MessageBox.Show(Page, this.GetType(), pMesajeResp);
                }
                else
                {
                    Session["IDE_USUARIO"]       = objUsuario_R.f_Usuario_E.ToString();
                    Session["IDE_CARTA_APROBAR"] = Request.QueryString["IDE_CARTA"];
                    Session["IDE_APROBACION"]    = Request.QueryString["IDE_APROBACION"];
                    //string url = objUsuario_R.f_UrlDefault_E;
                    //Response.Redirect(url);
                    Response.Redirect("~/OPERACIONES/CartaCobranzasAprobaciones.aspx");
                }
            }
            else
            {
                Response.Redirect("~/RRHH/Contacto.aspx");
            }
        }
        else
        {
            string     pMesajeResp = string.Empty;
            BE_Usuario oBE_Usuario = new BE_Usuario();
            oBE_Usuario.f_Usuario_E = lblCorreo.Text;

            BE_Usuario objUsuario_R = new BE_Usuario();

            BL_Seguridad obj_Usuario = new BL_Seguridad();
            objUsuario_R = new BL_Seguridad().f_LogeoUsuarioExterno(oBE_Usuario, ref pMesajeResp);
            if (string.IsNullOrEmpty(objUsuario_R.f_Usuario_E))
            {
                UC_MessageBox.Show(Page, this.GetType(), pMesajeResp);
            }
            else
            {
                Session["IDE_USUARIO"]       = objUsuario_R.f_Usuario_E.ToString();
                Session["IDE_CARTA_APROBAR"] = Request.QueryString["IDE_CARTA"];
                Session["IDE_APROBACION"]    = Request.QueryString["IDE_APROBACION"];
                Response.Redirect("~/OPERACIONES/CartaCobranzasAprobaciones.aspx");
            }
        }
    }
Ejemplo n.º 27
0
    protected void Page_Load(object sender, EventArgs e)
    {
        //string hash = HashEmailForGravatar(email);

        lblCorreo.Text = Request.QueryString["correo"];
        IDE_FASE       = Request.QueryString["IDE_FASE"];
        IDE_FICHA      = Request.QueryString["IDE_FICHA"];
        IDE_EXAMEN     = Request.QueryString["IDE_EXAMEN"];
        Boolean correo = email_bien_escrito(lblCorreo.Text);

        if (correo == true)
        {
            BL_RRHH_COMPETENCIAS_EVAL obj = new BL_RRHH_COMPETENCIAS_EVAL();
            DataTable dtResultado         = new DataTable();
            dtResultado = obj.uspSEL_RRHH_PERSONAL_EMPRESA_POR_CORREO(lblCorreo.Text);
            if (dtResultado.Rows.Count > 0)
            {
                //Session["IDE_USUARIO"] =

                string     pMesajeResp = string.Empty;
                BE_Usuario oBE_Usuario = new BE_Usuario();
                oBE_Usuario.f_Usuario_E = dtResultado.Rows[0]["ID_DNI"].ToString();

                BE_Usuario objUsuario_R = new BE_Usuario();

                BL_Seguridad obj_Usuario = new BL_Seguridad();
                objUsuario_R = new BL_Seguridad().f_LogeoUsuarioExterno(oBE_Usuario, ref pMesajeResp);
                if (string.IsNullOrEmpty(objUsuario_R.f_Usuario_E))
                {
                    UC_MessageBox.Show(Page, this.GetType(), pMesajeResp);
                }
                else
                {
                    Session["IDE_USUARIO"] = objUsuario_R.f_Usuario_E.ToString();
                    Session["IDE_FASE"]    = IDE_FASE;
                    Session["IDE_FICHA"]   = IDE_FICHA;
                    Session["IDE_EXAMEN"]  = IDE_EXAMEN;

                    Response.Redirect("~/RRHH/FormativoExamen.aspx");
                }
            }
            else
            {
                Response.Redirect("~/RRHH/Contacto.aspx");
            }
        }
        else
        {
            string     pMesajeResp = string.Empty;
            BE_Usuario oBE_Usuario = new BE_Usuario();
            oBE_Usuario.f_Usuario_E = lblCorreo.Text;

            BE_Usuario objUsuario_R = new BE_Usuario();

            BL_Seguridad obj_Usuario = new BL_Seguridad();
            objUsuario_R = new BL_Seguridad().f_LogeoUsuarioExterno(oBE_Usuario, ref pMesajeResp);
            if (string.IsNullOrEmpty(objUsuario_R.f_Usuario_E))
            {
                UC_MessageBox.Show(Page, this.GetType(), pMesajeResp);
            }
            else
            {
                Session["IDE_EXAMEN"]  = IDE_EXAMEN;
                Session["IDE_USUARIO"] = objUsuario_R.f_Usuario_E.ToString();
                Session["IDE_FASE"]    = IDE_FASE;
                Session["IDE_FICHA"]   = IDE_FICHA;
                Response.Redirect("~/RRHH/FormativoExamen.aspx");
            }
        }
    }