public jDataTable(string TableName) { this.DataSource = new DataTable(TableName); this.Columns = new jDataColumn(); this.Rows = new jDataRowCollection(); this.TableName = TableName; }
public void parseJSON(string dt) { jDataModel rdt = Newtonsoft.Json.JsonConvert.DeserializeObject <jDataModel>(dt); this.TableName = rdt.TableName; this.Columns = new jDataColumn(rdt.Columns); this.Rows = new jDataRowCollection(rdt.Rows); DataSource = new DataTable(this.TableName); this.Columns.UpdateDataTable(DataSource); this.Rows.UpdateDataTable(DataSource); }
public jDataTable(jDataModel model) { try { this.TableName = model.TableName; this.Columns = new jDataColumn(model.Columns); this.Rows = new jDataRowCollection(model.Rows); this.SetDataSource(); } catch (Exception ex) { throw ex; } }
public jDataTable(DataTable dt) { try { this.TableName = dt.TableName; this.DataSource = dt; this.Columns = new jDataColumn(dt.Columns); this.Rows = new jDataRowCollection(dt.Rows, dt.Columns); } catch (Exception ex) { throw ex; } }