Exemplo n.º 1
0
        public DashboardInvestigationStatisticsEntity AdaptItem(DataRow rw)
        {
            DashboardInvestigationStatisticsEntity result = new DashboardInvestigationStatisticsEntity();

            if (rw.Table.Columns["RequestType"] != null)
            {
                result.RequestType = SafeHelper.GetSafestring(rw["RequestType"]);
            }

            if (rw.Table.Columns["NbrOpenedCases"] != null)
            {
                result.NbrOpenedCases = SafeHelper.GetSafeint(rw["NbrOpenedCases"]);
            }

            if (rw.Table.Columns["NbrClosedCases"] != null)
            {
                result.NbrClosedCases = SafeHelper.GetSafeint(rw["NbrClosedCases"]);
            }

            if (rw.Table.Columns["NbrCaseOpenedLastWeek"] != null)
            {
                result.NbrCaseOpenedLastWeek = SafeHelper.GetSafeint(rw["NbrCaseOpenedLastWeek"]);
            }

            if (rw.Table.Columns["AverageResolutionTime_Minutes"] != null)
            {
                result.AverageResolutionTime_Minutes = SafeHelper.GetSafeint(rw["AverageResolutionTime_Minutes"]);
            }

            return(result);
        }
Exemplo n.º 2
0
        public List <DashboardInvestigationStatisticsEntity> Adapt(DataTable dt)
        {
            List <DashboardInvestigationStatisticsEntity> results = new List <DashboardInvestigationStatisticsEntity>();

            foreach (DataRow rw in dt.Rows)
            {
                DashboardInvestigationStatisticsEntity matchCode = new DashboardInvestigationStatisticsEntity();
                matchCode = AdaptItem(rw);
                results.Add(matchCode);
            }
            return(results);
        }