コード例 #1
0
        private void CreatCsF3DAL()
        {
            string procPrefix = this.txtProcPrefix.Text;
            string namepace   = this.txtNameSpace.Text.Trim();
            string namepace2  = this.txtNameSpace2.Text.Trim();
            string modelname  = this.txtClassName.Text;

            if (modelname == "")
            {
                modelname = tablename;
            }
            string bllname = modelname;
            string dalname = modelname;

            //命名规则处理
            modelname = namerule.GetModelClass(modelname);
            bllname   = namerule.GetBLLClass(bllname);
            dalname   = namerule.GetDALClass(dalname);

            BuilderFrameF3 f3 = new BuilderFrameF3(dbobj, dbname, tablename, modelname, bllname, dalname, GetFieldlist(), GetKeyFields(), namepace, namepace2, setting.DbHelperName);

            string dALtype = GetDALType();
            string strCode = f3.GetDALCode(dALtype, chk_CS_GetMaxID.Checked, chk_CS_Exists.Checked, chk_CS_Add.Checked,
                                           chk_CS_Update.Checked, chk_CS_Delete.Checked, chk_CS_GetModel.Checked, chk_CS_GetList.Checked, procPrefix);

            SettxtContent("CS", strCode);
        }
コード例 #2
0
ファイル: CodeMakerM.cs プロジェクト: starseaing/mycodematic
        private void CreatCsF3DAL()
        {
            string procPrefix      = this.txtProcPrefix.Text;
            string namepace        = this.txtNameSpace.Text.Trim();
            string namepace2       = this.txtNameSpace2.Text.Trim();
            string tableNameParent = cmbox_PTab.Text;
            string tableNameSon    = cmbox_STab.Text;

            string modelNameParent = txtClassName.Text;
            string modelNameSon    = txtClassName2.Text;

            if (modelNameParent == "")
            {
                modelNameParent = tableNameParent;
            }
            if (modelNameSon == "")
            {
                modelNameSon = tableNameSon;
            }
            string bllname       = modelNameParent;
            string dalnameparent = modelNameParent;
            string dalnameson    = modelNameSon;

            BuilderFrameF3 f3 = new BuilderFrameF3(dbobj, dbname, tablename, modelNameParent, bllname, dalnameparent, GetFieldlistP(), GetKeyFieldsP(), namepace, namepace2, setting.DbHelperName);

            string dALtype = GetDALType();
            string strCode = f3.GetDALCodeTran(dALtype, false, chk_CS_Exists.Checked, chk_CS_Add.Checked,
                                               chk_CS_Update.Checked, chk_CS_Delete.Checked, chk_CS_GetModel.Checked, chk_CS_GetList.Checked, procPrefix,
                                               tableNameParent, tableNameSon, modelNameParent, modelNameSon, GetFieldlistP(), GetFieldlistS(),
                                               GetKeyFieldsP(), GetKeyFieldsS(), dalnameparent, dalnameson);

            SettxtContent("CS", strCode);
        }
コード例 #3
0
ファイル: CodeMakerM.cs プロジェクト: starseaing/mycodematic
        private void CreatCsF3Model()
        {
            string procPrefix      = this.txtProcPrefix.Text;
            string namepace        = this.txtNameSpace.Text.Trim();
            string namepace2       = this.txtNameSpace2.Text.Trim();
            string tableNameParent = cmbox_PTab.Text;
            string tableNameSon    = cmbox_STab.Text;
            string modelNameParent = txtClassName.Text;
            string modelNameSon    = txtClassName2.Text;

            //命名规则处理
            modelNameParent = namerule.GetModelClass(modelNameParent);
            modelNameSon    = namerule.GetModelClass(modelNameSon);

            BuilderFrameF3 f3      = new BuilderFrameF3(dbobj, dbname, namepace, namepace2, setting.DbHelperName);
            string         strCode = f3.GetModelCode(tableNameParent, modelNameParent, GetFieldlistP(), tableNameSon, modelNameSon, GetFieldlistS());

            SettxtContent("CS", strCode);
        }
