public static Page getMainPage() { SQLiteConnection _connection = DependencyService.Get<ISQLite>().GetConnection(); if (!TableExists("Users",_connection)) _connection.CreateTable<Users> (); People guy = new People ("John", "John"); People gal = new People ("Jill", "Jill"); People thirdGuy = new People ("Peter", "Peter"); guy = People.GetByUserName ("John"); gal = People.GetByUserName ("Jill"); thirdGuy = People.GetByUserName ("Peter"); People fourth = new People ("Dean", "Dean"); guy.Name = "Paul"; guy.zipCode = 2100; guy.height = 175; guy.blind = true; guy.Update (); gal.Name = "Laura"; gal.zipCode = 2100; gal.blind = false; gal.height = 162; gal.Update (); thirdGuy.Name = "Paul"; thirdGuy.zipCode = 2200; thirdGuy.blind = false; thirdGuy.height = 175; thirdGuy.Update (); fourth.Name = "Dean"; fourth.zipCode = 2100; fourth.blind = false; fourth.height = 175; fourth.Update (); List<People> allPeople = guy.Matches (); NavigationPage MP = new NavigationPage(new MainPage ()); return MP; }
public void buttonPress() { People mainGuy = new People (userName.Text, password.Text); mainGuy.Name = name.Text; mainGuy.age = Convert.ToInt32(Age.Text); mainGuy.LastName = lastName.Text; mainGuy.height = Convert.ToInt32(Height.Text); mainGuy.Address = Address1.Text + " " + Address2.Text; mainGuy.city = City.Text; App.userName = mainGuy.userName; this.Navigation.PushAsync (new GuidePageView ()); }
public Users(People person) { this.userName = person.userName; this.password = person.password; this.Name = person.Name; this.LastName = person.LastName; this.Address = person.Address; this.zipCode = person.zipCode; this.age = person.age; this.height = person.height; this.Pace = person.Pace; this.Distance = person.Distance; this.blind = person.blind; this.city = person.city; }
public void update(People person) { if (person.userID != 0) this.userID = person.userID; this.userName = person.userName; this.password = person.password; this.Name = person.Name; this.LastName = person.LastName; this.Address = person.Address; this.zipCode = person.zipCode; this.age = person.age; this.height = person.height; this.Pace = person.Pace; this.Distance = person.Distance; this.blind = person.blind; this.city = person.city; }