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(); }
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; }
private void DeleArtistasList() { var artistas = dataService.Get().ToList(); dataService.DeleteList(artistas); }
private void DeleAlbumList() { var Albunes = dataService.Get().ToList(); dataService.DeleteList(Albunes); }