Exemplo n.º 1
0
        public WeixinResult AddUser(string openId)
        {
            string      url  = WeUtil.GetUrl(WeConst.ADD_GROUP_USER);
            WeGroupUser data = new WeGroupUser
            {
                OpenId  = openId,
                GroupId = Id
            };
            WeixinResult result = new WeixinResult();

            return(WeUtil.PostToUri(url, data.WriteJson(WeConst.WRITE_SETTINGS), result));
        }
Exemplo n.º 2
0
        public static int GetUserGroupId(string openId)
        {
            TkDebug.AssertArgumentNullOrEmpty(openId, "openId", null);

            WeGroupUser user = new WeGroupUser {
                OpenId = openId
            };
            WeGroupId group = new WeGroupId();
            string    url   = WeUtil.GetUrl(WeConst.QUERY_USER_GROUP);

            group = WeUtil.PostToUri(url, user.WriteJson(WeConst.WRITE_SETTINGS), group);
            return(group.GroupId);
        }
Exemplo n.º 3
0
 public WeixinResult AddUser(string openId)
 {
     string url = WeUtil.GetUrl(WeConst.ADD_GROUP_USER);
     WeGroupUser data = new WeGroupUser
     {
         OpenId = openId,
         GroupId = Id
     };
     WeixinResult result = new WeixinResult();
     return WeUtil.PostToUri(url, data.WriteJson(WeConst.WRITE_SETTINGS), result);
 }
Exemplo n.º 4
0
        public static int GetUserGroupId(string openId)
        {
            TkDebug.AssertArgumentNullOrEmpty(openId, "openId", null);

            WeGroupUser user = new WeGroupUser { OpenId = openId };
            WeGroupId group = new WeGroupId();
            string url = WeUtil.GetUrl(WeConst.QUERY_USER_GROUP);
            group = WeUtil.PostToUri(url, user.WriteJson(WeConst.WRITE_SETTINGS), group);
            return group.GroupId;
        }