lg
2024-09-14 3d4963776d819b9c8de199b88fe624483f8f566d
DevApp/Gs.DevApp/ToolBox/UtilityHelper.cs
@@ -220,7 +220,7 @@
                            if (txt != null)
                            {
                                txt.EditValue = strVal;
                               // txt.Text = strVal;
                                // txt.Text = strVal;
                            }
                            txt.Enabled = isEdt;
                            continue;
@@ -416,20 +416,39 @@
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        public static string ToCamelCase(string input)
        public static string ToCamelCase(string propertyName)
        {
            if (string.IsNullOrEmpty(input))
                return input;
            // 匹配非字母数字字符后的第一个字母,并将其转换为大写
            return Regex.Replace(
                input,
                "([a-z])([A-Z])",
                "$1$2",
                RegexOptions.CultureInvariant
            ).Trim();
            if (propertyName.Length > 0 && propertyName.All(char.IsUpper))
                propertyName = propertyName.ToLower();
            string dd = Regex.Replace(propertyName, @"_([a-z])", m => m.Groups[1].Value.ToUpper());
            return dd;
        }
        public class CboItemEntity
        {
            private object _text = 0;
            private object _Value = "";
            /// <summary>
            /// 显示值
            /// </summary>
            public object Text
            {
                get { return this._text; }
                set { this._text = value; }
            }
            /// <summary>
            /// 对象值
            /// </summary>
            public object Value
            {
                get { return this._Value; }
                set { this._Value = value; }
            }
            public override string ToString()
            {
                return this.Text.ToString();
            }
        }
    }
}