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);
        }
Esempio n. 2
0
 public static List <SystemPostWrapper> FindAllByOrganizationID(SystemOrganizationWrapper organizationID)
 {
     return(ConvertToWrapperList(businessProxy.FindAllByOrganizationID(organizationID.Entity)));
 }
Esempio n. 3
0
 public static List <SystemPostWrapper> FindAllByOrderByAndFilterAndOrganizationID(string orderByColumnName, bool isDesc, SystemOrganizationWrapper organizationID, PageQueryParams pageQueryParams)
 {
     return(ConvertToWrapperList(businessProxy.FindAllByOrderByAndFilterAndOrganizationID(orderByColumnName, isDesc, organizationID.Entity, pageQueryParams)));
 }