コード例 #1
0
        public ActionResult Save(DamageVehicleModel damageVehicle)
        {
            bool status = false;

            try
            {
                if (ModelState.IsValid)
                {
                    DamageVehiclesServiceClient damageVehicleServiceClient = new DamageVehiclesServiceClient();

                    status = damageVehicleServiceClient.SaveDamageVehicles(damageVehicle);
                }
            }
            catch (Exception e)
            {
                ModelState.AddModelError("error", "Something Went Wrong");
                status = false;
                throw e;
            }

            return(new JsonResult {
                Data = new { status = status }
            });
        }