public void Save(ClaimEntity obj) { using (var db = CreateCatalog()) { db.Claims.Save(obj); } }
public WarrantyClaimModel() { _claim = new ClaimEntity(); _policy = new PolicySummaryEntity(); _labour = new List<ClaimLabourEntity>(); _parts = new List<ClaimPartEntity>(); _miscellaneous = new List<ClaimMiscellaneousEntity>(); _attachments = new List<AttachmentEntity>(); }
public ActionResult Create(int id) { var claimObj = new ClaimEntity(); claimObj.VehicleId = id; ViewData.Model = claimObj; ViewData["programId"] = BuildProgramList(claimObj.Program.Id); ViewData["claimTypeId"] = BuildClaimTypeList(claimObj.ClaimType.Id); return View(); }
public ActionResult Create(int id, FormCollection form) { var claimObj = new ClaimEntity(); claimObj.VehicleId = id; claimObj.JobCardNumber = form["jobCardNumber"]; claimObj.InvoiceNumber = form["invoiceNumber"]; claimObj.ExternalNumber = form["externalNumber"]; claimObj.DiagnosticNumber = form["diagnosticNumber"]; claimObj.RepairDate = StringUtility.ToDateTime(form["repairDate"]); claimObj.ClaimDistance = StringUtility.ToInt(form["claimDistance"]); claimObj.Program.Id = StringUtility.ToInt(form["programId"]); claimObj.ClaimType.Id = StringUtility.ToInt(form["claimTypeId"]); claimObj.FaultNote = form["faultNote"]; claimObj.CauseNote = form["causeNote"]; claimObj.RemedyNote = form["remedyNote"]; ViewData.Model = claimObj; ViewData["programId"] = BuildProgramList(claimObj.Program.Id); ViewData["claimTypeId"] = BuildClaimTypeList(claimObj.ClaimType.Id); return View(); }