Exemple #1
0
        public Eva_LevelEntity GetLevel(float TotalMark)
        {
            var result = new Eva_LevelEntity();
            using (var context = new VnrHrmDataContext())
            {
                var status = string.Empty;
                var unitOfWork = (IUnitOfWork)(new UnitOfWork(context));
                var repo = new Eva_LevelRepository(unitOfWork);
                var list = repo.FindBy(x => x.MinimumRating.HasValue && x.MaximumRating.HasValue && x.MinimumRating.Value <= TotalMark && x.MaximumRating.Value >= TotalMark && x.IsDelete == null).ToList();
                if (list != null && list.Count != 0)
                    result = list.FirstOrDefault().CopyData<Eva_LevelEntity>();

            }

            return result;
        }
Exemple #2
0
        public Eva_LevelEntity GetLevel(float TotalMark)
        {
            var result = new Eva_LevelEntity();

            using (var context = new VnrHrmDataContext())
            {
                var status     = string.Empty;
                var unitOfWork = (IUnitOfWork)(new UnitOfWork(context));
                var repo       = new Eva_LevelRepository(unitOfWork);
                var list       = repo.FindBy(x => x.MinimumRating.HasValue && x.MaximumRating.HasValue && x.MinimumRating.Value <= TotalMark && x.MaximumRating.Value >= TotalMark && x.IsDelete == null).ToList();
                if (list != null && list.Count != 0)
                {
                    result = list.FirstOrDefault().CopyData <Eva_LevelEntity>();
                }
            }

            return(result);
        }