コード例 #1
0
ファイル: ClaimLogic.cs プロジェクト: codefire-sa/mototrak
 public void Save(ClaimEntity obj)
 {
     using (var db = CreateCatalog())
     {
         db.Claims.Save(obj);
     }
 }
コード例 #2
0
 public WarrantyClaimModel()
 {
     _claim = new ClaimEntity();
     _policy = new PolicySummaryEntity();
     _labour = new List<ClaimLabourEntity>();
     _parts = new List<ClaimPartEntity>();
     _miscellaneous = new List<ClaimMiscellaneousEntity>();
     _attachments = new List<AttachmentEntity>();
 }
コード例 #3
0
        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();
        }
コード例 #4
0
        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();
        }