예제 #1
0
        public PagedList <dynamic> QueryHandledList(Guid handlerId, int page, int pageSize, Guid?entityid)
        {
            string s = @"select a.*,e.Name AS WorkFlowName,b.ApplicantId,b.EntityId,b.ObjectId,b.Description as ApplyDescription,c.LocalizedName as EntityLocalizedName,d.Name as ApplicantIdName
            from WorkFlowProcess a
            inner join WorkFlowInstance b on a.WorkFlowInstanceId = b.WorkFlowInstanceId
            inner join Entity c on b.EntityId = c.EntityId
            inner join SystemUser d on b.ApplicantId = d.SystemUserId
            inner join WorkFlow e on b.WorkFlowId = e.WorkFlowId
            where a.HandlerId=@0 and a.StateCode in(2,3)
            ";

            if (entityid.HasValue && !entityid.Value.Equals(Guid.Empty))
            {
                s += " and b.EntityId='" + entityid.Value + "'";
            }
            s += " order by a.HandleTime desc";
            var dataRepository = new DataRepositoryBase <dynamic>(DbContext);

            return(dataRepository.ExecuteQueryPaged(page, pageSize, s, handlerId));
        }
예제 #2
0
        public PagedList <dynamic> QueryApplyHandlingList(Guid applierId, int page, int pageSize, Guid?entityid)
        {
            string s = @"select b.*,c.LocalizedName as EntityLocalizedName,d.Name as ApplicantIdName,e.Name AS WorkFlowName
            from WorkFlowInstance b
            inner join Entity c on b.EntityId = c.EntityId
            inner join SystemUser d on b.ApplicantId = d.SystemUserId
            inner join WorkFlow e on b.WorkFlowId = e.WorkFlowId
            where b.ApplicantId=@0 and b.StateCode = 1
            ";

            if (entityid.HasValue && !entityid.Value.Equals(Guid.Empty))
            {
                s += " and b.EntityId='" + entityid.Value + "'";
            }
            s += " order by b.CreatedOn desc";

            var dataRepository = new DataRepositoryBase <dynamic>(DbContext);

            return(dataRepository.ExecuteQueryPaged(page, pageSize, s, applierId));
        }
예제 #3
0
        public PagedList <dynamic> QueryPaged(bool ignorePermissions = false, List <Schema.Domain.Attribute> noneReadFields = null)
        {
            var result = _repository.ExecuteQueryPaged(this._queryByAttribute.PageInfo.PageNumber, this._queryByAttribute.PageInfo.PageSize, ToSqlString(ignorePermissions: ignorePermissions, noneReadFields: noneReadFields), this.Parameters.Args.ToArray());

            return(result);
        }