예제 #1
0
        internal ADMInfoEntity GetADMInfoEntity(string aDMInfoId)
        {
            ADMInfo aDMInfo = new ADMInfo();
            ADMInfoEntity aDMInfoEntity = new ADMInfoEntity();

            Criteria criteria = new Criteria("ADMInfoId", aDMInfoId);
            aDMInfo = GetADMInfo(criteria);
            aDMInfoEntity = AllInOne.Legal.DataMapper.BackEnd.NHibernateToDomain.ObjectMapper.CaseSpecificMapper.GetADMInfoEntity(aDMInfo);
            return aDMInfoEntity;
        }
        /// <summary>
        /// Gets the CaseInfoDetails
        /// </summary>
        /// <param name="criteria">Criteria contains CaseInfoId</param>
        /// <returns></returns>
        public CaseInfoEntity GetCaseInfoDetails(Criteria criteria)
        {
            Check.RequireWithNullException(criteria != null, "criteria was null or empty; it has to have value within it.");

            var caseInfoEntity = new CaseInfoEntity();

            using (var unitOfWork = new UnitOfWorkImpl(DataBaseConnectivity.Application))
            {
                try
                {
                    var icaseinfoRepository = new RepositoryImpl<CaseInfo>(unitOfWork.Session);
                    caseInfoEntity = CaseMapper.GetCaseInfoEntity(icaseinfoRepository.Get(Convert.ToInt64(criteria.Value)));
                }
                catch (Exception ex)
                {
                    unitOfWork.Rollback();
                    Logger.Error("Error encountered at GetCaseInfoDetails", ex);
                    throw;
                }
            }

            return caseInfoEntity;
        }
예제 #3
0
 internal RefCaveatCaseEntity GetRefCaveatCaseEntity(string aDMCavetNoId)
 {
     Criteria criteria = new Criteria("ADMCavetNoId", aDMCavetNoId);
     return AllInOne.Legal.DataMapper.BackEnd.NHibernateToDomain.ObjectMapper.CommonMapper.GetRefCaveatCaseEntity(GetRefCaveatCaseEntity(criteria));
 }
예제 #4
0
 private RefCaveatCase GetRefCaveatCaseEntity(Criteria criteria)
 {
     IRepository<RefCaveatCase> refCaveatCaseRepository = new RepositoryImpl<RefCaveatCase>(applicationSession);
     return refCaveatCaseRepository.Get(criteria.Value);
 }
예제 #5
0
        private ADMInfo GetADMInfo(Criteria criteria)
        {
            try
            {
                ADMInfo aDMInfo = new ADMInfo();

                IRepository<ADMInfo> iADMInfoRepository = new RepositoryImpl<ADMInfo>(applicationSession);
                aDMInfo = iADMInfoRepository.Get(criteria.Value);
                return aDMInfo;
            }
            catch (Exception ex)
            {
                Logger.Error("Error encountered at GetADMInfo", ex);
                throw;
            }
        }