Esempio n. 1
0
 public JsonResult GetClinic(string term)
 {
     try
     {
         CommonModel model = new CommonModel();
         model.SearchString = term;
         List <CommonModel> clinicList = model.GetClinic();
         var jsonData = new
         {
             rows = (from data in clinicList
                     select new
             {
                 i = data.ClinicID,
                 cell = new string[] {
                     data.ClinicName.ToString(),
                 }
             }).ToList()
         };
         return(Json(jsonData, JsonRequestBehavior.AllowGet));
     }
     catch (Exception ex)
     {
         UtilityController.LogException(ex, MethodBase.GetCurrentMethod().ReflectedType.Name, MethodBase.GetCurrentMethod().Name);
         return(null);
     }
 }