Exemple #1
0
        // GET: /Monitoring/WebsiteMonitoring/List/
        public ActionResult List(JQueryDataTableParamModel param, int?clientID)
        {
            try
            {
                if (clientID == null)
                {
                    throw new ArgumentNullException("ClientID");
                }

                var clientService = new RMS.Centralize.WebSite.Proxy.ClientService().clientService;

                var clientResult = clientService.GetClient(GetClientBy.ClientID, clientID, null, null, false, false);

                if (clientResult == null || clientResult.Client == null)
                {
                    throw new ArgumentException("ClientID (" + clientID.Value + ") not found.");
                }

                var service = new WebsiteMonitoringService().websiteMonitoringService;

                var result = service.ListWebsiteMonitoringsByClient(param, clientID.Value);

                var ret = new
                {
                    sEcho                = param.sEcho,
                    iTotalRecords        = result.TotalRecords,
                    iTotalDisplayRecords = result.TotalRecords,
                    aaData               = result.ListWebsiteMonitoringInfos.OrderBy(o => o.WebsiteMonitoringTypeId).ThenBy(o => o.WebsiteMonitoringProtocolId),
                    status               = (result.IsSuccess) ? 1 : 0,
                    error                = result.ErrorMessage
                };

                return(Json(ret));
            }
            catch (Exception ex)
            {
                var ret = new
                {
                    status = -1,
                    error  = ex.Message
                };
                new RMSWebException(this, "0500", "List failed. " + ex.Message, ex, true);

                return(Json(ret));
            }
        }
Exemple #2
0
 public System.Threading.Tasks.Task <RMS.Centralize.WebSite.Proxy.WebsiteMonitoringProxy.WebsiteMonitoringResult> ListWebsiteMonitoringsByClientAsync(RMS.Centralize.WebSite.Proxy.WebsiteMonitoringProxy.JQueryDataTableParamModel param, int clientID)
 {
     return(base.Channel.ListWebsiteMonitoringsByClientAsync(param, clientID));
 }
Exemple #3
0
 public RMS.Centralize.WebSite.Proxy.WebsiteMonitoringProxy.WebsiteMonitoringResult ListWebsiteMonitoringsByClient(RMS.Centralize.WebSite.Proxy.WebsiteMonitoringProxy.JQueryDataTableParamModel param, int clientID)
 {
     return(base.Channel.ListWebsiteMonitoringsByClient(param, clientID));
 }