//public Task PrepareAndSendOrder(Order orderToSend) //{ // if (ServiceCallConfig == ServiceCallConfigType.AllServiceCallsOff || // ServiceCallConfig == ServiceCallConfigType.UpdateServicesNoSend) // { // return; // } // DBTable dbTableCurrent = ConvertOrderToDbTable(orderToSend, true); // //Update the database table with built DBTable in order to obtain new OrderID. // //await UpdateTableAsync(dbTableCurrent); // UpdateTable(dbTableCurrent); // //Get the table just updated - will contain new OrderID. // DBTable updatedTable = GetTable((int)dbTableCurrent.ID); // //See if outstanding checks for this table. // //Cannot call a synchronous method in Zipline2. // List<DBCheck> checks = GetOpenChecks(dbTableCurrent.ID); // decimal checkId = -1; // if (checks.Count > 0) // { // checkId = checks[0].ID; // } // DBCheck newDbCheck = new DBCheck(checkId); // List<decimal> orderIDs = new List<decimal>(); // //Get items for check from updated Table just retrieved. // foreach (GuestItem item in updatedTable.Guests[0].Items) // { // if (!item.OrderSent) // { // orderIDs.Add(item.OrderID); // newDbCheck.Items.Add(item); // } // } // foreach (GuestComboItem combo in updatedTable.Guests[0].ComboItems) // { // bool first = true; // foreach (GuestItem gItem in combo.ComboGuestItems) // { // if (!gItem.OrderSent) // { // orderIDs.Add(gItem.OrderID); // if (first) // { // first = false; // newDbCheck.ComboItems.Add(combo); // } // } // } // } // //Create and add check to database. // CreateCheck(newDbCheck); // SendOrders(orderIDs, UserIdDecimal); //} public DBUser GetUser(string pin) { if (ServiceCallConfig == ServiceCallConfigType.AllServiceCallsOff) { return(new DBUser()); } DBUser thisUser = waiterClient.GetUser(pin); return(thisUser); }