コード例 #1
0
        public IEnumerable <TreeNode> SelectItems()
        {
            WorkflowHelper         helper = new WorkflowHelper(Sec.User);
            IEnumerable <TreeNode> result = null;

            switch (SourceType)
            {
            case WorkflowDataSourceType.Definition:
                result = helper.GetAllDefinition().Select(o => new TreeNode()
                {
                    Text = o.Name, Value = o.Id
                });
                break;

            case WorkflowDataSourceType.Application:
                result = helper.GetAllApplication().Select(o => new TreeNode()
                {
                    Text = o.Name, Value = o.Id
                });
                break;

            default:
                throw new FoxOneException("Not Support!");
            }
            return(result);
        }
コード例 #2
0
        protected override IEnumerable <IDictionary <string, object> > GetListInner()
        {
            WorkflowHelper helper = new WorkflowHelper(Sec.User);
            IList <IDictionary <string, object> > result = null;

            switch (SourceType)
            {
            case WorkflowDataSourceType.ToDo:
                result = helper.GetToDoList(Sec.User.Id).ToDictionary();
                break;

            case WorkflowDataSourceType.Done:
                result = helper.GetDoneList(Sec.User.Id).ToDictionary();
                break;

            case WorkflowDataSourceType.Read:
                result = helper.GetReadList(Sec.User.Id).ToDictionary();
                break;

            case WorkflowDataSourceType.Definition:
                result = helper.GetAllDefinition().ToDictionary();
                break;

            case WorkflowDataSourceType.Application:
                result = helper.GetAllApplication().ToDictionary();
                break;

            case WorkflowDataSourceType.Instance:
                result = helper.GetAllInstance().ToDictionary();
                break;

            default:
                break;
            }
            return(result);
        }