From bdfba21ce793f0d197e6deeea85e59de8d9d33ff Mon Sep 17 00:00:00 2001
From: schangxiang@126.com <schangxiang@126.com>
Date: 周二, 06 5月 2025 15:30:02 +0800
Subject: [PATCH] 222

---
 Weben_CMS专用代码生成器/Code/MainForm.cs                               |   11 ++++++++++-
 Weben_CMS专用代码生成器/Code/Model/GenerateCodeParam.cs                |    5 +++++
 Weben_CMS专用代码生成器/Code/Templete/Web/Controllers/EntityMode模板.txt |    4 ++--
 Weben_CMS专用代码生成器/Code/MainForm.Designer.cs                      |   22 ++++++++++++++++++++++
 Weben_CMS专用代码生成器/Code/Utility/CommonHelper.cs                   |    1 +
 5 files changed, 40 insertions(+), 3 deletions(-)

diff --git "a/Weben_CMS\344\270\223\347\224\250\344\273\243\347\240\201\347\224\237\346\210\220\345\231\250/Code/MainForm.Designer.cs" "b/Weben_CMS\344\270\223\347\224\250\344\273\243\347\240\201\347\224\237\346\210\220\345\231\250/Code/MainForm.Designer.cs"
index 5bdc754..947aa60 100644
--- "a/Weben_CMS\344\270\223\347\224\250\344\273\243\347\240\201\347\224\237\346\210\220\345\231\250/Code/MainForm.Designer.cs"
+++ "b/Weben_CMS\344\270\223\347\224\250\344\273\243\347\240\201\347\224\237\346\210\220\345\231\250/Code/MainForm.Designer.cs"
@@ -87,6 +87,8 @@
             this.label12 = new System.Windows.Forms.Label();
             this.tb_templeteFileDownName = new System.Windows.Forms.TextBox();
             this.label14 = new System.Windows.Forms.Label();
+            this.label25 = new System.Windows.Forms.Label();
+            this.tb_DeleteAlertAttr = new System.Windows.Forms.TextBox();
             this.groupBox1.SuspendLayout();
             this.groupBox2.SuspendLayout();
             this.groupBox3.SuspendLayout();
@@ -400,6 +402,8 @@
             // 
             // groupBox2
             // 
+            this.groupBox2.Controls.Add(this.tb_DeleteAlertAttr);
+            this.groupBox2.Controls.Add(this.label25);
             this.groupBox2.Controls.Add(this.tb_ValidateRepeatName);
             this.groupBox2.Controls.Add(this.label24);
             this.groupBox2.Controls.Add(this.tb_LikeQueryAttrsName);
@@ -650,6 +654,22 @@
             this.label14.TabIndex = 47;
             this.label14.Text = "鏂囦欢涓嬭浇鍚嶅瓧:";
             // 
+            // label25
+            // 
+            this.label25.AutoSize = true;
+            this.label25.Location = new System.Drawing.Point(452, 255);
+            this.label25.Name = "label25";
+            this.label25.Size = new System.Drawing.Size(83, 12);
+            this.label25.TabIndex = 64;
+            this.label25.Text = "鍒犻櫎鎻愮ず瀛楁:";
+            // 
+            // tb_DeleteAlertAttr
+            // 
+            this.tb_DeleteAlertAttr.Location = new System.Drawing.Point(553, 246);
+            this.tb_DeleteAlertAttr.Name = "tb_DeleteAlertAttr";
+            this.tb_DeleteAlertAttr.Size = new System.Drawing.Size(145, 21);
+            this.tb_DeleteAlertAttr.TabIndex = 65;
+            // 
             // MainForm
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
@@ -738,6 +758,8 @@
         private System.Windows.Forms.TextBox tb_LikeQueryAttrsName;
         private System.Windows.Forms.TextBox tb_ValidateRepeatName;
         private System.Windows.Forms.Label label24;
+        private System.Windows.Forms.TextBox tb_DeleteAlertAttr;
+        private System.Windows.Forms.Label label25;
     }
 }
 
diff --git "a/Weben_CMS\344\270\223\347\224\250\344\273\243\347\240\201\347\224\237\346\210\220\345\231\250/Code/MainForm.cs" "b/Weben_CMS\344\270\223\347\224\250\344\273\243\347\240\201\347\224\237\346\210\220\345\231\250/Code/MainForm.cs"
index 2d302f7..8821053 100644
--- "a/Weben_CMS\344\270\223\347\224\250\344\273\243\347\240\201\347\224\237\346\210\220\345\231\250/Code/MainForm.cs"
+++ "b/Weben_CMS\344\270\223\347\224\250\344\273\243\347\240\201\347\224\237\346\210\220\345\231\250/Code/MainForm.cs"
@@ -105,6 +105,14 @@
                 string modulelogo = this.tb_Modulelogo.Text.Trim();//妯″潡绠�鍐�
 
 
