Example #1
0
 public void MakeSpecialOffer(Dictionary <Item, List <SpecialOffer> > anOffer)
 {
     //InstanceContext context = new InstanceContext(new FrontDeskCallBack());
     using (DinningService.DinningServiceClient proxy = new DinningService.DinningServiceClient())
     {
         try
         {
             proxy.Open();
             foreach (KeyValuePair <Item, List <SpecialOffer> > pair in anOffer)
             {
                 proxy.SetSpecialOfferForItem(pair.Key, pair.Value);
             }
         }
         catch (FaultException <HCSMSException> ex)
         {
             raiseError(ex);
         }
         catch (Exception ex)
         {
             raiseError(ex);
         }
         finally
         {
             proxy.Close();
         }
     }
 }
Example #2
0
        public void SetItem(List <SaleItem> anItem)
        {
            //InstanceContext context = new InstanceContext(new FrontDeskCallBack());
            using (DinningService.DinningServiceClient proxy = new DinningService.DinningServiceClient())
            {
                try
                {
                    proxy.Open();

                    proxy.SetItem(anItem);
                }
                catch (FaultException <HCSMSException> ex)
                {
                    raiseError(ex);
                }
                catch (Exception ex)
                {
                    raiseError(ex);
                }
                finally
                {
                    proxy.Close();
                }
            }
        }
Example #3
0
        public List <SaleItem> GetRecommendItem()
        {
            //InstanceContext context = new InstanceContext(new FrontDeskCallBack());
            using (DinningService.DinningServiceClient proxy = new DinningService.DinningServiceClient())
            {
                try
                {
                    proxy.Open();

                    return(proxy.GetRecommendItem());
                }
                catch (FaultException <HCSMSException> ex)
                {
                    raiseError(ex);
                    return(null);
                }
                catch (Exception ex)
                {
                    raiseError(ex);
                    return(null);
                }
                finally
                {
                    proxy.Close();
                }
            }
        }
        public List <Table> GetAvailableTable(DateTime date)
        {
            using (DinningService.DinningServiceClient proxy = new DinningService.DinningServiceClient())
            {
                try
                {
                    proxy.Open();

                    return(proxy.GetTable(date));
                }
                catch (FaultException <HCSMSException> ex)
                {
                    raiseError(ex);
                    return(null);
                }
                catch (Exception ex)
                {
                    raiseError(ex);
                    return(null);
                }
                finally
                {
                    proxy.Close();
                }
            }
        }