Ejemplo n.º 1
0
        public Tafelbezet[] TafelsBezet()
        {
            Tafelbezet[]    tafelbezet = new Tafelbezet[10];
            OleDbConnection conn       = new OleDbConnection(connString);

            conn.Open();
            OleDbCommand    command = new OleDbCommand("SELECT Tafel FROM Bestelling WHERE Status='Bezet';", conn);
            OleDbDataReader reader  = command.ExecuteReader();

            while (reader.Read())
            {
                int i = Convert.ToInt32(reader.GetString(0)) - 1;
                tafelbezet[i].bezet = true;
            }
            conn.Close();
            return(tafelbezet);
        }
Ejemplo n.º 2
0
 private void setButtonColor(Button button, int klaarCount, Tafelbezet[] klaar)
 {
     button.BackColor = klaar[klaarCount].bezet ? Color.IndianRed : Color.DarkKhaki;
 }
Ejemplo n.º 3
0
 public Tafelbezet[] TafelsRes()
 {
     Tafelbezet[] tafelbezet = new Tafelbezet[10];
     OleDbConnection conn = new OleDbConnection (connString);
     conn.Open ();
     OleDbCommand command = new OleDbCommand ("SELECT Tafel FROM Bestelling WHERE Status='Gereserveerd';", conn);
     OleDbDataReader reader = command.ExecuteReader ();
     while (reader.Read ()) {
         int i = Convert.ToInt32 (reader.GetString (0)) - 1;
         tafelbezet[i].bezet = true;
     }
     conn.Close ();
     return tafelbezet;
 }