Exemple #1
0
        private static void BuildReport(SecondaryIncidentDispatcherReport returnValue, DataSet reportDataSet, DateTime beginDate, DateTime endDate)
        {
            foreach (DataRow row in reportDataSet.Tables[0].Rows)
            {
                SecondaryIncidentReportTotals incident = new SecondaryIncidentReportTotals();
                incident.Dispatcher = new Dispatcher();
                incident.Dispatcher.DispatcherId = row["DispatcherId"].ToString();
                incident.Dispatcher.FirstName = row["FirstName"].ToString();
                incident.Dispatcher.LastName = row["LastName"].ToString();
                incident.Sunstar3DigitUnit = 100 * (decimal.Parse(row["Sunstar3DigitNumber"].ToString()) / decimal.Parse(row["CallCount"].ToString()));
                returnValue.DispatcherBottomLineTotals.Sunstar3DigitUnit += incident.Sunstar3DigitUnit;
                incident.NatureOfCall = 100 * (decimal.Parse(row["NatureOfCall"].ToString()) / decimal.Parse(row["CallCount"].ToString()));
                returnValue.DispatcherBottomLineTotals.NatureOfCall += incident.NatureOfCall;
                incident.Location = 100 * (decimal.Parse(row["Location"].ToString()) / decimal.Parse(row["CallCount"].ToString()));
                returnValue.DispatcherBottomLineTotals.Location += incident.Location;
                incident.MapGrid = 100 * (decimal.Parse(row["MapGrid"].ToString()) / decimal.Parse(row["CallCount"].ToString()));
                returnValue.DispatcherBottomLineTotals.MapGrid += incident.MapGrid;
                incident.FDUnitsAndTacCh = 100 * (decimal.Parse(row["FDUnitsAndTacCh"].ToString()) / decimal.Parse(row["CallCount"].ToString()));
                returnValue.DispatcherBottomLineTotals.FDUnitsAndTacCh += incident.FDUnitsAndTacCh;
                incident.ScriptingDocumented = 100 * (decimal.Parse(row["ScriptingDocumented"].ToString()) / decimal.Parse(row["CallCount"].ToString()));
                returnValue.DispatcherBottomLineTotals.ScriptingDocumented += incident.ScriptingDocumented;
                incident.SevenMin = 100 * (decimal.Parse(row["SevenMin"].ToString()) / decimal.Parse(row["CallCount"].ToString()));
                returnValue.DispatcherBottomLineTotals.SevenMin += incident.SevenMin;
                incident.TwelveMin = 100 * (decimal.Parse(row["TwelveMin"].ToString()) / decimal.Parse(row["CallCount"].ToString()));
                returnValue.DispatcherBottomLineTotals.TwelveMin += incident.TwelveMin;
                incident.ETALocationAsked = 100 * (decimal.Parse(row["ETALocationAsked"].ToString()) / decimal.Parse(row["CallCount"].ToString()));
                returnValue.DispatcherBottomLineTotals.ETALocationAsked += incident.ETALocationAsked;
                incident.ETADocumented = 100 * (decimal.Parse(row["ETADocumented"].ToString()) / decimal.Parse(row["CallCount"].ToString()));
                returnValue.DispatcherBottomLineTotals.ETADocumented += incident.ETADocumented;
                incident.RoutingDocumented = 100 * (decimal.Parse(row["RoutingDocumented"].ToString()) / decimal.Parse(row["CallCount"].ToString()));
                returnValue.DispatcherBottomLineTotals.RoutingDocumented += incident.RoutingDocumented;
                incident.PreArrivalGiven = 100 * (decimal.Parse(row["PreArrivalGiven"].ToString()) / decimal.Parse(row["CallCount"].ToString()));
                returnValue.DispatcherBottomLineTotals.PreArrivalGiven += incident.PreArrivalGiven;
                incident.EMDDocumented = 100 * (decimal.Parse(row["EMDDocumented"].ToString()) / decimal.Parse(row["CallCount"].ToString()));
                returnValue.DispatcherBottomLineTotals.EMDDocumented += incident.EMDDocumented;
                incident.UsedProhibitedBehavior = 100 * (decimal.Parse(row["UsedProhibitedBehavior"].ToString()) / decimal.Parse(row["CallCount"].ToString()));
                returnValue.DispatcherBottomLineTotals.UsedProhibitedBehavior += incident.UsedProhibitedBehavior;
                incident.PatchedChannels = 100 * (decimal.Parse(row["PatchedChannels"].ToString()) / decimal.Parse(row["CallCount"].ToString()));
                returnValue.DispatcherBottomLineTotals.PatchedChannels += incident.PatchedChannels;
                incident.Phone = 100 * (decimal.Parse(row["Phone"].ToString()) / decimal.Parse(row["CallCount"].ToString()));
                returnValue.DispatcherBottomLineTotals.Phone += incident.Phone;

                incident.ProactiveRoutingGiven = 100 * TertiaryReceptor(
                    int.Parse(row["ProactiveRoutingGiven_Yes"].ToString()),
                    int.Parse(row["ProactiveRoutingGiven_No"].ToString()),
                    int.Parse(row["ProactiveRoutingGiven_NA"].ToString()),
                    5,
                    0,
                    0,
                    true);
                returnValue.DispatcherBottomLineTotals.ProactiveRoutingGiven += incident.ProactiveRoutingGiven;
                incident.CorrectRouting = 100 * TertiaryReceptor(
                    int.Parse(row["CorrectRouting_Yes"].ToString()),
                    int.Parse(row["CorrectRouting_No"].ToString()),
                    int.Parse(row["CorrectRouting_NA"].ToString()),
                    5,
                    0,
                    0,
                    true);
                incident.DisplayedServiceAttitude = 100 * TertiaryReceptor(
                int.Parse(row["DisplayedServiceAttitude_Correct"].ToString()),
                int.Parse(row["DisplayedServiceAttitude_Incorrect"].ToString()),
                int.Parse(row["DisplayedServiceAttitude_Minor"].ToString()),
                25,
                10,
                0,
                false);
                returnValue.DispatcherBottomLineTotals.DisplayedServiceAttitude += incident.DisplayedServiceAttitude;
                incident.UsedCorrectVolumeTone = 100 * TertiaryReceptor(
                    int.Parse(row["UsedCorrectVolumeTone_Correct"].ToString()),
                    int.Parse(row["UsedCorrectVolumeTone_Incorrect"].ToString()),
                    int.Parse(row["UsedCorrectVolumeTone_Minor"].ToString()),
                    25,
                    10,
                    0,
                    false);
                returnValue.DispatcherBottomLineTotals.UsedCorrectVolumeTone += incident.UsedCorrectVolumeTone;
                incident.CallCount = int.Parse(row["CallCount"].ToString());
                returnValue.DispatcherBottomLineTotals.CallCount += incident.CallCount;
                incident.TotalScore = decimal.Parse(row["TotalScore"].ToString()) / decimal.Parse(row["CallCount"].ToString());
                returnValue.DispatcherBottomLineTotals.TotalScore += incident.TotalScore;

                returnValue.DispatcherTotals.Add(incident);
            }
            if (reportDataSet.Tables[0].Rows.Count > 0)
            {
                returnValue.DispatcherBottomLineTotals.CorrectRouting /= returnValue.DispatcherTotals.Count;
                returnValue.DispatcherBottomLineTotals.DisplayedServiceAttitude /= returnValue.DispatcherTotals.Count;
                returnValue.DispatcherBottomLineTotals.EMDDocumented /= returnValue.DispatcherTotals.Count;
                returnValue.DispatcherBottomLineTotals.ETADocumented /= returnValue.DispatcherTotals.Count;
                returnValue.DispatcherBottomLineTotals.ETALocationAsked /= returnValue.DispatcherTotals.Count;
                returnValue.DispatcherBottomLineTotals.FDUnitsAndTacCh /= returnValue.DispatcherTotals.Count;
                returnValue.DispatcherBottomLineTotals.Location /= returnValue.DispatcherTotals.Count;
                returnValue.DispatcherBottomLineTotals.MapGrid /= returnValue.DispatcherTotals.Count;
                returnValue.DispatcherBottomLineTotals.NatureOfCall /= returnValue.DispatcherTotals.Count;
                returnValue.DispatcherBottomLineTotals.PatchedChannels /= returnValue.DispatcherTotals.Count;
                returnValue.DispatcherBottomLineTotals.Phone /= returnValue.DispatcherTotals.Count;
                returnValue.DispatcherBottomLineTotals.PreArrivalGiven /= returnValue.DispatcherTotals.Count;
                returnValue.DispatcherBottomLineTotals.ProactiveRoutingGiven /= returnValue.DispatcherTotals.Count;
                returnValue.DispatcherBottomLineTotals.RoutingDocumented /= returnValue.DispatcherTotals.Count;
                returnValue.DispatcherBottomLineTotals.ScriptingDocumented /= returnValue.DispatcherTotals.Count;
                returnValue.DispatcherBottomLineTotals.SevenMin /= returnValue.DispatcherTotals.Count;
                returnValue.DispatcherBottomLineTotals.Sunstar3DigitUnit /= returnValue.DispatcherTotals.Count;
                returnValue.DispatcherBottomLineTotals.TotalScore /= returnValue.DispatcherTotals.Count;
                returnValue.DispatcherBottomLineTotals.TwelveMin /= returnValue.DispatcherTotals.Count;
                returnValue.DispatcherBottomLineTotals.UsedCorrectVolumeTone /= returnValue.DispatcherTotals.Count;
                returnValue.DispatcherBottomLineTotals.UsedProhibitedBehavior /= returnValue.DispatcherTotals.Count;
            }
            returnValue.BeginDate = beginDate;
            returnValue.EndDate = endDate;
        }
Exemple #2
0
        public static SecondaryIncidentDispatcherReport GetSecondaryIncidentEvaluatorReport(DateTime beginDate, DateTime endDate)
        {
            SecondaryIncidentDispatcherReport returnValue = new SecondaryIncidentDispatcherReport();
            returnValue.DispatcherTotals = new List<SecondaryIncidentReportTotals>();
            returnValue.DispatcherBottomLineTotals = new SecondaryIncidentReportTotals();
            DataSet reportDataSet = Data.Provider.SecondaryIncidentReport_Evaluator_SelectByDateRange(beginDate, endDate);

            BuildReport(returnValue, reportDataSet, beginDate, endDate);
            returnValue.ReportName = "Protocol Compliance Report (Evaluators)";
            returnValue.ScriptInfo = "Secondary Channel Script";

            return returnValue;
        }