45 lines
1.3 KiB
C#
45 lines
1.3 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.ComponentModel;
|
|
using System.Data;
|
|
using System.Drawing;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
using System.Windows.Forms;
|
|
using WinFormDiApp.BLI;
|
|
|
|
namespace WinFormDiApp
|
|
{
|
|
public partial class frmPayments : Form
|
|
{
|
|
private readonly IAccountRecordRepository _accountRecordRepository;
|
|
|
|
public frmPayments(IAccountRecordRepository accountRecordRepository)
|
|
{
|
|
InitializeComponent();
|
|
lvPayments.Items.Clear();
|
|
_accountRecordRepository = accountRecordRepository;
|
|
}
|
|
|
|
private void frmPayments_Load(object sender, EventArgs e)
|
|
{
|
|
var payments = _accountRecordRepository.GetAllAccounts();
|
|
foreach (var account in payments)
|
|
{
|
|
var lvitem = lvPayments.Items.Add(account.Id.ToString());
|
|
lvitem.SubItems.Add(account.Mottagare);
|
|
lvitem.SubItems.Add(account.Konto);
|
|
lvitem.SubItems.Add(account.Belopp.ToString());
|
|
lvitem.SubItems.Add(account.BetalDatum.ToShortDateString());
|
|
lvitem.SubItems.Add(account.Avisering);
|
|
}
|
|
}
|
|
|
|
private void btnClose_Click(object sender, EventArgs e)
|
|
{
|
|
this.Close();
|
|
}
|
|
}
|
|
}
|