Esempio n. 1
0
        public PreQualificationResult Save(PreQualificationResult domainObject)
        {
            using (var adapter = PersistenceLayer.GetDataAccessAdapter())
            {
                var entity = Mapper.Map <PreQualificationResult, PreQualificationResultEntity>(domainObject);
                if (!adapter.SaveEntity(entity, true))
                {
                    throw new PersistenceFailureException();
                }

                return(Mapper.Map <PreQualificationResultEntity, PreQualificationResult>(entity));
            }
        }
Esempio n. 2
0
        private long SavePreQualification(PreQualificationResult preQualificationResult)
        {
            try
            {
                preQualificationResult.DateCreated  = DateTime.Now;
                preQualificationResult.IsActive     = true;
                preQualificationResult.SignUpModeId = (int)SignUpMode.CallCenter;
                preQualificationResult = _preQualificationResultRepository.Save(preQualificationResult);
            }
            catch (Exception exception)
            {
                _logger.Error(string.Format("while save PreQualification Result from CallCenter CustomerId: {0} EventId :{1}  message: {2} \n\t strack trace {3} ",
                                            preQualificationResult.CustomerId, preQualificationResult.EventId, exception.Message, exception.StackTrace), exception);
            }


            return(preQualificationResult.Id);
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            if (EventId > 0)
            {
                var eventRepository = IoC.Resolve <IEventRepository>();
                var theEvent        = eventRepository.GetById(EventId);

                if (theEvent != null)
                {
                    RecommendPackage        = theEvent.RecommendPackage;
                    AskPreQualifierQuestion = theEvent.AskPreQualifierQuestion;
                }

                var preQualificationRepository = IoC.Resolve <IPreQualificationResultRepository>();

                var rs = preQualificationRepository.GetById(PreQualificationResultId);

                if (rs != null)
                {
                    SkipPreQualificationQuestion       = rs.SkipPreQualificationQuestion;
                    AgreedWithPrequalificationQuestion = rs.AgreedWithPrequalificationQuestion;
                    ObjPqr = rs;
                }

                var prospectCustomerRepository = IoC.Resolve <IProspectCustomerRepository>();
                var prospectCustomer           = prospectCustomerRepository.GetProspectCustomerByCustomerId(CustomerId);

                if (prospectCustomer != null)
                {
                    Gender = (long)prospectCustomer.Gender;
                    if (prospectCustomer.BirthDate.HasValue)
                    {
                        Dob = Convert.ToDateTime(prospectCustomer.BirthDate).ToString("MM/dd/yyyy");
                    }
                }
            }
        }
Esempio n. 4
0
        public PackageSelectionInfoEditModel GetPackageSelectionInfoEditModel(TempCart tempCart, PreQualificationResult preQualificationResult)
        {
            var model = new PackageSelectionInfoEditModel
            {
                Gender                       = !string.IsNullOrEmpty(tempCart.Gender) ? ((int)(Gender)Enum.Parse(typeof(Gender), tempCart.Gender, true)) : (int?)null,
                Dob                          = tempCart.Dob,
                ChestPain                    = preQualificationResult.ChestPain ?? 0,
                Diabetic                     = preQualificationResult.Diabetic ?? 0,
                HeartDisease                 = preQualificationResult.HeartDisease ?? 0,
                HighBloodPressure            = preQualificationResult.HighBloodPressure ?? 0,
                Smoker                       = preQualificationResult.Smoker ?? 0,
                DiagnosedHeartProblem        = preQualificationResult.DiagnosedHeartProblem ?? 0,
                HighCholestrol               = preQualificationResult.HighCholestrol ?? 0,
                OverWeight                   = preQualificationResult.OverWeight ?? 0,
                SkipPreQualificationQuestion = preQualificationResult.SkipPreQualificationQuestion
            };

            return(model);
        }
Esempio n. 5
0
 public void Delete(PreQualificationResult domainObject)
 {
     throw new NotImplementedException();
 }