Esempio n. 1
0
        internal static IDictionary <string, PerformerList> CreateNextActivityPerformers(string activityGUID,
                                                                                         string userID,
                                                                                         string userName)
        {
            var performerList = new PerformerList();

            performerList.Add(new Performer(userID, userName));
            IDictionary <string, PerformerList> nextActivityPerformers = new Dictionary <string, PerformerList>();

            nextActivityPerformers.Add(activityGUID, performerList);

            return(nextActivityPerformers);
        }
Esempio n. 2
0
        /// <summary>
        /// 创建活动节点执行者列表
        /// </summary>
        /// <param name="roleList">角色列表</param>
        /// <returns></returns>
        internal static PerformerList CreatePerformerList(IList <Role> roleList)
        {
            var roleIDs         = roleList.Select(x => x.ID).ToArray();
            var resourceService = ResourceServiceFactory.Create();
            var userList        = resourceService.GetUserListByRoles(roleIDs);
            var performerList   = new PerformerList();

            foreach (var user in userList)
            {
                var performer = new Performer(user.UserID.ToString(), user.UserName);

                performerList.Add(performer);
            }
            return(performerList);
        }