Exemplo n.º 1
0
    public Email(String s, double b, String r, int klantid)
    {
        this.userName   = s;
        this.amount     = b;
        this.rekeningNr = r;
        HTTPget x   = new HTTPget();
        Klant   tmp = x.getKlant(klantid.ToString());

        email = tmp.email;
    }
Exemplo n.º 2
0
 public TransactionManager(String r, int u, ArduinoData a, String p, Stock s)
 {
     this.rekeningID = r;
     this.klantID    = u;
     this.userName   = downloadConnection.getKlant(klantID.ToString()).achternaam;
     this.arduino    = a;
     this.pasID      = p;
     this.rekening   = downloadConnection.getRekening(rekeningID);
     this.saldo      = rekening.balans;
     this.stock      = s;
 }
Exemplo n.º 3
0
    private void pin()
    {
        Boolean printTicket = false;
        Boolean goBack      = true;
        double  amount      = 0;
        String  input;

        cancelled = false;

        while (goBack == true)
        {
            pinsherm.Show();
            while (true)
            {
                input = arduino.getString();
                if (input.Contains("1"))
                {
                    amount = 10;
                    break;
                }
                else if (input.Contains("2"))
                {
                    amount = 20;
                    break;
                }
                else if (input.Contains("3"))
                {
                    amount = 50;
                    break;
                }
                else if (input.Contains("4"))
                {
                    amount = getAlternativeAmount();
                    break;
                }
                else if (input.Contains("#"))
                {
                    cancelled = true;
                    break;
                }
                else if (input.Contains("C"))
                {
                    cancelled    = true;
                    endOfSession = false;
                    break;
                }
            }
            pinsherm.Hide();
            if (amount > saldo && amount != 0)
            {
                PinError pinError = new PinError();
                cancelled = true;
            }
            if (cancelled == true)
            {
                break;
            }
            else
            {
                uploadConnection.UpdateBalans(Int32.Parse(rekeningID), (saldo - amount));
                uploadConnection.transaction(pasID, rekeningID, amount);
                //Error.show(amount.ToString());
            }
            asker.Show();
            while (true)
            {
                input = arduino.getString();
                if (input.Contains("*"))
                {
                    printTicket = true;
                    goBack      = false;
                    break;
                }
                else if (input.Contains("#"))
                {
                    //Error.show("Geen Bon", "bon");
                    goBack = false;
                    break;
                }
            }
            asker.Hide();
            if (printTicket == true)
            {
                Klant   tmp        = downloadConnection.getKlant(userName);
                String  printnaam  = String.Concat(tmp.Naam + " " + tmp.Achternaam);
                Printer bonPrinter = new Printer(printnaam, amount, rekeningID);
                bonPrinter.printTicket();
            }
            if (goBack == false)
            {
                ByeScreen goAway = new ByeScreen();
            }
        }
    }
Exemplo n.º 4
0
 public Email(String s, double b, String r,int klantid)
 {
     this.userName = s;
     this.amount = b;
     this.rekeningNr = r;
     HTTPget x = new HTTPget();
     Klant tmp = x.getKlant(klantid.ToString());
     email = tmp.email;
 }