public void ProcessRequest(HttpContext context) { BLL.CustomerAddress blladdreess = new BLL.CustomerAddress(); BLL.Customer bllCustomer = new BLL.Customer(); BLL.PublicVersion bllVersion = new BLL.PublicVersion(); JsonData jd = new JsonData(); StringBuilder strAddress = new StringBuilder(); StringBuilder strVersion = new StringBuilder(); context.Response.ContentType = "text/plain"; string customerId = context.Request["cid"]; DataSet dsAddress = new DataSet(); Model.Customer model = bllCustomer.GetModel(int.Parse(customerId)); if (model.ParentId == 0) { dsAddress = blladdreess.GetList("StateInfo=1 and CustimerId=" + model.Id); } else { dsAddress = blladdreess.GetList("StateInfo=1 and CustimerId=" + model.ParentId); } strAddress.Append("<option value=''>请选择收货地址</option>"); foreach (DataRow item in dsAddress.Tables[0].Rows) { strAddress.Append("<option value='" + item["Id"].ToString() + "'>" + item["NameInfo"].ToString() + ", " + item["Addressinfo"].ToString() + ", " + item["Phone"].ToString() + "</option>"); } jd["stateInfo"] = 1; jd["strAddress"] = strAddress.ToString(); DataSet dsVersion = bllVersion.GetList("StateInfo=1 and CustomerId=" + customerId); strVersion.Append("<option value=''>请选择客户公版</option>"); foreach (DataRow item in dsVersion.Tables[0].Rows) { strVersion.Append("<option value='" + item["Id"].ToString() + "'>" + item["NameInfo"].ToString() + "</option>"); } jd["strVersion"] = strVersion.ToString(); context.Response.Write(jd.ToJson()); }
void BindDetail(int sonid) { Model.SonOrder model = bllSonOrder.GetModel(sonid); DataSet ds = bllPublicversion.GetList("StateInfo=1 and Num>0 and CustomerId=" + model.CustomerID); foreach (DataRow item in ds.Tables[0].Rows) { ddlPublicversion.Items.Add(new ListItem(item["NameInfo"].ToString(), item["Id"].ToString())); } txtDifferencePrice.Text = model.DifferencePrice.ToString("0.00"); txtDifferenceReason.Text = model.DifferenceReason; txtExplain.Text = model.Explain; txtFileName.Text = model.Remark; txtNum.Text = model.Num.ToString("0.0"); ddlCustomer.SelectedValue = model.CustomerID.ToString(); ddlPaper.SelectedValue = model.PaperId.ToString(); ddlPublicversion.SelectedValue = model.PublicVersionId.ToString(); ddlType.SelectedValue = model.TypeId.ToString(); for (int i = 0; i < repTechnology.Items.Count; i++) { Repeater repSubTechnology = repTechnology.Items[i].FindControl("repSubTechnology") as Repeater; for (int j = 0; j < repSubTechnology.Items.Count; j++) { HiddenField hidsubId = repSubTechnology.Items[j].FindControl("hidsubId") as HiddenField; if (bllOrderTechnology.GetRecordCount("TechnologyId=" + hidsubId.Value + " and SonOrderId=" + sonid) > 0) { CheckBox ckTechnology = repSubTechnology.Items[j].FindControl("ckTechnology") as CheckBox; ckTechnology.Checked = true; } } } }
/// <summary> /// 绑定公版列表 /// </summary> void BindRepList(int cid) { repList.DataSource = bll.GetList(0, "CustomerId=" + id, "SortNum desc,Id asc"); repList.DataBind(); }