public List <DashboardV2GetInvestigationStatistics> AdaptInvestigationStatistics(DataTable dt) { List <DashboardV2GetInvestigationStatistics> results = new List <DashboardV2GetInvestigationStatistics>(); foreach (DataRow rw in dt.Rows) { DashboardV2GetInvestigationStatistics matchCode = new DashboardV2GetInvestigationStatistics(); matchCode = AdaptInvestigationStatisticsItem(rw, dt); results.Add(matchCode); } return(results); }
public DashboardV2GetInvestigationStatistics AdaptInvestigationStatisticsItem(DataRow rw, DataTable dt) { DashboardV2GetInvestigationStatistics result = new DashboardV2GetInvestigationStatistics(); if (dt.Columns.Contains("RequestType")) { result.RequestType = SafeHelper.GetSafestring(rw["RequestType"]); } if (dt.Columns.Contains("NbrOpenedCases")) { result.NbrOpenedCases = SafeHelper.GetSafeint(rw["NbrOpenedCases"]); } if (dt.Columns.Contains("NbrClosedCases")) { result.NbrClosedCases = SafeHelper.GetSafeint(rw["NbrClosedCases"]); } if (dt.Columns.Contains("NbrFailedCases")) { result.NbrFailedCases = SafeHelper.GetSafeint(rw["NbrFailedCases"]); } if (dt.Columns.Contains("NbrCaseOpenedLastWeek")) { result.NbrCaseOpenedLastWeek = SafeHelper.GetSafeint(rw["NbrCaseOpenedLastWeek"]); } if (dt.Columns.Contains("AverageResolutionTime_Minutes")) { result.AverageResolutionTime_Minutes = SafeHelper.GetSafeint(rw["AverageResolutionTime_Minutes"]); } return(result); }