Exemplo n.º 1
0
        private void BtnReservations_Click(object sender, EventArgs e)
        {
            ReservationsGUI reservationsGUI = ReservationsGUI.Instance;

            Nav(reservationsGUI, content);
            RecolorButtons();
            BtnReservations.BackColor = Color.DarkGray;
            reservationsGUI.AddDataToTable();
        }
        public async Task <bool> Delete(int id)
        {
            reservationsGUI = ReservationsGUI.Instance;
            bool res = false;

            bCtrl = new BaseController();
            using (var client = bCtrl.GetClient()) {
                var response = await client.DeleteAsync(bCtrl.BaseUrl + "reservations/" + id);

                string result = response.Content.ReadAsStringAsync().Result;
                res = true;
                reservationsGUI.AddDataToTable();
                return(res);
            }
        }