Пример #1
0
        void ListPOSSales_Loaded(object sender, RoutedEventArgs e)
        {
            _vm = DataContext as ListPOSSalesViewModel;
            _vm.ClearAndSetup();
            try
            {
                DataPager.txtTotal.Text = _vm.SalesCount.ToString();
                DataPager.txtPage.Text = _vm.CurrentPage.ToString();

                _posvm = ViewModelLocator.EditPOSOutletSaleViewModelPropertyNameStatic;
                _livm = ViewModelLocator.ListInvoicesViewModelStatic;

                SalesTabControl.SelectedIndex = OtherUtilities.SelectedTabPos;
                string _pendingSales = NavigationService.Source.OriginalString.ParseQueryString("PendingSales");
                if (!string.IsNullOrEmpty(_pendingSales))
                    _vm.PendingSales = Convert.ToBoolean(_pendingSales);
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }
        public void ConfirmThisPayment(ListInvoicesViewModel.UnconfirmedReceiptPayment payment, string recDocReference,
                                       string mMoneyPaymentType, string buyGoodsTransReference)
        {
            //isBusyWindow = new BusyWindow();
            //isBusyWindow.lblWhatsUp.Content = "Fetching payment notification.";
            //isBusyWindow.Show();
            using (StructureMap.IContainer cont = NestedContainer)
            {
                Using<IAuditLogWFManager>(cont).AuditLogEntry("PendingPayment",
                                                 "Attempted confirm payment to receipt line item Id :" +
                                                 payment.LineItemId +
                                                 " For receipt: " + recDocReference);

                _payment = payment;
                //_paymentNotifs.Clear();
                PaymentTransactionRefId = payment.LineItemId;
                ClientRequestResponseType type = ClientRequestResponseType.AsynchronousPaymentNotification;
                if (mMoneyPaymentType.ToLower() == "buy goods" || mMoneyPaymentType.ToLower() == "buy-goods" ||
                    mMoneyPaymentType.ToLower() == "buygoods")
                {
                    type = ClientRequestResponseType.BuyGoodsNotification;
                }
                string reqMsg = GetPaymentNotificationRequestJson(PaymentTransactionRefId, buyGoodsTransReference, type);

                GetPaymentNotification(reqMsg, type);
            }
        }
Пример #3
0
 private void btnSearch_Click(object sender, RoutedEventArgs e)
 {
     if (_vm == null)
         _vm = DataContext as ListInvoicesViewModel;
     _vm.CurrentPage = 1;
     LoadInvoices();
 }
Пример #4
0
 void ListInvoices_Loaded(object sender, RoutedEventArgs e)
 {
     _vm = DataContext as ListInvoicesViewModel;
    // _vm.ClearAndSetup();
     LoadInvoices();
 }
Пример #5
0
 void btnLast_Click(object sender, RoutedEventArgs e)
 {
     if (_vm == null)
         _vm = DataContext as ListInvoicesViewModel;
     _vm.CurrentPage = _vm.PageCount;
     DataPager.txtPage.Text = _vm.CurrentPage.ToString();
     LoadInvoices();
 }
Пример #6
0
 void btnGoTo_Click(object sender, RoutedEventArgs e)
 {
     if (_vm == null)
         _vm = DataContext as ListInvoicesViewModel;
     _vm.CurrentPage = Convert.ToInt32(DataPager.txtPage.Text);
     LoadInvoices();
 }
Пример #7
0
        private void btnClear_Click(object sender, RoutedEventArgs e)
        {
            txtSearchText.Text = "";
            if(_vm==null)
                _vm = DataContext as ListInvoicesViewModel;
            _vm.SearchText = "";
            LoadInvoices();

        }
Пример #8
0
 /// <summary>
 /// Provides a deterministic way to create the ListInvoicesViewModel property.
 /// </summary>
 public static void CreateListInvoicesViewModel()
 {
     if (_ListInvoicesViewModel == null)
     {
         _ListInvoicesViewModel = new ListInvoicesViewModel();
     }
 }
Пример #9
0
 /// <summary>
 /// Provides a deterministic way to delete the ListInvoicesViewModel property.
 /// </summary>
 public static void ClearListInvoicesViewModel()
 {
     _ListInvoicesViewModel.Cleanup();
     _ListInvoicesViewModel = null;
 }