private void ApprouveGroup_Click(object sender, RoutedEventArgs e) { ManagerWindow mainWindow = new ManagerWindow(); mainWindow.Top = this.Top; mainWindow.Left = this.Left; mainWindow.Show(); this.Close(); }
public void Login_Click(object sender, RoutedEventArgs e) { Sql_Connection.Login(Loginbox, Passwordbox); if (Sql_Connection.message == "1") { if (UserInfo.CustomerRole == "User") { UserWindows mainWindow = new UserWindows(); mainWindow.Top = this.Top; mainWindow.Left = this.Left; mainWindow.Show(); this.Close(); } else if (UserInfo.CustomerRole == "Admin") { AdminWindow mainWindow = new AdminWindow(); mainWindow.Top = this.Top; mainWindow.Left = this.Left; mainWindow.Show(); this.Close(); } else if (UserInfo.CustomerRole == "Manager") { ManagerWindow mainWindow = new ManagerWindow(); mainWindow.Top = this.Top; mainWindow.Left = this.Left; mainWindow.Show(); this.Close(); } else { MessageBox.Show("No rigth, access prohibited", "Info"); } } else { MessageBox.Show(Sql_Connection.message, "Info"); } }