protected void btnSave_ServerClick(object sender, EventArgs e) { try { var customerML = new Customer_ML() { Salutation = txtSalutation.Value, Initials = txtInitials.Value, Firstname = txtFirstname.Value, Lastname=txtLastname.Value, AddressNo = txtAccountNo.Value, Street=txtStreet.Value, City=txtCity.Value, Nic=txtNic.Value, Email=txtEmail.Value, Mobile=txtMobile.Value, Home=txtHome.Value, Office=txtOffice.Value, Bank = txtBank.Value, Branch = txtBranch.Value, AccountNo = txtAccountNo.Value }; var customerId = new Policy_BL().InsertCustomer(customerML); var vehicleCustomerML = new Customer_Vehicle_ML() { CustomerId = customerId, RegNo=txtRegNo.Value, VehicleId = Convert.ToInt32(txtVehicleId.Text), Color=txtColor.Value, EngineNo=txtEngineNo.Value, ChassissNo=txtChassissNo.Value, Usage = txtUsage.Value, ExtraFitting=txtExtra.Value, Damages = txtDamages.Value, AbsoluteOwner = txtAbsolute.Value, FinancialRights = txtFinan.Value }; var customerVehicleId = new Policy_BL().InsertCustomerVehicle(vehicleCustomerML); var policy = new Customer_Vehicle_Policy_ML() { Type = ddlType.SelectedItem.Text, CustomerVehicleId = customerVehicleId, CommenceOn = dtCommence.Date, ExpireOn = dtExpire.Date, NaturalDisaster = ddlnatural.SelectedItem.Text, Vandalism = ddlVandalism.SelectedItem.Text, Terrorism = ddlTerrorism.SelectedItem.Text, StrikeRiot = ddlStrikes.SelectedItem.Text, AirBag = ddlAirbag.SelectedItem.Text, PassengerComp = Convert.ToDecimal(txtPasen.Text), Towing = Convert.ToDecimal(txtTow.Text), DriverComp = Convert.ToDecimal(txtDriverCom.Text), status = "Active", empId = 1 }; var res = new Policy_BL().InsertCustomerVehiclepolicy(policy); } catch (Exception) { throw; } }
public string GetClaimHistory(int policy_ID) { var result = new Policy_BL().GetClaimHistory(new Policy_ML() { policyID = policy_ID }); return JsonConvert.SerializeObject(result, Formatting.Indented); }