Repositories inserted and new page for accounts inserted
This commit is contained in:
43
WinFormDi/frmPayments.cs
Normal file
43
WinFormDi/frmPayments.cs
Normal file
@ -0,0 +1,43 @@
|
||||
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();
|
||||
_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();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user