public ShopViewModel(GeneralLogin generalLogin) { SeatNumber = generalLogin.Login; CategoryListProductList = new ObservableCollection <CategoryAndListProductHelper>(); ProductList = new List <Product>(); Cart = new ShoppingCart(SeatNumber); client = new HttpClient(); LoadData(); }
public PassengerLoginViewModel() { GeneralLogin = new GeneralLogin() { Login = "" }; LoginCommand = new LoginCommand(this); CancelLoginCommand = new CancelLoginCommand(this); CancelLogin(); }
public ChatViewModel(GeneralLogin generalLogin) { Seat = generalLogin.Login; SendMessage = new SendMessage() { Content = "", Seat = Seat }; SendMessageCommand = new SendMessageCommand(this); ChatList = new ObservableCollection <Chat>(); Client = new HttpClient(); LoadChat(); }
public HomeViewModel(GeneralLogin generalLogin) { Flight = new Flight(); if (generalLogin.GetType() == typeof(CabinCrewLogin)) { LoadCabinMember((CabinCrewLogin)generalLogin); } else { LoadPassenger(generalLogin); } WeatherList = new ObservableCollection <Model.Weather>(); GetWeatherData(); }
public async void LoadPassenger(GeneralLogin generalLogin) { Windows.Web.Http.HttpClient client = new Windows.Web.Http.HttpClient(); try { var json = await client.GetStringAsync(new Uri("http://localhost:5000/api/User/passenger/" + generalLogin.Login)); var passenger = JsonConvert.DeserializeObject <Model.Passenger>(json); if (passenger != null) { Flight = passenger.Flight; } } catch (Exception) {}; }
public OrderViewModel(GeneralLogin generalLogin) { OrderList = new ObservableCollection <Model.Order>(); SeatNumber = generalLogin.Login; }
public NavigationPassengerViewModel(GeneralLogin login, bool checkForNotifications) { CheckForNotifications = checkForNotifications; GeneralLogin = login; LoadNotifications(); }