Example #1
0
    protected string ObtenerHistorial(string sIdAsunto)
    {
        //CronologĂ­a del asunto
        string sFecha = "";

        StringBuilder sb = new StringBuilder();

        try
        {
            sb.Append("<table id='tblTareas' style='width:700px; text-align:left;'>");
            //............................ estado........... Fecha................Profesional
            sb.Append("<colgroup><col style='width:135px;' /><col style='width:75px;' /><col style='width:490px;' /></colgroup>");
            SqlDataReader dr = ASUNTOESTADO_T.SelectByt600_idasunto(tr, int.Parse(sIdAsunto));

            while (dr.Read())
            {
                sb.Append("<tr style='height:16px;'>");
                sb.Append("<td style='padding-left:5px;'>" + dr["Estado"].ToString() + "</td>");
                sFecha = dr["t606_fecha"].ToString();
                if (sFecha != "")
                {
                    sFecha = DateTime.Parse(dr["t606_fecha"].ToString()).ToShortDateString();
                }
                sb.Append("<td>");
                sb.Append(sFecha);
                sb.Append("</td><td>");
                sb.Append(dr["nomRecurso"].ToString());
                sb.Append("</td></tr>");
            }
            dr.Close();
            dr.Dispose();
            sb.Append("</table>");
            return("OK@#@" + sb.ToString());;
        }
        catch (Exception ex)
        {
            return("Error@#@" + Errores.mostrarError("Error al obtener la cronologĂ­a del asunto.", ex));
        }
    }