public void Save(ClaimMiscellaneousEntity obj)
 {
     using (var db = CreateCatalog())
     {
         db.ClaimMiscellaneous.Save(obj);
     }
 }
        public ActionResult Create(int id)
        {
            var obj = new ClaimMiscellaneousEntity();
            obj.ClaimId = id;

            ViewData.Model = obj;

            return View();
        }
        public ActionResult Create(int id, FormCollection form)
        {
            var claimMiscellaneousSvc = new ClaimMiscellaneousLogic(Ticket);
            var miscellaneousSvc = new MiscellaneousLogic(Ticket);

            var miscellaneousId = StringUtility.ToInt(form["miscellaneousId"]);
            var miscellaneousObj = miscellaneousSvc.GetById(miscellaneousId);

            var obj = new ClaimMiscellaneousEntity();
            obj.ClaimId = id;
            if (miscellaneousObj != null)
            {
                obj.Miscellaneous.Id = miscellaneousObj.Id;
                obj.Miscellaneous.Code = miscellaneousObj.Code;
                obj.Miscellaneous.Name = miscellaneousObj.Name;
            }
            obj.SupplierName = form["supplierName"];
            obj.InvoiceNumber = form["invoiceNumber"];
            obj.ItemAmount = StringUtility.ToDecimal(form["itemAmount"]);

            claimMiscellaneousSvc.Save(obj);

            return RedirectToAction("Display", "WarrantyClaim", new { id = obj.ClaimId });
        }