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