public AddTrip(Trips T)
        {
            InitializeComponent();
            c    = new Controller();
            trip = T;
            //this.newButtons.Children.Clear();
            TC        = new TimeControl();
            TC.Name   = "DepTime";
            TC.Width  = 100;
            TC.Height = 24;
            TC.Margin = new Thickness(-400, -120, 0, 0);
            this.newButtons.Children.Add(TC);

            DataTable dt = c.GetSoucre();

            trip.BindTripsGrid();
            if (dt != null)
            {
                source.ItemsSource       = dt.DefaultView;
                source.DisplayMemberPath = "Name";
                source.SelectedValuePath = "ID";
                source.SelectedIndex     = 1;
                source.SelectedIndex     = 0;
            }
            else
            {
                source.ItemsSource = null;
            }

            BindTrains();
            BindDrivers();
        }
Exemple #2
0
        private void GoTrips()
        {
            Trips TW = new Trips(UserID);

            TW.Show();
            this.Close();
        }
        private void GoTrips()
        {
            Trips trips = new Trips(UserID);

            trips.Show();
            this.Close();
        }
        private void Trips_Click(object sender, RoutedEventArgs e)
        {
            Trips t = new Trips(userid);

            t.Show();
            this.Close();
        }
Exemple #5
0
 public EditTrip(Trips T)
 {
     mycontroller = new Controller();
     Trip         = T;
     InitializeComponent();
     Trip.BindTripsGrid();
 }
        public AddSub(Trips T)
        {
            InitializeComponent();
            c    = new Controller();
            trip = T;

            BindGrid();
        }