コード例 #1
0
        private void Generate(ModelGenerator modelGenerator, DALGenerator dalGenerator, BLLGenerator bllGenerator)
        {
            foreach (string tableName in clbTabs.CheckedItems)
            {
                string processedTableName = GetProcessedTableName(tableName);
                InitializeGenerator(modelGenerator, dalGenerator, bllGenerator, tableName, processedTableName);

                modelGenerator.GenerateModel2010();
                dalGenerator.GenerateDAL2010();
                bllGenerator.GenerateBLL2010();
            }
        }
コード例 #2
0
        private void btnGenerate_Click(object sender, EventArgs e)
        {
            ModelGenerator modelGenerator = new ModelGenerator();
            DALGenerator   dalGenerator   = new DALGenerator();
            BLLGenerator   bllGenerator   = new BLLGenerator();

            if (!IsValid())
            {
                return;
            }

            Generate(modelGenerator, dalGenerator, bllGenerator);

            ShowResult();
        }
コード例 #3
0
 private void InitializeGenerator(ModelGenerator modelGenerator, DALGenerator dalGenerator, BLLGenerator bllGenerator, string tableName, string processedTableName)
 {
     modelGenerator.ConStr             = txtConStr.Text;
     modelGenerator.FolderPath         = txtPath.Text;
     modelGenerator.NameSpace          = txtNameSpace.Text;
     modelGenerator.TableName          = tableName;
     modelGenerator.ProcessedTableName = processedTableName;
     bllGenerator.ConStr             = txtConStr.Text;
     bllGenerator.FolderPath         = txtPath.Text;
     bllGenerator.NameSpace          = txtNameSpace.Text;
     bllGenerator.TableName          = tableName;
     bllGenerator.ProcessedTableName = processedTableName;
     dalGenerator.ConStr             = txtConStr.Text;
     dalGenerator.FolderPath         = txtPath.Text;
     dalGenerator.NameSpace          = txtNameSpace.Text;
     dalGenerator.TableName          = tableName;
     dalGenerator.ProcessedTableName = processedTableName;
 }