protected void deleteButton_Click(object sender, EventArgs e)
    {
        string AuditingId = SalesOutID.Text.ToString();

        Leyp.SQLServerDAL.Sales.SalesOutDAL bl = new Leyp.SQLServerDAL.Sales.SalesOutDAL();
        if (bl.deleteEitity(AuditingId))//删除
        {
            Response.Redirect("ManagerAuditingSalesOut.aspx", true);
        }
        else
        {
            Jscript.AjaxAlert(this, "删除失败!");
            return;
        }
    }
    protected void shenhe_Click(object sender, EventArgs e)
    {
        string AuditingId = SalesOutID.Text.ToString();

        Leyp.SQLServerDAL.Sales.SalesOutDAL bl = new Leyp.SQLServerDAL.Sales.SalesOutDAL();
        if (bl.AuditingOrder(AuditingId, getUserName(), TradeDate.Text.ToString(), Consignee.Text.ToString()))//审核
        {
            Response.Redirect("ManagerAuditingSalesOut.aspx", true);
        }
        else
        {
            Jscript.AjaxAlert(this, "审核失败!");
            return;
        }
    }
    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.SalesOutDAL bl = new Leyp.SQLServerDAL.Sales.SalesOutDAL();
            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 + "条   &nbsp; &nbsp;&nbsp; &nbsp; <a href=\"Manager_SalesOutOrder.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.SalesOutDAL bl = new Leyp.SQLServerDAL.Sales.SalesOutDAL();
            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 + "条     &nbsp; &nbsp;&nbsp; &nbsp; <a href=\"Manager_SalesOutOrder.aspx\">返回列表</a>");
            Response.Write(sb.ToString());
        }
    }