Ejemplo n.º 1
0
        internal static CorpDepartmentCollection GetDepartmentList()
        {
            string url = WeCorpUtil.GetCorpUrl(WeCorpConst.QUERY_DEPARTMENT,
                                               WeixinSettings.Current.CorpUserManagerSecret);
            CorpDepartmentCollection collection = WeUtil.GetFromUri <CorpDepartmentCollection>(url);

            return(collection);
        }
 private static CorpDepartment FindDept(string id, out CorpDepartmentCollection deptList)
 {
     deptList = WeDataUtil.GetCacheData<CorpDepartmentCollection>(WeCorpConst.CORP_DEPT_NAME);
     CorpDepartment result = deptList.Department[id];
     TkDebug.AssertNotNull(result, string.Format(ObjectUtil.SysCulture,
         "数据有错误,无法找到Id为{0}的Department", id), null);
     return result;
 }
Ejemplo n.º 3
0
        public static IList <CorpDepartment> GetAllDepartments()
        {
            CorpDepartmentCollection collection = GetDepartmentList();

            return(collection.Department);
        }
Ejemplo n.º 4
0
 public WeixinResult ReadData(string json)
 {
     CorpDepartmentCollection result = new CorpDepartmentCollection();
     result.ReadJson(json);
     return result;
 }