Exemple #1
0
        public static CorpDepartment Create(int parentId, string name, int order)
        {
            TkDebug.AssertArgumentNullOrEmpty(name, "name", null);

            CorpDepartment data = new CorpDepartment
            {
                Name     = name,
                ParentId = parentId,
                Order    = order
            };
            string url = WeCorpUtil.GetCorpUrl(WeCorpConst.CREATE_DEPARTMENT,
                                               WeixinSettings.Current.CorpUserManagerSecret);

            return(WeUtil.PostToUri(url, data.WriteJson(WeConst.WRITE_SETTINGS), data));
        }
 public object CreateNew(IInputData input)
 {
     int parentId = input.QueryString["ParentId"].Value<int>(1);
     CorpDepartment dept = new CorpDepartment() { ParentId = parentId };
     return dept;
 }
        public static CorpDepartment Create(int parentId, string name, int order)
        {
            TkDebug.AssertArgumentNullOrEmpty(name, "name", null);

            CorpDepartment data = new CorpDepartment
            {
                Name = name,
                ParentId = parentId,
                Order = order
            };
            string url = WeCorpUtil.GetCorpUrl(WeCorpConst.CREATE_DEPARTMENT,
                WeixinSettings.Current.CorpUserManagerSecret);
            return WeUtil.PostToUri(url, data.WriteJson(WeConst.WRITE_SETTINGS), data);
        }