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/Utility/StructStrHelper.cs | 30 +++++++++++++++++++++++++++--- 1 files changed, 27 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/Utility/StructStrHelper.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/StructStrHelper.cs" index 0235276..3cd0592 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/StructStrHelper.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/StructStrHelper.cs" @@ -243,7 +243,7 @@ case DataTypeEnum.dt_datetime: case DataTypeEnum.dt_datetime2: case DataTypeEnum.dt_datetimeoffset: - attrStr += " public datetime" + str_NullFlag + attr + " { get; set; }\n"; + attrStr += " public DateTime" + str_NullFlag + attr + " { get; set; }\n"; attrStr += "\n";//鏈�鍚庢槸鍔犱竴涓┖鏍� break; case DataTypeEnum.dt_bigint: @@ -304,6 +304,30 @@ string attrStr = ""; attrStr += $" updateObj.{attr} = input.{attr};\n"; + + + return attrStr; + } + catch (Exception ex) + { + throw ex; + } + + } + + public static string GenerateAttribute_AppService_ImportAsync(ColumnModel columnModel, GenerateCodeParam param) + { + try + { + /* + + MaterialCode = impItem.MaterialCode, + + */ + string attr = columnModel.ColumnName; + + string attrStr = ""; + attrStr += $"{attr} = impItem.{attr},\n"; return attrStr; @@ -540,7 +564,7 @@ case DataTypeEnum.dt_datetime: case DataTypeEnum.dt_datetime2: case DataTypeEnum.dt_datetimeoffset: - attrStr += " public datetime" + str_NullFlag + attr + " { get; set; }\n"; + attrStr += " public DateTime" + str_NullFlag + attr + " { get; set; }\n"; attrStr += "\n";//鏈�鍚庢槸鍔犱竴涓┖鏍� break; case DataTypeEnum.dt_bigint: @@ -2022,7 +2046,7 @@ sb.Append(" //disabled: disabled, \n"); sb.Append(" placeholder: '璇疯緭鍏�" + columnModel.Description + "', \n"); - + //娣诲姞绫诲瀷 //switch (enumDT) //{ -- Gitblit v1.9.3