private void lstTables_SelectedIndexChanged(object sender, EventArgs e) { if (connect != null && lstTables.SelectedItems.Count > 0) { this.tablename = (lstTables.SelectedItems[0] as ListViewItem).Text; var list = connect.GetColumnsList(server, name, pwd, port, dbname, tablename); SetColumnsList(list); PageCache.SetTable(this.tablename); } }
private void lstTables_SelectedIndexChanged(object sender, EventArgs e) { if (connect != null && lstTables.SelectedItems.Count > 0) { this.tablename = (lstTables.SelectedItems[0] as ListViewItem).Text; var list = connect.GetColumnsList(server, name, pwd, port, dbname, tablename); SetColumnsList(list); PageCache.SetTable(this.tablename); PageCache.SetColumnList(list, isImport); this.lstFields.Items.Clear(); this.lstExtendAttribute.Items.Clear(); foreach (var model in list) { ListViewItem item = new ListViewItem(model.Name); item.Tag = model; item.SubItems.AddRange(new string[] { model.Comment }); this.lstFields.Items.Add(item); } } }