Exemplo n.º 1
0
        private void setAddress()
        {
            string url = "http://120.27.45.83:8082/api/Mall/getAddressInfo";

            string para = "key=" + Request.QueryString["aid"].ToString();

            resp resp = new resp();


            resp = QLWeiXin.Code.Util.GetResp(url, para);

            userAddress user = JsonHelper.DeserializeJsonToObject <userAddress>(resp.data.ToString());

            this.name.Value = user.name;

            this.mobile.Value = user.phone;

            this.area.Value = user.area;

            this.address.Value = user.address;

            this.aid.Value = user.id;

            this.uid.Value = user.user_id;
        }
Exemplo n.º 2
0
        //Button Find and collect data
        private void measuresend(object sender, EventArgs e)
        {
            userAddress first = web_servis.searchNeighbour(username);

            nexttextbox.Text = first.senzor.username + ": " + first.distance;
            xname            = username;

            Connect(first.senzor.port, first.senzor);
            Talk(first.senzor);
        }
Exemplo n.º 3
0
        /// <summary>
        /// 设置默认地址
        /// </summary>

        private void setAddress()
        {
            string url = "http://120.27.45.83:8082/api/Mall/getDefaultAddress";

            string para = "user_id=" + uInfo.id;


            if (Request.QueryString["addr10"] != null)
            {
                url = "http://120.27.45.83:8085/api/Mall/getAddressInfo";

                para = "key=" + Request.QueryString["addr10"].ToString();
            }



            resp resp = new resp();


            resp = QLWeiXin.Code.Util.GetResp(url, para);

            if (resp.code == 1000)
            {
                userAddress user = JsonHelper.DeserializeJsonToObject <userAddress>(resp.data.ToString());

                this.name.Text = user.name;

                this.mobile.Text = user.phone;

                if (user == null)
                {
                    this.address.Text = "请选择地址";
                    this.hf1.Value    = "0";
                }
                else
                {
                    this.address.Text = user.area + user.address;
                    this.hf1.Value    = user.id;
                }
            }
        }