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

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

SERUATTR Signaling Service Processing System (SPS) support class for Huawei's Fixed Telecommunications Network (FTN) entity model.

    1: using System;
    2: using System.ComponentModel.DataAnnotations;
    3: using System.ComponentModel.DataAnnotations.Schema;
    4: using System.Linq;
    5: using System.Threading;
    6: using System.Threading.Tasks;
    7:  
    8: namespace Ia.Ftn.Cl.Models.Huawei
    9: {
   10:     ////////////////////////////////////////////////////////////////////////////
   11:  
   12:     /// <summary publish="true">
   13:     /// SERUATTR Signaling Service Processing System (SPS) support class for Huawei's Fixed Telecommunications Network (FTN) entity model.
   14:     /// </summary>
   15:     /// 
   16:     /// <remarks> 
   17:     /// Copyright © 2018-2021 Jasem Y. Al-Shamlan (info@ia.com.kw), Integrated Applications - Kuwait. All Rights Reserved.
   18:     /// </remarks> 
   19:     public class Seruattr
   20:     {
   21:         /*
   22:          * HUAWEI SPS Signaling Service Processing System
   23:          * V300R008C10
   24:          * SPS V300R008C10 PGW MML Command Protocol (NP)
   25:          */
   26:  
   27:         /// <summary/>
   28:         public Seruattr() { }
   29:  
   30:         /// <summary/>
   31:         [Key, DatabaseGenerated(DatabaseGeneratedOption.None)]
   32:         public string Id { get; set; }
   33:  
   34:         /// <summary>
   35:         /// int SERVATTR Whether enable related services (e.g. OMNP-1) Enumerated This parameter specifies which service is enabled. It is a mandatory parameter. Value: OMNP(Enable MNP service). No default value
   36:         /// </summary>
   37:         public int SERVATTR { get; set; }
   38:  
   39:         /// <summary>
   40:         /// int NUMTYPE Number type Enumerated This parameter specifies the type of a subscriber. It is a mandatory parameter. 
   41:         /// </summary>
   42:         public int NUMTYPE { get; set; }
   43:  
   44:         /// <summary>
   45:         /// string USRNUM MSISDN String (16) The parameter specifies the MSISDN of a service subscriber. It is the key parameter that identifies a service subscriber. It is mandatory. 
   46:         /// </summary>
   47:         public string USRNUM { get; set; }
   48:  
   49:         /// <summary>
   50:         /// string IMSINUM User IMSI number String (16) This parameter specifies the IMSI of a subscriber. 
   51:         /// </summary>
   52:         public string IMSINUM { get; set; }
   53:  
   54:         /// <summary>
   55:         /// string DESC Description 
   56:         /// </summary>
   57:         public string DESC { get; set; }
   58:  
   59:         /// <summary>
   60:         /// int RNIDXTYPE Route index type Enumerated This parameter specifies the route index type of a subscriber. It is a mandatory parameter. 
   61:         /// </summary>
   62:         public int RNIDXTYPE { get; set; }
   63:  
   64:         /// <summary>
   65:         /// int HLRIDX HLR address index e.g. HLRIDX=1 HLRIDX HLR address index Numeric This parameter specifies the homing HLR index of a subscriber. It is valid only when Route index type is set to HLR(HLR number index) or ALL(HLR+RN). This parameter must be defined by running ADD SEMNPHLRADDR before being used. Value range: 0 to 65535. Default value: 65535
   66:         /// </summary>
   67:         public int HLRIDX { get; set; }
   68:  
   69:         /// <summary>
   70:         /// int RNIDX NP route index (e.g. RNIDX=0) NP route index Numeric This parameter specifies the route number index of the network where a subscriber belongs. It is valid only when Route index type is set to RN(Route number index). This parameter must be defined by running ADD SEMNPROUTENUM before being used. Value range: 0 to 65535. Default value: 65535
   71:         /// </summary>
   72:         public int RNIDX { get; set; }
   73:  
   74:         /// <summary>
   75:         /// int RNIDX2 Routing number index Numeric This parameter specifies the route number index of the network where a subscriber belongs. It is valid only when Route index type is set to ALL(HLR+RN). This parameter must be defined by running ADD SEMNPROUTENUM before being used. Value range: 0 to 65535. Default value: 65535
   76:         /// </summary>
   77:         public int RNIDX2 { get; set; }
   78:  
   79:         /// <summary>
   80:         /// string RN Routing number String (16) This parameter specifies the route number of the network where a subscriber belongs. It is valid only when Route index type is set to ALL(HLR+RN). This parameter must be defined by running ADD SEMNPROUTENUM before being used.. Value: a number of a maximum of 16 hexadecimal digits. No default value
   81:         /// </summary>
   82:         public string RN { get; set; }
   83:  
   84:         /// <summary/>
   85:         public DateTime Created { get; set; }
   86:  
   87:         /// <summary/>
   88:         public DateTime Updated { get; set; }
   89:  
   90:         ////////////////////////////////////////////////////////////////////////////
   91:  
   92:         /// <summary>
   93:         ///
   94:         /// </summary>
   95:         public bool Equal(Ia.Ftn.Cl.Models.Huawei.Seruattr b)
   96:         {
   97:             // below: this will not check the Id, Created, Updated fields
   98:             bool areEqual;
   99:  
  100:             if (this.SERVATTR != b.SERVATTR) areEqual = false;
  101:             else if (this.NUMTYPE != b.NUMTYPE) areEqual = false;
  102:             else if (this.USRNUM != b.USRNUM) areEqual = false;
  103:             else if (this.IMSINUM != b.IMSINUM) areEqual = false;
  104:             else if (this.DESC != b.DESC) areEqual = false;
  105:             else if (this.RNIDXTYPE != b.RNIDXTYPE) areEqual = false;
  106:             else if (this.HLRIDX != b.HLRIDX) areEqual = false;
  107:             else if (this.RNIDX != b.RNIDX) areEqual = false;
  108:             else if (this.RNIDX2 != b.RNIDX2) areEqual = false;
  109:             else if (this.RN != b.RN) areEqual = false;
  110:             else areEqual = true;
  111:  
  112:             return areEqual;
  113:         }
  114:  
  115:         ////////////////////////////////////////////////////////////////////////////
  116:  
  117:         /// <summary>
  118:         ///
  119:         /// </summary>
  120:         public bool Update(Ia.Ftn.Cl.Models.Huawei.Seruattr updatedItem)
  121:         {
  122:             // below: this will not update Id, Created
  123:             bool updated;
  124:  
  125:             updated = false;
  126:  
  127:             if (this.SERVATTR != updatedItem.SERVATTR) { this.SERVATTR = updatedItem.SERVATTR; updated = true; }
  128:             if (this.NUMTYPE != updatedItem.NUMTYPE) { this.NUMTYPE = updatedItem.NUMTYPE; updated = true; }
  129:             if (this.USRNUM != updatedItem.USRNUM) { this.USRNUM = updatedItem.USRNUM; updated = true; }
  130:             if (this.IMSINUM != updatedItem.IMSINUM) { this.IMSINUM = updatedItem.IMSINUM; updated = true; }
  131:             if (this.DESC != updatedItem.DESC) { this.DESC = updatedItem.DESC; updated = true; }
  132:             if (this.RNIDXTYPE != updatedItem.RNIDXTYPE) { this.RNIDXTYPE = updatedItem.RNIDXTYPE; updated = true; }
  133:             if (this.HLRIDX != updatedItem.HLRIDX) { this.HLRIDX = updatedItem.HLRIDX; updated = true; }
  134:             if (this.RNIDX != updatedItem.RNIDX) { this.RNIDX = updatedItem.RNIDX; updated = true; }
  135:             if (this.RNIDX2 != updatedItem.RNIDX2) { this.RNIDX2 = updatedItem.RNIDX2; updated = true; }
  136:             if (this.RN != updatedItem.RN) { this.RN = updatedItem.RN; updated = true; }
  137:  
  138:             if (updated) this.Updated = DateTime.UtcNow.AddHours(3);
  139:  
  140:             return updated;
  141:         }
  142:  
  143:         ////////////////////////////////////////////////////////////////////////////
  144:         ////////////////////////////////////////////////////////////////////////////
  145:  
  146:         /// <summary>
  147:         ///
  148:         /// </summary>
  149:         public string ToSimpleTextString()
  150:         {
  151:             return Ia.Ftn.Cl.Models.Data.Huawei.Seruattr.ToSimpleTextString(this);
  152:         }
  153:  
  154:         ////////////////////////////////////////////////////////////////////////////
  155:         ////////////////////////////////////////////////////////////////////////////
  156:     }
  157:  
  158:     ////////////////////////////////////////////////////////////////////////////
  159:     ////////////////////////////////////////////////////////////////////////////
  160: }