Example #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);
        }
Example #2
0
 private void setButtonColor(Button button, int klaarCount, Tafelbezet[] klaar)
 {
     button.BackColor = klaar[klaarCount].bezet ? Color.IndianRed : Color.DarkKhaki;
 }
Example #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;
 }