Пример #1
0
    private void quickPin()
    {
        Klant   tmp        = downloadConnection.getKlant(userName);
        String  printnaam  = String.Concat(tmp.Naam + " " + tmp.Achternaam);
        Printer bonPrinter = new Printer(printnaam, 70, rekeningID);

        bonPrinter.printTicket();
        ByeScreen quickBye = new ByeScreen();

        endOfSession = true;
        quickBye.Hide();
    }
Пример #2
0
    private void quickPin()
    {
        int    amount           = 70;
        String dispenserCommand = "";

        if (amount > saldo)
        {
            PinError pinError = new PinError();
            cancelled = true;
        }
        if (stock.checkIfAvailable(2, 0, 1))
        {
            dispenserCommand = "02,00,01,*";
        }
        else if (stock.checkIfAvailable(0, 1, 1))
        {
            dispenserCommand = "00,01,01,*";
        }
        else if (stock.checkIfAvailable(1, 3, 0))
        {
            dispenserCommand = "01,03,00,*";
        }
        else if (stock.checkIfAvailable(7, 0, 0))
        {
            dispenserCommand = "07,00,00,*";
        }
        else
        {
            cancelled = true;
        }
        if (cancelled == false)
        {
            stock.substractBiljets(dispenserCommand);
            uploadConnection.UpdateBalans(rekeningID, (saldo - amount * 100));
            uploadConnection.transaction(pasID, rekeningID, amount);
            arduino.dispenseMoney(dispenserCommand);
        }
        ByeScreen quickBye = new ByeScreen();

        endOfSession = true;
        quickBye.Hide();
    }
Пример #3
0
    private void quickPin()
    {
        int amount = 70;

        if (amount > saldo && amount != 0)
        {
            PinError pinError = new PinError();
            cancelled = true;
        }
        uploadConnection.UpdateBalans(Int32.Parse(rekeningID), (saldo - amount));
        uploadConnection.transaction(pasID, rekeningID, amount);
        if (cancelled == false)
        {
            arduino.dispenseMoney("02,00,01*");
        }
        ByeScreen quickBye = new ByeScreen();

        endOfSession = true;
        quickBye.Hide();
    }