コード例 #4
0
ファイル: CodeMakerM.cs プロジェクト: starseaing/mycodematic
        private void CreatCsF3DALFactory()
        {
            string namepace        = this.txtNameSpace.Text.Trim();
            string namepace2       = this.txtNameSpace2.Text.Trim();
            string tableNameParent = cmbox_PTab.Text;
            string tableNameSon    = cmbox_STab.Text;
            string modelNameParent = txtClassName.Text;

            if (modelNameParent == "")
            {
                modelNameParent = tableNameParent;
            }
            string bllname       = modelNameParent;
            string dalnameparent = modelNameParent;

            BuilderFrameF3 f3      = new BuilderFrameF3(dbobj, dbname, tablename, modelNameParent, bllname, dalnameparent, GetFieldlistP(), GetKeyFieldsP(), namepace, namepace2, setting.DbHelperName);
            string         strCode = f3.GetDALFactoryCode();

            SettxtContent("CS", strCode);
        }
コード例 #5
0
ファイル: CodeMakerM.cs プロジェクト: starseaing/mycodematic
        private void CreatCsF3BLL()
        {
            string namepace        = this.txtNameSpace.Text.Trim();
            string namepace2       = this.txtNameSpace2.Text.Trim();
            string tableNameParent = cmbox_PTab.Text;
            string tableNameSon    = cmbox_STab.Text;
            string modelNameParent = txtClassName.Text;

            if (modelNameParent == "")
            {
                modelNameParent = tableNameParent;
            }
            string bllname       = modelNameParent;
            string dalnameparent = modelNameParent;

            BuilderFrameF3 f3      = new BuilderFrameF3(dbobj, dbname, tablename, modelNameParent, bllname, dalnameparent, GetFieldlistP(), GetKeyFieldsP(), namepace, namepace2, setting.DbHelperName);
            string         blltype = GetBLLType();
            string         strCode = f3.GetBLLCode(blltype, false, chk_CS_Exists.Checked, chk_CS_Add.Checked, chk_CS_Update.Checked, chk_CS_Delete.Checked, chk_CS_GetModel.Checked, chk_CS_GetModelByCache.Checked, chk_CS_GetList.Checked, chk_CS_GetList.Checked);

            SettxtContent("CS", strCode);
        }
コード例 #6
0
        private void CreatCsF3DALFactory()
        {
            string namepace  = this.txtNameSpace.Text.Trim();
            string namepace2 = this.txtNameSpace2.Text.Trim();
            string modelname = this.txtClassName.Text;

            if (modelname == "")
            {
                modelname = tablename;
            }
            string bllname = modelname;
            string dalname = modelname;

            //命名规则处理
            modelname = namerule.GetModelClass(modelname);
            bllname   = namerule.GetBLLClass(bllname);
            dalname   = namerule.GetDALClass(dalname);

            BuilderFrameF3 f3      = new BuilderFrameF3(dbobj, dbname, tablename, modelname, bllname, dalname, GetFieldlist(), GetKeyFields(), namepace, namepace2, setting.DbHelperName);
            string         strCode = f3.GetDALFactoryCode();

            SettxtContent("CS", strCode);
        }
コード例 #7
0
ファイル: CodeMaker.cs プロジェクト: zhangxsheng/Codematic
        private void CreatCsF3IDAL()
        {
            string namepace  = this.txtNameSpace.Text.Trim();
            string namepace2 = this.txtNameSpace2.Text.Trim();
            string modelname = this.txtClassName.Text;

            if (modelname == "")
            {
                modelname = tablename;
            }
            string bllname = modelname;
            string dalname = modelname;

            //命名规则处理
            modelname = NameRule.GetModelClass(modelname, this.setting);
            bllname   = NameRule.GetBLLClass(bllname, this.setting);
            dalname   = NameRule.GetDALClass(dalname, this.setting);

            BuilderFrameF3 builderFrameS = new BuilderFrameF3(this.dbobj, this.dbname, this.tablename, this.cb.TableDescription, modelname, bllname, dalname, this.GetFieldlist(), this.GetKeyFields(), namepace, namepace2, setting.DbHelperName);
            string         strCode       = builderFrameS.GetIDALCode(chk_CS_GetMaxID.Checked, chk_CS_Exists.Checked, chk_CS_Add.Checked, chk_CS_Update.Checked, chk_CS_Delete.Checked, chk_CS_GetModel.Checked, chk_CS_GetList.Checked, chk_CS_GetList.Checked);

            SettxtContent("CS", strCode);
        }