public JsonResult GetTableDataById(string id, string idFieldName, string textFieldName, string tableName, string extraFields) { //List<IdTextInfo> aList = new List<IdTextInfo>(); DataTable aList = new DataTable(); AutoCompleteRepo aRepo = new AutoCompleteRepo(); int totalCount = 0; string data = ""; try { aList = aRepo.GetTableDataById(id, idFieldName, textFieldName, tableName, extraFields); totalCount = aList.Rows.Count; data = JsonConvert.SerializeObject(aList); } catch (Exception ex) { } return(Json(new { data }, JsonRequestBehavior.AllowGet)); }
public DataTable GetTableDataById(string id, string idFieldName, string textFieldName, string tableName, string extraFields) { return(_autoCompleteRepo.GetTableDataById(id, idFieldName, textFieldName, tableName, extraFields)); }