private void RellenaFriends() { if (this.iduser.HasValue) { try { using (Clases.cASPNET_FRIENDSHIP objUsuarios = new Clases.cASPNET_FRIENDSHIP()) { objUsuarios.fromuserid = this.iduser; objUsuarios.aceptado = true; lstFriends.DataSource = objUsuarios.ObtenerDatos(string.Empty, 15, 1, string.Empty); lstFriends.DataBind(); } } catch (Exception excp) { ExceptionUtility.LogException(excp, "Error en la función << RellenaFriends() >>"); } finally { numTabFriends.Text = lstFriends.Items.Count.ToString(); if (lstFriends.Items.Count == 0) { PanelMasFriends.Visible = true; lbMasFriends.Text = "No friends present"; } else if (lstFriends.Items.Count <= 6) { PanelMasFriends.Visible = false; } else { PanelMasFriends.Visible = true; lbMasFriends.Text = Convert.ToString(lstFriends.Items.Count - 6) + " more"; } } } else { Response.Redirect("~/errors/notfound.aspx"); } }
private void RellenaUltimosAmigos() { if (this.iduser.HasValue) { try { using (Clases.cASPNET_FRIENDSHIP objAmigos = new Clases.cASPNET_FRIENDSHIP()) { objAmigos.fromuserid = this.iduser; objAmigos.aceptado = true; lstLastSixFriends.DataSource = objAmigos.ObtenerDatos(6, 1, " FECHA DESC "); lstLastSixFriends.DataBind(); } } catch (Exception excp) { ExceptionUtility.LogException(excp, "Error en la función << RellenaUltimosAmigos() >>"); } } else { Response.Redirect("~/errors/notfound.aspx"); } }