Esempio n. 1
0
    private void LlenarEstados()
    {
        try
        {
            BL_ASIGNACION_RECURSOS obj = new BL_ASIGNACION_RECURSOS();
            DataTable dtResultado      = new DataTable();

            foreach (DataListItem FilaFactor in DataListRecursos.Items)
            {
                int id = (int)DataListRecursos.DataKeys[FilaFactor.ItemIndex];
                dtResultado = obj.LIST_ASIGNACION_DETALLE_POR_ID(id);

                RadioButtonList RadioEstados = ((RadioButtonList)FilaFactor.FindControl("RadioEstados"));
                RadioEstados.SelectedValue = dtResultado.Rows[0]["FLG_ATENDIDO"].ToString();

                RadioEstados.DataSource     = GetEstado();
                RadioEstados.DataTextField  = GetEstado().Columns["ValueMember"].ToString();
                RadioEstados.DataValueField = GetEstado().Columns["DisplayMember"].ToString();
                RadioEstados.DataBind();
            }
        }
        catch (Exception ex)
        {
            UC_MessageBox.Show(Page, Page.GetType(), "Ocurrio un error :" + ex.Message);
            return;
        }
    }
Esempio n. 2
0
    private void ListarPep()
    {
        try
        {
            BL_LOG_SOLPED obj         = new BL_LOG_SOLPED();
            DataTable     dtResultado = new DataTable();

            foreach (ListViewItem FilaFactor in lstRol.Items)
            {
                DropDownList ddlPep = ((DropDownList)FilaFactor.FindControl("ddlPep"));
                string       codigo = lstRol.DataKeys[FilaFactor.DisplayIndex].Value.ToString();

                dtResultado = obj.uspSEL_LOG_MATERIALES_PEP_IDE_MATERIAL(codigo);

                ddlPep.DataSource     = dtResultado;
                ddlPep.DataTextField  = dtResultado.Columns["PEP_DETALLE"].ToString();
                ddlPep.DataValueField = dtResultado.Columns["PEP"].ToString();
                ddlPep.DataBind();

                //dtResultado.AsDataView
                //DataView dv = ds.Tables[0].DefaultView;
                DataView dv = new DataView(dtResultado);
                //dv.RowFilter = "FLG_CAMBIO='" + false + "'";
                foreach (DataRowView dr in dv)
                {
                    foreach (ListItem item in ddlPep.Items)
                    {
                        if (Convert.ToBoolean(dr["FLG_CAMBIO"].ToString()) == false)
                        {
                            item.Attributes.Add("style", "background-color:#3399FF;color:white;font-weight:bold;");
                        }
                        else
                        {
                            item.Attributes.Add("style", "background-color:#3399FF;color:red;font-weight:bold;");
                        }
                    }
                }

                //foreach (ListItem item in ddlPep.Items)
                //{

                //    string x = dtResultado.Columns["FLG_CAMBIO"].ToString();
                //    if (x == "0")
                //    {
                //        item.Attributes.Add("style", "background-color:#3399FF;color:white;font-weight:bold;");
                //    }
                //}
            }
            // ModalRegistro.Show();
        }
        catch (Exception ex)
        {
            UC_MessageBox.Show(Page, Page.GetType(), "Ocurrio un error al Consultar :" + ex.Message);
            return;
        }
    }
Esempio n. 3
0
    protected void btnGuardar_Click(object sender, ImageClickEventArgs e)
    {
        string cleanMessage        = string.Empty;
        BL_ASIGNACION_RECURSOS obj = new BL_ASIGNACION_RECURSOS();
        DataTable dtResultado      = new DataTable();

        foreach (DataListItem FilaFactor in DataListRecursos.Items)
        {
            int             id           = (int)DataListRecursos.DataKeys[FilaFactor.ItemIndex];
            RadioButtonList RadioEstados = ((RadioButtonList)FilaFactor.FindControl("RadioEstados"));
            obj.UPD_ASIGNACION_ESTADO(id, Session["Usuario"].ToString(), Convert.ToInt32(RadioEstados.SelectedValue));
        }
        cleanMessage = "Actualizacion Satifactoria";
        ScriptManager.RegisterStartupScript(this, typeof(Page), "invocarfuncion", "doAlert('" + cleanMessage + "');", true);

        LlenarDatos();
    }
