public ListTrain(Frame frame1, TrainEntities db, DateTime fulltime, Station station1, Station station2) { InitializeComponent(); this.db = db; this.frame1 = frame1; DateTimeFormatInfo dateformat = new CultureInfo("pl-PL").DateTimeFormat; var linqsearchTravel = from x in db.Connection where x.Id_station == station1.Id_station & x.Id_station2 == station2.Id_station & x.km >= 0 select x; int numberOfConnection = linqsearchTravel.Count(); listView.ItemsSource = linqsearchTravel.ToList(); }
public SearchPage(Frame frame1, TrainEntities db) { InitializeComponent(); this.frame1 = frame1; this.db = db; DateTime timeNow = DateTime.Now; datapic1.SelectedDate = timeNow; txt_hour.Text = timeNow.Hour.ToString(); txt_minute.Text = timeNow.Minute.ToString(); Cities city = new Cities(); cmb_from.ItemsSource = db.Station.ToList(); cmb_to.ItemsSource = db.Station.ToList(); }