protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { if (Request.QueryString["cusid"] != null) { int cusid = Convert.ToInt32(Request.QueryString["cusid"]); FootTableTB FTT = Ft.GetSelectAcceptTBid(cusid); Label2.Text = FTT.Cusid.ToString(); Label3.Text = FTT.CName.ToString(); Label4.Text = FTT.Price.ToString(); if (FTT.Foot == false) { Label5.Text = "否"; } else { Label5.Text = "是"; } Label7.Text = FTT.Time.ToString(); Label6.Text = FTT.Remark.ToString(); } } }
//查询送件费 public FootTableTB GetSelectCustomerSendTBid(int Cid) { string sql = "select customerstb.cusid,customerstb.cusname,CustomerSendTB.EAllPrice,CustomerSendTB.Issettle,CustomerSendTB.Edate,CustomerSendTB.remark from customerstb inner join CustomerSendTB on customerstb.cusid=CustomerSendTB.cusid where customerstb.cusid=@Cid"; FootTableTB userinfo = new FootTableTB(); try { DataTable dt = DBHelper.GetTable(sql, new SqlParameter("@Cid", Cid)); if (dt.Rows.Count == 0) { return(null); } else { foreach (DataRow row in dt.Rows) { userinfo.Cusid = (int)row["Cusid"]; userinfo.CName = row["CusName"].ToString(); userinfo.Price = Convert.ToDouble(row["EAllPrice"]); userinfo.Foot = (bool)row["issettle"]; userinfo.Time = Convert.ToDateTime(row["edate"]); userinfo.Remark = (row["Remark"] == DBNull.Value) ? "" : row[5].ToString(); } return(userinfo); } } catch (Exception e) { throw e; } }