private string savecp(string dingdanbianhao, HttpContext context) { zhangte.BLL.zt_dingdan bll22 = new zhangte.BLL.zt_dingdan(context); zhangte.Model.zt_dingdan model22 = new zhangte.Model.zt_dingdan(); DataSet ds22 = bll22.GetList(" 订单编号 = '" + dingdanbianhao + "'"); model22.Id = int.Parse(ds22.Tables[0].Rows[0]["id"].ToString()); model22.订单编号 = ds22.Tables[0].Rows[0]["订单编号"].ToString(); model22.企业标识代码 = ds22.Tables[0].Rows[0]["企业标识代码"].ToString(); model22.用户名 = ds22.Tables[0].Rows[0]["用户名"].ToString(); model22.产品名称 = ds22.Tables[0].Rows[0]["产品名称"].ToString(); model22.单价 = ds22.Tables[0].Rows[0]["单价"].ToString(); model22.数量 = ds22.Tables[0].Rows[0]["数量"].ToString(); model22.总价 = ds22.Tables[0].Rows[0]["总价"].ToString(); model22.订单时间 = ds22.Tables[0].Rows[0]["订单时间"].ToString(); model22.收货地址 = ds22.Tables[0].Rows[0]["收货地址"].ToString(); model22.联系方式 = ds22.Tables[0].Rows[0]["联系方式"].ToString(); model22.订单状态 = "已收货"; bll22.Update1(model22); string strret = "OK"; return(strret); }
private string readlist(string yonghuming, HttpContext context) { zhangte.BLL.zt_dingdan bll1 = new zhangte.BLL.zt_dingdan(context); zhangte.Model.zt_dingdan model1 = new zhangte.Model.zt_dingdan(); DataSet ds1 = bll1.GetList(" 用户名 = '" + yonghuming + "'"); string strif = " order by id desc"; if (yonghuming != "") { strif = " where 用户名 like '%" + yonghuming + "%' order by id desc"; } string strret = "<table cellspacing='0' cellpadding='4' id='GridView1' style='color:#333333;width:100%;border-collapse:collapse;'><tr style='color:White;background-color:#5D7B9D;font-weight:bold;'>\r\n"; strret += "<th scope='col'>订单编号</th><th scope='col'>企业标识代码</th><th scope='col'>用户名</th><th scope='col'>产品名称</th><th scope='col'>总价</th><th scope='col'>订单状态</th><th scope='col'>查看明细</th></tr>\r\n"; for (int i = 0; i < ds1.Tables[0].Rows.Count; i++) { if (i % 2 == 0) { strret += "<tr align='center' style='color:#333333;background-color:#F7F6F3;'> <td>" + ds1.Tables[0].Rows[i]["订单编号"].ToString() + "</td> <td>" + ds1.Tables[0].Rows[i]["企业标识代码"].ToString() + "</td><td>" + ds1.Tables[0].Rows[i]["用户名"].ToString() + "</td><td>" + ds1.Tables[0].Rows[i]["总价"].ToString() + "</td><td>" + ds1.Tables[0].Rows[i]["产品名称"].ToString() + "</td><td>" + ds1.Tables[0].Rows[i]["订单状态"].ToString() + "</td><td><a onclick=\"mbedit('" + ds1.Tables[0].Rows[i]["id"].ToString() + "'); href='#cpedit'\">查看明细</a></td> </tr>\r\n"; } else { strret += "<tr align='center' style='color:#333333;background-color:#F7F6F3;'> <td>" + ds1.Tables[0].Rows[i]["订单编号"].ToString() + "</td> <td>" + ds1.Tables[0].Rows[i]["企业标识代码"].ToString() + "</td><td>" + ds1.Tables[0].Rows[i]["用户名"].ToString() + "</td><td>" + ds1.Tables[0].Rows[i]["总价"].ToString() + "</td><td>" + ds1.Tables[0].Rows[i]["产品名称"].ToString() + "</td><td>" + ds1.Tables[0].Rows[i]["订单状态"].ToString() + "</td><td><a onclick=\"mbedit('" + ds1.Tables[0].Rows[i]["id"].ToString() + "'); href='#cpedit'\">查看明细</a></td> </tr>\r\n"; } } strret += "</table>\r\n"; return(strret); }
private string readedit(string dingdanbianhao, HttpContext context) { zhangte.BLL.zt_dingdan bll1 = new zhangte.BLL.zt_dingdan(context); zhangte.Model.zt_dingdan model1 = new zhangte.Model.zt_dingdan(); DataSet ds1 = bll1.GetList(" Id = '" + dingdanbianhao + "'"); string strif = " order by id desc"; if (dingdanbianhao != "") { strif = " where 订单编号 = " + dingdanbianhao + " order by id desc"; } string strret = ""; if (ds1.Tables[0].Rows.Count > 0) { strret = ds1.Tables[0].Rows[0]["订单编号"].ToString() + "|" + ds1.Tables[0].Rows[0]["企业标识代码"].ToString() + "|" + ds1.Tables[0].Rows[0]["用户名"].ToString() + "|" + ds1.Tables[0].Rows[0]["产品名称"].ToString() + "|" + ds1.Tables[0].Rows[0]["单价"].ToString() + "|" + ds1.Tables[0].Rows[0]["数量"].ToString() + "|" + ds1.Tables[0].Rows[0]["总价"].ToString() + "|" + ds1.Tables[0].Rows[0]["订单时间"].ToString() + "|" + ds1.Tables[0].Rows[0]["收货地址"].ToString() + "|" + ds1.Tables[0].Rows[0]["联系方式"].ToString() + "|" + ds1.Tables[0].Rows[0]["订单状态"].ToString() + "|"; } return(strret); }