Esempio n. 1
0
        //Generate Three-Layout-Frame
        private void button15_Click(object sender, EventArgs e)
        {
            //Generate QX_Frame.Data.Entities
            textBox2.Text = "QX_Frame.Data.Entities";
            textBox7.Text = "";
            textBox8.Text = $"Entity<{DataBaseName}, {TableName}>";
            CommonComponent(() => NetEntityWithBantina.CreateCode(CreateInfoDic));
            //Generate QX_Frame.Data.QueryObject
            textBox3.Text = "using QX_Frame.App.Base;\nusing QX_Frame.Data.Entities;\nusing System;\nusing System.Linq.Expressions;";
            textBox2.Text = "QX_Frame.Data.QueryObject";
            textBox7.Text = "QueryObject";
            textBox8.Text = $"WcfQueryObject<{DataBaseName}, {TableName}>";
            CommonComponent(() => QX_FrameToQueryObject.CreateCode(CreateInfoDic));

            //Generate QX_Frame.Data.Service
            textBox3.Text = "using QX_Frame.App.Base;\nusing QX_Frame.Data.Contract;\nusing QX_Frame.Data.Entities;";
            textBox2.Text = "QX_Frame.Data.Service";
            textBox7.Text = "Service";
            string tableNameRelace = TableName.Replace("TB_", "").Replace("tb_", "").Replace("t_", "").Replace("T_", "");

            textBox5.Text = tableNameRelace;
            textBox8.Text = $"WcfService, I{tableNameRelace}Service";
            CommonComponent(() => QX_FrameToDataService.CreateCode(CreateInfoDic));

            string dirPath         = textBox6.Text;
            string fileComplexPath = dirPath + "ClassRegister.txt";

            IO_Helper_DG.CreateDirectoryIfNotExist(dirPath);

            using (StreamWriter sw = new StreamWriter(fileComplexPath, true))
            {
                sw.WriteLine($"AppBase.Register(c => new {tableNameRelace}Service());");
                sw.Close();
            }

            //Generate QX_Frame.Data.Contract
            textBox3.Text = "using QX_Frame.Data.Entities;";
            textBox2.Text = "QX_Frame.Data.Contract";
            textBox5.Text = $"I{textBox5.Text.Replace("TB_", "").Replace("tb_", "").Replace("t_", "").Replace("T_", "")}";
            textBox7.Text = "Service";
            textBox8.Text = "";
            CommonComponent(() => QX_FrameToDataContract.CreateCode(CreateInfoDic));
        }
Esempio n. 2
0
 //Data.Service
 private void button16_Click(object sender, EventArgs e) => CommonComponent(() => QX_FrameToDataService.CreateCode(CreateInfoDic));