private async void attachDocument() { SelectedTransaction.CurrentFilePath = new FileOperation().ChooseFile(); TransactionComment = new Comment(); TransactionComment.CommentText = "Attached Document"; SelectedTransaction.Transaction.UploadLocation = await new FileOperation().CopyFile(SelectedTransaction); SelectedTransaction.AddComment(TransactionComment); GetComments(); }
private async void returnTransaction() { SelectedTransaction.UpdateDocument(); sendMessage($"Transaction for {SelectedTransaction.Transaction.Member.LastName} has been sent for Verification."); EsrTransactions = await transaction.GetRejectedTransactions(); SelectedTransaction = null; Comments = null; UploadVisibility = Visibility.Collapsed; }
/// <summary> /// Make the modifications to the transaction /// </summary> public void ModifyTransaction() { using (var db = new DataModel()) { CurrentTransaction.CategoryID = SelectedCategory.CategoryID; Transactions tmp = db.Transactions.First(t => t.TransactionID == CurrentTransaction.TransactionID); db.Entry(tmp).CurrentValues.SetValues(CurrentTransaction); db.SaveChanges(); SelectedTransaction.Copy(tmp); } }
private async void rejectTransaction() { SelectedTransaction.AddComment(TransactionComment); SelectedTransaction.RejectToApprover(); TransactionDialogOpen = false; TransactionMessage = new SnackbarMessageQueue(); TransactionMessage.Enqueue($"Transaction rejection for {SelectedTransaction.Transaction.Member.LastName} has been sent for verification."); Transactions = await EsrTransaction.GetNotBatched(); SearchTransactions(); TransactionComment = new Comment(); }
private async void removeFromBatch() { if (SelectedBatch != null) { SelectedTransaction.RemoveFromBatch(); BatchTransactions = await EsrTransaction.GetBatchTransactions(SelectedBatch); Transactions = await EsrTransaction.GetNotBatched(); SearchTransactions(); } }
private async void addToBatch() { if (SelectedBatch != null) { SelectedTransaction.AddToBatch(SelectedBatch); BatchTransactions = await EsrTransaction.GetBatchTransactions(SelectedBatch); Transactions = await EsrTransaction.GetNotBatched(); SearchTransactions(); } }
/// <summary> /// This handler handles the event when the <see cref="ITransactionRepository.SaveTransactionCompleted"/> /// event is raised by <see cref="_transactionRepository"/>. /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void TransactionRepositorySaveTransactionCompleted(object sender, RepositoryTaskFinishedEventArgs e) { ThreadSafeInvoke(() => { _messagingService.CloseProgressMessage(); if (e.HasError) { _messagingService.ShowMessage(UIText.ERROR_OCCURED_MSG); } if (!Transactions.Contains(SelectedTransaction)) { Transactions.Add(SelectedTransaction); if (null != SelectedTransaction) //Redundant but safe check { SelectedTransaction.Refresh(); } TotalIncome = Transactions.Where(t => t.FlowType == TransactionFlowType.Income).Sum(t => t.Entity.Amount); TotalExpenditure = Transactions.Where(t => t.FlowType == TransactionFlowType.Expenditure).Sum(t => t.Entity.Amount); // GraphItems = GetGraphData(Transactions.Select(t => t.Entity).ToList()); } }); }
private async void addComment() { SelectedTransaction.AddComment(TransactionComment); TransactionDialogOpen = false; Comments = await comment.GetTransactionComments(SelectedTransaction); }
private void OnInfoTapped(Transaction transactionTapped) { string selectedTransactionString = SelectedTransaction == null ? "null" : SelectedTransaction.ToString(); Debug.WriteLine($"**** {this.GetType().Name}.{nameof(OnInfoTapped)}: {transactionTapped}\n\tFYI, the SelectedPerson is {selectedTransactionString}"); }