public Page1(OrderingApp customer) { InitializeComponent(); var db = new userdatabase(); Orders = db.GetItems(); _customer = customer; BindingContext = this; }
public void addorder(string Name, string Gender, string TshirtSize, string TshirtColor, string ShipppingAddress) { OrderingApp temp = new OrderingApp(); temp.Name = Name; temp.Gender = Gender; temp.TshirtSize = TshirtSize; temp.TshirtColor = TshirtColor; temp.ShipppingAddress = ShipppingAddress; database.Insert(temp); }
public void SeedDatabase() { if (database.Table <OrderingApp>().Count() == 0) { OrderingApp newapp = new OrderingApp(); newapp.Name = "thando"; newapp.Gender = "male"; newapp.TshirtSize = "medium"; newapp.DateofTransaction = DateTime.Now; newapp.TshirtColor = "blue"; newapp.ShipppingAddress = "bluedowns"; database.Insert(newapp); } }
private void savebutton_Clicked(object sender, EventArgs e) { customer = new OrderingApp(); customer.DateofTransaction = DateTime.Now; customer.Name = NameEntry.Text; customer.Gender = genderName.Text; customer.TshirtSize = size.Text; customer.TshirtColor = colorName.Text; customer.ShipppingAddress = addressname.Text; thando.addorder(NameEntry.Text, genderName.Text, size.Text, colorName.Text, addressname.Text); var page = new Page1(customer); Navigation.PushAsync(page); }