private string ObtenerEntradas(int intIdArea, byte intOrden, byte intAscDesc)
        {
            //Catalogo(Nullable<string> T074_DENOMINACION, Nullable<short> T075_ORIGEN, Nullable<int> T042_IDAREA, Nullable<int> T074_CREADOR, byte nOrden, byte nAscDesc)
            dr = null;
            dr = ENTRADA.Catalogo(intIdArea, intOrden, intAscDesc);

            int i = 0;

            System.Text.StringBuilder strBuilderCatalogo = new System.Text.StringBuilder();

            strBuilderCatalogo.Append("<table id='tblCatalogoEntrada' style='width: 830px;text-align:left'>" + (char)13);
            strBuilderCatalogo.Append("<colgroup><col style='width:45%;' /><col style='width:25%;' /><col style='width:30%;' /></colgroup>" + (char)13);

            while (dr.Read())
            {
                strBuilderCatalogo.Append("<tr id='" + dr["T074_CREADOR"].ToString() + "/" + dr["ID"].ToString() + "' ");

                //if (i % 2 == 0)
                //    strBuilderCatalogo.Append("class='FA' ");
                //else
                //    strBuilderCatalogo.Append("class='FB' ");

                i++;
                strBuilderCatalogo.Append(" onclick=mm(event); ");
                strBuilderCatalogo.Append(" ondblclick=this.className='FS';Det_Entrada(this); ");
                strBuilderCatalogo.Append(" style='cursor: pointer;height:16px'>");

                strBuilderCatalogo.Append("<td style='padding-left:5px'>&nbsp;&nbsp;" + dr["DESCRIPCION"].ToString() + "</td>");
                strBuilderCatalogo.Append("<td>&nbsp;&nbsp;" + dr["ORIGEN"].ToString() + "</td>");
                strBuilderCatalogo.Append("<td>&nbsp;&nbsp;" + dr["CREADOR"].ToString() + "</td>");
                strBuilderCatalogo.Append("</tr>" + (char)13);
            }

            dr.Close();
            dr.Dispose();

            strBuilderCatalogo.Append("</table>");
            return(strBuilderCatalogo.ToString());
        }
        private string ObtenerDatos()
        {
            string sResul = "";

            try
            {
                StringBuilder strBuilder = new StringBuilder();
                int           i          = 0;

                strBuilder.Append("<table id='tblDatos' class='texto' style='width: 396px;'>");
                strBuilder.Append("<colgroup><col style='width:396px;' /></colgroup>");
                if (hdnOpcion.Text == "Area")
                {
                    dr = Areas.Listado(int.Parse(Session["IDFICEPI"].ToString()), Session["ADMIN"].ToString());
                }
                else if (hdnOpcion.Text == "Tipo")
                {
                    dr = TIPO.Catalogo(null, short.Parse(hdnIDArea.Text), "", null, 4, 0);
                }
                else if (hdnOpcion.Text == "Entrada")
                {
                    dr = ENTRADA.Catalogo(null, short.Parse(hdnIDArea.Text), "", null, 4, 0);
                }
                else if (hdnOpcion.Text == "Alcance")
                {
                    dr = ALCANCE.Catalogo(null, short.Parse(hdnIDArea.Text), "", null, 4, 0);
                }
                else if (hdnOpcion.Text == "Proceso")
                {
                    dr = PROCESO.Catalogo(null, short.Parse(hdnIDArea.Text), "", null, 4, 0);
                }
                else if (hdnOpcion.Text == "Producto")
                {
                    dr = PRODUCTO.Catalogo(null, short.Parse(hdnIDArea.Text), "", null, 4, 0);
                }
                else if (hdnOpcion.Text == "Requisito")
                {
                    dr = REQUISITO.Catalogo(null, short.Parse(hdnIDArea.Text), "", null, 4, 0);
                }
                else if (hdnOpcion.Text == "CR")
                {
                    dr = CR.Catalogo();
                }
                else if (hdnOpcion.Text == "CR_TEXTO")
                {
                    dr = CR.Catalogo(short.Parse(hdnIDArea.Text));
                }
                else if (hdnOpcion.Text == "Cliente")
                {
                    dr = Cliente.Catalogo(short.Parse(hdnIDArea.Text));
                }
                else if (hdnOpcion.Text == "Proveedor")
                {
                    dr = Proveedor.Catalogo(short.Parse(hdnIDArea.Text));
                }
                else if (hdnOpcion.Text == "Causa")
                {
                    dr = CAUSA.Catalogo(null, short.Parse(hdnIDArea.Text), "", null, 4, 0);
                }
                else if (hdnOpcion.Text == "Origen")
                {
                    dr = ORIGEN.Catalogo(null, short.Parse(hdnIDArea.Text), "", null, 4, 0);
                }
                else if (hdnOpcion.Text == "Coordinadores")
                {
                    dr = Areas.CoordinadoresArea(int.Parse(hdnIDArea.Text));
                }
                else if (hdnOpcion.Text == "Solicitantes")
                {
                    dr = Areas.SolicitantesArea(int.Parse(hdnIDArea.Text));
                }
                else if (hdnOpcion.Text == "Especialistas")
                {
                    dr = Areas.LeerTecnicosArea(int.Parse(hdnIDArea.Text));
                }
                else if (hdnOpcion.Text == "Deficiencias")
                {
                    dr = Areas.DeficienciasArea(int.Parse(hdnIDArea.Text));
                }

                while (dr.Read())
                {
                    //if (i % 2 == 0) strBuilder.Append("<tr class=FA ");
                    //else strBuilder.Append("<tr class=FB ");
                    i++;
                    strBuilder.Append("<tr ");
                    if (hdnOpcion.Text == "Cliente" || hdnOpcion.Text == "Proveedor" || hdnOpcion.Text == "CR_TEXTO")
                    {
                        strBuilder.Append("id='" + i.ToString() + "'");
                    }
                    else
                    {
                        strBuilder.Append("id='" + dr["ID"].ToString() + "'");
                    }
                    strBuilder.Append(" onclick='ms(this)' ondblclick='aceptarClick(this);' onmousemove='TTip(event);' style='cursor:pointer;height:16px'>");
                    //strBuilder.Append("<td width='15%'>" + (int.Parse(dr["ID"].ToString())).ToString("#,###,##0") + "</td>");

                    if (hdnOpcion.Text == "Cliente" || hdnOpcion.Text == "Proveedor" || hdnOpcion.Text == "CR_TEXTO")
                    {
                        strBuilder.Append("<td style='padding-left:5px'><label class=texto id='lbl" + i.ToString() + "' style='width:315px;text-overflow:ellipsis;overflow:hidden'");
                    }
                    else
                    {
                        strBuilder.Append("<td style='padding-left:5px'><label class=texto id='lbl" + dr["ID"].ToString() + "' style='width:315px;text-overflow:ellipsis;overflow:hidden'");
                    }
                    if (dr["DESCRIPCION"].ToString().Length > 80)
                    {
                        strBuilder.Append(" title='" + dr["DESCRIPCION"].ToString() + "'");
                    }
                    strBuilder.Append("><nobr class='NBR W395'>" + dr["DESCRIPCION"] + "</nobr></label></td></tr>");
                }

                dr.Close();
                dr.Dispose();

                strBuilder.Append("</table>");

                sResul = "OK@@" + strBuilder.ToString();
            }
            catch (Exception ex)
            {
                sResul = "Error@@" + Errores.mostrarError("Error al obtener los datos", ex);
            }
            return(sResul);
        }