Esempio n. 1
0
        /// <summary>
        /// Log activities and related information to the Activities table.
        /// </summary>
        public static void Log(Activity activity)
        {
            // set create date
            activity.Created = DateTime.Now;

            // add to db
            using (var queries = new ActivityQueries())
            {
                queries.Save(ref activity);
            }
        }
Esempio n. 2
0
        public static void Log(WebUser user, ActivityEventItem activityEvent, string value)
        {
            // todo: validate inputs

            var activity = new Activity()
            {
                EventId = (int)activityEvent,
                Value = value
            };

            if (user != null)
            {
                activity.UserGuid = user.Guid;
            }

            Log(activity);
        }