Esempio n. 1
0
        private void EditTransaction(ListViewItem item)
        {
            var transaction = new Transaction {
                ID          = long.Parse(item.SubItems[0].Text),
                Description = item.SubItems[1].Text,
                Amount      = decimal.Parse(item.SubItems[2].Text),
                Date        = DateTime.Parse(item.SubItems[3].Text),
                Tags        = item.SubItems[4].Text.Split(' ')
            };

            var editForm = new TransactionForm(transaction);

            editForm.ShowDialog();
        }
Esempio n. 2
0
        private void EditTransaction(ListViewItem item)
        {
            var transaction = new Transaction {
                ID = long.Parse(item.SubItems[0].Text),
                Description = item.SubItems[1].Text,
                Amount = decimal.Parse(item.SubItems[2].Text),
                Date = DateTime.Parse(item.SubItems[3].Text),
                Tags = item.SubItems[4].Text.Split(' ')
            };

            var editForm = new TransactionForm(transaction);
            editForm.ShowDialog();
        }