public ActionResult ProcessCarSeeker(string firstName, string lastName, string emailAddress,
                                             DateTime dateOfBirth, DateTime carYear, string carMake, string carModel,
                                             bool?hasHadDUI, int?speedingTickets, bool?coverageVsLiability)
        {
            using (CarQuotesDBEntities db = new CarQuotesDBEntities())
            {
                var carSeeker = new CarSeeker();

                carSeeker.FirstName    = firstName;
                carSeeker.LastName     = lastName;
                carSeeker.EmailAddress = emailAddress;
                carSeeker.DateOfBirth  = dateOfBirth;
                carSeeker.CarYear      = carYear;
                carSeeker.CarMake      = carMake;
                carSeeker.CarModel     = carModel;

                if (Request.Form["HasHadDUI"] == "Yes")
                {
                    carSeeker.HasHadDUI = true;
                }
                else
                {
                    carSeeker.HasHadDUI = false;
                }

                carSeeker.SpeedingTickets = speedingTickets;

                if (Request.Form["CoverageVsLiability"] == "Full Coverage")
                {
                    carSeeker.CoverageVsLiability = true;
                }
                else
                {
                    carSeeker.CoverageVsLiability = false;
                }

                db.CarSeekers.Add(carSeeker);
                db.SaveChanges();

                var carSeekerProcessed  = new CarSeekerProcessed();
                var carSeekersProcessed = new List <CarSeekerProcessed>();
                int finalQuote          = 50;
                CarQuote.CalculateQuote(carSeeker, out finalQuote);

                carSeekerProcessed.FirstName           = carSeeker.FirstName;
                carSeekerProcessed.LastName            = carSeeker.LastName;
                carSeekerProcessed.EmailAddress        = carSeeker.EmailAddress;
                carSeekerProcessed.DateOfBirth         = carSeeker.DateOfBirth;
                carSeekerProcessed.CarYear             = carSeeker.CarYear;
                carSeekerProcessed.CarMake             = carSeeker.CarMake;
                carSeekerProcessed.CarModel            = carSeeker.CarModel;
                carSeekerProcessed.HasHadDUI           = carSeeker.HasHadDUI;
                carSeekerProcessed.SpeedingTickets     = carSeeker.SpeedingTickets;
                carSeekerProcessed.CoverageVsLiability = carSeeker.CoverageVsLiability;
                carSeekerProcessed.FinalQuote          = finalQuote;

                carSeekersProcessed.Add(carSeekerProcessed);

                return(View("YourQuote", carSeekersProcessed));
            }
        }
        public ActionResult ProcessQuote(string firstName, string lastName, string emailAddress,
                                         DateTime dateOfBirth, int carYear, string carMake, string carModel,
                                         bool?DUI, int speedingTickets, bool?coverageType)
        {
            using (QuotesEntities db = new QuotesEntities())
            {
                var Quotes = new Insuree();

                Quotes.FirstName    = firstName;
                Quotes.LastName     = lastName;
                Quotes.EmailAddress = emailAddress;
                Quotes.DateOfBirth  = dateOfBirth;
                Quotes.CarYear      = carYear;
                Quotes.CarMake      = carMake;
                Quotes.CarModel     = carModel;

                if (Request.Form["DUI"] == "Yes")
                {
                    Quotes.DUI = true;
                }
                else
                {
                    Quotes.DUI = false;
                }

                Quotes.SpeedingTickets = speedingTickets;

                if (Request.Form["CoverageType"] == "Full Coverage")
                {
                    Quotes.CoverageType = true;
                }
                else
                {
                    Quotes.CoverageType = false;
                }

                db.Insurees.Add(Quotes);
                db.SaveChanges();

                var quoteProcessed  = new QuotesProcessed();
                var quotesProcessed = new List <QuotesProcessed>();
                int finalQuote      = 50;
                CarQuote.CalculateQuote(Quotes, out finalQuote);

                quoteProcessed.FirstName       = Quotes.FirstName;
                quoteProcessed.LastName        = Quotes.LastName;
                quoteProcessed.EmailAddress    = Quotes.EmailAddress;
                quoteProcessed.DateOfBirth     = Quotes.DateOfBirth;
                quoteProcessed.CarYear         = Quotes.CarYear;
                quoteProcessed.CarMake         = Quotes.CarMake;
                quoteProcessed.CarModel        = Quotes.CarModel;
                quoteProcessed.DUI             = Quotes.DUI;
                quoteProcessed.SpeedingTickets = Quotes.SpeedingTickets;
                quoteProcessed.CoverageType    = Quotes.CoverageType;
                quoteProcessed.FinalQuote      = finalQuote;

                quotesProcessed.Add(quoteProcessed);

                return(View("YourQuote", quotesProcessed));
            }
        }