public RowTemplate(int idx, int rIdx, LinkedList <Room> room, Grid super, adminWindow aWindow) { InitializeComponent(); this.idx = idx; this.rIdx = rIdx; this.room = room; this.mRoom = room.ElementAt(rIdx); this.super = super; cIdx = -1; pIdx = -1; sIdx = -1; this.aWindow = aWindow; // aWindow.room5.Visibility = Visibility.Hidden; initializeR(); }
public RowTemplate(int idx, int previousForm, int cIdx, int pIdx, int sIdx, LinkedList <Child> child, LinkedList <Parent> parent, LinkedList <Staff> staff, Grid super, adminWindow aWindow, parentWindow pWindow, staffWindow sWindow) { InitializeComponent(); this.idx = idx; this.child = child; this.parent = parent; this.staff = staff; this.previousForm = previousForm; this.super = super; this.aWindow = aWindow; this.pWindow = pWindow; this.sWindow = sWindow; this.cIdx = cIdx; this.pIdx = pIdx; this.sIdx = sIdx; initialize(); }
private void loginButton_Click(object sender, RoutedEventArgs e) { SQLQuery mSqlQuery = new SQLQuery(); if (!mSqlQuery.checkForUsername(username.Text)) { usernameError.Visibility = Visibility.Visible; passwordError.Visibility = Visibility.Visible; } else if (!mSqlQuery.serachForUser(username.Text, password.Password)) { usernameError.Visibility = Visibility.Hidden; passwordError.Visibility = Visibility.Visible; } else { usernameError.Visibility = Visibility.Hidden; passwordError.Visibility = Visibility.Hidden; if (GlobalVariables.globalType.Equals("Staff")) { //open staff form staffWindow mStaffWindow = new staffWindow(); mStaffWindow.Show(); } else if (GlobalVariables.globalType.Equals("Admin")) { //open admin form adminWindow adminForm = new adminWindow(); adminForm.Show(); } else if (GlobalVariables.globalType.Equals("Parent")) { //open parent form parentWindow mParentWindow = new parentWindow(); mParentWindow.Show(); } this.Close(); } }
private void loginButton_Click(object sender, RoutedEventArgs e) { SQLQuery mSqlQuery = new SQLQuery(); if (mSqlQuery.checkForUsername(username.Text) == false) { usernameError.Visibility = Visibility.Visible; passwordError.Visibility = Visibility.Visible; } else if (!mSqlQuery.serachForUser(username.Text, password.Password) == false) { usernameError.Visibility = Visibility.Hidden; passwordError.Visibility = Visibility.Visible; } else { usernameError.Visibility = Visibility.Hidden; passwordError.Visibility = Visibility.Hidden; MessageBox.Show("Hello, " + username.Text + "!", "Logged In Successfully", MessageBoxButton.OK, MessageBoxImage.None); if (GlobalVariables.globalType.Equals("Staff")) { //open staff form staffWindow mStaffWindow = new staffWindow(); mStaffWindow.Show(); } else if (GlobalVariables.globalType.Equals("Admin")) { //open admin form adminWindow adminForm = new adminWindow(); adminForm.Show(); } else if (GlobalVariables.globalType.Equals("Parent")) { //open parent form parentWindow mParentWindow = new parentWindow(); mParentWindow.Show(); } this.Close(); } }