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

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

ONT-SERVICEVOIP support class for Fixed Telecommunications Network (FTN) Nokia data model.

    1: using System.Collections.Generic;
    2: using System.Linq;
    3: using System.Text;
    4:  
    5: namespace Ia.Ftn.Cl.Models.Data.Nokia
    6: {
    7:     ////////////////////////////////////////////////////////////////////////////
    8:  
    9:     /// <summary publish="true">
   10:     /// ONT-SERVICEVOIP support class for Fixed Telecommunications Network (FTN) Nokia data model.
   11:     /// </summary>
   12:     /// 
   13:     /// <remarks> 
   14:     /// Copyright © 2006-2017 Jasem Y. Al-Shamlan (info@ia.com.kw), Integrated Applications - Kuwait. All Rights Reserved.
   15:     /// </remarks> 
   16:     public class OntServiceVoip
   17:     {
   18:         /// <summary/>
   19:         public OntServiceVoip() { }
   20:  
   21:         /*
   22:         ////////////////////////////////////////////////////////////////////////////
   23: 
   24:         /// <summary>
   25:         ///
   26:         /// </summary>
   27:         public static List<Ia.Ftn.Cl.Model.OntServiceVoip> ReadListBySerial(string serial)
   28:         {
   29:             List<Ia.Ftn.Cl.Model.OntServiceVoip> list;
   30: 
   31:             using (var db = new Ia.Ftn.Cl.Model.Ftn())
   32:             {
   33:                 list = (from q in db.Onts where q.Serial == serial select q).ToList();
   34:             }
   35: 
   36:             return list;
   37:         }
   38:          */
   39:  
   40:         ////////////////////////////////////////////////////////////////////////////
   41:  
   42:         /// <summary>
   43:         ///
   44:         /// </summary>
   45:         public static Dictionary<string, string> IdToOntIdDictionary
   46:         {
   47:             get
   48:             {
   49:                 Dictionary<string, string> dictionary;
   50:  
   51:                 using (var db = new Ia.Ftn.Cl.Db())
   52:                 {
   53:                     dictionary = (from s in db.OntServiceVoips 
   54:                                   select new { s.Id, OntId = s.Ont.Id }).ToDictionary(u => u.Id, u => u.OntId);
   55:                 }
   56:  
   57:                 return dictionary.ToDictionary(u => u.Key, u => u.Value);
   58:             }
   59:         }
   60:  
   61:         ////////////////////////////////////////////////////////////////////////////
   62:         ////////////////////////////////////////////////////////////////////////////
   63:  
   64:         /// <summary>
   65:         ///
   66:         /// </summary>
   67:         public static string ToSimpleTextString(Ia.Ftn.Cl.Models.OntServiceVoip ontServiceVoip)
   68:         {
   69:             StringBuilder sb;
   70:  
   71:             sb = new StringBuilder();
   72:  
   73:             //sb.AppendLine("Vendor: " + Ia.Ftn.Cl.Model.Business.NetworkDesignDocument.Vendor.Nokia.Name);
   74:             sb.AppendLine("State: " + ontServiceVoip.State);
   75:             //sb.AppendLine("Svlan: " + ontServiceVoip.Svlan);
   76:             sb.AppendLine("Ip: " + ontServiceVoip.Ip);
   77:             //sb.AppendLine("FtpIp: " + ontServiceVoip.FtpIp);
   78:             //sb.AppendLine("ConfiguratinFile: " + ontServiceVoip.ConfiguratinFile);
   79:             sb.AppendLine("Customer: " + ontServiceVoip.Customer);
   80:             sb.AppendLine("Label: " + ontServiceVoip.Label);
   81:  
   82:             return sb.ToString();
   83:         }
   84:  
   85:         ////////////////////////////////////////////////////////////////////////////
   86:         ////////////////////////////////////////////////////////////////////////////
   87:     }
   88:  
   89:     ////////////////////////////////////////////////////////////////////////////
   90:     ////////////////////////////////////////////////////////////////////////////
   91: }