public override void OnPageLoad(object sender, EventArgs e)
 {
     base.OnPageLoad(sender, e);
     viewVM        = new VendorRefundInfoVM();
     serviceFacade = new VendorRefundFacade(this);
     RefundSysNo   = this.Request.Param;
     if (!string.IsNullOrEmpty(RefundSysNo))
     {
         //加载供应商退款单详细信息:
         LoaPORefundDetailInfo();
     }
 }
        private void LoaPORefundDetailInfo()
        {
            serviceFacade.LoadVendorRefundInfo(RefundSysNo, (obj, args) =>
            {
                if (args.FaultsHandle())
                {
                    return;
                }
                this.viewVM      = EntityConverter <VendorRefundInfo, VendorRefundInfoVM> .Convert(args.Result);
                this.DataContext = viewVM;
                this.gridRefundProductsList.Bind();

                //权限判断:PM,PMD,PMCC
                isPM   = viewVM.UserRole == "PM";
                isPMD  = AuthMgr.HasFunctionPoint(AuthKeyConst.PO_VendorRefund_PMDVerify);
                isPMCC = AuthMgr.HasFunctionPoint(AuthKeyConst.PO_VendorRefund_PMCCVerify);
                if (isPMD)
                {
                    viewVM.UserRole = "PMD";
                }
                else if (isPMCC)
                {
                    viewVM.UserRole = "PMCC";
                }

                #region [验证权限角色]
                if (viewVM.NotPMAndPMD == true && !isPMD && !isPMCC)
                {
                    this.lblAlertText.Text        = "您不是当前产品的PM,也不是当前产品PM的备份PM,无法审核!";
                    this.btnUpdate.IsEnabled      = false;
                    this.btnAuditPassed.IsEnabled = false;
                    this.btnAuditDenied.IsEnabled = false;
                    return;
                }
                if (!isPM && !isPMD && !isPMCC)
                {
                    this.lblAlertText.Text        = " 你既不是PM,也不是PMD,无法进行任何操作 !";
                    this.btnUpdate.IsEnabled      = false;
                    this.btnAuditPassed.IsEnabled = false;
                    this.btnAuditDenied.IsEnabled = false;
                    return;
                }
                #endregion

                HideActionButtons();
            });
        }