protected void btnReview_ServerClick(object sender, EventArgs e) { try { var claimId = ""; if (gridClaims.Selection.Count > 0) { claimId = gridClaims.GetSelectedFieldValues("claimId")[0].ToString(); var dt = new Claim_BL().GetClaimById(Convert.ToInt32(claimId)); if (dt.Rows.Count > 0) { SetCustomerDetails(dt); SetVehicleDetails(dt); SetPolicyDetails(dt); SetClaimDetails(dt); SetThirdPartyDetails(dt); SetClaimPaymentDetails(dt); SetSparepareListDetails(dt); } SetImages(claimId); ScriptManager.RegisterClientScriptBlock(this.Page, this.Page.GetType(), "script", "<script type='text/javascript'>$( document ).ready(function() { $('#Modal').modal('show')});</script>", false); } } catch (Exception) { throw; } }
protected void ASPxButton1_Click(object sender, EventArgs e) { Claim_ML ml = new Claim_ML(); ml.spareParts = new List<SparepartPayment_ML>(); for (int i = 0; i < 3; i++) { ml.spareParts.Add(new SparepartPayment_ML() { sparePartId = i, sparePartQty = 2, sparePartCost = 1000 }); } ml.policyId = 4; ml.location = "Badulla"; ml.reason = "Fell asleep"; ml.knockedOn = "tree"; ml._3rdVehicleNo = "253-3402"; ml._3rdOwnerName = "Ishanka"; ml._3rdAddress = "199/4, Keppetipola Road,Badulla"; ml._3rdContactNo = "0716405220"; ml._3rdRenewalDate =DateTime.Now; ml._3rdSpecialNotes = ""; ml._3rdVictimName = "Yas"; ml._3rdVictimAddress = ""; ml._3rdDamageNature = "rear buffer"; ml._3rdClaimant = "Ceylinco"; ml._3rdAmountClaimed = 0; ml.isDriverOwner = "No"; ml.driverName = "Lakshan"; ml.driverLicense ="asdasdasd"; ml.licenseCat = "A"; ml.licenseExpreDate = DateTime.Now; ml.driverNIC = "912701395v"; ml.purchaseDate = DateTime.Now; ml.VehicleUsedFor = "Private"; ml.rentCompanyName = ""; ml.rentAmount = 0; ml.garageCosts = 324234.324f; ml.otherCosts = 324.43f; Claim_BL bl = new Claim_BL(); //bool returValue = bl.insertClaim(ml); // ASPxTextBox1.Text = returValue.ToString(); }
public int InsertClaim(string claim) { var claimId = new Claim_BL().createClaimObject(claim); return claimId; }