/// <summary> /// The login. /// </summary> private void Login() { try { int userId = this.frontServiceClient.SystemEnter(new UserLogin(this.LoginText, this.PasswordText)); if (userId != -1) { var mainWindow = new WarehouseWindow { DataContext = new WarehouseWindowViewModel(userId) }; mainWindow.Show(); this.Close("LoginWindow"); } else { MessageBox.Show("Incorrect login or password", "Stop message", MessageBoxButton.OK, MessageBoxImage.Stop); } } catch (Exception e) { MessageBox.Show(e.StackTrace, "Error message", MessageBoxButton.OK, MessageBoxImage.Error); } }
private void WarehouseButton_Click(object sender, RoutedEventArgs e) { WarehouseWindow ww = new WarehouseWindow(); ww.Show(); }
private void OpenWarehouseWindow() { var warehouseWindow = new WarehouseWindow(); warehouseWindow.Show(); }