Esempio n. 4
0
    protected void Registro()
    {
        string cleanMessage = string.Empty;


        foreach (ListViewDataItem FilaFactor in ListView1.Items)
        {
            TextBox txtsustento       = ((TextBox)FilaFactor.FindControl("txtSustento"));
            Label   lblIDE_NOMINACION = ((Label)FilaFactor.FindControl("lblIDE_NOMINACION"));
            Label   lblDNI_EVALUADO   = ((Label)FilaFactor.FindControl("lblDNI_EVALUADO"));
            Label   lblIDE_FACTOR     = ((Label)FilaFactor.FindControl("lblIDE_FACTOR"));


            if (txtsustento.Text != string.Empty)
            {
                BE_RRHH_ESTRELLA_NOMINACION oBESol = new BE_RRHH_ESTRELLA_NOMINACION();
                oBESol.IDE_NOMINACION = Convert.ToInt32(lblIDE_NOMINACION.Text);
                oBESol.DNI_EVALUADO   = lblDNI_EVALUADO.Text;
                oBESol.DNI_SUPERVISOR = Session["IDE_USUARIO"].ToString();
                oBESol.IDE_FACTOR     = Convert.ToInt32(lblIDE_FACTOR.Text);
                oBESol.SUSTENTO       = txtsustento.Text.Trim();

                int dtrpta = 0;
                dtrpta = new BL_RRHH_ESTRELLA_NOMINACION().uspINS_RRHH_ESTRELLA_NOMINACION(oBESol);
                if (dtrpta > 0)
                {
                    BL_RRHH_ESTRELLA_NOMINACION ob = new BL_RRHH_ESTRELLA_NOMINACION();
                    ob.CORREO_NOMINACION(dtrpta);
                    ob.SP_CORREO_NOMINACION_IDE(dtrpta);
                    //cleanMessage = "Registro exitoso, en poco tiempo estaremos informando sobre la situación de esta nominación, gracias";
                    //ScriptManager.RegisterStartupScript(this, typeof(Page), "invocarfuncion", "doAlert('" + cleanMessage + "');", true);
                    ModalRegistro.Show();
                }
            }
            else
            {
                cleanMessage = "Ingresar sustento de nominación";
                ScriptManager.RegisterStartupScript(this, typeof(Page), "invocarfuncion", "doAlert('" + cleanMessage + "');", true);
            }
        }
    }
    private void OpcionesRespuestaCar()
    {
        try
        {
            BL_PERSONAL obj = new BL_PERSONAL();
            DataTable   dt  = new DataTable();
            dt = obj.ListarParametros_orden("RRHH_FORMATIVO_EXAM_CARTILLA", "NIVEL_EXIGENCIA");
            //int Cod = 0;

            BL_RRHH_FORMATIVO_EXAM_CARTILLA objEx = new BL_RRHH_FORMATIVO_EXAM_CARTILLA();
            DataTable dtEx = new DataTable();

            foreach (ListViewItem FilaFactor in ListView1.Items)
            {
                RadioButtonList RadioButtonList1 = ((RadioButtonList)FilaFactor.FindControl("RadioButtonList1"));

                RadioButtonList1.DataSource     = dt;
                RadioButtonList1.DataTextField  = "RESUMEN_ORDEN";
                RadioButtonList1.DataValueField = "ID_PARAMETRO";
                RadioButtonList1.DataBind();


                string codePregunta = ListView1.DataKeys[FilaFactor.DisplayIndex].Value.ToString();


                dtEx = objEx.uspSEL_RESPUESTA_EXAM_CARTILLA(Convert.ToInt32(codePregunta), Session["IDE_USUARIO"].ToString(), Session["DNI_EVALUADO"].ToString(), Convert.ToInt32(lblCodigo.Text), Convert.ToInt32(Session["IDE_PROGRAMA"].ToString()));
                if (dtEx.Rows.Count > 0)
                {
                    RadioButtonList1.SelectedValue = dtEx.Rows[0]["IDE_NOTA"].ToString();
                }
            }
        }
        catch (Exception ex)
        {
            UC_MessageBox.Show(Page, Page.GetType(), "Ocurrio un error al Consultar :" + ex.Message);
            return;
        }
    }