Example #1
0
        public FIS2GoResponseObject <IncidentRankContainer> FetchTopFaults(FIS2GoCommonParameter p)
        {
            FIS2GoResponseObject <IncidentRankContainer> response = new FIS2GoResponseObject <IncidentRankContainer>();

            response.Params = p;
            try
            {
                List <FIS2GoManagedException> lst_ex;
                IncidentRankContainer         ret_cont = ReportDatasetRepository.GetIncidentsUnified(p, out lst_ex);
                FISLogging.Log("[200-OK] " + p.ToParameterLogString());
                response.Was_Successful = true;
                response.Value          = ret_cont;
                lst_ex.ForEach(x => response.lst_ex.Add(x.GetSerializable()));
            }
            catch (FIS2GoManagedException mex)
            {
                FISLogging.LogException(mex, p);
                response.Was_Successful = false;
                mex.context             = p;
                response.AddException(mex);
            }
            catch (Exception ex)
            {
                FISLogging.LogException(ex, p);
                response.Was_Successful = false;
                response.AddException(new FIS2GoManagedException(ex.Message, false, p));
            }
            return(response);
        }
Example #2
0
        public FIS2GoResponseObject <DataBinGroup> FetchCycleTimeBins_Dev(FIS2GoCommonParameter p)
        {
            FIS2GoResponseObject <DataBinGroup> response = new FIS2GoResponseObject <DataBinGroup>();

            response.Params = p;
            try
            {
                DataBinGroup retval = ReportDatasetRepository.GetCycleTimeByBinning(p);
                FISLogging.Log("[200-OK] " + p.ToParameterLogString());
                response.Was_Successful = true;
                response.Value          = retval;
            }
            catch (FIS2GoManagedException mex)
            {
                FISLogging.LogException(mex, p);
                response.Was_Successful = false;
                mex.context             = p;
                response.AddException(mex);
            }
            catch (Exception ex)
            {
                FISLogging.LogException(ex, p);
                response.Was_Successful = false;
                response.AddException(new FIS2GoManagedException(ex.Message, false, p));
            }
            return(response);
        }
Example #3
0
        public FIS2GoResponseObject <List <RateOfClimbRecord> > FetchRateOfClimbData(FIS2GoCommonParameter p)
        {
            FIS2GoResponseObject <List <RateOfClimbRecord> > response = new FIS2GoResponseObject <List <RateOfClimbRecord> >();

            response.Params = p;
            try
            {
                List <RateOfClimbRecord> retval = ReportDatasetRepository.GetRateOfClimb(p);
                FISLogging.Log("[200-OK] " + p.ToParameterLogString());
                response.Was_Successful = true;
                response.Value          = retval;
            }
            catch (FIS2GoManagedException mex)
            {
                FISLogging.LogException(mex, p);
                response.Was_Successful = false;
                mex.context             = p;
                response.AddException(mex);
            }
            catch (Exception ex)
            {
                FISLogging.LogException(ex, p);
                response.Was_Successful = false;
                response.AddException(new FIS2GoManagedException(ex.Message, false, p));
            }
            return(response);
        }
Example #4
0
        public FIS2GoResponseObject <List <List <OvercycleReport> > > FetchOvercyclePercentRanks(FIS2GoCommonParameter p)
        {
            FIS2GoResponseObject <List <List <OvercycleReport> > > response = new FIS2GoResponseObject <List <List <OvercycleReport> > >();

            response.Params = p;
            try
            {
                List <FIS2GoManagedException>  lst_ex;
                List <List <OvercycleReport> > ret_lst = ReportDatasetRepository.GetTopOvercycle_Flex(p, out lst_ex);
                FISLogging.Log("[200-OK] " + p.ToParameterLogString());
                response.Value          = ret_lst;
                response.Was_Successful = true;
                lst_ex.ForEach(x => response.lst_ex.Add(x.GetSerializable()));
            }
            catch (FIS2GoManagedException mex)
            {
                FISLogging.LogException(mex, p);
                response.Was_Successful = false;
                mex.context             = p;
                response.AddException(mex);
            }
            catch (Exception ex)
            {
                FISLogging.LogException(ex, p);
                response.Was_Successful = false;
                response.AddException(new FIS2GoManagedException(ex.Message, false, p));
            }
            return(response);
        }
Example #5
0
        public FIS2GoResponseObject <FISNodeMetric> FetchAvailability(FIS2GoCommonParameter p)
        {
            FIS2GoResponseObject <FISNodeMetric> response = new FIS2GoResponseObject <FISNodeMetric>();

            response.Params = p;
            try
            {
                FISNodeMetric metric = new FISNodeMetric(p.SiteID, p.AREA_SAKEY, p.NodeID);
                if (p.Period == "CSPS")
                {
                    p.Period = "CS";
                    metric.FetchAvailability(p);
                    p.Period = "PS";
                    metric.FetchAvailability(p);
                }
                else
                {
                    metric.FetchAvailability(p);
                }

                FISLogging.Log("[200-OK] " + p.ToParameterLogString());

                response.Value          = metric;
                response.Was_Successful = true;
            }
            catch (FIS2GoManagedException mex)
            {
                FISLogging.LogException(mex, p);
                response.Was_Successful = false;
                mex.context             = p;
                response.AddException(mex);
            }
            catch (Exception ex)
            {
                FISLogging.LogException(ex, p);
                response.Was_Successful = false;
                response.AddException(new FIS2GoManagedException(ex.Message, false, p));
            }
            return(response);
        }