public static List <TypedTreeNodeItem <SystemDepartmentWrapper> > GetAllDepartmentByOrginationID(int orginationID) { List <TypedTreeNodeItem <SystemDepartmentWrapper> > nodes = new List <TypedTreeNodeItem <SystemDepartmentWrapper> >(); List <SystemDepartmentWrapper> departments = SystemDepartmentWrapper.FindAllByOrganizationID(SystemOrganizationWrapper.FindById(orginationID)); List <SystemDepartmentWrapper> topDepartments = departments.FindAll(p => (p.ParentDepartmentID == null)); foreach (SystemDepartmentWrapper topDepartment in topDepartments) { TypedTreeNodeItem <SystemDepartmentWrapper> topnode = new TypedTreeNodeItem <SystemDepartmentWrapper>(); topnode.Id = topDepartment.DepartmentID.ToString(); topnode.Name = topDepartment.DepartmentNameCn; topnode.DataItem = topDepartment; topnode.ParentNode = null; AddSubDepartment(topnode, topDepartment, departments); nodes.Add(topnode); } return(nodes); }
public static List <SystemPostWrapper> FindAllByOrganizationID(SystemOrganizationWrapper organizationID) { return(ConvertToWrapperList(businessProxy.FindAllByOrganizationID(organizationID.Entity))); }
public static List <SystemPostWrapper> FindAllByOrderByAndFilterAndOrganizationID(string orderByColumnName, bool isDesc, SystemOrganizationWrapper organizationID, PageQueryParams pageQueryParams) { return(ConvertToWrapperList(businessProxy.FindAllByOrderByAndFilterAndOrganizationID(orderByColumnName, isDesc, organizationID.Entity, pageQueryParams))); }