Exemple #1
0
    protected string ObtenerProyectos(string sIdContrato)
    {
        string        sResul = "";
        StringBuilder sb     = new StringBuilder();

        try
        {
            SqlDataReader dr = PROYECTOSUBNODO.ObtenerContratantesCambioEstructura(int.Parse(sIdContrato), "T");

            sb.Append("<table id='tblDatosRep' class='texto' style='width:570px;'>");
            sb.Append("<colgroup><col style='width:20px;' /><col style='width:250px;' /><col style='width:100px;' /><col style='width:100px;' /><col style='width:100px;' /></colgroup>");
            sb.Append("<tbody>");
            while (dr.Read())
            {
                sb.Append("<tr idPSN='" + dr["t305_idproyectosubnodo"].ToString() + "' ");
                //sb.Append("idProy='" + dr["t301_idproyecto"].ToString() + "' ");
                sb.Append("cualidad='" + dr["t305_cualidad"].ToString() + "' ");

                sb.Append("style='height:20px' >");
                sb.Append("<td></td>");
                sb.Append("<td style='padding-left:3px;'>");
                sb.Append("<nobr class='NBR W240'  style='noWrap:true;' title=\"cssbody=[dvbdy] cssheader=[dvhdr] header=[<img src='../../../../images/info.gif' style='vertical-align:middle' />  Información] ");
                sb.Append("body=[<label style='width:70px;'>Proyecto:</label>" + int.Parse(dr["t301_idproyecto"].ToString()).ToString("#,###") + " - " + dr["t301_denominacion"].ToString().Replace((char)34, (char)39) + "<br>");
                sb.Append("<label style='width:70px;'>" + Estructura.getDefCorta(Estructura.sTipoElem.NODO) + ":</label>" + int.Parse(dr["t303_idnodo"].ToString()).ToString("#,###") + " - " + dr["t303_denominacion"].ToString().Replace((char)34, (char)39) + "<br>");
                sb.Append("<label style='width:70px;'>Gestor Prod:</label>" + int.Parse(dr["t314_idusuario_responsable"].ToString()).ToString("#,###") + " - " + dr["Responsable"].ToString().Replace((char)34, (char)39) + "<br>");
                sb.Append("<label style='width:70px;'>Cliente:</label>" + dr["t302_denominacion"].ToString().Replace((char)34, (char)39) + "] hideselects=[off]\">");
                sb.Append(int.Parse(dr["t301_idproyecto"].ToString()).ToString("#,###") + " - " + dr["t301_denominacion"].ToString().Replace((char)34, (char)39));
                sb.Append("</nobr></td>");
                sb.Append("<td><nobr class='NBR W90' style='noWrap:true;'>" + dr["t303_denominacion"].ToString() + "</nobr></td>");
                sb.Append("<td><nobr class='NBR W90' style='noWrap:true;'>" + dr["Responsable"].ToString() + "</nobr></td>");
                sb.Append("<td><nobr class='NBR W90' style='noWrap:true;'>" + dr["t302_denominacion"].ToString() + "</nobr></td></tr>");
            }

            dr.Close();
            dr.Dispose();
            sb.Append("</tbody>");
            sb.Append("</table>");

            sResul = "OK@#@" + sb.ToString();;
        }
        catch (Exception ex)
        {
            sResul = "Error@#@" + Errores.mostrarError("Error al obtener la relación de réplicas.", ex);
        }

        return(sResul);
    }