/// <summary>
        /// Erstellt eine Rechnung
        /// </summary>
        /// <param name="gasPump"></param>
        /// <returns></returns>
        public Receipt CreateReceipt(GasPump gasPump)
        {
            Receipt receipt = new Receipt();

            receipt.RelatedFuel  = gasPump.ActiveTap.Fuel;
            receipt.RelatedLiter = float.Parse(gasPump.Liter.ToString());
            receipt.Sum          = gasPump.ToPayValue;
            DateTime    datum  = DateTime.Now;
            CultureInfo german = new CultureInfo("de");

            receipt.Date = DateTime.Parse(DateTime.Parse(datum.ToString()).ToString("yyyy/MM/dd HH:mm:ss"));
            GasStation.GetInstance().AddReceipt(receipt);
            return(receipt);
        }
 /// <summary>
 /// Schliesst die Zahlung ab, sofern die Schulden beglichen wurden
 /// </summary>
 /// <param name="gasPump">Zapfsäule bei, welcher die Zahlung abgeschlossen werden soll</param>
 /// <param name="verifyToPayValue">Gibt an ob die Bezahlung auch abgeschlossen werden soll, wenn noch eine Rechnung offen ist. Bei false ist es egal ob noch eine Rechnung offen ist.</param>
 /// <returns>Gibt an ob die Rechnung abgeschlossen werden konnte oder nicht.</returns>
 public int FinishPayment(GasPump gasPump, bool verifyToPayValue = true)
 {
     if (gasPump != null)
     {
         if (verifyToPayValue)
         {
             if (gasPump.ToPayValue > 0)
             {
                 return(1);
             }
         }
         GasPumpList.Find(g => g == gasPump).Refresh();
         return(0);
     }
     return(2);
 }
        /// <summary>
        /// Schliesst die Eingabe vom Geld ab und gibt das Rückgeld
        /// </summary>
        /// <param name="gasPump"></param>
        /// <returns>Das Rückgeld oder -1 wenn noch zu wenig Geld eingeworfen wurde</returns>
        public int[] FinishInput(GasPump gasPump)
        {
            AcceptValueInput();
            int inputValue  = GetValueInput();
            int outputValue = inputValue - Convert.ToInt32((gasPump.ToPayValue * 100));

            if (decimal.Parse(inputValue.ToString()) / 100 >= gasPump.ToPayValue)
            {
                int[] outputCoins = new int[1];
                outputCoins = GetChange(outputValue).CountCoins();
                GasStation.GetInstance().DeleteCoins();
                List <Coin> coins = new List <Coin>();
                foreach (var oneContainer in containers)
                {
                    coins.AddRange(oneContainer.GetCoins().Where(c => c != null));
                }
                GasStation.GetInstance().UpdateCoins(coins);
                return(outputCoins);
            }
            else
            {
                return(new int[] { -1 });
            }
        }