private void editDatabase_Click(object sender, RoutedEventArgs e) { staffs1.Children.Clear(); parents1.Children.Clear(); children1.Children.Clear(); rooms.Children.Clear(); childRow.Clear(); staffRow.Clear(); parentRow.Clear(); roomRow.Clear(); SQLQuery mSQLQuery = new SQLQuery(); childList = mSQLQuery.childToLinkedList(mSQLQuery.getNotPendingChild()); parentList = mSQLQuery.parentToLinkedList(mSQLQuery.getNotPendingParent()); staffList = mSQLQuery.staffToLinkedList(mSQLQuery.getNotPendingStaff()); roomList = mSQLQuery.roomToLinkedList(mSQLQuery.getAllRooms()); showPendingStaff(staffs1); showPendingChildren(children1); showPendingParent(parents1); showAllRoomsAndChildren(rooms); roomPanel.Visibility = Visibility.Hidden; this.AdminFeedback.Visibility = Visibility.Hidden; this.pendingRequestsPanel.Visibility = Visibility.Hidden; this.profilePanel.Visibility = Visibility.Hidden; this.editDatabasePanel.Visibility = Visibility.Visible; featuresPanel.Visibility = Visibility.Hidden; }
private void fillRoomID() { SQLQuery mSql = new SQLQuery(); DataTable dt = mSql.getAllRooms(); foreach (DataRow dr in dt.Rows) { roomID.Items.Add(dr[1].ToString()); getRoomID.Add(int.Parse(dr[1].ToString()), int.Parse(dr[0].ToString())); } }