private void bttn_login_Click(object sender, RoutedEventArgs e) { showPartial(this.grid_loader); ClientResponseObject cro = CommunicationController.Login(this.tbox_username.Text, this.passwordBox.Password, this.tbox_server.Text); if (cro.ok) { ClientResponseObject cro1 = CommunicationController.getUserInfo(); if (cro1.ok) { CommunicationController.setCurrentlyLoggedInUser(cro1.userAccount[0]); if (cro1.userAccount[0].isAdmin) { MainMenuAdministrator screen = new MainMenuAdministrator(); screen.Show(); this.Close(); } else { MainMenuCustomer screen = new MainMenuCustomer(); screen.Show(); this.Close(); } } else { MessageBox.Show(cro.message, "Cimitero© Error ", MessageBoxButton.OK, MessageBoxImage.Hand); showPartial(this.grid_login); } } else { MessageBox.Show(cro.message, "Cimitero© Error ", MessageBoxButton.OK, MessageBoxImage.Hand); showPartial(this.grid_login); } }
private void bttn_admin_view_Click(object sender, RoutedEventArgs e) { MainMenuAdministrator admin = new MainMenuAdministrator(); admin.Show(); }