+                string _tb_DeleteAlertAttr = this.tb_DeleteAlertAttr.Text.Trim();//涓枃娉ㄩ噴
+                if (_tb_DeleteAlertAttr == "")
+                {
+                    MessageBox.Show("璇疯緭鍏� 鍒犻櫎鎻愮ず瀛楁锛�");
+                    this.tb_DeleteAlertAttr.Focus();
+                    return;
+                }
+
                 string _tb_ValidateRepeatName = this.tb_ValidateRepeatName.Text.Trim();//涓枃娉ㄩ噴
                 if (_tb_ValidateRepeatName == "")
                 {
@@ -210,6 +218,7 @@
 
                 GenerateCodeParam param = new GenerateCodeParam()
                 {
+                    DeleteAlertAttr = CommonHelper.FirstLowercase(_tb_DeleteAlertAttr),
                     Modulelogo = modulelogo,
                     ChinaComment = chinaComment,
                     PageMenuName = menuName,
@@ -447,7 +456,7 @@
                 str_generate = AutoMapperProfile_Generate.CreateText(param);
                 tf = TextHelper.Export2File_V2(autoMapFilePath, param.EntityName + $"AutoMapperProfile.cs", tableName, str_generate, FileType.InputModel, filePrefixName, entityName, modulelogo);
 
-                
+
 
                 ////鐢熸垚 OutputModel 鏂囦欢
                 //str_generate = OutputModel_Generate.CreateQueryModelLText(modulelogo, chinaComment, columnList, entityName);
diff --git "a/Weben_CMS\344\270\223\347\224\250\344\273\243\347\240\201\347\224\237\346\210\220\345\231\250/Code/Model/GenerateCodeParam.cs" "b/Weben_CMS\344\270\223\347\224\250\344\273\243\347\240\201\347\224\237\346\210\220\345\231\250/Code/Model/GenerateCodeParam.cs"
index 736f45d..6ac8c62 100644
--- "a/Weben_CMS\344\270\223\347\224\250\344\273\243\347\240\201\347\224\237\346\210\220\345\231\250/Code/Model/GenerateCodeParam.cs"
+++ "b/Weben_CMS\344\270\223\347\224\250\344\273\243\347\240\201\347\224\237\346\210\220\345\231\250/Code/Model/GenerateCodeParam.cs"
@@ -13,6 +13,11 @@
     public class GenerateCodeParam
     {
         /// <summary>
+        /// 鍒犻櫎鎻愮ず瀛楁
+        /// </summary>
+        public string DeleteAlertAttr { get; set; }
+
+        /// <summary>
         /// 妯″潡绠�鍐�
         /// </summary>
         public string Modulelogo { get; set; }
diff --git "a/Weben_CMS\344\270\223\347\224\250\344\273\243\347\240\201\347\224\237\346\210\220\345\231\250/Code/Templete/Web/Controllers/EntityMode\346\250\241\346\235\277.txt" "b/Weben_CMS\344\270\223\347\224\250\344\273\243\347\240\201\347\224\237\346\210\220\345\231\250/Code/Templete/Web/Controllers/EntityMode\346\250\241\346\235\277.txt"
index e555b58..0acb24f 100644
--- "a/Weben_CMS\344\270\223\347\224\250\344\273\243\347\240\201\347\224\237\346\210\220\345\231\250/Code/Templete/Web/Controllers/EntityMode\346\250\241\346\235\277.txt"
+++ "b/Weben_CMS\344\270\223\347\224\250\344\273\243\347\240\201\347\224\237\346\210\220\345\231\250/Code/Templete/Web/Controllers/EntityMode\346\250\241\346\235\277.txt"
@@ -128,9 +128,9 @@
     {
       label: '删除',
       fn: async (c: CurrentType) => {
-        const names = selection.value.map((item: { name: string }) => item.name)
+        const names = selection.value.map((item: { $DeleteAlertAttr$: string }) => item.$DeleteAlertAttr$)
         ConfirmBox(
-          `是否删除${names.length ? names.join(',') : c.row.name}`
+          `是否删除${names.length ? names.join(',') : c.row.$DeleteAlertAttr$}`
         ).then(async () => {
           const ids = selection.value.map((item: { id: string }) => item.id)
           await $PageMenuInstanceName$.delete$EntityName$s(ids.length ? ids : [c.row.id])
diff --git "a/Weben_CMS\344\270\223\347\224\250\344\273\243\347\240\201\347\224\237\346\210\220\345\231\250/Code/Utility/CommonHelper.cs" "b/Weben_CMS\344\270\223\347\224\250\344\273\243\347\240\201\347\224\237\346\210\220\345\231\250/Code/Utility/CommonHelper.cs"
index f190bff..090191f 100644
--- "a/Weben_CMS\344\270\223\347\224\250\344\273\243\347\240\201\347\224\237\346\210\220\345\231\250/Code/Utility/CommonHelper.cs"
+++ "b/Weben_CMS\344\270\223\347\224\250\344\273\243\347\240\201\347\224\237\346\210\220\345\231\250/Code/Utility/CommonHelper.cs"
@@ -50,6 +50,7 @@
             str = str.Replace("$LikeQueryAttrs$", param.LikeQueryAttrs);
             str = str.Replace("$LikeQueryAttrsName$", param.LikeQueryAttrsName);
             str = str.Replace("$ValidateRepeatName$", param.ValidateRepeatName);
+            str = str.Replace("$DeleteAlertAttr$", param.DeleteAlertAttr);
 
         }
 

--
Gitblit v1.9.3