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, 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 dALtype = GetDALType(); string strCode = builderFrameS.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); }
private void CreatCsS3DAL() { 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; //命名规则处理 modelNameParent = namerule.GetModelClass(modelNameParent); modelNameSon = namerule.GetModelClass(modelNameSon); bllname = namerule.GetBLLClass(bllname); dalnameparent = namerule.GetDALClass(dalnameparent); dalnameson = namerule.GetDALClass(dalnameson); BuilderFrameS3 s3 = new BuilderFrameS3(dbobj, dbname, tablename, modelNameParent, bllname, dalnameparent, GetFieldlistP(), GetKeyFieldsP(), namepace, namepace2, setting.DbHelperName); string dALtype = GetDALType(); string strCode = s3.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); }
private void CreatWeb() { string namepace = this.txtNameSpace.Text.Trim(); string folder = this.txtNameSpace2.Text.Trim(); string modelname = this.txtClassName.Text; if (modelname == "") { modelname = tablename; } string bllname = modelname; //命名规则处理 modelname = NameRule.GetModelClass(modelname, this.setting); bllname = NameRule.GetBLLClass(bllname, this.setting); //Maticsoft.BuilderWeb.BuilderWeb bw = new Maticsoft.BuilderWeb.BuilderWeb(); //bw.NameSpace = namepace; //bw.Fieldlist = GetFieldlist(); //bw.Keys = GetKeyFields(); //bw.ModelName = modelname; //bw.BLLName = bllname; //bw.Folder = folder; cb.BLLName = bllname; cb.NameSpace = namepace; cb.Fieldlist = GetFieldlist(); cb.Keys = GetKeyFields(); cb.ModelName = modelname; cb.Folder = folder; string webtype = GetWebType(); cb.CreatBuilderWeb(webtype); if (radbtn_Web_Aspx.Checked) { string strCode = cb.GetWebHtmlCode(chk_Web_HasKey.Checked, chk_Web_Add.Checked, chk_Web_Update.Checked, chk_Web_Show.Checked, true); SettxtContent("Aspx", strCode); } else { string strCode = cb.GetWebCode(chk_Web_HasKey.Checked, chk_Web_Add.Checked, chk_Web_Update.Checked, chk_Web_Show.Checked, true); SettxtContent("CS", strCode); } }
private void CreatCsS3Model() { 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); BuilderFrameS3 s3 = new BuilderFrameS3(dbobj, dbname, tablename, modelname, bllname, dalname, GetFieldlist(), GetKeyFields(), namepace, namepace2, setting.DbHelperName); string strCode = s3.GetModelCode(); SettxtContent("CS", strCode); }
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, 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.GetDALFactoryCode(); SettxtContent("CS", strCode); }