public UserWindow(string login, SmartParkingApp.ParkingManager pm) { InitializeComponent(); this.pm = pm; user = pm.FindUserByLogin(login); var sessionList = new List <SmartParkingApp.Models.ParkingSession>(); if (pm.UsersParkingSession(user.Id, out sessionList)) { var activeSession = sessionList[sessionList.Count - 1]; TextBuilder(activeSession); } else { if (sessionList.Count != 0) { var lastSession = sessionList[sessionList.Count - 1]; TextBuilder(lastSession); } else { MessageBox.Show("История парковки отсутствует"); } } var contentList = new List <DateTime>(); foreach (var s in sessionList) { contentList.Add(s.EntryDt); } sessions = sessionList; GetAllComboBox.ItemsSource = contentList; }
public LoginWindow(SmartParkingApp.ParkingManager pm) { InitializeComponent(); this.pm = pm; }