public WarehouseClerkViewModel(WarehouseClerkView warehouseClerkView)
 {
     this.warehouseClerkView = warehouseClerkView;
     ProductList             = products.ViewAllRecordedProducts();
     //subscribe on event
     products.OnNotification += ShowMessage;
 }
Beispiel #2
0
 /// <summary>
 /// This method checks if username and password valid.
 /// </summary>
 /// <param name="password">User input for password.</param>
 public void LogInExecute(object password)
 {
     Password = (password as PasswordBox).Password;
     if (Username == "Man2019" && Password == "Man2019")
     {
         ManagerView managerView = new ManagerView();
         managerView.ShowDialog();
     }
     else if (Username == "Mag2019" && Password == "Mag2019")
     {
         WarehouseClerkView warehouseClerkView = new WarehouseClerkView();
         warehouseClerkView.ShowDialog();
     }
     else
     {
         MessageBox.Show("Wrong username or password. Please, try again.", "Notification");
     }
 }