lg
2024-09-17 ae27635bd92120d0dd975d8480c344162610219a
DevApp/Gs.DevApp/ToolBox/UtilityHelper.cs
@@ -15,6 +15,7 @@
using DevExpress.XtraEditors;
using DevExpress.XtraTab;
using System.Text.RegularExpressions;
using System.Xml;
namespace Gs.DevApp.ToolBox
{
@@ -423,7 +424,20 @@
            string dd = Regex.Replace(propertyName, @"_([a-z])", m => m.Groups[1].Value.ToUpper());
            return dd;
        }
        public static void UpdateAppConfig(string key, string newValue)
        {
            string configFile = AppDomain.CurrentDomain.SetupInformation.ConfigurationFile;
            XmlDocument xmlDoc = new XmlDocument();
            xmlDoc.Load(configFile);
            XmlNode node = xmlDoc.SelectSingleNode($"//appSettings//add[@key='{key}']");
            if (node != null)
            {
                XmlAttribute attribute = node as XmlAttribute;
                attribute.Value = newValue;
                xmlDoc.Save(configFile);
            }
        }
        public class CboItemEntity
        {
            private object _text = 0;