private void btnNext_Click(object sender, EventArgs e) { List <string> tableList = new List <string>(); if (connect != null && lstTables.SelectedItems.Count > 0) { foreach (ListViewItem item in lstTables.SelectedItems) { tableList.Add(item.Text); } } if (tableList.Count > 0) { AspNetHelper.InitDbName(PageCache.DatabaseName); AspNetHelper.InitTables(tableList); foreach (var tbName in tableList) { var list = connect.GetColumnsList(server, name, pwd, port, dbname, tbName); AspNetHelper.AddColumnList(tbName, list); } this.Invoke(new Action <TabControl>(p => { int mulIndex = 1; p.TabPages.RemoveAt(0); p.TabPages.AddRange(new TabPage[] { cache_tabPageList[mulIndex] }); }), this.tabControl1); } else { MessageBox.Show("请先选中至少一张表."); } }
private void AspNet_CreateAspxcs(int action) { Dictionary <string, string> result = AspNetHelper.CreateAspxcs(this.txtNameSpace.Text, this.txtModelSuffix.Text, this.txtDalSuffix.Text, action); FillInTab_AspNet(result, tbAspNet); }
private void AspNet_CreateFactory() { Dictionary <string, string> result = AspNetHelper.CreateFactory(this.txtNameSpace.Text); FillInTab_AspNet(result, tbAspNet); }
private void AspNet_CreateConfig() { Dictionary <string, string> result = AspNetHelper.CreateConfig(); FillInTab_AspNet(result, tbAspNet); }