Example #1
0
        public void AanvullenFacturen()
        {
            List <Tuple <Factuur, decimal, int> > lijst = DataBetaling.GeefBetalingen();

            foreach (Tuple <Factuur, decimal, int> tuple in lijst)
            {
                ListViewItem lvi = new ListViewItem(tuple.Item1.FactuurNummer);
                lvi.SubItems.AddRange(new string[] {
                    tuple.Item1.OpmaakDatum.ToShortDateString(),
                    tuple.Item1.Inschrijving.Persoon.ToString(),
                    string.Format("€{0:0.00}", tuple.Item1.TotaalBedrag),
                    string.Format("€{0:0.00}", tuple.Item2),
                    tuple.Item3.ToString()
                });

                if (tuple.Item1.TotaalBedrag == tuple.Item2)
                {
                    lvi.ForeColor = Color.Green;
                }
                else if (tuple.Item1.TotaalBedrag > tuple.Item2)
                {
                    lvi.ForeColor = Color.Red;
                }
                else
                {
                    lvi.ForeColor = Color.Black;
                }

                betalingenItemListView.Add(tuple, lvi);
            }
        }
Example #2
0
        private void InvullenLabels()
        {
            detailPanel.Visible    = true;
            totaalBedragLabel.Text = string.Format("€{0:0.00}", _factuur.TotaalBedrag);
            bestemmingLabel.Text   = _factuur.Inschrijving.Persoon.ToString();

            _tuple = DataBetaling.GeefBetalingen(_factuur.ID);
            int a = _tuple.Item2;

            hoeveelsteStortingLabel.Text = string.Format("{0}e", ++a);
            reedsGestortLabel.Text       = string.Format("€{0:0.00}", _tuple.Item1);
        }
Example #3
0
 private void ClickOpslaanButton(object sender, EventArgs e)
 {
     DataBetaling.BetalingToevoegen(stortingNumericUpDown.Value, _factuur.ID);
     MessageBox.Show("Betaling toegevoegd", "Info", MessageBoxButtons.OK, MessageBoxIcon.Information);
     Terug();
 }