Example #1
0
        public static void loadUserListfromDB(agencydbEntities1 DBAccess)
        {
            foreach (Actor a in DBAccess.Actor)
            {
                if (a.Client.User.removed == false)
                {
                    ActorDTO aDto = mapActorDTOfromDB(a);
                    UserServiceDTO.AddUser(aDto);
                }
            }

            foreach (Musician m in DBAccess.Musician)
            {
                if (m.Client.User.removed == false)
                {
                    MusicianDTO mDto = mapMusicianDTOfromDB(m);
                    UserServiceDTO.AddUser(mDto);
                }
            }
        }
Example #2
0
        public static List <JobDTO> loadJobListfromDB(agencydbEntities1 DBAccess)
        {
            List <JobDTO> result = new List <JobDTO>();

            foreach (Movie m in DBAccess.Movie)
            {
                if (m.Job.removed == false)
                {
                    MovieDTO mDto = mapMovieDTOfromDB(m);
                    JobServiceDTO.AddJob(mDto);
                }
            }

            foreach (Concert c in DBAccess.Concert)
            {
                if (c.Job.removed == false)
                {
                    ConcertDTO cDto = mapConcertDTOfromDB(c);
                    JobServiceDTO.AddJob(cDto);
                }
            }

            return(result);
        }