示例#1
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="document"></param>
        /// <exceptions>
        ///    <exception name="PosIntegration client Exception" description="Any Exception coming from PosIntegration client"></exception>
        ///    <exception name="NoCurrentLocationException" description="No current location has been set"></exception>
        /// </exceptions>
        /// <returns></returns>
        public void saveTables()
        {
            if (_tablesChanged || _tableDeleted)
            {
                try
                {
                    foreach (DTOReservable table in _removedTables)
                    {
                        _posIntegrationClient.DeleteReservable(table, this.currentLocation);
                    }
                    _tableDeleted = false;

                    if (_tablesChanged)
                    {
                        foreach (DTOReservable table in this.tablesInLocation)
                        {
                            saveTable(table);
                        }
                        _tablesChanged = false;
                    }

                    refreshTablesInLocation();
                }
                catch (NoCurrentLocationException)
                {
                    throw;
                }
                catch (Exception exc) // Pos Integration Exception
                {
                    _posIntegrationFailed = true;
                    throw new PosIntegrationException(exc.Message);
                }
            }
        }
示例#2
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="?"></param>
        private void pDeleteDTOTables(List <TableInfo> inTables, DTOLocation inDTOLocation)
        {
            foreach (TableInfo table in inTables)
            {
                if (table.ID > 0)
                {
                    _posIntegrationClient.DeleteReservable(pDTOTableWithID(table.ID), inDTOLocation);
                }
            }

            _deletedTableList.Clear();
        }