Exemplo n.º 1
0
        public async Task <int> updatecustomerdata(SendDetail SendDetaildata, string activeState)
        {
            int item = 0;
            Dictionary <string, string> parameters = new Dictionary <string, string>();

            var myContent3 = JsonConvert.SerializeObject(SendDetaildata);

            parameters.Add("object", myContent3);
            parameters.Add("activeState", activeState);
            //#################
            IEnumerable <Claim> claims = await APIResult.getList(urimainpath + "updatecustomerdata", parameters);

            foreach (Claim c in claims)
            {
                if (c.Type == "scopes")
                {
                    item = int.Parse(c.Value);
                }
            }
            return(item);
        }
Exemplo n.º 2
0
        public async Task <SendDetail> ActivateServerOffline(int packageUserId, string activeState)
        {
            SendDetail item = new SendDetail();
            Dictionary <string, string> parameters = new Dictionary <string, string>();

            parameters.Add("packageUserId", packageUserId.ToString());
            parameters.Add("activeState", activeState);

            //#################
            IEnumerable <Claim> claims = await APIResult.getList(urimainpath + "ActivateServerOffline", parameters);

            foreach (Claim c in claims)
            {
                if (c.Type == "scopes")
                {
                    item = JsonConvert.DeserializeObject <SendDetail>(c.Value, new JsonSerializerSettings {
                        DateParseHandling = DateParseHandling.None
                    });
                }
            }
            return(item);
        }
Exemplo n.º 3
0
        public async Task <SendDetail> Activateserver(string packageSaleCode, string customerServerCode)
        {
            SendDetail item = new SendDetail();
            Dictionary <string, string> parameters = new Dictionary <string, string>();

            parameters.Add("packageSaleCode", packageSaleCode);
            parameters.Add("customerServerCode", customerServerCode);

            //#################
            IEnumerable <Claim> claims = await APIResult.getList(urimainpath + "ActivateServer", parameters);

            foreach (Claim c in claims)
            {
                if (c.Type == "scopes")
                {
                    item = JsonConvert.DeserializeObject <SendDetail>(c.Value, new JsonSerializerSettings {
                        DateParseHandling = DateParseHandling.None
                    });
                }
            }
            return(item);
        }