Ejemplo n.º 1
0
        public void Load()
        {
            int numberOfAlbumsPerPage = 5;

            if (ConfigurationManager.AppSettings.AllKeys.Contains("NumberOfAlbumsPerPage"))
            {
                numberOfAlbumsPerPage = int.Parse(ConfigurationManager.AppSettings["NumberOfAlbumsPerPage"]);
            }

            Musicalog.Service.ServiceClient svc = new Musicalog.Service.ServiceClient();
            var response = svc.GetListAlbums(OrderedBy, CurrentPage, numberOfAlbumsPerPage);

            Albums             = response.Albums.ToList();
            TotalNumberOfPages = response.TotalNumberOfPages;
        }
        public void Prepare()
        {
            Musicalog.Service.ServiceClient svc = new Musicalog.Service.ServiceClient();
            var response = svc.GetBasicAlbumLists();

            Artists    = response.Artists;
            Labels     = response.Labels;
            AlbumTypes = response.AlbumTypes;

            if (OperationType == Operation.UPDATE)
            {
                Album = svc.GetSpecificAlbum(Album.Id).Album;
            }
            else
            {
                Album = new Albums()
                {
                    Id = 0
                };
            }
        }
 internal void Save()
 {
     Musicalog.Service.ServiceClient svc = new Musicalog.Service.ServiceClient();
     svc.InsertOrUpdate(Album);
 }