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);
        }
Example #2
0
 public override void Save(ParametersDumpInfrastructure infrastructure)
 {
     using (CdmaCellBaseRepository baseRepository = new CdmaCellBaseRepository(_repository))
     {
         foreach (CdmaCell cell in _cells)
         {
             if (_baseBtsRepository.QueryENodeb(cell.BtsId) != null &&
                 baseRepository.QueryCell(
                     cell.BtsId, cell.SectorId, cell.CellType) == null)
             {
                 _repository.Insert(cell);
                 infrastructure.CdmaCellsInserted++;
             }
         }
     }
 }