Exemplo n.º 1
0
    private string ObtenerOrigenes(string sCR)
    {
        try
        {
            StringBuilder sb = new StringBuilder();

            sb.Append("<table id='tblDatos' class='texto' style='width: 900px;' mantenimiento='1'>");
            sb.Append("<colgroup><col style='width:15px;' /><col style='width:210px;' /><col style='width:75px;' /><col style='width:550px;' /><col style='width:50px;' /></colgroup>");

            SqlDataReader dr = TAREAORIGEN.SelectByt303_idnodo(null, short.Parse(sCR));
            while (dr.Read())
            {
                sb.Append("<tr id='" + dr["T353_idorigen"].ToString() + "' bd='' onclick='mm(event)'>");
                sb.Append("<td><img src='../../../../images/imgFN.gif'></td>");
                sb.Append("<td style='padding-left:5px;'><input type='text' id='txtDesc' class='txtL' style='width:200px' value='" + dr["T353_desorigen"].ToString() + "' maxlength='25' onKeyUp='fm(event)'></td>");
                sb.Append("<td><input type='checkbox' style='width:15px;' name='chkNot' id='chkNot' class='check' onclick='fm(event)' ");
                if ((bool)dr["T353_notificable"])
                {
                    sb.Append("checked=true");
                }
                sb.Append("></td><td><input type='text' id='txtMail' class='txtL' style='width:540px' value='" + dr["T353_email"].ToString() + "' maxlength='250' onKeyUp='fm(event)'></td>");
                sb.Append("<td><input type='checkbox' style='width:15px' name='chkEst' id='chkEst' class='check' onclick='fm(event)' ");
                if ((bool)dr["T353_estado"])
                {
                    sb.Append("checked=true");
                }
                sb.Append("></td></tr>");
            }
            dr.Close();
            dr.Dispose();

            sb.Append("</table>");
            strTablaHTML = sb.ToString();
            return("OK@#@" + sb.ToString());;
        }
        catch (Exception ex)
        {
            return("Error@#@" + Errores.mostrarError("Error al ordenar el catálogo", ex));
        }
    }