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

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

AXE 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.Ericsson
    9: {
   10:     ////////////////////////////////////////////////////////////////////////////
   11:  
   12:     /// <summary publish="true">
   13:     /// AXE 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 AxeSubscriber
   20:     {
   21:         /// <summary/>
   22:         public AxeSubscriber() { }
   23:  
   24:         /// <summary/>
   25:         [Key, DatabaseGenerated(DatabaseGeneratedOption.None)]
   26:         public string Id { get; set; }
   27:  
   28:         /// <summary/>
   29:         public int SNB { get; set; }
   30:  
   31:         /// <summary/>
   32:         public string DEV { get; set; }
   33:  
   34:         /// <summary/>
   35:         public string DETY { get; set; }
   36:  
   37:         /// <summary/>
   38:         public string SUT { get; set; }
   39:  
   40:         /// <summary/>
   41:         public string SCL { get; set; }
   42:  
   43:         /// <summary/>
   44:         public string MIS { get; set; }
   45:  
   46:         /// <summary/>
   47:         public string COS { get; set; }
   48:  
   49:         /// <summary/>
   50:         public string Content { get; set; }
   51:  
   52:         /// <summary/>
   53:         public DateTime Created { get; set; }
   54:  
   55:         /// <summary/>
   56:         public DateTime Updated { get; set; }
   57:  
   58:         ////////////////////////////////////////////////////////////////////////////
   59:  
   60:         /// <summary>
   61:         ///
   62:         /// </summary>
   63:         public bool Equal(Ia.Ftn.Cl.Models.Ericsson.AxeSubscriber b)
   64:         {
   65:             // below: this will not check the Id, Created, Updated fields
   66:             bool areEqual;
   67:  
   68:             if (this.SNB != b.SNB) areEqual = false;
   69:             else if (this.DEV != b.DEV) areEqual = false;
   70:             else if (this.DETY != b.DETY) areEqual = false;
   71:             else if (this.SUT != b.SUT) areEqual = false;
   72:             else if (this.SCL != b.SCL) areEqual = false;
   73:             else if (this.MIS != b.MIS) areEqual = false;
   74:             else if (this.COS != b.COS) areEqual = false;
   75:             else if (this.Content != b.Content) areEqual = false;
   76:             else areEqual = true;
   77:  
   78:             return areEqual;
   79:         }
   80:  
   81:         ////////////////////////////////////////////////////////////////////////////
   82:  
   83:         /// <summary>
   84:         ///
   85:         /// </summary>
   86:         public bool Update(Ia.Ftn.Cl.Models.Ericsson.AxeSubscriber updatedItem)
   87:         {
   88:             // below: this will not update Id, Created
   89:             bool updated;
   90:  
   91:             updated = false;
   92:  
   93:             if (this.SNB != updatedItem.SNB) { this.SNB = updatedItem.SNB; updated = true; }
   94:             if (this.DEV != updatedItem.DEV) { this.DEV = updatedItem.DEV; updated = true; }
   95:             if (this.DETY != updatedItem.DETY) { this.DETY = updatedItem.DETY; updated = true; }
   96:             if (this.SUT != updatedItem.SUT) { this.SUT = updatedItem.SUT; updated = true; }
   97:             if (this.SCL != updatedItem.SCL) { this.SCL = updatedItem.SCL; updated = true; }
   98:             if (this.MIS != updatedItem.MIS) { this.MIS = updatedItem.MIS; updated = true; }
   99:             if (this.COS != updatedItem.COS) { this.COS = updatedItem.COS; updated = true; }
  100:             if (this.Content != updatedItem.Content) { this.Content = updatedItem.Content; updated = true; }
  101:  
  102:             if (updated) this.Updated = DateTime.UtcNow.AddHours(3);
  103:  
  104:             return updated;
  105:         }
  106:  
  107:         ////////////////////////////////////////////////////////////////////////////
  108:         ////////////////////////////////////////////////////////////////////////////
  109:  
  110:         /// <summary>
  111:         ///
  112:         /// </summary>
  113:         public string ToSimpleTextString()
  114:         {
  115:             return Ia.Ftn.Cl.Models.Data.Ericsson.Subscriber.ToSimpleTextString(this);
  116:         }
  117:  
  118:         ////////////////////////////////////////////////////////////////////////////
  119:         ////////////////////////////////////////////////////////////////////////////
  120:     }
  121:  
  122:     ////////////////////////////////////////////////////////////////////////////
  123:     ////////////////////////////////////////////////////////////////////////////
  124: }