Hola buenos dias
no se como pasar de un datatable a un Jtable me sale el siguiente error
A circular reference was detected while serializing an object of type 'System.Reflection.RuntimeModule'.
aqui el codigo
[WebMethod(EnableSession = true)]
public static object StateList(int jtStartIndex, int jtPageSize)
{
try
{
DataTable itemList = new DataTable();
conectionsql.SQLServer conn = new conectionsql.SQLServer(ConfigurationManager.AppSettings["DbConnection"]);
string strQuery = "Select * from Books";
//consultar Tabla SQL
SqlCommand itemConsult = new SqlCommand(strQuery);
itemList = conn.SqlQuery(itemConsult);
conn.CloseConn();
//Get data from database
int itemsCount = itemList.Rows.Count;
if (itemList == null)
return null;
List<DataRow> rows = new List<DataRow>();
foreach (DataRow row in itemList.Rows)
{
rows.Add(row);
}
return new { Result = "OK", Records = rows, TotalRecordCount = itemsCount };
}
catch (Exception ex)
{
return new { Result = "ERROR", Message = ex.Message };
}
}
Felipe Hurtado Developer