Whit this lines you can get all elements from "Task"
string ElementTable = "Task";
var dtRowsElements = objData.SelectAllfromTable(ElementTable);
IEnumerable
/*Function*/
public IEnumerable SelectAllfromTable(string Table)
{ /*Selecciona Todos los campos de la tabla en el .XML*/
string DBFile = string.Empty;
DBFile = "DB\\TrackTimeDB.xml";
try
{
XElement TracktTimeDB = XElement.Load(DBFile);
var AllData = from c in TracktTimeDB.Descendants(Table)
select c;
return AllData;
}
catch (Exception er)
{
return null;
}
}
No hay comentarios:
Publicar un comentario