Esempio n. 1
0
 public void AddPaymentItem(PaymentItem item)
 {
     if (Installments.Count() <= 0 && PayInSlips.Count() <= 0)
     {
         PaymentItems.Add(item);
     }
 }
Esempio n. 2
0
        async Task ExecuteLoadItemsCommand()    // Will load the items in this section
        {
            if (IsBusy)
            {
                return;
            }

            IsBusy = true;

            try
            {
                PaymentItems.Clear();       // Get Paymethods from the Logged in user
                ListPaymentItems = App.LoggedInUser.Payments;
                var paymentitems = ListPaymentItems;
                foreach (var paymethod in paymentitems)
                {
                    PaymentItems.Add(paymethod);
                }
            }
            catch (Exception ex)
            {
                Debug.WriteLine(ex);
            }
            finally
            {
                IsBusy = false;
            }
        }
Esempio n. 3
0
        public EmployeePaymentItem addPaymentItems(Guid PaymentTypeGuid, decimal amount)
        {
            var employeePaymentItem = new EmployeePaymentItem()
            {
                Id = Guid.NewGuid(),
                PaymentTypeGuid = PaymentTypeGuid,
                Amount          = Math.Abs(amount)
            };

            PaymentItems.Add(employeePaymentItem);

            return(employeePaymentItem);
        }
Esempio n. 4
0
        private void OnRefreshCommandExecute()
        {
            switch (SelectedTab)
            {
            case ClaimsTabIndex:
                AppService.ReloadClaims();
                break;

            case DownloadsTabIndex:
                var worker = new BackgroundWorker();
                worker.DoWork += (i, j) =>
                {
                    var list = AppService.GetDownloads();
                    DispatcherHelper.CheckBeginInvokeOnUI(() =>
                    {
                        DownloadItems.Clear();
                        foreach (var item in list)
                        {
                            DownloadItems.Add(item);
                        }
                    });
                };
                worker.RunWorkerAsync();
                break;

            case PaymentsTabIndex:
                worker         = new BackgroundWorker();
                worker.DoWork += (i, j) =>
                {
                    var list = AppService.GetPayments();
                    DispatcherHelper.CheckBeginInvokeOnUI(() =>
                    {
                        PaymentItems.Clear();
                        foreach (var item in list)
                        {
                            PaymentItems.Add(item);
                        }
                    });
                };
                worker.RunWorkerAsync();
                break;

            default:
                throw new ArgumentOutOfRangeException();
            }
        }
Esempio n. 5
0
 public void AddPaymentItem(int serviceCode, string serviceName, int quantity, decimal unitAmount, decimal taxOrVat,
                            decimal withHoldingTax, bool isRevenue, bool isLegalPerson, string itemDescription)
 {
     if (Installments.Count() <= 0 && PayInSlips.Count() <= 0)
     {
         PaymentItems.Add(new PaymentItem(
                              //serviceCode,
                              //serviceName,
                              quantity,
                              unitAmount,
                              taxOrVat,
                              withHoldingTax,
                              isRevenue,
                              isLegalPerson,
                              itemDescription));
     }
 }
Esempio n. 6
0
        public Payment(string createBy, long customerIdmPartyId,
                       string customerName, string customerAddress,
                       params PaymentItem[] paymentItems)
        {
            CreatedBy   = createBy;
            CreatedDate = DateTime.Now;
            UpdatedBy   = createBy;
            UpdatedDate = DateTime.Now;

            CustomerIdmPartyId = customerIdmPartyId;
            CustomerName       = customerName;
            CustomerAddress    = customerAddress;
            Status             = PaymentStatusEnum.UNPAID.ToString();

            foreach (var paymentItem in paymentItems)
            {
                PaymentItems.Add(paymentItem);
            }
        }
Esempio n. 7
0
 public void Load()
 {
     PaymentItems.Add(new PayItemViewModel {
         Description = "$100", Price = 100.0m
     });
     PaymentItems.Add(new PayItemViewModel {
         Description = "$50", Price = 50.0m
     });
     PaymentItems.Add(new PayItemViewModel {
         Description = "$20", Price = 20.0m
     });
     PaymentItems.Add(new PayItemViewModel {
         Description = "$10", Price = 10.0m
     });
     PaymentItems.Add(new PayItemViewModel {
         Description = "$5", Price = 5.0m
     });
     PaymentItems.Add(new PayItemViewModel {
         Description = "$2", Price = 2.0m
     });
     PaymentItems.Add(new PayItemViewModel {
         Description = "$1", Price = 1.0m
     });
     PaymentItems.Add(new PayItemViewModel {
         Description = "50c", Price = 0.50m
     });
     PaymentItems.Add(new PayItemViewModel {
         Description = "20c", Price = 0.20m
     });
     PaymentItems.Add(new PayItemViewModel {
         Description = "10c", Price = 0.10m
     });
     PaymentItems.Add(new PayItemViewModel {
         Description = "5c", Price = 0.05m
     });
 }