شركة التطبيقات المتكاملة لتصميم النظم البرمجية الخاصة ش.ش.و.

Integrated Applications Programming Company

Skip Navigation LinksHome » Code Library » Owsbr

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

Huawei's Owsbr Entity Framework class for Optical Fiber Network (OFN) data model.

   1:  using System.Collections;
   2:  using System.Collections.Generic;
   3:  using System.Data;
   4:  using System.Linq;
   5:  using System.Text;
   6:   
   7:  namespace Ia.Ngn.Cl.Model.Data.Huawei
   8:  {
   9:      ////////////////////////////////////////////////////////////////////////////
  10:   
  11:      /// <summary publish="true">
  12:      /// Huawei's Owsbr Entity Framework class for Optical Fiber Network (OFN) data model.
  13:      /// </summary>
  14:      /// 
  15:      /// <remarks> 
  16:      /// Copyright © 2014-2017 Jasem Y. Al-Shamlan (info@ia.com.kw), Integrated Applications - Kuwait. All Rights Reserved.
  17:      ///
  18:      /// 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
  19:      /// the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
  20:      ///
  21:      /// This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
  22:      /// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
  23:      /// 
  24:      /// You should have received a copy of the GNU General Public License along with this library. If not, see http://www.gnu.org/licenses.
  25:      /// 
  26:      /// Copyright notice: This notice may not be removed or altered from any source distribution.
  27:      /// </remarks> 
  28:      public class Owsbr
  29:      {
  30:          /// <summary/>
  31:          public Owsbr() { }
  32:   
  33:          ////////////////////////////////////////////////////////////////////////////
  34:   
  35:          /// <summary>
  36:          ///
  37:          /// </summary>
  38:          public static Ia.Ngn.Cl.Model.Huawei.Owsbr Read(string impu)
  39:          {
  40:              Ia.Ngn.Cl.Model.Huawei.Owsbr owsbr;
  41:   
  42:              using (var db = new Ia.Ngn.Cl.Model.Ngn())
  43:              {
  44:                  owsbr = (from o in db.Owsbrs where o.IMPU == impu select o).SingleOrDefault();
  45:              }
  46:   
  47:              return owsbr;
  48:          }
  49:   
  50:          /*
  51:          ////////////////////////////////////////////////////////////////////////////
  52:  
  53:          /// <summary>
  54:          ///
  55:          /// </summary>
  56:          public static List<Ia.Ngn.Cl.Model.Huawei.Owsbr> ReadList(ArrayList impuList)
  57:          {
  58:              long i;
  59:              long[] sp;
  60:              List<Ia.Ngn.Cl.Model.Huawei.Owsbr> owsbrList;
  61:  
  62:              i = 0;
  63:              sp = new long[impuList.Count];
  64:  
  65:              foreach (long l in impuList) sp[i++] = l;
  66:  
  67:              using (var db = new Ia.Ngn.Cl.Model.Ngn())
  68:              {
  69:                  //serviceList = (from q in db.Services where dnList.Contains(q.DN) select q).ToList();
  70:  
  71:                  // var pages = context.Pages.Where(x => keys.Any(key => x.Title.Contains(key)));
  72:                  owsbrList = db.Owsbrs.Where(q => sp.Any(v => q.IMPU == v.ToString())).ToList();
  73:              }
  74:  
  75:              return owsbrList;
  76:          }
  77:          */
  78:   
  79:          ////////////////////////////////////////////////////////////////////////////
  80:          ////////////////////////////////////////////////////////////////////////////
  81:   
  82:          /// <summary>
  83:          ///
  84:          /// </summary>
  85:          public static string ToSimpleTextString(Ia.Ngn.Cl.Model.Huawei.Owsbr owsbr)
  86:          {
  87:              StringBuilder sb;
  88:   
  89:              sb = new StringBuilder();
  90:   
  91:              //sb.AppendLine("Vendor: " + Ia.Ngn.Cl.Model.Business.NetworkDesignDocument.Vendor.Huawei.Name);
  92:              sb.AppendLine("IMPU: " + owsbr.IMPU);
  93:              sb.AppendLine("US: " + owsbr.US);
  94:   
  95:              return sb.ToString();
  96:          }
  97:   
  98:          ////////////////////////////////////////////////////////////////////////////
  99:          ////////////////////////////////////////////////////////////////////////////
 100:      }
 101:   
 102:      ////////////////////////////////////////////////////////////////////////////
 103:      ////////////////////////////////////////////////////////////////////////////
 104:  }