Exemple #1
0
        private void Button_Clicked(object sender, EventArgs e)
        {
            int CourseID = 0;
            DBDataAccess <Course> service = new DBDataAccess <Course>();

            CourseID = service.Get().ToList().Count + 1;
            service.Create(new Course {
                CourseID = CourseID, Name = txtName.Text, Grade = txtGrade.Text
            });
            lstCourses.ItemsSource = service.Get();


            //ServiceCourse service = new ServiceCourse();
            //int CourseID = 0;
            //CourseID = service.Get().Count + 1;
            //service.Create(new Course {CourseID= CourseID, Name = txtName.Text, Grade = txtGrade.Text } );
            //lstCourses.ItemsSource = service.Get();
        }
Exemple #2
0
        public MainPage()
        {
            InitializeComponent();

            DBDataAccess <Person> service = new DBDataAccess <Person>();

            service.Create(new Person {
                PersonID = 2, FirstName = "Hugo", LastName = "Torrico"
            });
            service.Create(new Person {
                PersonID = 3, FirstName = "Juan", LastName = "Torrico"
            });
            service.Create(new Person {
                PersonID = 4, FirstName = "Janeth", LastName = "Torrico"
            });
            List <Person> people = service.Get().ToList();

            lstPeople.ItemsSource = people;
        }
Exemple #3
0
        private void DeleArtistasList()
        {
            var artistas = dataService.Get().ToList();

            dataService.DeleteList(artistas);
        }
Exemple #4
0
        private void DeleAlbumList()
        {
            var Albunes = dataService.Get().ToList();

            dataService.DeleteList(Albunes);
        }