예제 #1
0
        public bool UserExists(UInt64 uniqueID)
        {
            if (uniqueID == 0)
            {
                return(false);
            }

            return(mUserBaseBO.UserExists(uniqueID));
        }
    public string GetInvitationsHTMLStr()
    {
        if (!mIsInit)
        {
            InitMembers();
        }

        if (mCurrentUser == null)
        {
            return("User is not Loaded");
        }

        string retHTMLStr = "";

        List <EventBase> invitedEvents = mEventsInvitationsBO.GetInvitedEvents(mCurrentUser.Email);

        foreach (EventBase eventBase in invitedEvents)
        {
            if (!mEventBaseBO.EventExists(eventBase.UniqueID))
            {
                continue;
            }

            if (!eventBase.IsLoaded())
            {
                mEventBaseBO.Load(eventBase, mCurrentUser);
            }

            if (!mUserBaseBO.UserExists(eventBase.Admin.UniqueID))
            {
                continue;
            }

            if (!eventBase.Admin.IsLoaded())
            {
                mUserBaseBO.Load(eventBase.Admin);
            }

            string uID = eventBase.UniqueID.ToString();

            retHTMLStr += "<div class=\"myInvitedEvents\" id=\"invited_" + uID + "\" onclick=\"InvitationClicked('" + uID + "');\"" +
                          "onmouseover=\"InvitationMouseOver('" + uID + "');\" onmouseout=\"InvitationMouseOut('" + uID + "');\"" +
                          "><span>&nbsp;" + eventBase.ResourceDescription.Topic +
                          "<div style=\"font-size:0.75em;margin-left:3px;\">Invited by " + eventBase.Admin.FirstName + " " + eventBase.Admin.LastName + "</div></span></div>";
        }

        return(retHTMLStr);
    }