From f12cbfe9cba26c1a0e3abf1fe09a3c9cd9586a81 Mon Sep 17 00:00:00 2001 From: schangxiang@126.com <schangxiang@126.com> Date: 周日, 11 5月 2025 11:59:39 +0800 Subject: [PATCH] 优化 代码生成器 --- Weben_CMS专用代码生成器/Code/MainForm.cs | 14 +++++++------- 1 files changed, 7 insertions(+), 7 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.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 6311a10..6e9bc75 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" @@ -43,7 +43,7 @@ this.tb_LikeQueryAttrsName.Text = "璇疯緭鍏ョ墿鏂欑紪鐮�/鐗╂枡鍚嶇О/澶囨敞"; //this.tb_EntityProName.Text = "wmsMaterial";//瀹炰綋绫诲璞″悕 - this.tb_EnumList.Text = "PurchaseType|PurchaseTypeEnum|PurchaseTypeDesc,MaterialType|MaterialTypeEnum|MaterialTypeDesc,IsMainBranch|YesNoEnum|IsMainBranchDesc"; + this.tb_EnumList.Text = "PurchaseType,PurchaseTypeEnum&MaterialType,MaterialTypeEnum&IsMainBranch,YesNoEnum"; this.cmb_DataSource.DropDownStyle = ComboBoxStyle.DropDownList; List<ListItem> itemList = CommonHelper.GetDataSources(); @@ -246,20 +246,20 @@ //澶勭悊鏋氫妇绫诲瀷 List<EnumModel> enumList = new List<EnumModel>(); var str_enumList = this.tb_EnumList.Text.Trim(); - if (str_enumList.IndexOf(',') > -1) + if (str_enumList.IndexOf('&') > -1) { str_enumList = str_enumList.Replace("\n", ""); str_enumList = str_enumList.Replace("\t", ""); str_enumList = str_enumList.Replace("\r", ""); - var arr_enumList = str_enumList.Split(','); + var arr_enumList = str_enumList.Split('&'); foreach (var item in arr_enumList) { - var arr_single = item.Split('|'); + var arr_single = item.Split(','); enumList.Add(new EnumModel() { EnumAttrName = arr_single[0], EnumType = arr_single[1], - EnumTypeDesc = arr_single[2] + EnumTypeDesc = arr_single[0] + SystemConst.enumDescName }); } } @@ -267,12 +267,12 @@ { if (!string.IsNullOrEmpty(str_enumList)) { - var arr_single = str_enumList.Split('|'); + var arr_single = str_enumList.Split(','); enumList.Add(new EnumModel() { EnumAttrName = arr_single[0], EnumType = arr_single[1], - EnumTypeDesc = arr_single[2] + EnumTypeDesc = arr_single[0] + SystemConst.enumDescName }); } } -- Gitblit v1.9.3