示例#1
0
        private static void TestRetrieveUsuariosMasActivos(IApplicationContext ctx)
        {
            IEscuchaService escuchaService = (IEscuchaService)ctx.GetObject("escuchaService");
            Artista         a = new Artista();

            a.Id = 4;
            IList list = escuchaService.RetrieveUsuariosMasActivos(a);

            foreach (ItemRanking item in list)
            {
                Console.WriteLine("{0} - {1}", item.Id, item.Nombre);
            }
        }
示例#2
0
        private void Page_Load(object sender, System.EventArgs e)
        {
            if (!this.IsPostBack)
            {
                if (this.Request.QueryString["id"] == null)
                {
                    this.MostrarNoEncontrado();
                    return;
                }
                int id = 0;
                try
                {
                    id = int.Parse(this.Request.QueryString["id"]);
                }
                catch (Exception)
                {
                    this.MostrarNoEncontrado();
                }
                ModelArtista artista = this.GetMusicaService().RetrieveArtista(id);
                if (artista == null)
                {
                    this.MostrarNoEncontrado();
                    return;
                }

                this.lblNombre.Text = artista.Nombre;

                IEscuchaService escuchaService = this.GetEscuchaService();
                this.RatingTemasMusicales.DataSource = escuchaService.RetrieveTemasMusicalesMasEscuchados(artista);
                this.RatingTemasMusicales.DataBind();

                this.RatingUsuarios.DataSource = escuchaService.RetrieveUsuariosMasActivos(artista);
                this.RatingUsuarios.DataBind();

                this.RatingAlbumes.DataSource = escuchaService.RetrieveAlbumesMasEscuchados(artista);
                this.RatingAlbumes.DataBind();

                this.rtgArtistasSimilares.DataSource = this.GetMusicaService().GetArtistasSimilaresA(artista);
                this.rtgArtistasSimilares.DataBind();
            }
        }