Esempio n. 1
0
 public IEnumerable <CUL> SearchCULs(string criteria)
 {
     return(cULsRepository
            .SearchData(c => c.Code.ToLower().Contains(criteria.ToLower()) ||
                        c.Description.ToLower().Contains(criteria.ToLower()))
            .Select(c => c.AutoMapObject <DB.CUL, CUL>())
            .OrderByDescending(c => c.CULId));
 }
Esempio n. 2
0
        private static bool ValidateCULNumber(string culNumber)
        {
            var culRepo = new CULsRepository(new PmcsDbContext());
            var result  = culRepo.SearchData(c => c.Description == culNumber || c.Code == culNumber);

            return(result.Any());
        }