private void putTransactionDetails(ImportedTransaction impTran) { cbImport.Checked = impTran.Selected; dtpDate.Value = impTran.Transaction.TransactionTime; tbTitle.Text = impTran.Transaction.Title; cbImplementsPlan.Checked = (impTran.Transaction.PlannedTransactionsRow != null); cbPlan.SelectedItem = impTran.Transaction.PlannedTransactionsRow; cbAccount.SelectedItem = impTran.Transaction.AccountRow; numAmount.Value = (decimal)impTran.Transaction.Amount; ttbTags.Tags = keeper.GetTransactionTagStrings(impTran.Transaction); }
private void refreshDetails() { if (lbImportedTransactions.SelectedIndex > -1) { if ((selectedIndex != lbImportedTransactions.SelectedIndex) && (selectedIndex != -1)) { // there is previous transaction shown, gather all changes from form ImportedTransaction impTranGet = lbImportedTransactions.Items[selectedIndex] as ImportedTransaction; getTransactionDetails(impTranGet); } ImportedTransaction impTran = lbImportedTransactions.SelectedItem as ImportedTransaction; putTransactionDetails(impTran); selectedIndex = lbImportedTransactions.SelectedIndex; } }
public async Task <IActionResult> PostDetails(int id, [Bind("Caption,Comment,Date,UserDate")] ImportedTransaction transaction) { var trx = new TransactionEditRequest { Caption = transaction.Caption, Comment = transaction.Comment, Date = transaction.Date, UserDate = transaction.UserDate, }; await _api.PutAsync($"transactions/{id}", trx); var details = await _api.GetAsync <dto.Model.ImportedTransaction>($"transactions/{id}"); return(View("Details", details)); }
private void getTransactionDetails(ImportedTransaction impTran) { }