public ActionResult get_OPBill_Amount(string fdate, string tdate) { PatientStatisticsDB _DB = new PatientStatisticsDB(); OPBILLActualAmount _RE = _DB.get_OPBill_Amount(fdate, tdate); var serializer = new JavaScriptSerializer { MaxJsonLength = Int32.MaxValue }; var result = new ContentResult { Content = serializer.Serialize(new { Res = _RE ?? new OPBILLActualAmount() }), ContentType = "application/json" }; return(result); }