public IEnumerable <FoodMonitor> QueryFoodMonitorsByPage(FoodMonitor condition, int pageSize, int pageNo) { PriceService.PriceClient client = new PriceClient(); var result = client.FindFoodMonitors(condition, "FoodName", true, pageSize, Math.Max(0, pageNo - 1)); return(result); }
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; } }