private void LoadColumnInfo(string tabName) { ERP.DAL.ERPRepository repository = new DAL.ERPRepository(); var tableInfos = repository.GetTables(tabName); this.dataGridView1.DataSource = tableInfos.FirstOrDefault().ColumnInfos.ToDataTable(); }
private void EditTab_Frm_Load(object sender, EventArgs e) { ERP.DAL.ERPRepository repository = new DAL.ERPRepository(); var tableInfos = repository.GetTables(); var tabNames = from p in tableInfos select new { id = p.Id, name = p.Name }; foreach (var item in tabNames) { var node = this.treeView1.Nodes.Add(item.name); node.Tag = item.id; } }