private void btMod_Click(object sender, System.EventArgs e)
        {
            CMSMStruct.LoginStruct       ls1  = (CMSMStruct.LoginStruct)Session["Login"];
            CMSMStruct.PoStockMainStruct psm1 = new CMSMStruct.PoStockMainStruct();
            psm1.strPoID      = this.txtPoID.Text.Trim();
            psm1.strPrvdCode  = this.ddlProvider.SelectedValue;
            psm1.strAddress   = this.txtAddress.Text.Trim();
            psm1.strComments  = this.txtComments.Text.Trim();
            psm1.strPlanCycle = this.txtPlanCycle.Text.Trim();
            psm1.strModer     = ls1.strOperName;

            if (psm1.strPoID == "" || psm1.strPoID.Length != 13)
            {
                this.Popup("采购订单号不正确!");
                return;
            }
            if (psm1.strPrvdCode == "")
            {
                this.Popup("供应商不能为空!");
                return;
            }
            if (psm1.strPlanCycle == "")
            {
                this.Popup("采购周期不能为空!");
                return;
            }

            CMSMStruct.PoStockMainStruct psmold = (CMSMStruct.PoStockMainStruct)Session["psmold"];
            Hashtable htapp   = (Hashtable)Application["appconf"];
            string    strcons = (string)htapp["cons"];

            StoBusi = new BusiComm.StorageBusi(strcons);
            try
            {
                if ((psm1.strPrvdCode != psmold.strPrvdCode || psm1.strPlanCycle != psmold.strPlanCycle) && StoBusi.IsExistPoProviderCycle(psm1.strPrvdCode, psm1.strPlanCycle))
                {
                    this.Popup("该供应商在本采购周期下已经有订单,不能修改!");
                    return;
                }

                if (StoBusi.ModPoSotckMainInfo(psm1, psmold))
                {
                    this.SetSuccMsgPageBydir("修改采购订单主表内容成功!", "Storage/wfmPoStock.aspx");
                    return;
                }
                else
                {
                    this.SetErrorMsgPageBydir("修改采购订单主表内容时发生错误,请重试!");
                    return;
                }
            }
            catch (Exception er)
            {
                this.clog.WriteLine(er);
                this.SetErrorMsgPageBydir("查询错误,请重试!");
                return;
            }
        }