public Status NutritionInfoLikePages(string keyword, int pagesize, int pageindex) { this._logger.LogWarning("The server execute NutritionInfoLikePages Fuction --" + DateTime.Now.ToString()); EFHelper <TNutrientInformation> eFHelper = new EFHelper <TNutrientInformation>(); var result = eFHelper.getListByPage(a => a.Name.Contains(keyword), a => a.Id, pagesize, pageindex); if (result != null) { PagesStatus <TNutrientInformation> nutritionInfoStatus = new PagesStatus <TNutrientInformation> { StatusCode = 200, Message = "获取成功", ReturnTime = DateTime.Now, PageList = result }; return(nutritionInfoStatus); } else { Status status = new Status { StatusCode = 0, Message = "获取失败", ReturnTime = DateTime.Now, }; return(status); } }
public Status StaffPagesSearch(int pagesize, int pageindex, string staffname) { this._logger.LogWarning("The server execute StaffPagesSearch Fuction --"); EFHelper <TStaff> eFHelper = new EFHelper <TStaff>(); var result = eFHelper.getListByPage(a => a.StaffName == staffname, a => a.Id, pagesize, pageindex); if (result != null) { PagesStatus <TStaff> status = new PagesStatus <TStaff> { StatusCode = 200, Message = "获取成功", ReturnTime = DateTime.Now, PageList = result }; return(status); } else { Status status = new Status { StatusCode = 0, Message = "获取失败", ReturnTime = DateTime.Now, }; return(status); } }
public Status StoragePagesSearch(int pagesize, int pageindex, DateTime starttime, DateTime endtime) { this._logger.LogWarning("The server execute StoragePages Fuction --"); EFHelper <TStorage> eFHelper = new EFHelper <TStorage>(); var result = eFHelper.getListByPage(a => a.StorageTime >= starttime && a.StorageTime <= endtime, a => a.StorageTime, pagesize, pageindex); if (result != null) { PagesStatus <TStorage> status = new PagesStatus <TStorage> { StatusCode = 200, Message = "获取成功", ReturnTime = DateTime.Now, PageList = result }; return(status); } else { Status status = new Status { StatusCode = 0, Message = "获取失败", ReturnTime = DateTime.Now, }; return(status); } }
public Status FoodNutrionInfoPages(int pagesize, int pageindex) { this._logger.LogWarning("The server execute FoodNutrionInfoPages Fuction --" + DateTime.Now.ToString()); EFHelper <TFoodNutrition> eFHelper = new EFHelper <TFoodNutrition>(); var result = eFHelper.getListByPage(a => true, a => a.Id, pagesize, pageindex); if (result != null) { PagesStatus <TFoodNutrition> nutritionInfoStatus = new PagesStatus <TFoodNutrition> { StatusCode = 200, Message = "获取成功", ReturnTime = DateTime.Now, PageList = result }; return(nutritionInfoStatus); } else { Status status = new Status { StatusCode = 0, Message = "获取失败", ReturnTime = DateTime.Now, }; return(status); } }
public Status CookBookInfoQueryPages(int pagesize, int pageindex, string keyword) { EFHelper <TCookBook> eFHelper = new EFHelper <TCookBook>(); var result = eFHelper.getListByPage(a => a.Name == keyword, a => a.Id, pagesize, pageindex); if (result != null) { PagesStatus <TCookBook> pagesStatus = new PagesStatus <TCookBook>() { StatusCode = 200, Message = "获取成功", ReturnTime = DateTime.Now, PageList = result }; return(pagesStatus); } else { Status status = new Status { StatusCode = 0, Message = "获取失败", ReturnTime = DateTime.Now, }; return(status); } }
public Status CookBookInfoLikePages(int pagesize, int pageindex, string likeword) { this._logger.LogWarning("The server execute CookBookInfoLikePages function --" + DateTime.Now.ToString()); EFHelper <TCookBook> eFHelper = new EFHelper <TCookBook>(); var result = eFHelper.getListByPage(a => a.Name.Contains(likeword), a => a.Id, pagesize, pageindex); if (result != null) { PagesStatus <TCookBook> pagesStatus = new PagesStatus <TCookBook>() { StatusCode = 200, Message = "获取成功", ReturnTime = DateTime.Now, PageList = result }; return(pagesStatus); } else { Status status = new Status { StatusCode = 0, Message = "获取失败", ReturnTime = DateTime.Now, }; return(status); } }