Summa i detaljvy av sökta betalningsmottagare
This commit is contained in:
@ -15,6 +15,7 @@ namespace WinFormDiApp
|
||||
public partial class frmPayments : Form
|
||||
{
|
||||
private bool _enableClearing;
|
||||
private bool _enableDetailShow;
|
||||
private readonly IAccountRecordRepository _accountRecordRepository;
|
||||
|
||||
public bool EnableClearing
|
||||
@ -29,6 +30,18 @@ namespace WinFormDiApp
|
||||
}
|
||||
}
|
||||
|
||||
public bool EnableDetailShow
|
||||
{
|
||||
get
|
||||
{
|
||||
return _enableDetailShow;
|
||||
}
|
||||
set
|
||||
{
|
||||
_enableDetailShow = value;
|
||||
}
|
||||
}
|
||||
|
||||
public frmPayments(IAccountRecordRepository accountRecordRepository)
|
||||
{
|
||||
InitializeComponent();
|
||||
@ -40,6 +53,9 @@ namespace WinFormDiApp
|
||||
{
|
||||
//MessageBox.Show("Load");
|
||||
btnRensa.Visible = _enableClearing;
|
||||
lblTotal.Visible = _enableDetailShow;
|
||||
txtSoekSumma.Visible = _enableDetailShow;
|
||||
double totalSum = 0;
|
||||
lvPayments.Items.Clear();
|
||||
|
||||
if (CustomPayments != null)
|
||||
@ -50,10 +66,12 @@ namespace WinFormDiApp
|
||||
lvitem.SubItems.Add(account.Mottagare);
|
||||
lvitem.SubItems.Add(account.Konto);
|
||||
lvitem.SubItems.Add(account.Belopp.ToString());
|
||||
totalSum += account.Belopp;
|
||||
lvitem.SubItems.Add(account.BetalDatum.ToShortDateString());
|
||||
lvitem.SubItems.Add(account.Avisering);
|
||||
}
|
||||
}
|
||||
txtSoekSumma.Text = totalSum.ToString();
|
||||
}
|
||||
|
||||
private void btnClose_Click(object sender, EventArgs e)
|
||||
|
||||
Reference in New Issue
Block a user