Now it works reading in different transactionsheets from excel
This commit is contained in:
@ -40,7 +40,7 @@ namespace WinFormDiApp
|
||||
.AddTransient<IAccountRecordRepository,AccountRecordRepository>()
|
||||
.AddTransient<IMemberRepository,MemberRepository>()
|
||||
.AddTransient<IReadingIn, ReadingIn>()
|
||||
.AddTransient<IExcel, Excel>()
|
||||
.AddTransient<IExcellent, Excellent>()
|
||||
.AddTransient<MainWindow>()
|
||||
.AddTransient<frmReadPayments>()
|
||||
.AddTransient<frmPayments>();
|
||||
|
||||
@ -18,6 +18,7 @@ namespace WinFormDiApp
|
||||
public frmPayments(IAccountRecordRepository accountRecordRepository)
|
||||
{
|
||||
InitializeComponent();
|
||||
lvPayments.Items.Clear();
|
||||
_accountRecordRepository = accountRecordRepository;
|
||||
}
|
||||
|
||||
|
||||
1
WinFormDi/frmReadPayments.Designer.cs
generated
1
WinFormDi/frmReadPayments.Designer.cs
generated
@ -192,7 +192,6 @@
|
||||
Name = "frmReadPayments";
|
||||
StartPosition = FormStartPosition.CenterScreen;
|
||||
Text = "frmReadPayments";
|
||||
Load += frmReadPayments_Load;
|
||||
ResumeLayout(false);
|
||||
PerformLayout();
|
||||
}
|
||||
|
||||
@ -13,6 +13,7 @@ namespace WinFormDiApp
|
||||
public frmReadPayments(IAccountRecordRepository accountRecordRepository, IReadingIn readingIn, ILogger<frmReadPayments> logger)
|
||||
{
|
||||
InitializeComponent();
|
||||
lvPayouts.Items.Clear();
|
||||
_accountRecordRepository = accountRecordRepository;
|
||||
_readingIn = readingIn;
|
||||
_logger = logger;
|
||||
@ -24,20 +25,6 @@ namespace WinFormDiApp
|
||||
this.Close();
|
||||
}
|
||||
|
||||
private void frmReadPayments_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 btnChooseFile_Click(object sender, EventArgs e)
|
||||
{
|
||||
ofChooseFile.Title = "Välj nerladdad excel-fil (Transaktioner)";
|
||||
|
||||
Reference in New Issue
Block a user