private string ObtenerPTs(string sTipoBusqueda, string strNomPT) { string sResul = "";//sPermiso SqlDataReader dr; try { StringBuilder strBuilder = new StringBuilder(); int iUser = (int)Session["UsuarioActual"]; strBuilder.Append("<table id='tblDatos' class='texto MA' style='width: 780px;'>"); strBuilder.Append("<colgroup><col style='width:390px;'><col style='width:390px;'></colgroup>"); strBuilder.Append("<tbody>"); dr = ProyTec.Catalogo(null, strNomPT, null, iUser, sTipoBusqueda); while (dr.Read()) { nPE = int.Parse(dr["cod_pe"].ToString()); strBuilder.Append("<tr id='" + dr["cod_pt"].ToString() + "' onclick='ms(this)' ondblclick='aceptarClick(this.rowIndex)' "); strBuilder.Append("des='" + dr["nom_pt"].ToString() + "' "); strBuilder.Append("idT305PE='" + dr["t305_idproyectosubnodo"].ToString() + "' "); strBuilder.Append("idPE='" + dr["cod_pe"].ToString() + "' "); strBuilder.Append("desPE='" + dr["nom_pe"].ToString() + "' "); strBuilder.Append("est='" + dr["t301_estado"].ToString() + "' "); strBuilder.Append("une='" + dr["cod_une"].ToString() + "' "); if (dr["t305_admiterecursospst"] != DBNull.Value) { if ((bool)dr["t305_admiterecursospst"]) { strBuilder.Append("bRecPST='S'>"); } else { strBuilder.Append("bRecPST='N'>"); } } else { strBuilder.Append("bRecPST='S'>"); } strBuilder.Append("<td><nobr class='NBR W390'>" + nPE.ToString("#,###") + " " + dr["nom_pe"].ToString() + "</nobr></td>"); strBuilder.Append("<td><nobr class='NBR W390'>" + dr["nom_pt"].ToString() + "</nobr></td></tr>"); } dr.Close(); dr.Dispose(); strBuilder.Append("</tbody>"); strBuilder.Append("</table>"); sResul = "OK@#@" + strBuilder.ToString(); } catch (Exception ex) { sResul = "Error@#@" + Errores.mostrarError("Error al obtener los proyectos técnicos", ex); } return(sResul); }
private string ObtenerPTs(string sTipoBusqueda, string strNomPT) { string sResul = "";//sPermiso SqlDataReader dr; int nPE; try { StringBuilder strBuilder = new StringBuilder(); int iUser = (int)Session["UsuarioActual"]; strBuilder.Append("<div style='background-image:url(../../../../Images/imgFT16.gif); width:596px;'>"); strBuilder.Append("<table id='tblDatos' class='texto MA' style='width: 596px;'>"); strBuilder.Append("<colgroup><col style='width=296px;'><col style='width=300px;'></colgroup>"); strBuilder.Append("<tbody>"); //dr = ProyTec.CatalogoBitacora(null, iUser, strNomPT, sTipoBusqueda); dr = ProyTec.Catalogo(null, strNomPT, null, iUser, sTipoBusqueda); while (dr.Read()) { nPE = int.Parse(dr["cod_pe"].ToString()); strBuilder.Append("<tr id='" + dr["cod_pt"].ToString() + "' onclick='ms(this)' ondblclick='aceptarClick(this.rowIndex)' style='height:16px;' "); strBuilder.Append("des='" + dr["nom_pt"].ToString() + "' "); strBuilder.Append("idT305PE='" + dr["t305_idproyectosubnodo"].ToString() + "' "); strBuilder.Append("idPE='" + dr["cod_pe"].ToString() + "' "); strBuilder.Append("desPE='" + dr["nom_pe"].ToString() + "' "); strBuilder.Append("est='" + dr["t301_estado"].ToString() + "' "); strBuilder.Append("une='" + dr["cod_une"].ToString() + "' "); //strBuilder.Append("sAccesoBitacoraPT='" + dr["t331_acceso_iap"].ToString() + "' "); strBuilder.Append("sAccesoBitacoraT='E' "); strBuilder.Append("desune='" + dr["t303_denominacion"].ToString() + "'>"); strBuilder.Append("<td style='padding-left:5px;'>" + nPE.ToString("#,###") + " " + dr["nom_pe"].ToString() + "</td>"); strBuilder.Append("<td style='padding-left:5px;'>" + HttpUtility.HtmlEncode(dr["nom_pt"].ToString()) + "</td></tr>"); } dr.Close(); dr.Dispose(); strBuilder.Append("</tbody>"); strBuilder.Append("</table></div>"); sResul = "OK@#@" + strBuilder.ToString(); } catch (Exception ex) { sResul = "Error@#@" + Errores.mostrarError("Error al obtener los proyectos técnicos", ex); } return(sResul); }
private string ObtenerPTs(string sTipoBusqueda, string sPSN, string strNomPT) { string sResul = "";//sPermiso int? nPSN = null; SqlDataReader dr; try { StringBuilder strBuilder = new StringBuilder(); int iUser = (int)Session["UsuarioActual"]; if (sPSN != "") { nPSN = int.Parse(sPSN); } strBuilder.Append("<div style='background-image:url(../../../../Images/imgFT18.gif); width: 396px;'>"); strBuilder.Append("<table id='tblDatos' class='texto MA' style='width: 396px;'>"); strBuilder.Append("<colgroup><col style='width: 396px;''></colgroup>"); strBuilder.Append("<tbody>"); //dr = ProyTec.CatalogoBitacora(nPSN, iUser, strNomPT, sTipoBusqueda); dr = ProyTec.Catalogo(null, strNomPT, nPSN, iUser, sTipoBusqueda); while (dr.Read()) { strBuilder.Append("<tr id='" + dr["cod_pt"].ToString()); strBuilder.Append("' une='" + dr["cod_une"].ToString()); strBuilder.Append("' nPE='" + dr["cod_pe"].ToString()); strBuilder.Append("' dPE='" + dr["nom_pe"].ToString()); strBuilder.Append("' est='" + dr["t301_estado"].ToString()); strBuilder.Append("' idP='" + dr["t305_idproyectosubnodo"].ToString()); strBuilder.Append("' sAccesoBitacoraPT='" + dr["t305_accesobitacora_pst"].ToString()); strBuilder.Append("' onclick='ms(this)' ondblclick='aceptarClick(this.rowIndex)' onmouseover='TTip(event)'>"); strBuilder.Append("<td><span class='NBR' style='width:380px;'>" + HttpUtility.HtmlEncode(dr["nom_pt"].ToString()) + "</span></td></tr>"); } dr.Close(); dr.Dispose(); strBuilder.Append("</tbody>"); strBuilder.Append("</table></div>"); sResul = "OK@#@" + strBuilder.ToString(); } catch (Exception ex) { sResul = "Error@#@" + Errores.mostrarError("Error al obtener los proyectos técnicos", ex); } return(sResul); }
private string ObtenerPTs(string sTipoBusqueda, string sPSN, string strNomPT) { string sResul = "";//sPermiso int? nPSN = null; SqlDataReader dr; try { StringBuilder strBuilder = new StringBuilder(); int iUser = (int)Session["UsuarioActual"]; if (sPSN != "") { nPSN = int.Parse(sPSN); } strBuilder.Append("<div style='background-image:url(../../../Images/imgFT18.gif);width:396px'>"); strBuilder.Append("<table id='tblDatos' class='texto MA' style='width: 396px;'>"); strBuilder.Append("<colgroup><col style='width:396px;'></colgroup>"); strBuilder.Append("<tbody>"); dr = ProyTec.Catalogo(null, strNomPT, nPSN, iUser, sTipoBusqueda); while (dr.Read()) { strBuilder.Append("<tr id='" + dr["cod_pt"].ToString() + "' onclick=\"ms(this)\" ondblclick=\"aceptarClick(this.rowIndex)\" >"); strBuilder.Append("<td>" + dr["nom_pt"].ToString() + "</td></tr>"); } dr.Close(); dr.Dispose(); strBuilder.Append("</tbody>"); strBuilder.Append("</table></div>"); sResul = "OK@#@" + strBuilder.ToString(); } catch (Exception ex) { sResul = "Error@#@" + Errores.mostrarError("Error al obtener los proyectos técnicos", ex); } return(sResul); }