public ActionResult SaveDetails(WebGarmentDetails detail) { ClosetGarment garment = closetRepository.GetClosetGarment(detail.ClosetGarmentId); if (garment.Details == null) { garment.Details = new GarmentDetails(); } garment.Details.CareConditions = detail.CareConditions; garment.Details.IsTailored = false; if (detail.IsTailored == "True") { garment.Details.IsTailored = true; } garment.Details.MadeBy = detail.MadeBy; garment.Details.MadeOf = detail.MadeOf; garment.Details.PurchasedAt = detail.PurchasedAt; if (StringHelper.IsDateTime(detail.PurchasedOn)) { IFormatProvider formatProvider = new CultureInfo("en-US"); garment.Details.PurchasedOn = Convert.ToDateTime(detail.PurchasedOn, formatProvider); } garment.Details.StoreConditions = detail.StoreConditions; closetRepository.SaveClosetGarment(garment); return(Json(new { Success = true })); }