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

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

ONT-ONTPOTS support class of Fixed Telecommunications Network (FTN) Nokia business model.

    1: using System;
    2:  
    3: namespace Ia.Ftn.Cl.Models.Business.Nokia
    4: {
    5:     ////////////////////////////////////////////////////////////////////////////
    6:  
    7:     /// <summary publish="true">
    8:     /// ONT-ONTPOTS support class of Fixed Telecommunications Network (FTN) Nokia business model.
    9:     /// </summary>
   10:     /// 
   11:     /// <remarks> 
   12:     /// Copyright © 2006-2017 Jasem Y. Al-Shamlan (info@ia.com.kw), Integrated Applications - Kuwait. All Rights Reserved.
   13:     /// </remarks> 
   14:     public class OntOntPots
   15:     {
   16:         /// <summary/>
   17:         public OntOntPots() { }
   18:  
   19:         ////////////////////////////////////////////////////////////////////////////
   20:  
   21:         /// <summary>
   22:         ///
   23:         /// </summary>
   24:         public static string OntOntPotsId(string ontId, int card, int port)
   25:         {
   26:             string id;
   27:  
   28:             if (card >= Ia.Ftn.Cl.Models.Business.Nokia.Ont.MinimumCardValue && card <= Ia.Ftn.Cl.Models.Business.Nokia.Ont.MaximumCardValue && port >= Ia.Ftn.Cl.Models.Business.Nokia.Ont.MinimumPortValue && port <= Ia.Ftn.Cl.Models.Business.Nokia.Ont.MaximumPortValue)
   29:             {
   30:                 id = ontId.ToString() + card.ToString().PadLeft(2, '0') + port.ToString().PadLeft(2, '0');
   31:             }
   32:             else
   33:             {
   34:                 throw new ArgumentOutOfRangeException(@"Card and/or port value is invalid: card:" + card + ", port:" + port);
   35:             }
   36:  
   37:             return id;
   38:         }
   39:  
   40:         ////////////////////////////////////////////////////////////////////////////
   41:         ////////////////////////////////////////////////////////////////////////////
   42:     }
   43:  
   44:     ////////////////////////////////////////////////////////////////////////////
   45:     ////////////////////////////////////////////////////////////////////////////
   46: }