Profiles.ORNG.Utilities.OpenSocialManager.PostActivity C# (CSharp) Method

PostActivity() public static method

public static PostActivity ( int userId, string title, string body, string xtraId1Type, string xtraId1Value ) : void
userId int
title string
body string
xtraId1Type string
xtraId1Value string
return void
        public static void PostActivity(int userId, string title, string body, string xtraId1Type, string xtraId1Value)
        {
            Profiles.ORNG.Utilities.DataIO data = new Profiles.ORNG.Utilities.DataIO();

            string sql = "INSERT INTO shindig_activity (userId, activity, xtraId1Type, xtraId1Value) VALUES (" + userId +
                ",'<activity xmlns=\"http://ns.opensocial.org/2008/opensocial\"><postedTime>" +
                Convert.ToInt64((DateTime.UtcNow - new DateTime(1970, 1, 1)).TotalMilliseconds) + "</postedTime><title>" + title + "</title>"
                + (body != null ? "<body>" + body + "</body>" : "") + "</activity>','" + xtraId1Type + "','" + xtraId1Value + "');";

            data.ExecuteSQLDataCommand(sql);
        }

Same methods

OpenSocialManager::PostActivity ( int userId, string title ) : void
OpenSocialManager::PostActivity ( int userId, string title, string body ) : void