Ejemplo n.º 1
0
        static void Main(string[] args)
        {
            ServiceGbd db  = new ServiceGbd();
            ServiceLib lib = new ServiceLib();


            List <Organisation> test1 = lib.GetOrganisations();

            foreach (Organisation item in test1)
            {
                Console.WriteLine(item.Id + " | " + item.Name);
            }

            string inputIin = Console.ReadLine();

            Patient patient = db.GetPatientByIin(inputIin);

            Console.WriteLine(patient.FirstName + " " + patient.LastName);
            Console.WriteLine(patient.Dob);
            int InputUserIdOrg = int.Parse(Console.ReadLine());

            lib.AttachPatient(InputUserIdOrg, patient);
            foreach (Organisation item in test1)
            {
                Console.WriteLine(item.Id + " | " + item.Name);
                foreach (Patient pat in item.patients)
                {
                    Console.WriteLine(pat.FirstName + " " + pat.LastName);
                    Console.WriteLine(pat.Dob);
                }
            }
        }
Ejemplo n.º 2
0
        private void lib_Choice(object sender, RoutedEventArgs e)
        {
            statut = true;
            int i = 0;

            listView.Items.Clear();
            listView.DataContext = null;
            listView.ItemsSource = null;
            delete_list();
            mediaElement.Source = null;
            lib = new ServiceLib(new Library());
            while (i != lib.library.songs.Count())
            {
                listView.Items.Add(lib.library.songs.ElementAt(i));
                i += 1;
            }
            playlist.FontWeight = FontWeights.Normal;
            library.FontWeight  = FontWeights.Bold;
        }