Example #1
0
        private void LoadPayItemDetailInfo()
        {
            PayItemDetailInfoReq request = new PayItemDetailInfoReq();

            if (ValidQueryParam(this.Request.Param, ref request))
            {
                this._payFacade.LoadPayDetailInfoForEdit(request, result =>
                {
                    this.btnNew.IsEnabled = true && AuthMgr.HasFunctionPoint(AuthKeyConst.Invoice_PayItem_InvoiceInputMaintain_Insert);

                    _pageVM = result;
                    this.LayoutRoot.DataContext = _pageVM;
                    this.tbTotalInfo.Text       = string.Format(ResPayItemMaintain.Message_TotalInfo,
                                                                _pageVM.OrderSysNo, ConstValue.Invoice_ToCurrencyString(_pageVM.TotalAmt), ConstValue.Invoice_ToCurrencyString(_pageVM.PaidAmt));
                    this.tbTotalInfo.Visibility = Visibility.Visible;

                    if (_pageVM.OrderType == PayableOrderType.POAdjust || _pageVM.OrderType == PayableOrderType.RMAPOR)
                    {
                        this.btnNew.IsEnabled = false;
                    }
                });
            }
            else
            {
                this.Window.Confirm(ResPayItemMaintain.Message_RecordDataError, (x => {
                    this.Window.Close();
                }));
            }
        }
Example #2
0
        public void LoadPayDetailInfoForEdit(PayItemDetailInfoReq request, Action <PaymentOrderMaintainVM> callback)
        {
            string relativeUrl = "/InvoiceService/Payable/LoadForEdit";

            request.CompanyCode = CPApplication.Current.CompanyCode;
            restClient.Query <PayDetailInfoResp>(relativeUrl, request, (obj, args) =>
            {
                if (args.FaultsHandle())
                {
                    return;
                }
                PaymentOrderMaintainVM result = EntityConverter <OrderInfo, PaymentOrderMaintainVM> .Convert(args.Result.OrderInfo);
                result.TotalAmt    = args.Result.TotalInfo.TotalAmt;
                result.PaidAmt     = args.Result.TotalInfo.PaidAmt;
                result.PayItemList = args.Result.PayItemList.Convert <PayItemInfo, PayItemVM>((s, t) =>
                {
                    t.PayItemSysNo   = s.SysNo;
                    t.IsVendorHolded = args.Result.OrderInfo.IsVendorHoldedControl;
                });
                callback(result);
            });
        }
Example #3
0
 public PayItemMaintain()
 {
     InitializeComponent();
     _pageVM = new PaymentOrderMaintainVM();
     this.LayoutRoot.DataContext = _pageVM;
 }