/// <summary>
 /// 更新终端配置
 /// </summary>
 /// <returns></returns>
 public static string UpdateTeminalSetting(ClassModel.TerminalInfoV2 teminal)
 {
     IWCFService.ISeatManageService seatService = WcfAccessProxy.ServiceProxy.CreateChannelSeatManageService();
     try
     {
         return(seatService.UpdateTeminalInfo(teminal));
     }
     catch (Exception ex)
     {
         SeatManage.SeatManageComm.WriteLog.Write("更新配置失败:" + ex.Message);
         throw new Exception("更新终端设置失败:" + ex.Message);
     }
     finally
     {
         ICommunicationObject ICommObjectService = seatService as ICommunicationObject;
         try
         {
             if (ICommObjectService.State == CommunicationState.Faulted)
             {
                 ICommObjectService.Abort();
             }
             else
             {
                 ICommObjectService.Close();
             }
         }
         catch
         {
             ICommObjectService.Abort();
         }
     }
 }
コード例 #2
0
 /// <summary>
 /// 廷加终端配置
 /// </summary>
 /// <returns></returns>
 public static string AddTeminalInfo(ClassModel.TerminalInfoV2 teminal)
 {
     IWCFService.ISeatManageService seatService = new WcfServiceForSeatManage.SeatManageDateService();
     try
     {
         return(seatService.AddTeminalInfo(teminal));
     }
     catch (Exception ex)
     {
         SeatManage.SeatManageComm.WriteLog.Write("添加配置失败:" + ex.Message);
         throw new Exception("添加终端设置失败:" + ex.Message);
     }
 }