Пример #1
0
 public jDataTable(string TableName)
 {
     this.DataSource = new DataTable(TableName);
     this.Columns    = new jDataColumn();
     this.Rows       = new jDataRowCollection();
     this.TableName  = TableName;
 }
Пример #2
0
        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);
        }
Пример #3
0
 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;
     }
 }
Пример #4
0
 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;
     }
 }