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);
            }
        }
 private void btnSearch_Click(object sender, RoutedEventArgs e)
 {
     if (_vm == null)
         _vm = DataContext as ListInvoicesViewModel;
     _vm.CurrentPage = 1;
     LoadInvoices();
 }
 void ListInvoices_Loaded(object sender, RoutedEventArgs e)
 {
     _vm = DataContext as ListInvoicesViewModel;
    // _vm.ClearAndSetup();
     LoadInvoices();
 }
 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();
 }
 void btnGoTo_Click(object sender, RoutedEventArgs e)
 {
     if (_vm == null)
         _vm = DataContext as ListInvoicesViewModel;
     _vm.CurrentPage = Convert.ToInt32(DataPager.txtPage.Text);
     LoadInvoices();
 }
        private void btnClear_Click(object sender, RoutedEventArgs e)
        {
            txtSearchText.Text = "";
            if(_vm==null)
                _vm = DataContext as ListInvoicesViewModel;
            _vm.SearchText = "";
            LoadInvoices();

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