Ejemplo n.º 1
0
        public WebsiteMonitoringResult GetWebsiteMonitoring(int websiteMonitoringID)
        {
            try
            {
                BSL.WebsiteMonitoringService service = new BSL.WebsiteMonitoringService();
                var rms = service.GetWebsiteMonitoring(websiteMonitoringID);

                var sr = new WebsiteMonitoringResult
                {
                    IsSuccess             = true,
                    WebsiteMonitoringInfo = rms,
                };
                return(sr);
            }
            catch (Exception ex)
            {
                new RMSWebException(this, "0500", "GetWebsiteMonitoring failed. " + ex.Message, ex, true);

                var sr = new WebsiteMonitoringResult
                {
                    IsSuccess    = false,
                    ErrorMessage = "GetWebsiteMonitoring failed. " + ex.Message
                };
                return(sr);
            }
        }
Ejemplo n.º 2
0
        public WebsiteMonitoringResult ListWebsiteMonitoringsByClient(JQueryDataTableParamModel param, int clientID)
        {
            try
            {
                int totalRecord;

                BSL.WebsiteMonitoringService service = new BSL.WebsiteMonitoringService();
                var infos = service.ListWebsiteMonitoringsByClient(clientID);

                var sr = new WebsiteMonitoringResult
                {
                    IsSuccess = true,
                    ListWebsiteMonitoringInfos = infos,
                    TotalRecords = infos.Count
                };
                return(sr);
            }
            catch (Exception ex)
            {
                new RMSWebException(this, "0500", "ListWebsiteMonitoringsByClient failed. " + ex.Message, ex, true);

                var sr = new WebsiteMonitoringResult
                {
                    IsSuccess    = false,
                    ErrorMessage = "ListWebsiteMonitoringsByClient failed. " + ex.Message
                };
                return(sr);
            }
        }