protected void deleteButton_Click(object sender, EventArgs e) { string AuditingId = SalesOrderID.Text.ToString(); Leyp.SQLServerDAL.Sales.SalesOrderDAL bl = new Leyp.SQLServerDAL.Sales.SalesOrderDAL(); if (bl.deleteEitity(AuditingId))//删除 { Response.Redirect("ManagerAuditingSalesOrder.aspx", true); } else { Jscript.AjaxAlert(this, "删除失败!"); return; } }
protected void shenhe_Click(object sender, EventArgs e) { string AuditingId = SalesOrderID.Text.ToString(); Leyp.SQLServerDAL.Sales.SalesOrderDAL bl = new Leyp.SQLServerDAL.Sales.SalesOrderDAL(); if (bl.AuditingOrder(AuditingId, getUserName()))//审核 { Response.Redirect("ManagerAuditingSalesOrder.aspx", true); } else { Jscript.AjaxAlert(this, "审核失败!"); return; } }
protected void init() { string action = Request.QueryString["action"].ToString(); if (action.Equals("delMySalesOrder"))//用户删除自己的订单 { string AuditingId = Request.QueryString["AuditingId"].ToString(); StringBuilder sb = new StringBuilder(); string[] a = AuditingId.Split('#'); Leyp.SQLServerDAL.Sales.SalesOrderDAL bl = new Leyp.SQLServerDAL.Sales.SalesOrderDAL(); int num = 0; for (int i = 0; i < a.Length; i++) { VSalesOrder v = new VSalesOrder(); v = bl.getByID(a[i]); if (v != null) { if (v.UserName.Equals(getUserName()))//如果是该用户的单据 { if (bl.deleteEitity(a[i])) { num++; } else { sb.Append("订单号:" + a[i] + " 已经审核不能再审核 <br/>"); } } else { sb.Append("订单号:" + a[i] + " 无权删除 <br/>"); } } } sb.Append("成功删除 " + num + "条"); Response.Write(sb.ToString()); } }
protected void init() { string action = Request.QueryString["action"].ToString(); if (action.Equals("shenhe")) { string AuditingId = Request.QueryString["AuditingId"].ToString(); StringBuilder sb = new StringBuilder(); string[] a = AuditingId.Split('#'); Leyp.SQLServerDAL.Sales.SalesOrderDAL bl = new Leyp.SQLServerDAL.Sales.SalesOrderDAL(); int num = 0; for (int i = 0; i < a.Length; i++) { if (bl.AuditingOrder(a[i], getUserName()))//审核 { num++; } else { sb.Append("订单号:" + a[i] + " 已经审核不能再审核 <br/>"); } } sb.Append("成功审核 " + num + "条 <a href=\"Manager_SalesOrderList.aspx\">返回列表</a>"); Response.Write(sb.ToString()); } else if (action.Equals("delete")) { string AuditingId = Request.QueryString["AuditingId"].ToString(); StringBuilder sb = new StringBuilder(); string[] a = AuditingId.Split('#'); Leyp.SQLServerDAL.Sales.SalesOrderDAL bl = new Leyp.SQLServerDAL.Sales.SalesOrderDAL(); int num = 0; for (int i = 0; i < a.Length; i++) { if (bl.deleteEitity(a[i]))//删除成功 { num++; } else { sb.Append("订单号:" + a[i] + " 可能已经审核不能删除 <br/>"); } } sb.Append("成功删除 " + num + "条 <a href=\"Manager_SalesOrderList.aspx\">返回列表</a>"); Response.Write(sb.ToString()); } else if (action.Equals("rshenhe"))//反审核 { string AuditingId = Request.QueryString["AuditingId"].ToString(); StringBuilder sb = new StringBuilder(); string[] a = AuditingId.Split('#'); Leyp.SQLServerDAL.Sales.SalesOrderDAL bl = new Leyp.SQLServerDAL.Sales.SalesOrderDAL(); int num = 0; for (int i = 0; i < a.Length; i++) { if (bl.rAuditingOrder(a[i]))//删除成功 { num++; } else { sb.Append("订单号:" + a[i] + " 不能反审核 <br/>"); } } sb.Append("成功反审核 " + num + "条 <a href=\"Manager_SalesOrderList.aspx\">返回列表</a>"); Response.Write(sb.ToString()); } else if (action.Equals("Kuaishenhe"))//审核且生成销售开单 { } }