/// <summary> /// /// </summary> /// <param name="document"></param> /// <exceptions> /// <exception name="PosIntegration client Exception" description="Any Exception coming from PosIntegration client"></exception> /// <exception name="NoCurrentLocationException" description="Could not save a table as no current location has been set"></exception> /// </exceptions> /// <returns></returns> protected void saveTable(DTOReservable inTable) { // Exceptions are caught in saveTables method !!!! if (inTable.Id == 0) { _posIntegrationClient.AddReservable(inTable, this.currentLocation); } else { _posIntegrationClient.UpdateReservable(inTable); } }
/// <summary> /// /// </summary> /// <param name="inTable"></param> /// <param name="inLocation"></param> private void pSaveDTOTable(TableInfo inTable, DTOLocation inLocation) { if (inTable.Modified) { DTOReservable dtoTable = new DTOReservable(); dtoTable.Id = inTable.ID; dtoTable.Name = inTable.Name; dtoTable.Number = inTable.Number; dtoTable.X = inTable.PosX; dtoTable.Y = inTable.PosY; dtoTable.Height = inTable.Height; dtoTable.Width = inTable.Width; dtoTable.Shape = (inTable.Shape == TableShape.Rectangle) ? @"r" : @"s"; _posIntegrationClient.UpdateReservable(dtoTable); _tableInfoBuilder.MakeTableNoLongerModified(inTable); } }