public void chooseTable(Group group) { TableController.GetTableController().MyManualResetEvent.WaitOne(Timeout.Infinite); Thread.Sleep(2000); int placeTableListe = 0; int tableId = 0; bool test = false; for (int i = 0; (i < TableController.GetTableController().MylistTable.Count) && (test == false); i++) { if (TableController.GetTableController().MylistTable.ElementAt(i).MyAvailable&& (TableController.GetTableController().MylistTable.ElementAt(i).MyNumberSeats >= group.MySizeGroup)) { tableId = TableController.GetTableController().MylistTable.ElementAt(i).MyIdTable; placeTableListe = i; test = true; } } if (test == false) { Console.WriteLine("pas de table dispo"); Thread.Sleep(5000); chooseTable(group); } TableController.GetTableController().MylistTable.ElementAt(placeTableListe).MyGroup = group; Console.WriteLine("les clients vont occuper la table :" + tableId); TableController.GetTableController().MylistTable.ElementAt(placeTableListe).MyAvailable = false; callChefRang(tableId); }
public void doStuff3(Group group) { TableController.GetTableController().MyManualResetEvent.WaitOne(Timeout.Infinite); chooseTable(group); }
Availability IStaff.getAvailability() { TableController.GetTableController().MyManualResetEvent.WaitOne(Timeout.Infinite); return(MyAvailability); }
public void doStuff2(int idTable) { TableController.GetTableController().MyManualResetEvent.WaitOne(Timeout.Infinite); getPayment(idTable); }
public int returnID() { TableController.GetTableController().MyManualResetEvent.WaitOne(Timeout.Infinite); throw new NotImplementedException(); }
public void doStuff3(Group group) { TableController.GetTableController().MyManualResetEvent.WaitOne(Timeout.Infinite); throw new NotImplementedException(); }
public void doStuff(int idTable) { TableController.GetTableController().MyManualResetEvent.WaitOne(Timeout.Infinite); dressTable(idTable); }
public int returnID() { TableController.GetTableController().MyManualResetEvent.WaitOne(Timeout.Infinite); return(MyId); }