예제 #1
0
        /// <summary>
        /// 创建活动节点执行者列表
        /// </summary>
        /// <param name="userID">用户ID</param>
        /// <param name="userName">用户名称</param>
        /// <returns></returns>
        internal static PerformerList CreatePerformerList(string userID, string userName)
        {
            var performerList = new PerformerList();

            performerList.Add(new Performer(userID, userName));

            return(performerList);
        }
예제 #2
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);
        }
예제 #3
0
        /// <summary>
        /// 生成办理人名称的字符串列表
        /// </summary>
        /// <param name="performerList">操作者列表</param>
        /// <returns>ID字符串列表</returns>
        internal static string GenerateActivityAssignedUserNames(PerformerList performerList)
        {
            StringBuilder strBuilder = new StringBuilder(1024);

            foreach (var performer in performerList)
            {
                if (strBuilder.ToString() != "")
                {
                    strBuilder.Append(",");
                }
                strBuilder.Append(performer.UserName);
            }
            return(strBuilder.ToString());
        }
예제 #4
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);
        }
예제 #5
0
        /// <summary>
        /// 获取特定步骤的办理人员列表
        /// </summary>
        /// <param name="previousActivityPerformers">上一步办理人员列表</param>
        /// <param name="activityGUID">节点GUID</param>
        /// <returns>办理人员列表</returns>
        internal PerformerList GetPreviousPerformerList(IList <KeyValuePairWrapper> previousActivityPerformers,
                                                        string activityGUID)
        {
            PerformerList performerList = null;

            foreach (var kvp in previousActivityPerformers)
            {
                if (kvp.ActivityGUID == activityGUID)
                {
                    performerList = kvp.PerformerList;
                    break;
                }
            }
            return(performerList);
        }
예제 #6
0
        /// <summary>
        /// 创建下一步活动执行者列表
        /// </summary>
        /// <param name="activityGUID">活动节点GUID</param>
        /// <param name="performerList">执行者列表</param>
        /// <returns>步骤执行者列表</returns>
        internal static IDictionary <string, PerformerList> CreateNextActivityPerformers(string activityGUID,
                                                                                         PerformerList performerList)
        {
            var nextActivityPerformers = new Dictionary <string, PerformerList>();

            nextActivityPerformers.Add(activityGUID, performerList);

            return(nextActivityPerformers);
        }
예제 #7
0
 //a convenience method which allows you to set the values while sorting
 public KeyValuePairWrapper(string activityGUID, PerformerList performerList)
 {
     ActivityGUID  = activityGUID;
     PerformerList = performerList;
 }