Beispiel #1
0
        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;
        }
Beispiel #2
0
        private void roomButton_Click(object sender, RoutedEventArgs e)
        {
            //hide all other windows
            SQLQuery mSQLQuery = new SQLQuery();

            mRoom = mSQLQuery.roomToLinkedList(mSQLQuery.getRoomByStaffID(GlobalVariables.globalStaff.id)).ElementAt(0);

            roomName.Content = "Room" + "  " + Convert.ToString(mRoom.number);

            childRow.Clear();
            children.Children.Clear();

            childList = mSQLQuery.childToLinkedList(mSQLQuery.getChildByRoomID(mRoom.id));

            showPendingChildren();

            this.profile.Visibility       = Visibility.Hidden;
            this.feedbackPanel.Visibility = Visibility.Hidden;
            //show room grid
            this.room.Visibility = Visibility.Visible;
        }