internal List<RefCaveatCaseEntity> GetListRefCaveatCaseEntityBySGID(string SGID) { List<RefCaveatCaseEntity> listRefCaveatCaseEntity = new List<RefCaveatCaseEntity>(); RefCaveatCaseEntity refCaveatCaseEntity = new RefCaveatCaseEntity(); DetachedCriteria detachedCriteria = DetachedCriteria.For(typeof(RefCaveatCase)) .Add(Expression.Eq("SubmissionGroupId", SGID)); IRepository<RefCaveatCase> refCaveatCaseRepository = new RepositoryImpl<RefCaveatCase>(applicationSession); List<RefCaveatCase> listRefCaveatCase = refCaveatCaseRepository.GetAll(detachedCriteria) as List<RefCaveatCase>; if (listRefCaveatCase != null && listRefCaveatCase.Count > 0) { foreach (RefCaveatCase refCaveatCase in listRefCaveatCase) { refCaveatCaseEntity = AllInOne.Legal.DataMapper.BackEnd.NHibernateToDomain.ObjectMapper.CommonMapper.GetRefCaveatCaseEntity(refCaveatCase); listRefCaveatCaseEntity.Add(refCaveatCaseEntity); } } return listRefCaveatCaseEntity; }
internal void SaveOrUpdateRefCaveatCaseEntity(RefCaveatCaseEntity refCaveatCaseEntity) { IRepository<RefCaveatCase> refCaveatCaseRepository = new RepositoryImpl<RefCaveatCase>(applicationSession); refCaveatCaseRepository.SaveOrUpdate(AllInOne.Legal.DataMapper.BackEnd.DomainToNHibernate.ObjectMapper.CommonMapper.GetRefCaveatCase(refCaveatCaseEntity)); }