protected string GetEventHTMLStr(EventBase eventBase)
    {
        if (!mIsInit)
        {
            InitMembers();
        }

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

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

        string uID = eventBase.UniqueID.ToString();

        string infoStr = "";

        if (eventBase.EventTimeInfo.BecomeActive.Value.Year != 1)
        {
            infoStr += eventBase.EventTimeInfo.BecomeActive.Value.ToString("d-MMM-yyyy", CultureInfo.CreateSpecificCulture("en-US"));
            if (eventBase.EventTimeInfo.BecomeInactive.Value.Year != 1)
            {
                string toStr = eventBase.EventTimeInfo.BecomeInactive.Value.ToString("d-MMM-yyyy", CultureInfo.CreateSpecificCulture("en-US"));
                if (toStr == infoStr)
                {
                    infoStr = " At " + infoStr;
                }
                else
                {
                    infoStr += " to " + toStr;
                }
            }
        }

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

            infoStr += "  <i>(" + eventBase.Admin.FirstName + " " + eventBase.Admin.LastName + ")</i>";
        }

        return("<div class=\"myEventsTopicItems\" id=\"event_h_" + uID + "\" onclick=\"EventClicked('" + uID + "');\"" +
               "onmouseover=\"EventMouseOver('" + uID + "');\" onmouseout=\"EventMouseOut('" + uID + "');\"" +
               "><span>&nbsp;" + eventBase.ResourceDescription.Topic + "<div style=\"font-size:0.5em;text-align: center;\">" + infoStr + "</div></span></div>" +
               "<div class=\"myEventsDescriptionItems\" style=\"display: none;\" id=\"event_d_" + uID + "\" onclick=\"EventClicked('" + uID + "');\"" +
               "onmouseover=\"EventMouseOver('" + uID + "');\" onmouseout=\"EventMouseOut('" + uID + "');\"" +
               "><span>" + eventBase.ResourceDescription.Summary.Replace("\n", "<br/>") + "</span></div>");
    }
示例#2
0
        public bool GetUser(UserBase retUserBase, string email, string password)
        {
            UInt64 userUniqueID = mAccessLayer.GetUserUniqueID(email, password);

            if (userUniqueID == 0)
            {
                return(false);
            }

            retUserBase.UniqueID = userUniqueID;

            mUserBaseBO.Load(retUserBase);

            return(true);
        }
    protected UserBase GetUserBase(UInt64 uniqueID)
    {
        UserBase retUserBase = FindUserInPool(uniqueID);

        if (retUserBase == null)
        {
            retUserBase = new UserBase(uniqueID);
            mUserBaseBO.Load(retUserBase);
            AddUserToPool(retUserBase);
        }

        return(retUserBase);
    }