Exemple #1
0
        private void Hyperlink_Edit_Click(object sender, RoutedEventArgs e)
        {
            PayableVM vm  = (sender as HyperlinkButton).DataContext as PayableVM;
            string    url = string.Format(ConstValue.Invoice_PayItemMaintainUrl, "?PaySysNo=" + vm.PaySysNo);

            Window.Navigate(url, null, true);
        }
Exemple #2
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="payableVM"></param>
        /// <param name="callback"></param>
        public void PayableQuery(PayableVM payableVM, EventHandler <RestClientEventArgs <dynamic> > callback)
        {
            var    data        = payableVM.ConvertVM <PayableVM, PayableInfo>();
            string relativeUrl = "InvoiceService/Invoice/PaybleQuery";

            restClient.QueryDynamicData(relativeUrl, data, callback);
        }
Exemple #3
0
        /// <summary>
        /// 添加备注
        /// </summary>
        /// <param name="payVM"></param>
        /// <param name="callback"></param>
        public void AddMemo(PayableVM payableVM, EventHandler <RestClientEventArgs <PayableInfo> > callback)
        {
            payableVM.OperationUserFullName = CPApplication.Current.LoginUser.DisplayName;
            payableVM.CompanyCode           = CPApplication.Current.CompanyCode;
            var    data        = payableVM.ConvertVM <PayableVM, PayableInfo>();
            string relativeUrl = "InvoiceService/Invoice/AddMemo";

            restClient.Create <PayableInfo>(relativeUrl, data, callback);
        }
Exemple #4
0
        private void Hyperlink_ShowFailedDetail_Click(object sender, RoutedEventArgs e)
        {
            PayableVM vm = (sender as HyperlinkButton).DataContext as PayableVM;

            if (vm.SapInFailedReason != null)
            {
                Window.Alert(vm.SapInFailedReason);
            }
            //var viewer = new UCMessageViewer();
            //viewer.Message = vm.SapInFailedReason;
            //viewer.ShowDialog(ResPayQuery.Dialog_FailedDetail, null);
        }
Exemple #5
0
        private void Hyperlink_OrderIDLinkUrl(object sender, RoutedEventArgs e)
        {
            PayableVM vm  = (sender as HyperlinkButton).DataContext as PayableVM;
            string    url = string.Empty;

            switch (vm.OrderType)
            {
            case PayableOrderType.PO:
            case PayableOrderType.POAdjust:
                url = string.Format(ConstValue.PO_PurchaseOrderMaintain, vm.OrderSysNo);
                break;

            case PayableOrderType.VendorSettleOrder:
                //url = vm.IsOldConsignSettle.Value ? string.Format(ConstValue.PO_ConsignMaintain, vm.OrderSysNo) : string.Format(ConstValue.PO_ConsignNewEdit, vm.OrderSysNo);
                //借的代销结算单页面已经没有在使用了。
                url = string.Format(ConstValue.PO_ConsignMaintain, vm.OrderSysNo);
                break;

            case PayableOrderType.RMAPOR:
                url = string.Format(ConstValue.PO_VendorRMARefundMaintain, vm.OrderSysNo);
                break;

            case PayableOrderType.CollectionSettlement:
                url = string.Format(ConstValue.PO_GatherMaintain, vm.OrderSysNo);
                break;

            case PayableOrderType.Commission:
                url = string.Format(ConstValue.PO_CommissionItemView, vm.OrderSysNo);
                break;

            case PayableOrderType.CollectionPayment:
                url = string.Format(ConstValue.PO_CollectionPaymentItemView, vm.OrderSysNo);
                break;

            case PayableOrderType.CostChange:
                url = string.Format(ConstValue.PO_CostChangeMaintain, vm.OrderSysNo);
                break;

            case PayableOrderType.ConsignAdjust:
                url = string.Format(ConstValue.PO_ConsignAdjustMaintain, vm.OrderSysNo);
                break;

            case PayableOrderType.GroupSettle:
                url = string.Format(ConstValue.PO_GroupSettleMaintain, vm.OrderSysNo);
                break;

            default:
                break;
            }
            Window.Navigate(url, null, true);
        }
Exemple #6
0
        private void Hyperlink_UpdateInvoiceStatus(object sender, RoutedEventArgs e)
        {
            PayableVM vm = (sender as HyperlinkButton).DataContext as PayableVM;

            var model = new PayInvoiceMaintainVM();

            model.OrderSysNos       = vm.OrderSysNo.ToString();
            model.InvoiceStatus     = vm.InvoiceStatus;
            model.InvoiceFactStatus = vm.InvoiceFactStatus;
            model.Note   = vm.Note;
            model.SysNos = vm.PaySysNo.ToString();
            UCPayInvoiceMaintain uctl = new UCPayInvoiceMaintain(model);

            uctl.ShowDialog(ResPayQuery.Dialog_InvoiceMaintain, (s, args) =>
            {
                if (args.DialogResult == DialogResultType.OK && args.Data != null)
                {
                    dynamic result = args.Data as dynamic;
                    Window.Alert(result.Result.ToString());
                    this.DataGrid_QueryResult.Bind();
                }
            });
        }