protected void gridDocumentos_RowDataBound(object sender, GridViewRowEventArgs e) { try { if (e.Row.RowType == DataControlRowType.DataRow) { Label lbl_CatDcumentosId = (Label)e.Row.FindControl("lbl_CatDcumentosId"); Label lbl_Pzas = (Label)e.Row.FindControl("lbl_Pzas"); Label lbl_DocumentosRelacioFolio = (Label)e.Row.FindControl("lbl_DocumentosRelacioFolio"); Label lbl_DocStatus = (Label)e.Row.FindControl("lbl_DocStatus"); HyperLink HypFolio = (HyperLink)e.Row.FindControl("HypFolio"); DocumentosRelacio obj_Pzas = new DocumentosRelacio(); obj_Pzas.CatDcumentosId = SqlInt32.Parse(lbl_CatDcumentosId.Text); obj_Pzas.FacturasId = SqlInt32.Parse(lbl_IdHojaViaje.Text); obj_Pzas.SelectOneDocRelacionadosPzas(); if (!obj_Pzas.Pzas.IsNull) { lbl_Pzas.Text = obj_Pzas.Pzas.ToString(); } if (lbl_CatDcumentosId.Text == "1") { Facturas obj_SelecDocentry = new Facturas(); obj_SelecDocentry.Facturas_DocNum = SqlInt32.Parse(lbl_DocumentosRelacioFolio.Text); obj_SelecDocentry.SelectFacturaDocEntry(); TSHAK.Components.SecureQueryString QueryString = new TSHAK.Components.SecureQueryString(new Byte[] { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 2, 3, 4, 5, 8 }); QueryString["DocEntry"] = obj_SelecDocentry.Facturas_DocEntry.ToString(); QueryString["DocStatus"] = lbl_DocStatus.Text; QueryString["TipoDoc"] = "FACTURA"; HypFolio.NavigateUrl = "http://www2.promoshop.com.mx/Factura_Electro/Default.aspx?data=" + HttpUtility.UrlEncode(QueryString.ToString()); } else { HypFolio.Enabled = false; } } } catch (Exception ex) { } }