예제 #1
0
    protected void btnConfirmWX_Click(object sender, EventArgs e)
    {
        AllocationBllAction allocationBllAction = new AllocationBllAction();
        string text = (this.HdnAcode.Value == "") ? this.HdnAcodeList.Value : this.HdnAcode.Value;
        int    num  = allocationBllAction.InDepositoryConfirm(text, this.Session["yhdm"].ToString());

        if (num != 1)
        {
            this.RegisterStartupScript("alert1", "<script>alert('\\n系统提示:\\n\\n调拨失败!该用户没有权限接收');</script>");
            return;
        }
        DataTable allocationList = allocationBllAction.GetAllocationList("acode='" + text + "'");
        string    title          = "接收提醒";
        string    content        = text + "调拨单已被" + WebUtil.GetUserNames(base.UserCode) + "接收";
        DataRow   dataRow        = allocationList.Rows[0];
        string    userCode       = dataRow["OutAllocationPerson"].ToString();
        string    dbTable        = "Sm_Allocation";
        string    dbColumn       = "acode";
        string    key            = text;
        string    uri            = string.Concat(new string[]
        {
            "/StockManage/Allocation/AuditPage.aspx?ic=",
            dataRow["aid"].ToString(),
            "&acode=",
            text,
            "&allocationType=in"
        });

        Warning.AddWarning(title, content, userCode, dbTable, dbColumn, key, uri);
        this.RegisterStartupScript("alert", "<script>alert('\\n系统提示:\\n\\n调拨成功!');</script>");
        base.RegisterScript("location='ConfirmInDepositoryWX.aspx'");
    }