private void btn_Refresh_Click(object sender, EventArgs e)
 {
     try
     {
         CounterBLL.CenterTestConnection();
         InitCounterList();
     }
     catch (Exception ex)
     {
         string      errCode   = "GL-3006";
         string      errMsg    = "刷新柜台连接状态失败!";
         VTException exception = new VTException(errCode, errMsg, ex);
         LogHelper.WriteError(exception.ToString(), exception.InnerException);
     }
 }
Esempio n. 2
0
 /// <summary>
 /// 测试柜台服务和撮合服务连接状态
 /// </summary>
 private static void TestConnState()
 {
     while (true)
     {
         int timegap = 0;
         try
         {
             ManagementCenter.BLL.CT_CounterBLL CounterBLL = new CT_CounterBLL();
             CounterBLL.CenterTestConnection();
             ManagementCenter.BLL.RC_MatchCenterBLL MatchCenterBLL = new RC_MatchCenterBLL();
             MatchCenterBLL.CenterTestConnection();
             if (!int.TryParse(System.Configuration.ConfigurationManager.AppSettings["TestConnGapTime"].ToString(),
                               out timegap))
             {
                 timegap = 600000;
             }
         }
         catch (Exception ex)
         {
             LogHelper.WriteError("测试柜台和撮合服务是否连接的方法失败", ex.InnerException);
         }
         Thread.Sleep(timegap);
     }
 }