GetActivity() public méthode

public GetActivity ( System.Int64 lastActivityLogID, int count, bool declump ) : List
lastActivityLogID System.Int64
count int
declump bool
Résultat List
Exemple #1
0
        public static string GetActivities(Int64 referenceActivityId, int count, bool newActivities)
        {
            Profiles.Activity.Utilities.DataIO data = new Profiles.Activity.Utilities.DataIO();
            JavaScriptSerializer serializer         = new JavaScriptSerializer();
            List <Profiles.Activity.Utilities.Activity> activities = null;

            if (newActivities)
            {
                // get the latest and remove any that we already have
                activities = new List <Profiles.Activity.Utilities.Activity>();
                // we should probably make the data function smart enough to not return a bunch we already have
                // to save the loop
                foreach (Profiles.Activity.Utilities.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 static string GetActivities(Int64 referenceActivityId, int count, bool newActivities)
 {
     Profiles.Activity.Utilities.DataIO data = new Profiles.Activity.Utilities.DataIO();
     JavaScriptSerializer serializer = new JavaScriptSerializer();
     List<Profiles.Activity.Utilities.Activity> activities = null;
     if (newActivities)
     {
         // get the latest and remove any that we already have
         activities = new List<Profiles.Activity.Utilities.Activity>();
         // we should probably make the data function smart enough to not return a bunch we already have
         // to save the loop
         foreach (Profiles.Activity.Utilities.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()
        {
            LoadAssets();
            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.Activity.Utilities.DataIO data = new Profiles.Activity.Utilities.DataIO();
            List<Profiles.Activity.Utilities.Activity> activities = data.GetActivity(-1, count, true);
            rptActivityHistory.DataSource = activities;
            rptActivityHistory.DataBind();
        }
        public void DrawProfilesModule()
        {
            LoadAssets();
            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.Activity.Utilities.DataIO          data       = new Profiles.Activity.Utilities.DataIO();
            List <Profiles.Activity.Utilities.Activity> activities = data.GetActivity(-1, count, true);

            rptActivityHistory.DataSource = activities;
            rptActivityHistory.DataBind();
        }