/// <summary>
        /// 获取地址信息
        /// </summary>
        /// <returns></returns>
        protected string GetAddr(object pid)
        {
            UserAddress ua = UserAddressService.GetModel(Convert.ToInt32(pid));

            if (ua != null)
            {
                return(ua.zipcode + " " + ua.address);
            }
            return("");
        }
示例#2
0
        /// <summary>
        /// 获取地址信息
        /// </summary>
        /// <returns></returns>
        protected string GetAddr(object pid)
        {
            UserAddress ua = UserAddressService.GetModel(Convert.ToInt32(pid));

            if (ua != null)
            {
                return(AreaInfoService.GetName(Convert.ToInt32(ua.qq)) + " " + AreaInfoService.GetName(Convert.ToInt32(ua.weixin)) + " " + AreaInfoService.GetName(Convert.ToInt32(ua.zipcode)) + " " + ua.address + " " + ua.addressDetail);
            }
            return("");
        }
示例#3
0
        /// <summary>
        /// 收货人信息
        /// </summary>
        /// <param name="pid"></param>
        /// <param name="recieveUser"></param>
        /// <param name="mobile"></param>
        /// <param name="address"></param>
        /// <returns></returns>
        protected string GetSend(object pid, object recieveUser, object mobile, object address)
        {
            UserAddress ua = UserAddressService.GetModel(Convert.ToInt32(pid));

            if (ua != null)
            {
                return("<a title='" + ua.relName + " " + ua.mobile + "/" + ua.tel + "  " + ua.qq + " " + ua.weixin + " " + ua.zipcode + " " + ua.address + "'>" + ua.relName + "/" + ua.mobile + "</a>");
            }
            else
            {
                return("<a title='" + mobile + " " + address + "'>" + recieveUser + "/" + mobile + "</a>");
            }
        }
示例#4
0
        /// <summary>
        /// 绑定信息
        /// </summary>
        private void BindData()
        {
            DataSet ds = AreaInfoService.GetList("parentId = 0");

            if (ds.Tables[0].Rows.Count > 0)
            {
                location_p.DataSource     = ds;
                location_p.DataTextField  = "areaName";
                location_p.DataValueField = "id";
                location_p.DataBind();
            }
            location_p.Items.Insert(0, new ListItem("请选择", "0"));
            location_c.Items.Insert(0, new ListItem("请选择", "0"));
            location_a.Items.Insert(0, new ListItem("请选择", "0"));
            UserAddress item = UserAddressService.GetModel(id);

            if (item != null)
            {
                ViewState["labelname"]   = item.addressDetail;
                ViewState["address"]     = item.address;
                ViewState["telephone"]   = item.tel;
                ViewState["mobile"]      = item.mobile;
                ViewState["name"]        = item.relName;
                location_p.SelectedValue = item.qq;

                location_c.Items.Clear();
                ds = AreaInfoService.GetList("parentId = " + location_p.SelectedValue);
                if (ds.Tables[0].Rows.Count > 0)
                {
                    location_c.DataSource     = ds;
                    location_c.DataTextField  = "areaName";
                    location_c.DataValueField = "id";
                    location_c.DataBind();
                }
                location_c.Items.Insert(0, new ListItem("请选择", "0"));
                location_c.SelectedValue = item.weixin;

                location_a.Items.Clear();
                ds = AreaInfoService.GetList("parentId = " + location_c.SelectedValue);
                if (ds.Tables[0].Rows.Count > 0)
                {
                    location_a.DataSource     = ds;
                    location_a.DataTextField  = "areaName";
                    location_a.DataValueField = "id";
                    location_a.DataBind();
                }
                location_a.Items.Insert(0, new ListItem("请选择", "0"));
                location_a.SelectedValue = item.zipcode;
            }
        }