Professional Applications Programmers/Consultants برمجة واستشارات تطبيقات الإنترنت
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 Next Generation Network (NGN) business 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.Business.Huawei
  11:  {
  12:      ////////////////////////////////////////////////////////////////////////////
  13:   
  14:      /// <summary publish="true">
  15:      /// Huawei's OwSbr Entity Framework class for Next Generation Network (NGN) business 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 Owsbr
  32:      {
  33:          /// <summary/>
  34:          public Owsbr() { }
  35:   
  36:          ////////////////////////////////////////////////////////////////////////////
  37:   
  38:          /// <summary>
  39:          ///
  40:          /// </summary>
  41:          public static Ia.Ngn.Cl.Model.Huawei.Owsbr ParseFromDictionary(Dictionary<string, string> parameterDictionary)
  42:          {
  43:              string impu;
  44:              Ia.Ngn.Cl.Model.Huawei.Owsbr owsbr;
  45:   
  46:              owsbr = new Ia.Ngn.Cl.Model.Huawei.Owsbr();
  47:   
  48:              impu = (parameterDictionary.ContainsKey("IMPU")) ? parameterDictionary["IMPU"].ToString() : null;
  49:   
  50:              if (impu != null)
  51:              {
  52:                  owsbr.IMPU = impu;
  53:   
  54:                  owsbr.US = (parameterDictionary.ContainsKey("US")) ? int.Parse(parameterDictionary["US"].ToString()) : 0;
  55:   
  56:                  owsbr.Created = DateTime.UtcNow.AddHours(3);
  57:                  owsbr.Updated = DateTime.UtcNow.AddHours(3);
  58:                  //owsbr..UserId = Guid.Empty;
  59:              }
  60:              else
  61:              {
  62:   
  63:              }
  64:   
  65:              return owsbr;
  66:          }
  67:   
  68:          ////////////////////////////////////////////////////////////////////////////
  69:   
  70:          /// <summary>
  71:          ///
  72:          /// </summary>
  73:          public static bool ServiceSuspensionState(Ia.Ngn.Cl.Model.Huawei.Owsbr owsbr)
  74:          {
  75:              bool b;
  76:   
  77:              b = (owsbr.US != 0); // 0: Normal
  78:   
  79:              return b;
  80:          }
  81:   
  82:          ////////////////////////////////////////////////////////////////////////////
  83:          ////////////////////////////////////////////////////////////////////////////
  84:      }
  85:   
  86:      ////////////////////////////////////////////////////////////////////////////
  87:      ////////////////////////////////////////////////////////////////////////////
  88:  }