public ActionResult Create()
        {
            ViewBag.ClaimCreate  = "first active";
            ViewBag.ProductTypes = ProductTypeManager.GetAll();
            ViewBag.Brands       = BrandManager.GetAll();

            BookingClaimViewModel model = new BookingClaimViewModel();

            return(View(model));
        }
        public JsonResult GetAll()
        {
            try
            {
                var items = ProductTypeManager.GetAll();

                return(Json(new { Result = "OK", Options = items.Select(m => new { DisplayText = m.sDescription, Value = m.kProductTypeId }) }));
            }
            catch (Exception ex)
            {
                return(Json(new { Result = "ERROR", Message = ex.Message }));
            }
        }
        public ActionResult Edit(Guid id)
        {
            ViewBag.ClaimCreate  = "first active";
            ViewBag.SuperUser    = StaffManager.GetAll().Where(m => m.vStaffPositionDescription == "หัวหน้าช่าง");
            ViewBag.ProductTypes = ProductTypeManager.GetAll();
            ViewBag.Brands       = BrandManager.GetAll();

            BookingClaimViewModel model = new BookingClaimViewModel();
            var claim = ClaimManager.GetById(id);

            if (claim.dtInsuranceExpire.HasValue)
            {
                claim.dtInsuranceExpire = claim.dtInsuranceExpire.Value.AddYears(543);
            }



            model.Claim = claim;
            //model.Repair.RepairCauses = repair.RepairCauses;
            model.Insurance = claim.Insurance;
            model.Product   = claim.Product;
            return(View(model));
        }