public ClientMonitoringResult Get(int clientID, int monitoringProfileID) { try { BSL.ClientMonitoringService service = new BSL.ClientMonitoringService(); var monitoring = service.Get(clientID, monitoringProfileID); var sr = new ClientMonitoringResult { IsSuccess = true, MonitoringProfileInfo = monitoring, }; return(sr); } catch (Exception ex) { new RMSWebException(this, "0500", "Get failed. " + ex.Message, ex, true); var sr = new ClientMonitoringResult { IsSuccess = false, ErrorMessage = "Get errors. " + ex.Message }; return(sr); } }
public ClientMonitoringResult ListByClient(int clientID) { try { BSL.ClientMonitoringService service = new BSL.ClientMonitoringService(); var lists = service.ListByClient(clientID); var sr = new ClientMonitoringResult { IsSuccess = true, ListMonitoringProfileInfos = lists, TotalRecords = lists.Count }; return(sr); } catch (Exception ex) { new RMSWebException(this, "0500", "ListByClient (" + clientID + ") failed. " + ex.Message, ex, true); var sr = new ClientMonitoringResult { IsSuccess = false, ErrorMessage = "List errors. " + ex.Message }; return(sr); } }