public LogCreatorBase(ActivityLogTypeEnum type) { _entity = new ActivityLog() { ActivityLogType = type, PostedDate = DateTime.Now }; }
public LogCreator(BaseController controller, ActivityLogTypeEnum type) : base(type) { _controller = controller; _entity.UserId = controller.User.Identity.GetUserId(); }
/// <summary> /// Inserts an activity log item /// </summary> /// <param name="logTypeEnum">The activity log type enum</param> /// <param name="comment">The activity comment</param> /// <param name="commentParams">The activity comment parameters for string.Format() function.</param> /// <returns>Activity log item</returns> public virtual ActivityLog InsertActivity(ActivityLogTypeEnum logTypeEnum, string comment, params object[] commentParams) { return(InsertActivity(_workContext.CurrentUser, logTypeEnum.ToString(), comment, commentParams)); }