Professional Applications Programmers/Consultants برمجة واستشارات تطبيقات الإنترنت
Skip Navigation LinksHome » Code Library » HuSbr

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

Huawei's Sbr Entity Framework class for Next Generation Network (NGN) data model.

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