/// <summary> /// 得到审批步骤列表 /// </summary> /// <returns></returns> public TList <WorkFlowInstance> GetWorkFlowInstanceList() { WorkFlowInstanceService service = new WorkFlowInstanceService(); WorkFlowInstanceQuery query = new WorkFlowInstanceQuery(); query.Clear(); SqlSortBuilder <WorkFlowInstanceColumn> sort = new SqlSortBuilder <WorkFlowInstanceColumn>(); sort.AppendASC(WorkFlowInstanceColumn.CreateAtTime); return(service.Find(query.GetParameters(), sort.GetSortColumns())); }
/// <summary> /// 根据根据工作流实例ID与步骤名得到审批步骤 /// </summary> /// <param name="WflInstanceId"></param> /// <param name="CheckByUserRole"></param> /// <returns></returns> public WorkFlowInstance GetWorkFlowInstanceByWFInstanceId(string WfInstanceId) { WorkFlowInstance workFlowInstance = null; WorkFlowInstanceService rs = new WorkFlowInstanceService(); WorkFlowInstanceQuery query = new WorkFlowInstanceQuery(); query.Clear(); query.AppendEquals(string.Empty, WorkFlowInstanceColumn.WfInstanceId, WfInstanceId); SqlSortBuilder <WorkFlowInstanceColumn> sort = new SqlSortBuilder <WorkFlowInstanceColumn>(); sort.AppendASC(WorkFlowInstanceColumn.CreateAtTime); TList <WorkFlowInstance> WorkFlowInstanceList = rs.Find(query.GetParameters(), sort.GetSortColumns()); if (WorkFlowInstanceList.Count > 0) { workFlowInstance = WorkFlowInstanceList[0]; } return(workFlowInstance); }