protected void Page_Load(object sender, EventArgs e) { if (Request.QueryString["id"] != null && Request.QueryString["id"].ToString() != "") { string orderid = Request.QueryString["id"].ToString(); order= obll.getOrdersViewModel(int.Parse(orderid)); this.customer_name.Text = order.Username; this.sales_orderid.Text = order.OrderNo; this.customer_address.Text = order.Address; //查询详细客户信息 c= cb.GetModel(int.Parse(order.Customerid.ToString())); this.customer_linker.Text = c.link_men; this.customer_tel.Text = order.Tel + "/" + order.Mobile; this.customet_email.Text = c.email; //查询详细物流公司信息 tbLogs logs=new tbLogs(); tbLogsBLL tblogbll=new tbLogsBLL(); if (order.Logid != null) { logs = tblogbll.tbLogs_GetModel(order.Logid.ToString()); this.logistics.Text = logs.LogisticsName; this.logistics_num.Text = order.LogNumber; } this.state.Text = order.StateName; this.create_date.Text = DateTime.Parse(order.createdate.ToString()).ToString("yyyy-MM-dd"); attach_pay.Text =decimal.Parse(order.Postmoney.ToString()).ToString("0.00"); dt = sql.getDataByCondition("dbo.OrdersPro_View", "*", " OrderID="+order.OrderID); } }
protected void btnSave_Click(object sender, EventArgs e) { logs.LinkMan = txtLinkMan.Text; logs.LogisticsName = txtLogsName.Text; logs.Mobile = txtMobie.Text; logs.Tel = txtTel.Text; logs.Address = txtAddress.Text; tbLogsBLL logsbll = new tbLogsBLL(); int count= logsbll.tbLogs_Update(logs); if (count != 0) { Response.Redirect("logsList.aspx"); } else { ClientScript.RegisterStartupScript(this.GetType(), "test", "alert('添加失败')", true); } }