public static string GetActivities(Int64 referenceActivityId, int count, bool newActivities)
 {
     Profiles.History.Utilities.DataIO data = new Profiles.History.Utilities.DataIO();
     JavaScriptSerializer serializer = new JavaScriptSerializer();
     List<Activity> activities = null;
     if (newActivities)
     {
         // get the latest and remove any that we already have
         activities = new List<Activity>();
         // we should probably make the data function smart enough to not return a bunch we already have
         // to save the loop
         foreach (Activity activity in data.GetActivity(-1, count, true))
         {
             if (activity.Id > referenceActivityId)
             {
                 activities.Add(activity);
             }
         }
     }
     else
     {
         activities = data.GetActivity(referenceActivityId, count, true);
     }
     return serializer.Serialize(activities);
 }
        public void DrawProfilesModule()
        {
            int count = Convert.ToInt32(base.GetModuleParamString("Show"));
            linkSeeMore.Visible = "True".Equals(base.GetModuleParamString("SeeMore"));
            if ("True".Equals(base.GetModuleParamString("Scrolling")))
            {
                pnlActivities.ScrollBars = ScrollBars.Vertical;
                pnlActivities.Height = 7 * count;
                pnlActivities.Attributes.Add("onscroll", "ScrollAlert()");
            }
            else
            {
                pnlActivities.ScrollBars = ScrollBars.None;
            }

            // grab a bunch of activities from the Database
            Profiles.History.Utilities.DataIO data = new Profiles.History.Utilities.DataIO();
            List<Activity> activities = data.GetActivity(-1, count, true);
            rptActivityHistory.DataSource = activities;
            rptActivityHistory.DataBind();
        }