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

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

EWSD Subscriber Entity Framework class for 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.Siemens
    9: {
   10:     ////////////////////////////////////////////////////////////////////////////
   11:  
   12:     /// <summary publish="true">
   13:     /// EWSD Subscriber Entity Framework class for Fixed Telecommunications Network (FTN) entity model.
   14:     /// </summary>
   15:     /// 
   16:     /// <remarks> 
   17:     /// Copyright � 2019-2021 Jasem Y. Al-Shamlan (info@ia.com.kw), Integrated Applications - Kuwait. All Rights Reserved.
   18:     /// </remarks> 
   19:     public class EwsdSubscriber
   20:     {
   21:         /// <summary/>
   22:         public EwsdSubscriber() { }
   23:  
   24:         /// <summary/>
   25:         [Key, DatabaseGenerated(DatabaseGeneratedOption.None)]
   26:         public string Id { get; set; }
   27:  
   28:         /// <summary/>
   29:         public int DN { get; set; }
   30:  
   31:         /// <summary/>
   32:         public string LAC { get; set; }
   33:  
   34:         /// <summary/>
   35:         public string EQN { get; set; }
   36:  
   37:         /// <summary/>
   38:         public string CAT { get; set; }
   39:  
   40:         /// <summary/>
   41:         public string LTT { get; set; }
   42:  
   43:         /// <summary/>
   44:         public string OPTRCL { get; set; }
   45:  
   46:         /// <summary/>
   47:         public string SUBTRCL { get; set; }
   48:  
   49:         /// <summary/>
   50:         public string NUMCAL { get; set; }
   51:  
   52:         /// <summary/>
   53:         public string ORIG1 { get; set; }
   54:  
   55:         /// <summary/>
   56:         public string TRARSTR { get; set; }
   57:  
   58:         /// <summary/>
   59:         public string LNATT { get; set; }
   60:  
   61:         /// <summary/>
   62:         public string DIV { get; set; }
   63:  
   64:         /// <summary/>
   65:         public string COS { get; set; }
   66:  
   67:         /// <summary/>
   68:         public string ADDINF { get; set; }
   69:  
   70:         /// <summary/>
   71:         public string NUMBCH { get; set; }
   72:  
   73:         /// <summary/>
   74:         public string CTDIVI { get; set; }
   75:  
   76:         /// <summary/>
   77:         public string BLK { get; set; }
   78:  
   79:         /// <summary/>
   80:         public string Content { get; set; }
   81:  
   82:         /// <summary/>
   83:         public DateTime Created { get; set; }
   84:  
   85:         /// <summary/>
   86:         public DateTime Updated { get; set; }
   87:  
   88:         ////////////////////////////////////////////////////////////////////////////
   89:  
   90:         /// <summary>
   91:         ///
   92:         /// </summary>
   93:         public bool Equal(Ia.Ftn.Cl.Models.Siemens.EwsdSubscriber b)
   94:         {
   95:             // below: this will not check the Id, Created, Updated fields
   96:             bool areEqual;
   97:  
   98:             if (this.DN != b.DN) areEqual = false;
   99:             else if (this.LAC != b.LAC) areEqual = false;
  100:             else if (this.EQN != b.EQN) areEqual = false;
  101:             else if (this.CAT != b.CAT) areEqual = false;
  102:             else if (this.LTT != b.LTT) areEqual = false;
  103:             else if (this.OPTRCL != b.OPTRCL) areEqual = false;
  104:             else if (this.SUBTRCL != b.SUBTRCL) areEqual = false;
  105:             else if (this.NUMCAL != b.NUMCAL) areEqual = false;
  106:             else if (this.ORIG1 != b.ORIG1) areEqual = false;
  107:             else if (this.TRARSTR != b.TRARSTR) areEqual = false;
  108:             else if (this.LNATT != b.LNATT) areEqual = false;
  109:             else if (this.DIV != b.DIV) areEqual = false;
  110:             else if (this.COS != b.COS) areEqual = false;
  111:             else if (this.ADDINF != b.ADDINF) areEqual = false;
  112:             else if (this.NUMBCH != b.NUMBCH) areEqual = false;
  113:             else if (this.CTDIVI != b.CTDIVI) areEqual = false;
  114:             else if (this.BLK != b.BLK) areEqual = false;
  115:             else if (this.Content != b.Content) areEqual = false;
  116:             else areEqual = true;
  117:  
  118:             return areEqual;
  119:         }
  120:  
  121:         ////////////////////////////////////////////////////////////////////////////
  122:  
  123:         /// <summary>
  124:         ///
  125:         /// </summary>
  126:         public bool Update(Ia.Ftn.Cl.Models.Siemens.EwsdSubscriber updatedItem)
  127:         {
  128:             // below: this will not update Id, Created
  129:             bool updated;
  130:  
  131:             updated = false;
  132:  
  133:             if (this.DN != updatedItem.DN) { this.DN = updatedItem.DN; updated = true; }
  134:             if (this.LAC != updatedItem.LAC) { this.LAC = updatedItem.LAC; updated = true; }
  135:             if (this.EQN != updatedItem.EQN) { this.EQN = updatedItem.EQN; updated = true; }
  136:             if (this.CAT != updatedItem.CAT) { this.CAT = updatedItem.CAT; updated = true; }
  137:             if (this.LTT != updatedItem.LTT) { this.LTT = updatedItem.LTT; updated = true; }
  138:             if (this.OPTRCL != updatedItem.OPTRCL) { this.OPTRCL = updatedItem.OPTRCL; updated = true; }
  139:             if (this.SUBTRCL != updatedItem.SUBTRCL) { this.SUBTRCL = updatedItem.SUBTRCL; updated = true; }
  140:             if (this.NUMCAL != updatedItem.NUMCAL) { this.NUMCAL = updatedItem.NUMCAL; updated = true; }
  141:             if (this.ORIG1 != updatedItem.ORIG1) { this.ORIG1 = updatedItem.ORIG1; updated = true; }
  142:             if (this.TRARSTR != updatedItem.TRARSTR) { this.TRARSTR = updatedItem.TRARSTR; updated = true; }
  143:             if (this.LNATT != updatedItem.LNATT) { this.LNATT = updatedItem.LNATT; updated = true; }
  144:             if (this.DIV != updatedItem.DIV) { this.DIV = updatedItem.DIV; updated = true; }
  145:             if (this.COS != updatedItem.COS) { this.COS = updatedItem.COS; updated = true; }
  146:             if (this.ADDINF != updatedItem.ADDINF) { this.ADDINF = updatedItem.ADDINF; updated = true; }
  147:             if (this.NUMBCH != updatedItem.NUMBCH) { this.NUMBCH = updatedItem.NUMBCH; updated = true; }
  148:             if (this.CTDIVI != updatedItem.CTDIVI) { this.CTDIVI = updatedItem.CTDIVI; updated = true; }
  149:             if (this.BLK != updatedItem.BLK) { this.BLK = updatedItem.BLK; updated = true; }
  150:             if (this.Content != updatedItem.Content) { this.Content = updatedItem.Content; updated = true; }
  151:  
  152:             if (updated) this.Updated = DateTime.UtcNow.AddHours(3);
  153:  
  154:             return updated;
  155:         }
  156:  
  157:         ////////////////////////////////////////////////////////////////////////////
  158:         ////////////////////////////////////////////////////////////////////////////
  159:  
  160:         /// <summary>
  161:         ///
  162:         /// </summary>
  163:         public string ToSimpleTextString()
  164:         {
  165:             return Ia.Ftn.Cl.Models.Data.Siemens.Subscriber.ToSimpleTextString(this);
  166:         }
  167:  
  168:         ////////////////////////////////////////////////////////////////////////////
  169:         ////////////////////////////////////////////////////////////////////////////
  170:     }
  171:  
  172:     ////////////////////////////////////////////////////////////////////////////
  173:     ////////////////////////////////////////////////////////////////////////////
  174: }