schangxiang@126.com
2025-05-09 6081db6f036f8ad77959e7b04cca54f7c9cc8a0d
Weben_CMSרÓôúÂëÉú³ÉÆ÷/Code/MainForm.cs
@@ -10,6 +10,8 @@
using GenerateCode_WeiBen_WMS.Model;
using GenerateCode_WeiBen_WMS.Utility;
using System.Xml;
using System.Linq;
using GenerateCode_GEBrilliantFactory.Model;
namespace GenerateCode_GEBrilliantFactory
{
@@ -165,7 +167,7 @@
                string entityName = this.tb_EntityName.Text.Trim();//实体类名
                string tableAlias = this.tb_EntityProName.Text.Trim();//实体类对象名/表别名
                string orderByName = this.tb_OrderBy.Text.Trim();//排序字段名称
                string routePrefix = this.tb_RoutePrefix.Text.Trim();//WCF路由前缀
                string _tb_VueRootFolerName = this.tb_VueRootFolerName.Text.Trim();//WCF路由前缀
                string connStr = this.lbl_DataSource.Text.Trim();//数据库连接字符串
                if (connStr == "")
                {
@@ -185,10 +187,10 @@
                    this.tb_Primary.Focus();
                    return;
                }
                if (routePrefix == "")
                if (_tb_VueRootFolerName == "")
                {
                    MessageBox.Show("请输入WCF路由前缀!");
                    this.tb_RoutePrefix.Focus();
                    MessageBox.Show("请输入 å‰ç«¯æ ¹æ–‡ä»¶å¤¹åç§°ï¼");
                    this.tb_VueRootFolerName.Focus();
                    return;
                }
                if (wcf_NameSpacePath == "")
@@ -204,6 +206,12 @@
                if (columnList.Count == 0)
                {
                    MessageBox.Show("没有获取到表下面的列集合!");
                    return;
                }
                //增加校验
                if (columnList.Where(x => x.ColumnName.ToUpper() == SystemCommonVar.c_creator.ToUpper()).Count() == 0)
                {
                    MessageBox.Show($"表中没有字段{SystemCommonVar.c_creator}!");
                    return;
                }
@@ -273,7 +281,8 @@
                //CreateModelFile(columnList, tableName, filePrefixName, wcf_NameSpacePath, createPerson, chinaComment, entityName, modulelogo);
                //CreateModelParamFile(columnList, tableName, filePrefixName, wcf_NameSpacePath, createPerson, chinaComment, entityName, modulelogo);
                genCodeRootPath = tbPath.Text + @"\" + tb_WCF_NameSpacePath.Text.Trim();
                var webFolerPath = (tb_WCF_NameSpacePath.Text.Trim() + "_Web").ToLower();
                //var webFolerPath = (tb_WCF_NameSpacePath.Text.Trim() + "_Web").ToLower();
                var webFolerPath = _tb_VueRootFolerName;
                #region å®žä½“ç±»
                var entityFilePath = genCodeRootPath + @"\server\src\CMS.Plugin." + tb_WCF_NameSpacePath.Text.Trim() + @".Application.Contracts\Dtos\" + tb_EntityName.Text.Trim();
                //1、生成 åˆ†é¡µæŸ¥è¯¢å®žä½“ æ–‡ä»¶
@@ -636,7 +645,7 @@
            tb_FileName.Enabled = false;
            tb_Modulelogo.Enabled = false;
            tb_WCF_NameSpacePath.Enabled = true;
            tb_RoutePrefix.Enabled = false;
            tb_VueRootFolerName.Enabled = false;
        }
        private void cmb_DataSource_SelectedIndexChanged(object sender, EventArgs e)
@@ -759,6 +768,9 @@
                            case "枚举类型字段集合":
                                entity.枚举类型字段集合 = propertyValue;
                                break;
                            case "前端根文件夹名称":
                                entity.前端根文件夹名称 = propertyValue;
                                break;
                        }
                    }
                }
@@ -793,6 +805,7 @@
                this.tb_EnumList.Text = entity.枚举类型字段集合;
                this.tb_ValidateRepeatName.Text = entity.重复性校验字段;
                this.tb_DeleteAlertAttr.Text = entity.删除提示字段;
                this.tb_VueRootFolerName.Text = entity.前端根文件夹名称;
            }
            catch (FileNotFoundException)