public QuoteRepository(MasterDataService masterDataService, MotorVehicleDetailsService motorVehicleDetailsService, QuickQuoteService quickQuoteService) { this._masterDataService = masterDataService; this._motorVehicleDetailsService = motorVehicleDetailsService; this._quickQuoteService = quickQuoteService; this._masterDetails = new MasterDetails(); this._carDetails = new MotorVehicleDetails(); this._quickQuote = new QuickQuote(); this._vehicleInfo = new VehicleInfo(); this._insuredInfo = new InsuredInfo(); }
private void btnGetQuote_Click(object sender, EventArgs e) { InsuranceQuoteServiceClient svcInsuranceQuote = new InsuranceQuoteServiceClient(); InsuredInfo objInsuredInfo = new InsuredInfo(); InsuranceQuoteInfo objQuoteInfo; objInsuredInfo.Name = txtInsuredName.Text; objInsuredInfo.Address = txtInsuredAddress.Text; objInsuredInfo.Age = txtInsuredAge.Text; objInsuredInfo.VehicleMake = txtVehicleMake.Text; objInsuredInfo.VehicleYearBuilt = txtVehicleYearBuilt.Text; try { objQuoteInfo = svcInsuranceQuote.GetQuote(objInsuredInfo); lblMonthlyAmount.Text = string.Format("Your premium will be ${0} per month.", objQuoteInfo.MontlyTotal); } catch (Exception ex) { MessageBox.Show(ex.Message, "Service Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } }
private void btnGetQuote_Click(object sender, EventArgs e) { InsuranceQuoteServiceClient svcInsuranceQuote = new InsuranceQuoteServiceClient(); InsuredInfo objInsuredInfo = new InsuredInfo(); InsuranceQuoteInfo objQuoteInfo; objInsuredInfo.Name = txtInsuredName.Text; objInsuredInfo.Address = txtInsuredAddress.Text; objInsuredInfo.Age = txtInsuredAge.Text; objInsuredInfo.VehicleMake = txtVehicleMake.Text; objInsuredInfo.VehicleYearBuilt = txtVehicleYearBuilt.Text; try { objQuoteInfo = svcInsuranceQuote.GetQuote(objInsuredInfo); lblMonthlyAmount.Text = string.Format("Your premium will be ${0} per month.", objQuoteInfo.MontlyTotal); } catch (Exception ex) { MessageBox.Show(ex.Message, "Service Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } }
private InsuredDetails MapInsuredDetails(InsuredInfo insuredDetails) { if (insuredDetails != null) { List <string> addressLine = new List <string>(); addressLine.Add(insuredDetails.AddressLine1); addressLine.Add(insuredDetails.AddressLine2); return(new InsuredDetails { address = new Address { lines = addressLine, city = insuredDetails.City, state = "NA", zipCode = insuredDetails.ZipCode }, firstName = insuredDetails.FirstName, secondName = insuredDetails.SecondName, lastName = insuredDetails.LastName }); } return(new InsuredDetails()); }