using Dao; using System.Reflection; public abstract class Const { private static GwSetting _CurrentSetting; private static string _MachineID; public static GwSetting CurrentSetting { get { if (Const._CurrentSetting == null) { using (GwSettingDao gwSettingDao = new GwSettingDao()) Const._CurrentSetting = gwSettingDao.GetCurrentSetting(); } return Const._CurrentSetting; } } public static string Version { get { return "数据库版本:" + Const.CurrentSetting.Version + " 管理平台版本:" + Assembly.GetAssembly(typeof (UserDao)).GetName().Version.ToString(); } } public static string Title { get { return Const.CurrentSetting.GwName; } } }