protected override bool SaveWhenBtsNotExisted() { bool result = true; CdmaCellBase cellBase = _baseRepository.QueryCell(_cellInfo.BtsId, _cellInfo.SectorId, _cellInfo.CellType); if (cellBase == null) { CdmaCell cell = new CdmaCell(); cell.Import(_cellInfo, true); _repository.Insert(cell); } else if (cellBase.Frequency < 0 || !cellBase.HasFrequency(_cellInfo.Frequency)) { CdmaCell cell = _repository.Query(_cellInfo.BtsId, _cellInfo.SectorId, _cellInfo.CellType); if (cell != null) { cell.Import(_cellInfo, true); } } else { result = false; } return(result); }
public void ImportNewCellInfo(CdmaCellExcel cellInfo) { CdmaCellBase cell = QueryCell(cellInfo.BtsId, cellInfo.SectorId, cellInfo.CellType); if (cell == null) { CdmaCellBase cellBase = new CdmaCellBase { BtsId = cellInfo.BtsId, SectorId = cellInfo.SectorId, CellType = cellInfo.CellType }; cellBase.AddFrequency(cellInfo.Frequency); cellBaseList.Add(cellBase); } else { cell.AddFrequency(cellInfo.Frequency); } }