示例#1
0
        /// <summary>
        /// Creates the activity comment including a change in priority or a user name is applcable to the comment.
        /// </summary>
        /// <param name="set">The set of tickets to which to add this comment.</param>
        /// <param name="eventByUserId">The userId.</param>
        /// <param name="activity">The activity.</param>
        /// <param name="comment">The comment.</param>
        /// <param name="newPriority">The new priority.</param>
        /// <param name="userName">Name of the user.</param>
        /// <returns>TicketEvent.</returns>
        public static TicketEvent AddActivityEvent(this ICollection <TicketEvent> set,
                                                   string eventByUserId,
                                                   TicketActivity activity,
                                                   string comment,
                                                   string newPriority,
                                                   string userName)
        {
            var tc = TicketEvent.CreateActivityEvent(
                eventByUserId,
                activity,
                comment,
                newPriority,
                userName
                );

            set.Add(tc);
            return(tc);
        }
示例#2
0
        /// <summary>
        /// Creates the activity event.
        /// </summary>
        /// <param name="eventByUserId">The event by user identifier.</param>
        /// <param name="activity">The activity.</param>
        /// <param name="comment">The comment.</param>
        /// <param name="newPriority">The new priority.</param>
        /// <param name="userName">Name of the user.</param>
        /// <returns>TicketEvent.</returns>
        public static TicketEvent CreateActivityEvent(
            string eventByUserId,
            TicketActivity activity,
            string comment,
            string newPriority,
            string userName)
        {
            var tc = new TicketEvent
            {
                Comment          = comment,
                EventBy          = eventByUserId,
                EventDate        = DateTime.Now,
                EventDescription = TicketTextUtility.GetTicketEventDescription(activity, newPriority, userName),
                IsHtml           = false
            };

            return(tc);
        }
示例#3
0
 /// <summary>
 /// Creates the activity event.
 /// </summary>
 /// <param name="eventByUserId">The event by user identifier.</param>
 /// <param name="activity">The activity.</param>
 /// <param name="comment">The comment.</param>
 /// <param name="newPriority">The new priority.</param>
 /// <param name="userName">Name of the user.</param>
 /// <returns>TicketEvent.</returns>
 public static TicketEvent CreateActivityEvent(
 string eventByUserId,
 TicketActivity activity,
 string comment,
 string newPriority,
 string userName)
 {
     var tc = new TicketEvent
     {
         Comment = comment,
         EventBy = eventByUserId,
         EventDate = DateTime.Now,
         EventDescription = TicketTextUtility.GetTicketEventDescription(activity, newPriority, userName),
         IsHtml = false
     };
     return tc;
 }
示例#4
0
        public static UserDisplayInfo GetEventByInfo(this TicketEvent ticketEvent)
        {
            var userManager = DependencyResolver.Current.GetService <TicketDeskUserManager>();

            return(userManager.GetUserInfo(ticketEvent.EventBy));
        }