コード例 #1
0
        private static string GetEndTimeCase(long caseId)
        {
            if (caseId == -1)
            {
                return("");
            }
            var @case = new CaseBuilder().CreateCase(caseId);

            return(@case.Events.Last().TimeStamp.ToShortDateString());
        }
コード例 #2
0
        private static string GetStartTimeCase(long caseId)
        {
            if (caseId == -1)
            {
                return("");
            }
            var @case = new CaseBuilder().CreateCase(caseId);

            return(@case.Begin.TimeStamp.ToShortDateString());
        }
コード例 #3
0
        public List <Alert> FindAlerts()
        {
            MainDBContext mainDB = new MainDBContext();
            var           BPs    = mainDB.BPCases.Include(s => s.BP).ToList();

            CaseBuilder caseBuilder = new CaseBuilder();

            List <Alert> alerts = new List <Alert>();

            foreach (var bp in BPs)
            {
                Case @case = caseBuilder.CreateCase(bp.CaseId);

                alerts.AddRange(SearchRouteErrors(@case, bp.BP.StandartCase));
                alerts.AddRange(SearchTimeErrors(@case, bp.BP.StandartCase));
                alerts.AddRange(SearchAccessErrors(@case, bp.BP.AccessMatrix));
            }
            return(alerts);
        }