Ejemplo n.º 1
0
        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("请先选中至少一张表.");
            }
        }
Ejemplo n.º 2
0
        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);
        }
Ejemplo n.º 3
0
        private void AspNet_CreateFactory()
        {
            Dictionary <string, string> result = AspNetHelper.CreateFactory(this.txtNameSpace.Text);

            FillInTab_AspNet(result, tbAspNet);
        }
Ejemplo n.º 4
0
        private void AspNet_CreateConfig()
        {
            Dictionary <string, string> result = AspNetHelper.CreateConfig();

            FillInTab_AspNet(result, tbAspNet);
        }