public async Task <Bookings> AddBooking(string name, string email, int number, DateTime date, TimeSpan time) { await Initialize(); //create and insert coffee var booking = new Bookings { Name = name, Email = email, Number = number, Date = date, Time = time }; await bookingTable.InsertAsync(booking); //Synchronize coffee //await SyncBooking(); return(booking); }
async public void Button_Clicked(object sender, EventArgs e) { //AzureDataService azureService = new AzureDataService(); string name1 = name.Text; string email1 = email.Text; int phone1 = Convert.ToInt32(phone.Text); DateTime date1 = date.Date; TimeSpan time1 = time.Time; Bookings booki = new Bookings() { Name = name1, Email = email1, Number = phone1, Date = date1, Time = time1 }; await AzureManager.AzureManagerInstance.AddBooking(booki); await DisplayAlert("Saved!", "Your booking has been saved! If you'd like to edit it, you can see your bookings by selecting the button below, and then selecting edit.", "OK"); }
public BookingsUpdatePage(Bookings booking) { InitializeComponent(); bookingtoChange = booking; }
public async Task DeleteBooking(Bookings booking) { await this.bookingsTable.DeleteAsync(booking); }
public async Task UpdateBooking(Bookings booking) { await this.bookingsTable.UpdateAsync(booking); }
public async Task AddBooking(Bookings booking) { await this.bookingsTable.InsertAsync(booking); }