Example #1
0
        public void GetFinalReportText(DataTable dtfromfile)
        {
            SmenaCategory smenaCategory = IncidentToCategories.GetIncidentToCategoy(dtfromfile);


            //MessageBox.Show(FullSmenaReport(smenaCategory, dtfromfile));
        }
Example #2
0
        public string FullSmenaReport(DataTable dtfromfile)
        {
            SmenaCategory smenaCategory = IncidentToCategories.GetIncidentToCategoy(dtfromfile);

            if (smenaCategory.LastSmena != null)
            {
                incidentsCountersLastSmena = IncidentsCountersProc.GetIncidentsCounters(smenaCategory.LastSmena);
            }
            if (smenaCategory.Smena24Hours != null)
            {
                incidentsCountersSmena24Hours = IncidentsCountersProc.GetIncidentsCounters(smenaCategory.Smena24Hours);
            }
            if (dtfromfile != null)
            {
                incidentsCountersForAll = IncidentsCountersProc.GetIncidentsCounters(dtfromfile);
            }

            DataTable tmpdt;

            // string[] tmptext = new string[];
            string tmptext = "";

            //List<string> tmptext = new List<string>();
            tmptext += "1. Инциденты, переданные по смене (решенные).\n";
            //tmptext.Join(smenaCategory.IncidensFromPreviousSmenaEnd);
            //tmptext.Add("\n2. Инциденты, переданные по смене (не решенные).\n");

            tmptext += FormatTextForSmena(smenaCategory.IncidensFromPreviousSmenaEnd);
            tmptext += "\n2. Инциденты, переданные по смене (не решенные).\n";
            tmptext += FormatTextForSmena(smenaCategory.IncidensFromPreviousSmenaNoEnd);
            tmptext += "\n3. Инциденты по электропитанию.\n";
            try
            {
                tmpdt    = (smenaCategory.ClosedIncidentsForSmena24Hours.AsEnumerable().Where(row => (row.Field <string>("ЭЛЕКТРОЭНЕРГИЯ") == "True"))).CopyToDataTable();
                tmptext += FormatTextForSmena(tmpdt);
            }
            catch { }
            tmptext += "\n4. Инциденты по СПД.\n";
            try
            {
                tmpdt    = (smenaCategory.ClosedIncidentsForSmena24Hours.AsEnumerable().Where(row => (row.Field <string>("ЭЛЕКТРОЭНЕРГИЯ") == "False"))).CopyToDataTable();
                tmptext += FormatTextForSmena(tmpdt);
            }
            catch { }
            tmptext += "\n5. Инциденты в работе.\n";
            try
            {
                tmptext += FormatTextForSmena(smenaCategory.ToDoForNextSmenaKRASN);
            }
            catch { }
            tmptext += "\n6. Инциденты в работе ЮВСТ.\n";
            try
            {
                tmptext += FormatTextForSmena(smenaCategory.ToDoForNextSmenaUVST);
            }
            catch { }
            //tmptext += "`n`nКол-во решенных переданных ИНЦ КРАСН:.";
            //tmptext += "ТИ - " +$CountTechnicalFromPreviousSmenaAuto + " ИИ - " + $CountInfrastructureFromPreviousSmenaAuto
            tmptext += "\n\nЗа сутки обработано:";
            tmptext += "\n\nКРАСН: ТИ - " + incidentsCountersSmena24Hours.KRS_TechnoInc + " ИИ - " + incidentsCountersSmena24Hours.KSK_InfraInc;
            tmptext += "\n\nЮВСТ: ТИ - " + incidentsCountersSmena24Hours.UVST_TechnoInc + " ИИ - " + incidentsCountersSmena24Hours.UVST_InfraInc;
            tmptext += "\n\nЗСИБ: ТИ - " + incidentsCountersSmena24Hours.ZSIB_TechnoInc + " ИИ - " + incidentsCountersSmena24Hours.ZSIB_InfraInc;

            tmptext += "\n\nИнтересные ТИ за сутки:";
            try
            {
                tmptext += FormatTextForSmena(smenaCategory.TI_Incidents24Hours_WithProblem);
            }
            catch { }


            return(tmptext);
        }