Beispiel #1
0
        private void name_MouseDown(object sender, MouseButtonEventArgs e)
        {
            if (idx == 3)
            {
                aWindow.children2.Visibility        = Visibility.Visible;
                aWindow.room5.Visibility            = Visibility.Visible;
                aWindow.roomScrollerView.Visibility = Visibility.Hidden;
                aWindow.roomTab1.IsSelected         = false;
                aWindow.children2.Children.Clear();
                SQLQuery mSQLQuery = new SQLQuery();
                child = mSQLQuery.childToLinkedList(mSQLQuery.getChildByRoomID(mRoom.id));

                LinkedList <Staff> currStaff = mSQLQuery.staffToLinkedList(mSQLQuery.getStaffByID(mRoom.staffID));
                if (currStaff.Count == 0)
                {
                    aWindow.childCount.Content = "No Staff";
                }
                else
                {
                    aWindow.childCount.Content = currStaff.ElementAt(0).firstName;
                }

                aWindow.childList           = child;
                aWindow.roomName.Content    = "Room  " + Convert.ToString(mRoom.number);
                aWindow.roomBack.Visibility = Visibility.Visible;

                aWindow.showPendingChildren(aWindow.children2);
            }
        }
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;
        }