Exemplo n.º 1
0
        /// <summary>
        /// Returns unique hash for the <paramref name="activity"/> instance.
        /// <seealso cref="ActivityUtils.GetActivityHash"/>.
        /// </summary>
        /// <param name="activity">Activity instance.</param>
        /// <param name="userConnection"><see cref="UserConnection"/> instance.</param>
        /// <returns>Unique hash for the <paramref name="activity"/> instance.</returns>
        protected virtual string GetActivityHash(Entity activity, UserConnection userConnection)
        {
            TimeZoneInfo currentTimeZone = userConnection.CurrentUser.TimeZone;

            return(ActivityUtils.GetActivityHash(activity.GetTypedColumnValue <string>("Title"),
                                                 string.Empty, activity.GetTypedColumnValue <DateTime>("StartDate").Date,
                                                 activity.GetTypedColumnValue <DateTime>("DueDate").Date, activity.GetTypedColumnValue <Guid>("PriorityId"),
                                                 activity.GetTypedColumnValue <Guid>("StatusId").ToString(), currentTimeZone));
        }