using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using System.Data; public partial class DispatchPrint : System.Web.UI.Page { //创建一个共用的订单bll层 Maticsoft.BLL.nr_z_dd ddbll = new Maticsoft.BLL.nr_z_dd(); //创建一个共用的订单模板 Maticsoft.Model.nr_z_dd dd = new Maticsoft.Model.nr_z_dd(); //创建一个共用的客户bll层 Maticsoft.BLL.nr_z_kehu kehubll = new Maticsoft.BLL.nr_z_kehu(); //创建一个操作记录模板 Maticsoft.Model.nr_sys_rizhi rizhi = new Maticsoft.Model.nr_sys_rizhi(); //创建一个操作记录bll Maticsoft.BLL.nr_sys_rizhi rizhibll = new Maticsoft.BLL.nr_sys_rizhi(); public string userinfo = ""; protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { DataTable dtuserinfo = DBHlper.Execute("select mingcheng,logourl from nr_sysuserinfo").Tables[0]; if (dtuserinfo.Rows.Count > 0) { userinfo = dtuserinfo.Rows[0]["mingcheng"].ToString(); img_logo.Src = "../UseFile/" + dtuserinfo.Rows[0]["logourl"].ToString(); } else { img_logo.Visible = false; } if (Session["user"] == null) { Response.Redirect("../index.aspx"); } Maticsoft.Model.nr_z_yhzh user = (Maticsoft.Model.nr_z_yhzh)(Session["user"]); if (Request.QueryString["uid"] != null && Request.QueryString["uid"] != "") { id.Value = Request.QueryString["uid"].ToString(); } initdata(id.Value); getsccpxm(Convert.ToInt32(id.Value)); } } #region 获取真正数据值 private void initdata(string did) { DataSet scdds = DBHlper.Execute("select * from view_nr_z_scd where id='" + did + "'"); if (scdds != null && scdds.Tables[0].Rows.Count > 0) { bh.Text = scdds.Tables[0].Rows[0]["bh"].ToString(); sclx.Text = scdds.Tables[0].Rows[0]["sclx"].ToString(); xdrq.Text = Convert.ToDateTime(scdds.Tables[0].Rows[0]["xdrq"]).ToString("yyyy-MM-dd"); wgrq.Text = Convert.ToDateTime(scdds.Tables[0].Rows[0]["wgrq"]).ToString("yyyy-MM-dd"); ywy.Text = scdds.Tables[0].Rows[0]["kdr"].ToString(); ddbz.Text = scdds.Tables[0].Rows[0]["bz"].ToString(); zt.Text = scdds.Tables[0].Rows[0]["zt"].ToString(); } } #endregion #region 用来加载项目 private void getsccpxm(int scdid) { //修改页面时,首先吧项目明细的表头加载出来 string biao = "
| 单据编号 | 客户编号 | 产品货号 | " + "产品名称 | 种类 | 工艺要求 | 订单数量 | " + "提取库存数量 | 生产数量 | 交货日期 | " + "备注 |
| " + r["djbh"].ToString() + " | " + r["khbh"].ToString() + " | " + "" + r["cphh"].ToString() + " | " + "" + r["cpmc"] + " | " + r["zl"].ToString() + " | " + "" + r["scfs"].ToString() + " | " + r["ddsl"].ToString() + " | " + "" + tqxxst + " | " + "" + r["scsl"].ToString() + " | " + "" + Convert.ToDateTime(r["jhrq"]).ToString("yyyy-MM-dd") + " | " + "" + r["bz"].ToString() + " |