Exemple #1
0
        //public void Query()
        //{
        //    try
        //    {
        //        PriceService.PriceClient client = new PriceService.PriceClient();
        //        var foods = client.GetFoods();
        //        var rfoods = foods.Where(it => !string.IsNullOrEmpty(it.Value)).ToList();
        //        var foodNames = client.GetFoodName();
        //        var categ = client.GetCategorys();
        //        var tables = client.GetTableNames();
        //        var dd = client.GetMonitorSites();
        //        PriceService.FoodMonitor monitor = new FoodMonitor();
        //        monitor.FoodID = foods[0].Key;
        //        monitor.FoodName = foods[0].Value;
        //        var result = client.FindFoodMonitors(null, null, true, 50, 0);
        //    }
        //    catch (Exception ex)
        //    {
        //        LogHelper.GetInstance().Error(ex.ToString());
        //        return;
        //    }
        //}

        public IEnumerable <KeyValuePair <string, string> > QueryAllFoods()
        {
            PriceService.PriceClient client = new PriceClient();
            var foods = client.GetFoodName();

            return(foods);
        }
Exemple #2
0
        public IEnumerable <KeyValuePair <string, string> > QueryFoodsByCategory(string category)
        {
            PriceService.PriceClient client = new PriceClient();
            var list = client.GetFoodName().Where(it => it.Value == category).ToList();

            return(list);
        }
Exemple #3
0
 public void Query()
 {
     try
     {
         PriceService.PriceClient client = new PriceClient();
         var foods     = client.GetFoods();
         var rfoods    = foods.Where(it => !string.IsNullOrEmpty(it.Value)).ToList();
         var foodNames = client.GetFoodName();
         var categ     = client.GetCategorys();
         var tables    = client.GetTableNames();
         var dd        = client.GetMonitorSites();
         PriceService.FoodMonitor monitor = new FoodMonitor();
         monitor.FoodID   = foods[0].Key;
         monitor.FoodName = foods[0].Value;
         var result = client.FindFoodMonitors(null, null, true, 50, 0);
     }
     catch (Exception ex)
     {
         LogHelper.GetInstance().Error(ex.ToString());
         return;
     }
 }