Beispiel #1
0
        private async void buttonEditTrip_Click(object sender, EventArgs e)
        {
            int id;

            if (int.TryParse(textBoxTripSelector.Text, out id))
            {
                var x = await client.GetTrip(id);

                if (x != null)
                {
                    DaugtherGUI creator = new DaugtherGUI(this);
                    creator.Show();
                    creator.textBoxFrom.Text      = x.From;
                    creator.textBoxTo.Text        = x.To;
                    creator.dateTimePicker1.Value = x.Takeof;
                    creator.dateTimePicker2.Value = x.Arrival;
                    creator.tripId = x.TripId;


                    // screen.Text = x.From + "--" + x.To + "//" + x.Takeof + "__Id: " + x.TripId + " was edited" + "\n";
                }

                else
                {
                    screen.Text = "Trip with id " + id + " was not found";
                }
            }
            else
            {
                screen.Text = "Wrong id format";
            }
        }
Beispiel #2
0
        private void buttonCreateTrip_Click(object sender, EventArgs e)
        {
            DaugtherGUI creator = new DaugtherGUI(this);

            creator.Show();
        }