)>}]
شركة التطبيقات المتكاملة لتصميم وبرمجة البرمجيات الخاصة ش.ش.و.
Integrated Applications Programming Company
Skip Navigation LinksHome » Code Library » Hsi

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

High Speed Internet (HSI) support class for Next Generation Network (NGN) UI model.

   1:  using System;
   2:  using System.Web;
   3:  using System.Xml;
   4:  using System.Xml.Linq;
   5:  using System.IO;
   6:  using System.Configuration;
   7:  using System.Text;
   8:  using System.Text.RegularExpressions;
   9:  using System.Data;
  10:  using System.Data.SqlClient;
  11:  using System.Web.UI;
  12:  using System.Web.UI.WebControls;
  13:  using System.Collections;
  14:  using System.Collections.Generic;
  15:  using System.Reflection;
  16:  using System.Linq;
  17:   
  18:  namespace Ia.Ngn.Cl.Model.Ui
  19:  {
  20:      ////////////////////////////////////////////////////////////////////////////
  21:   
  22:      /// <summary publish="true">
  23:      /// High Speed Internet (HSI) support class for Next Generation Network (NGN) UI model.
  24:      /// </summary>
  25:      /// 
  26:      /// <remarks> 
  27:      /// Copyright © 2006-2017 Jasem Y. Al-Shamlan (info@ia.com.kw), Integrated Applications - Kuwait. All Rights Reserved.
  28:      ///
  29:      /// This library is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by
  30:      /// the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
  31:      ///
  32:      /// This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
  33:      /// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
  34:      /// 
  35:      /// You should have received a copy of the GNU General Public License along with this library. If not, see http://www.gnu.org/licenses.
  36:      /// 
  37:      /// Copyright notice: This notice may not be removed or altered from any source distribution.
  38:      /// </remarks> 
  39:      public partial class Hsi
  40:      {
  41:          ////////////////////////////////////////////////////////////////////////////
  42:   
  43:          /// <summary>
  44:          ///
  45:          /// </summary>
  46:          public Hsi() { }
  47:   
  48:          ////////////////////////////////////////////////////////////////////////////
  49:   
  50:          /// <summary>
  51:          ///
  52:          /// </summary>
  53:          public class Isp
  54:          {
  55:              public Isp() { }
  56:   
  57:              public int Id { get; set; }
  58:              public bool Active { get; set; }
  59:              public int Lan { get; set; }
  60:              public string Name { get; set; }
  61:              public string ArabicName { get; set; }
  62:              public string Description { get; set; }
  63:          }
  64:   
  65:          ////////////////////////////////////////////////////////////////////////////
  66:   
  67:          /// <summary>
  68:          ///
  69:          /// </summary>
  70:          public class ProfileAndCount
  71:          {
  72:              public ProfileAndCount() { }
  73:   
  74:              public int Id { get; set; }
  75:              public string NameAndCount { get; set; }
  76:          }
  77:   
  78:          //////////////////////////////////////////////////////////////////////////////
  79:   
  80:          ///// <summary>
  81:          /////
  82:          ///// </summary>
  83:          public static List<ProfileAndCount> ProfileAndCountList
  84:          {
  85:              get
  86:              {
  87:                  ProfileAndCount profileAndCount;
  88:                  Ia.Ngn.Cl.Model.Data.Hsi.Profile profile;
  89:                  List<ProfileAndCount> profileAndCountList;
  90:   
  91:                  profileAndCountList = new List<ProfileAndCount>();
  92:   
  93:                  // profiles in database
  94:                  foreach(KeyValuePair<int, int> kvp in Ia.Ngn.Cl.Model.Data.Nokia.OntServiceHsi.DownstreamBandwidthProfileIdAndCountDictionary)
  95:                  {
  96:                      profileAndCount = new ProfileAndCount();
  97:   
  98:                      profile = (from p in Ia.Ngn.Cl.Model.Data.Hsi.ProfileList where p.Id == kvp.Key select p).SingleOrDefault();
  99:   
 100:                      profileAndCount.Id = kvp.Key;
 101:   
 102:                      if (profile != null) profileAndCount.NameAndCount = profile.Name + " (" + kvp.Value + ")";
 103:                      else profileAndCount.NameAndCount = "Unknown (" + kvp.Key + ") (" + kvp.Value + ")";
 104:   
 105:                      profileAndCountList.Add(profileAndCount);
 106:                  }
 107:   
 108:                  // profiles defined in XML
 109:                  foreach(Ia.Ngn.Cl.Model.Data.Hsi.Profile p in Ia.Ngn.Cl.Model.Data.Hsi.ProfileList)
 110:                  {
 111:                      if(!Ia.Ngn.Cl.Model.Data.Nokia.OntServiceHsi.DownstreamBandwidthProfileIdAndCountDictionary.ContainsKey(p.Id))
 112:                      {
 113:                          profileAndCount = new ProfileAndCount();
 114:   
 115:                          profileAndCount.Id = p.Id;
 116:                          profileAndCount.NameAndCount = p.Name + " (0)";
 117:   
 118:                          profileAndCountList.Add(profileAndCount);
 119:                      }
 120:                  }
 121:   
 122:                  return profileAndCountList.OrderBy(u => u.Id).ToList();
 123:              }
 124:          }
 125:   
 126:          ////////////////////////////////////////////////////////////////////////////
 127:          ////////////////////////////////////////////////////////////////////////////    
 128:      }
 129:   
 130:      ////////////////////////////////////////////////////////////////////////////
 131:      ////////////////////////////////////////////////////////////////////////////   
 132:  }