public static StrongTable ParseFromXElement(XElement table) { XName tname = table.Name; StrongTable rlt = new StrongTable(); if (tname != null) { rlt.TableName = tname.ToString(); } XElement el = table.FirstNode as XElement; if (el != null) { foreach (XAttribute col in el.Attributes()) { rlt.Columns.Add(col.Name.ToString()); } foreach (XElement row in table.Elements()) { DataRow dr = rlt.NewRow(); foreach (XAttribute col in row.Attributes()) { dr[col.Name.ToString()] = col.Value; } rlt.Rows.Add(dr); } } return rlt; }
public string GetDataTable(DictParams parlist) { StrongTable st = new StrongTable("Managers"); st.PagedQuery(Dbs.Use<DbSqlServer>("company"),1, 5, "", "", ""); return st.ToXmlString("RowNumber"); }