Beispiel #1
0
 /// <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);
     }
 }
Beispiel #2
0
        private void WarehouseButton_Click(object sender, RoutedEventArgs e)
        {
            WarehouseWindow ww = new WarehouseWindow();

            ww.Show();
        }
Beispiel #3
0
        private void OpenWarehouseWindow()
        {
            var warehouseWindow = new WarehouseWindow();

            warehouseWindow.Show();
        }