示例#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="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);
     }
 }
示例#2
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="inLocation"></param>
        private void pAddNewDTOTable(TableInfo inTable, DTOLocation inDTOLocation)
        {
            DTOReservable dtoTable = new DTOReservable();

            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" : @"e";

            _posIntegrationClient.AddReservable(dtoTable, inDTOLocation);

            DTOReservable[] dtoTables = _posIntegrationClient.GetTablesForLocation(inDTOLocation.Id);
            int             tableID   = dtoTables[dtoTables.Length - 1].Id;

            _tableInfoBuilder.AssignTableID(inTable, tableID);
            _tableInfoBuilder.MakeTableNoLongerNew(inTable);
            _tableInfoBuilder.MakeTableNoLongerModified(inTable);
        }