Exemplo n.º 1
0
        public MonitoringProfileResult Get(int monitoringProfileID)
        {
            try
            {
                BSL.MonitoringProfileService service = new BSL.MonitoringProfileService();
                var monitoringProfile = service.Get(monitoringProfileID);

                var sr = new MonitoringProfileResult
                {
                    IsSuccess         = true,
                    MonitoringProfile = monitoringProfile,
                };
                return(sr);
            }
            catch (Exception ex)
            {
                new RMSWebException(this, "0500", "Get failed. " + ex.Message, ex, true);

                var sr = new MonitoringProfileResult
                {
                    IsSuccess    = false,
                    ErrorMessage = "Get errors. " + ex.Message
                };
                return(sr);
            }
        }
Exemplo n.º 2
0
        public MonitoringProfileResult Search(JQueryDataTableParamModel param, string name, bool?activeList)
        {
            try
            {
                int totalRecord;
                BSL.MonitoringProfileService service = new BSL.MonitoringProfileService();
                List <MonitoringProfileInfo> monitoringProfileInfos = service.Search(param, name, activeList, out totalRecord);

                var sr = new MonitoringProfileResult
                {
                    IsSuccess = true,
                    ListMonitoringProfileInfo = monitoringProfileInfos,
                    TotalRecords = totalRecord
                };

                return(sr);
            }
            catch (Exception ex)
            {
                new RMSWebException(this, "0500", "Search failed. " + ex.Message, ex, true);

                var sr = new MonitoringProfileResult
                {
                    IsSuccess    = false,
                    ErrorMessage = "Search errors. " + ex.Message
                };
                return(sr);
            }
        }
Exemplo n.º 3
0
        public MonitoringProfileResult List(bool?activeList)
        {
            try
            {
                BSL.MonitoringProfileService service = new BSL.MonitoringProfileService();
                var monitoringProfiles = service.List(activeList);

                var sr = new MonitoringProfileResult
                {
                    IsSuccess = true,
                    ListMonitoringProfiles = monitoringProfiles,
                };
                return(sr);
            }
            catch (Exception ex)
            {
                new RMSWebException(this, "0500", "List failed. " + ex.Message, ex, true);

                var sr = new MonitoringProfileResult
                {
                    IsSuccess    = false,
                    ErrorMessage = "List errors. " + ex.Message
                };
                return(sr);
            }
        }