public JsonResult Insert_PaymentDetail(List <BookingReceiptInstrumentDetailVM> objects) { bool result = false; int count = 0; string msg = "Failed to save record.."; //foreach (var item in objects) //{ // if (count >= 1 || item.InstrumentNo != null) // { result = BookingOrderMethods.Insert_PaymentDetail(objects, Session["DealerCode"].ToString()); // } // count++; //} if (result) { msg = "Successfully Added"; } return(Json(new { Success = result, Message = msg }, JsonRequestBehavior.AllowGet)); }