)>}]
شركة التطبيقات المتكاملة لتصميم وبرمجة البرمجيات الخاصة ش.ش.و.
Integrated Applications Programming Company
Home » Code Library » Migration (Ia.Ftn.Cl.Models.Data)

Public general use code classes and xml files that we've compiled and used over the years:

Migration support class of Fixed Telecommunications Network (FTN) data model.

    1: using System;
    2: using System.Collections.Generic;
    3: using System.Data;
    4: using System.Linq;
    5:  
    6: namespace Ia.Ftn.Cl.Models.Data
    7: {
    8:     ////////////////////////////////////////////////////////////////////////////
    9:  
   10:     /// <summary publish="true">
   11:     /// Migration support class of Fixed Telecommunications Network (FTN) data model.
   12:     /// </summary>
   13:     /// 
   14:     /// <remarks> 
   15:     /// Copyright © 2018-2019 Jasem Y. Al-Shamlan (info@ia.com.kw), Integrated Applications - Kuwait. All Rights Reserved.
   16:     /// </remarks> 
   17:     public class Migration
   18:     {
   19:         ////////////////////////////////////////////////////////////////////////////
   20:  
   21:         /// <summary>
   22:         ///
   23:         /// </summary>
   24:         public Migration()
   25:         {
   26:  
   27:         }
   28:  
   29:         /*
   30:         ////////////////////////////////////////////////////////////////////////////
   31: 
   32:         /// <summary>
   33:         ///
   34:         /// </summary>
   35:         public static List<Ia.Ftn.Cl.Model.Business.Migration.MigratedService> MigrationPendingPstnServiceWithValidAccessAndNoFtnServiceList()
   36:         {
   37:             int port;
   38:             string service;
   39:             List<string> serviceExemptionList, ftnServiceList;
   40:             Ia.Ftn.Cl.Model.Service2 service2;
   41:             Ia.Ftn.Cl.Model.Business.Service.ServiceSupplementaryService serviceSupplementaryService;
   42:             Ia.Ftn.Cl.Model.Business.NetworkDesignDocument.Pstn pstn;
   43:             Ia.Ftn.Cl.Model.Business.NetworkDesignDocument.Ont nddOnt;
   44: 
   45:             List<Ia.Ftn.Cl.Model.Business.Migration.MigratedService> migratedServiceList;
   46:             Dictionary<string, Ia.Ftn.Cl.Model.Business.NetworkDesignDocument.Ont> pstnServiceToNddOntDictionary;
   47: 
   48:             // find brownfield PSTN services with valid access and no FTN service
   49: 
   50:             using (var db = new Ia.Ftn.Cl.Model.Ftn())
   51:             {
   52:                 var pstnServiceList = Ia.Ftn.Cl.Model.Data.Service2.PstnServiceList;
   53: 
   54:                 pstnServiceToNddOntDictionary = Ia.Ftn.Cl.Model.Data.Service2.PstnServiceToNddOntDictionary;
   55: 
   56:                 ftnServiceList = Ia.Ftn.Cl.Model.Data.Service2.ServiceList;
   57: 
   58:                 // services to provision (pstnServiceToNddOntDictionary and not in ftnServiceIdList)
   59:                 migratedServiceList = new List<Ia.Ftn.Cl.Model.Business.Migration.MigratedService>(pstnServiceToNddOntDictionary.Count);
   60: 
   61:                 // will exclude exempt numbers
   62:                 serviceExemptionList = Ia.Ftn.Cl.Model.Data.Provision.ServiceOfServiceExemptFromProvisionProcessingList();
   63: 
   64:                 foreach (KeyValuePair<string, Ia.Ftn.Cl.Model.Business.NetworkDesignDocument.Ont> kvp in pstnServiceToNddOntDictionary)
   65:                 {
   66:                     service = kvp.Key;
   67:                     nddOnt = kvp.Value;
   68: 
   69:                     if (!ftnServiceList.Contains(service))
   70:                     {
   71:                         if (!serviceExemptionList.Contains(service))
   72:                         {
   73:                             if (Ia.Ftn.Cl.Model.Business.Service.OltIsWithinAllowedToBeMigratedOltList(nddOnt.Pon.PonGroup.Olt))
   74:                             {
   75:                                 service2 = (from s in pstnServiceList where s.Service == service select s).SingleOrDefault();
   76: 
   77:                                 serviceSupplementaryService = new Ia.Ftn.Cl.Model.Business.Service.ServiceSupplementaryService();
   78:                                 serviceSupplementaryService.SupplementaryServiceList = new List<Ia.Ftn.Cl.Model.Business.Service.SupplementaryService>();
   79: 
   80:                                 if (int.TryParse(service2.Service, out int i))
   81:                                 {
   82:                                     serviceSupplementaryService.Service = i;
   83:                                     port = service2.Port;
   84: 
   85:                                     // test to see if service is in Siemens EWSD or Ericsson AXE
   86:                                     pstn = Ia.Ftn.Cl.Model.Data.NetworkDesignDocument.PstnFromService(service);
   87: 
   88:                                     if (pstn != null)
   89:                                     {
   90:                                         if (service2.AbbriviatedCalling) serviceSupplementaryService.SupplementaryServiceList.Add(Ia.Ftn.Cl.Model.Business.Service.SupplementaryService.AbbriviatedCalling);
   91:                                         if (service2.CallerId) serviceSupplementaryService.SupplementaryServiceList.Add(Ia.Ftn.Cl.Model.Business.Service.SupplementaryService.CallerId);
   92:                                         if (service2.CallForwarding) serviceSupplementaryService.SupplementaryServiceList.Add(Ia.Ftn.Cl.Model.Business.Service.SupplementaryService.CallForwarding);
   93:                                         if (service2.CallWaiting) serviceSupplementaryService.SupplementaryServiceList.Add(Ia.Ftn.Cl.Model.Business.Service.SupplementaryService.CallWaiting);
   94:                                         if (service2.ConferenceCall) serviceSupplementaryService.SupplementaryServiceList.Add(Ia.Ftn.Cl.Model.Business.Service.SupplementaryService.ConferenceCall);
   95:                                         if (service2.InternationalCalling) serviceSupplementaryService.SupplementaryServiceList.Add(Ia.Ftn.Cl.Model.Business.Service.SupplementaryService.InternationalCalling);
   96:                                         if (service2.InternationalCallingUserControlled) serviceSupplementaryService.SupplementaryServiceList.Add(Ia.Ftn.Cl.Model.Business.Service.SupplementaryService.InternationalCallingUserControlled);
   97:                                         if (service2.ServiceSuspension) serviceSupplementaryService.SupplementaryServiceList.Add(Ia.Ftn.Cl.Model.Business.Service.SupplementaryService.ServiceSuspension);
   98:                                         if (service2.WakeupCall) serviceSupplementaryService.SupplementaryServiceList.Add(Ia.Ftn.Cl.Model.Business.Service.SupplementaryService.WakeupCall);
   99: 
  100:                                         serviceSupplementaryService.Pin = service2.Pin.ToString();
  101: 
  102:                                         migratedServiceList.Add(new Ia.Ftn.Cl.Model.Business.Migration.MigratedService
  103:                                         {
  104:                                             Service = service,
  105:                                             Port = port,
  106:                                             NddOnt = nddOnt,
  107:                                             Access = service2.Access,
  108:                                             PstnExchangeType = pstn.PstnExchangeType,
  109:                                             ServiceSupplementaryService = serviceSupplementaryService
  110:                                         }
  111:                                         );
  112:                                     }
  113:                                     else throw new Exception("Pstn is null. ");
  114:                                 }
  115:                             }
  116:                         }
  117:                     }
  118:                 }
  119:             }
  120: 
  121:             return migratedServiceList;
  122:         }
  123:         */
  124:  
  125:         ////////////////////////////////////////////////////////////////////////////    
  126:         ////////////////////////////////////////////////////////////////////////////    
  127:     }
  128:  
  129:     ////////////////////////////////////////////////////////////////////////////
  130:     ////////////////////////////////////////////////////////////////////////////   
  131: }