public static ShareDataEntity GetSingleton() { if (_singleton == null) { _singleton = new ShareDataEntity(); } return(_singleton); }
/// <summary> /// 初始化数据实体 /// </summary> private void InitialEntity() { try { ShareDataEntity shareDataEntity = ShareDataEntity.GetSingleton(); shareDataEntity.UpdatePrintLogCollection(); shareDataEntity.UpdateMailSmtpCollection(); shareDataEntity.UpdateMailQueueCollection(); shareDataEntity.UpdateMailQueueReserverCollection(); shareDataEntity.GetMailQueueViewCollection(); } catch (Exception e) { System.Windows.Forms.MessageBox.Show("数据更新出现错误:" + e.Message); } }