예제 #1
0
 public static ShareDataEntity GetSingleton()
 {
     if (_singleton == null)
     {
         _singleton = new ShareDataEntity();
     }
     return(_singleton);
 }
예제 #2
0
 /// <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);
     }
 }