public IEntityCollectionBase GetZteBbhRecords(IEntityBase xmlConfiguration) { IDataReader dataReader = null; ExcelDataAccess excelDataAccess = null; IEntityCollectionBase zteBbhRecords = Kaizen2GEntityCreator.GetZteBbhEntityCollection(); try { IXmlConfiguration xmlConfig = xmlConfiguration as IXmlConfiguration; Logger.Write("Inside ZteBbhDataManager.GetZteBbhRecords()", xmlConfig.LogTypeInfo); excelDataAccess = CommonDataManager.GetDataAccess(xmlConfig); dataReader = excelDataAccess.ExecuteReader(); IZteBbh zteBbhEntity = null; while (dataReader.Read()) { zteBbhEntity = Kaizen2GEntityCreator.GetZteBbhEntity(); zteBbhEntity = CommonDataManager.GetEntityFromExcelRow(dataReader, xmlConfig, zteBbhEntity) as IZteBbh; if (zteBbhEntity != null) { if ((zteBbhEntity.CombinedMaster as ICombinedMaster).CellId > 0 && !(zteBbhEntity.CombinedMaster as ICombinedMaster).CellName.ToUpper().Contains("TEST")) { // match the record for same CellId.here i need to check // string[] matchID = zteBbhRecords.Cast<IZteBbh>().Select(zteBbh => (zteBbh.CombinedMaster as ICombinedMaster).CellId.ToString()).GroupBy(item => item).Where(items => items.Count() > 1).Select(item => item.Key).ToArray(); if ((zteBbhEntity.CombinedMaster as ICombinedMaster).Circle.Trim().ToUpper() == "ROTN") { (zteBbhEntity.CombinedMaster as ICombinedMaster).Circle = "ROTN-ZTE"; } else if ((zteBbhEntity.CombinedMaster as ICombinedMaster).Circle.Trim().ToUpper() == "AP") { (zteBbhEntity.CombinedMaster as ICombinedMaster).Circle = "AP-ZTE"; } zteBbhEntity.FileLogId = xmlConfig.FileLogId; zteBbhEntity.HandOverSuccessRate = zteBbhEntity.HandOverSuccessRate * 100; zteBbhEntity.HandOverFailureRate = zteBbhEntity.HandOverFailureRate * 100; zteBbhEntity.RandomAccessSuccessRate = zteBbhEntity.RandomAccessSuccessRate * 100; zteBbhEntity.TbfSuccessRateUl = zteBbhEntity.TbfSuccessRateUl * 100; zteBbhEntity.TbfSuccessRateDl = zteBbhEntity.TbfSuccessRateDl * 100; zteBbhRecords.Add(zteBbhEntity); } } } Logger.Write("Exiting ZteBbhDataManager.GetZteBbhRecords()", xmlConfig.LogTypeInfo); } catch (Exception exception) { throw exception; } finally { dataReader.CloseDataReader(); excelDataAccess.CloseConnection(); } return zteBbhRecords; }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)