using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using System.Data; using Ajax; public partial class Common_cgrk : System.Web.UI.Page { //创建一个共用的送货单bll层 Maticsoft.BLL.nr_z_cgrk cgrkbll = new Maticsoft.BLL.nr_z_cgrk(); //创建一个共用的生产单模板 Maticsoft.Model.nr_z_cgrk cgrkmodel = new Maticsoft.Model.nr_z_cgrk(); //创建一个共用的订单bll层 Maticsoft.BLL.nr_z_dd ddbll = new Maticsoft.BLL.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) { Utility.RegisterTypeForAjax(typeof(Common_cgrk)); if (!IsPostBack) { if (Session["user"] == null) { Response.Redirect("../index.aspx"); } Maticsoft.Model.nr_z_yhzh user = (Maticsoft.Model.nr_z_yhzh)(Session["user"]); string uid = Request["uid"].ToString(); initdata(uid); } 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; } } #region 获取真正数据值 private void initdata(string sid) { int shdid=Convert.ToInt32(sid); DataTable dt = DBHlper.Execute("select * from view_nr_z_cgrk where id=" + shdid).Tables[0]; if (dt != null && dt.Rows.Count > 0) { gysmc.Text = dt.Rows[0]["gysmc"].ToString(); jsr.Text = dt.Rows[0]["jsr"].ToString(); } } #endregion #region 用来加载项目 [Ajax.AjaxMethod] public string getms(string ids) { //修改页面时,首先吧项目明细的表头加载出来 string biao = "
| 采购单号 | " + "物料名称 | 库房 | 物料种类 | " + "物料规格 | 物料单位 | " + "数量 | 单价 | 金额 |
| " + r["cgdh"].ToString() + " | " + "" + r["mingcheng"].ToString() + " | " + "" + r["kufang"].ToString() + " | " + "" + r["zhonglei"].ToString() + " | " + "" + r["guige"].ToString() + " | " + "" + r["danwei"].ToString() + " | " + "" + r["sl"].ToString() + " | " + "¥" + r["dj"].ToString() + " | " + "¥" + r["je"].ToString() + " |
| 合计大写 | " + dxzje + " | 合计 | ¥" + zje + " | |||||
| 备注 | " + bz + " | |||||||
| 备注 | ||||||||