public void AddPaymentItem(PaymentItem item) { if (Installments.Count() <= 0 && PayInSlips.Count() <= 0) { PaymentItems.Add(item); } }
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; } }
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); }
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(); } }
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)); } }
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); } }
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 }); }