Example #1
0
 public List <ClassModel.StudyBookingLog> GetStudyLogList(AMS.Model.AMS_School school, string cardNo, int spanDay)
 {
     SeatManage.IPocketBespeakBllService.IPocketBespeakBllService pocketBespeak = BespeakServiceConnProxy.BespeakServiceConnProxy.CreateChannelPocketBespeakBllService(school.ConnectionString);
     try
     {
         return(pocketBespeak.GetStudyLogList(cardNo, spanDay));
     }
     catch (Exception ex)
     {
         throw new RemoteServiceLinkFailed(ex.Message);
     }
     finally
     {
         ICommunicationObject ICommObjectService = pocketBespeak as ICommunicationObject;
         try
         {
             if (ICommObjectService.State == CommunicationState.Faulted)
             {
                 ICommObjectService.Abort();
             }
             else
             {
                 ICommObjectService.Close();
             }
         }
         catch
         {
             ICommObjectService.Abort();
         }
     }
 }