public void ProcessRequest(HttpContext context)
 {
     StringBuilder sb = new StringBuilder();
     if (context.Session["MemberID"] != null)
     {
        int uid = Convert.ToInt32(HttpContext.Current.Session["MemberID"]);
         ShowShop.BLL.Member.ReceAddress rabll = new ShowShop.BLL.Member.ReceAddress();
         ChangeHope.DataBase.DataByPage db = rabll.GetList(" uid="+uid+"");
         if (db.DataReader != null)
         {
             context.Response.ContentType = "text/plain";
             sb.Append("<table border=\"0\" width=\"98%\"  cellpadding=\"1\" cellspacing=\"1\">");
             sb.Append("<tr><td></td></tr>");
             sb.Append("<tr>");
             sb.Append("<td height=\"60px\"><fieldset><legend><span style=\"font-weight:bold;font-size:14px\">选择收货地址</span></legend><%=Proviecs %><span id=\"City\">");
             sb.Append("<table width=\"100%\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">");
             sb.Append("<tr>");
             sb.Append("<td align=\"center\"><strong><span style='font-size:12px'>收货人</span></strong></td>");
             sb.Append("<td align=\"center\"><strong><span style='font-size:12px'>收货地址</span></strong></td>");
             sb.Append("</tr>");
             while (db.DataReader.Read())
             {
                 sb.Append("<tr>");
                 sb.Append("<td><a href='#' onClick='javascript:Consignee(" + db.DataReader["id"].ToString() + ");closeWithIframe();'>" + db.DataReader["username"].ToString() + "</a></td>");
                 sb.Append("<td><a href=''>" + db.DataReader["address"].ToString() + "</a></td>");
                 sb.Append(" </tr>");
             }
             sb.Append("</table>");
             sb.Append("</span></fieldset> </td>");
             sb.Append("</tr>");
             sb.Append("<tr>");
             sb.Append("<td><span id=\"MainConent\"></span></td>");
             sb.Append("</tr>");
             sb.Append("</table>");
         }
     }
     else
     {
         sb.Append("没有收货信息!");
     }
     context.Response.Write(sb.ToString());
 }
Example #2
0
        //td 2010-4-9
        private void GetReceaddress(int id)
        {
            try
            {
                ShowShop.BLL.Member.ReceAddress rbll = new ShowShop.BLL.Member.ReceAddress();
                ShowShop.Model.Member.ReceAddress model = rbll.GetModelByID(id);

                if (model != null)
                {
                    this.lblName.Text = model.UserName;
                    this.lblEmails.Text = model.Email;
                    this.lblAddresss.Text = model.Address;
                    this.lblZips.Text = model.Zip;
                    this.lblTel.Text = model.Phone;
                    this.lblModeil.Text = model.Mobile;
                    this.lblConig.Text = model.ConstructionSigns;
                    this.lblConTime.Text = model.ConsignesTime;
                    string address = "";
                    ShowShop.BLL.SystemInfo.Provinces pbll = new ShowShop.BLL.SystemInfo.Provinces();
                    ShowShop.Model.SystemInfo.Provinces pmodel = pbll.GetModel(int.Parse(model.Province));
                    if (pmodel != null)
                    {
                        address += pmodel.CityName + "&nbsp;&nbsp;";
                    }

                    pmodel = pbll.GetModel(int.Parse(model.City));
                    if (pmodel != null)
                    {
                        address+=pmodel.CityName+"&nbsp;&nbsp;";
                    }
                    pmodel = pbll.GetModel(int.Parse(model.Borough));
                    if (pmodel != null)
                    {
                        address += pmodel.CityName + "&nbsp;&nbsp;";
                    }
                    this.lblAdd.Text = address;
                }

            }
            catch { }
        }