Beispiel #1
0
        private void declineButton_Click(object sender, RoutedEventArgs e)
        {
            //rejecting request
            SQLQuery mSQLQuery = new SQLQuery();

            if (idx == 0)
            {
                LinkedList <int> toDel = new LinkedList <int>();
                toDel.AddLast((int)child.ElementAt(cIdx).id);
                mSQLQuery.deleteChildData(toDel);
            }
            else if (idx == 1)
            {
                LinkedList <Int64> toDel = new LinkedList <Int64>();
                toDel.AddLast(parent.ElementAt(pIdx).id);
                mSQLQuery.deleteParentData(toDel);
            }
            else if (idx == 2)
            {
                LinkedList <Int64> toDel = new LinkedList <Int64>();
                toDel.AddLast(staff.ElementAt(sIdx).id);
                mSQLQuery.deleteStaffData(toDel);
            }
            else if (idx == 3)
            {
                LinkedList <int> toDel = new LinkedList <int>();
                toDel.AddLast(room.ElementAt(rIdx).id);
                mSQLQuery.deleteRoomData(toDel);
            }

            removeFromParent();
        }