Example #1
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 #2
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 #3
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 #4
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 #5
0
 public string GetBookmark(String base_url, String page, ClientSelections selections)
 {
     try
     {
         try
         {
             if (WebConfigurationManager.AppSettings["XFordMapping_Enabled"].ToString() == "1" || WebConfigurationManager.AppSettings["XFordMapping_Enabled"].ToString().ToUpper() == "TRUE")
             {
                 base_url = base_url.Replace(WebConfigurationManager.AppSettings["XFordMapping_Key"].ToString(), WebConfigurationManager.AppSettings["XFordMapping_Value"].ToString());
             }
         }
         catch (Exception e)
         {
         }
         FISBookmark b = new FISBookmark(selections);
         //return base_url + "?b=" + b.GetBookmark();
         return(base_url + "wsl/WSLHandler.aspx?page=" + page + "&data=" + b.GetBookmark() + "&ts=" + DateTime.Now.Second);
     }
     catch (Exception ex)
     {
         FISLogging.Log("[E] Exception Encountered: " + ex.Message);
         FISLogging.Log("[E-P] Params: selections = " + selections.ToString());
         FISLogging.Log("[E-ST] " + ex.StackTrace);
         HttpContext.Current.Response.StatusCode = 500;
         throw ex;
     }
 }
Example #6
0
 public static void LogException(Exception ex, FIS2GoCommonParameter p)
 {
     FISLogging.Log("[E] Exception Encountered: " + ex.Message);
     FISLogging.Log("[E-P] " + p.ToParameterLogString());
     FISLogging.Log("[E-ST] " + ex.StackTrace);
     HttpContext.Current.Response.StatusCode = 500;
 }
Example #7
0
 public FISNode FetchNodeDetails(FIS2GoCommonParameter p)
 {
     try
     {
         FISNode retval = FISNodeRepository.GetNode(p.SuperPath); // .GetArea(SiteID, AREA_SAKEY);
         FISLogging.Log("[200-OK] " + p.ToParameterLogString());
         return(retval);
     }
     catch (Exception ex)
     {
         FISLogging.Log("[E] Exception Encountered: " + ex.Message);
         FISLogging.Log("[E-P] " + p.ToParameterLogString());
         FISLogging.Log("[E-ST] " + ex.StackTrace);
         HttpContext.Current.Response.StatusCode = 500;
         throw ex;
     }
 }
Example #8
0
 public Area FetchAreaDetails(string SiteID, string AREA_SAKEY)
 {
     try
     {
         Area retval = AreaRepository.GetArea(SiteID, AREA_SAKEY);
         FISLogging.Log("[200-OK] Params: SiteID = " + SiteID + ", AREASAKEY = " + AREA_SAKEY);
         return(retval);
     }
     catch (Exception ex)
     {
         FISLogging.Log("[E] Exception Encountered: " + ex.Message);
         FISLogging.Log("[E-P] Params: SiteID = " + SiteID + ", AREASAKEY = " + AREA_SAKEY);
         FISLogging.Log("[E-ST] " + ex.StackTrace);
         HttpContext.Current.Response.StatusCode = 500;
         throw ex;
     }
 }
Example #9
0
 public String GetODBServer(string SiteID)
 {
     try
     {
         String retval = AreaRepository.GetODBServer(SiteID);
         FISLogging.Log("[200-OK] Params: SiteID = " + SiteID);
         return(retval);
     }
     catch (Exception ex)
     {
         FISLogging.Log("[E] Exception Encountered: " + ex.Message);
         FISLogging.Log("[E-P] Params: SiteID = " + SiteID);
         FISLogging.Log("[E-ST] " + ex.StackTrace);
         HttpContext.Current.Response.StatusCode = 500;
         throw ex;
     }
 }
Example #10
0
 public List <String> FetchGroupChildNodeID(string SiteID, string AREA_SAKEY, string GroupID)
 {
     try
     {
         List <String> retval = FISNodeRepository.GetNodeIDChildren(AreaRepository.GetODBServer(SiteID), AREA_SAKEY, GroupID);
         FISLogging.Log("[200-OK] Params: SiteID = " + SiteID + ", AREASAKEY = " + AREA_SAKEY + ", GroupID = " + GroupID);
         return(retval);
     }
     catch (Exception ex)
     {
         FISLogging.Log("[E] Exception Encountered: " + ex.Message);
         FISLogging.Log("[E-P] Params: SiteID = " + SiteID + ", AREASAKEY = " + AREA_SAKEY + ", GroupID = " + GroupID);
         FISLogging.Log("[E-ST] " + ex.StackTrace);
         HttpContext.Current.Response.StatusCode = 500;
         throw ex;
     }
 }
Example #11
0
 public ClientSelections LoadBookmark(String data)
 {
     try
     {
         FISBookmark b = new FISBookmark(null);
         b.LoadBookmark(data);
         b.selections.lst_strSelectedNodeSuperPaths = b.selections.lst_strSelectedNodeSuperPaths.Distinct().ToList();
         return(b.selections);
     }
     catch (Exception ex)
     {
         FISLogging.Log("[E] Exception Encountered: " + ex.Message);
         FISLogging.Log("[E-P] Params: data = " + data);
         FISLogging.Log("[E-ST] " + ex.StackTrace);
         HttpContext.Current.Response.StatusCode = 500;
         throw ex;
     }
 }
Example #12
0
        public List <Plant> FetchFordTree()
        {
            try
            {
                List <Plant> ret = PlantRepository.GetPlants(true);
                FISLogging.Log("[200-OK] Params: ");

                return(ret);
            }
            catch (Exception ex)
            {
                FISLogging.Log("[E] Exception Encountered: " + ex.Message);
                FISLogging.Log("[E-P] Params: ");
                FISLogging.Log("[E-ST] " + ex.StackTrace);
                HttpContext.Current.Response.StatusCode = 500;
                throw ex;
            }
        }
Example #13
0
 public ClientSelections BookmarkOnDemand(String type, List <String> payload)
 {
     try
     {
         ClientSelections c = new ClientSelections();
         foreach (String arg in payload)
         {
             c.lst_strSelectedNodeSuperPaths.AddRange(FISBookmark.ParseOnDemandBookmark(type, arg));
         }
         c.lst_strSelectedNodeSuperPaths = c.lst_strSelectedNodeSuperPaths.Distinct().ToList();
         return(c);
     }
     catch (Exception ex)
     {
         FISLogging.Log("[E] Exception Encountered: " + ex.Message);
         FISLogging.Log("[E-P] Params: Type = " + type + ", Payload: " + String.Join("//", payload));
         FISLogging.Log("[E-ST] " + ex.StackTrace);
         HttpContext.Current.Response.StatusCode = 500;
         throw ex;
     }
 }
Example #14
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);
        }
Example #15
0
 public int ping(String username, string curr_page = "Unknown")
 {
     FISLogging.Log("[P] " + username + "| [V] " + curr_page);
     return(1);
 }