public JsonResult Save(Billed model) { if (ModelState.IsValid && model.BilledDetails != null && model.BilledDetails.Count > 0) { if (billManager.SaveOrUpdate(model)) { return(Json(new { info = "Saved", status = true }, JsonRequestBehavior.AllowGet)); } return(Json(new { info = "Not Saved", status = false }, JsonRequestBehavior.AllowGet)); } else { return(Json(new { info = "Not Saved", status = false }, JsonRequestBehavior.AllowGet)); } }