)>}]
شركة التطبيقات المتكاملة لتصميم وبرمجة البرمجيات الخاصة ش.ش.و.
Integrated Applications Programming Company
Home » Code Library » AxeSubscriber (Ia.Ftn.Cl.Model.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.Model.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:     ///
   19:     /// 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
   20:     /// the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
   21:     ///
   22:     /// This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
   23:     /// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
   24:     /// 
   25:     /// You should have received a copy of the GNU General Public License along with this library. If not, see http://www.gnu.org/licenses.
   26:     /// 
   27:     /// Copyright notice: This notice may not be removed or altered from any source distribution.
   28:     /// </remarks> 
   29:     public class AxeSubscriber
   30:     {
   31:         /// <summary/>
   32:         public AxeSubscriber() { }
   33:  
   34:         /// <summary/>
   35:         [Key, DatabaseGenerated(DatabaseGeneratedOption.None)]
   36:         public string Id { get; set; }
   37:  
   38:         /// <summary/>
   39:         public int SNB { get; set; }
   40:  
   41:         /// <summary/>
   42:         public string DEV { get; set; }
   43:  
   44:         /// <summary/>
   45:         public string DETY { get; set; }
   46:  
   47:         /// <summary/>
   48:         public string SUT { get; set; }
   49:  
   50:         /// <summary/>
   51:         public string SCL { get; set; }
   52:  
   53:         /// <summary/>
   54:         public string MIS { get; set; }
   55:  
   56:         /// <summary/>
   57:         public string COS { get; set; }
   58:  
   59:         /// <summary/>
   60:         public string Content { get; set; }
   61:  
   62:         /// <summary/>
   63:         public DateTime Created { get; set; }
   64:  
   65:         /// <summary/>
   66:         public DateTime Updated { get; set; }
   67:  
   68:         ////////////////////////////////////////////////////////////////////////////
   69:  
   70:         /// <summary>
   71:         ///
   72:         /// </summary>
   73:         public bool Equal(Ia.Ftn.Cl.Model.Ericsson.AxeSubscriber b)
   74:         {
   75:             // below: this will not check the Id, Created, Updated fields
   76:             bool areEqual;
   77:  
   78:             if (this.SNB != b.SNB) areEqual = false;
   79:             else if (this.DEV != b.DEV) areEqual = false;
   80:             else if (this.DETY != b.DETY) areEqual = false;
   81:             else if (this.SUT != b.SUT) areEqual = false;
   82:             else if (this.SCL != b.SCL) areEqual = false;
   83:             else if (this.MIS != b.MIS) areEqual = false;
   84:             else if (this.COS != b.COS) areEqual = false;
   85:             else if (this.Content != b.Content) areEqual = false;
   86:             else areEqual = true;
   87:  
   88:             return areEqual;
   89:         }
   90:  
   91:         ////////////////////////////////////////////////////////////////////////////
   92:  
   93:         /// <summary>
   94:         ///
   95:         /// </summary>
   96:         public bool Update(Ia.Ftn.Cl.Model.Ericsson.AxeSubscriber updatedItem)
   97:         {
   98:             // below: this will not update Id, Created
   99:             bool updated;
  100:  
  101:             updated = false;
  102:  
  103:             if (this.SNB != updatedItem.SNB) { this.SNB = updatedItem.SNB; updated = true; }
  104:             if (this.DEV != updatedItem.DEV) { this.DEV = updatedItem.DEV; updated = true; }
  105:             if (this.DETY != updatedItem.DETY) { this.DETY = updatedItem.DETY; updated = true; }
  106:             if (this.SUT != updatedItem.SUT) { this.SUT = updatedItem.SUT; updated = true; }
  107:             if (this.SCL != updatedItem.SCL) { this.SCL = updatedItem.SCL; updated = true; }
  108:             if (this.MIS != updatedItem.MIS) { this.MIS = updatedItem.MIS; updated = true; }
  109:             if (this.COS != updatedItem.COS) { this.COS = updatedItem.COS; updated = true; }
  110:             if (this.Content != updatedItem.Content) { this.Content = updatedItem.Content; updated = true; }
  111:  
  112:             if (updated) this.Updated = DateTime.UtcNow.AddHours(3);
  113:  
  114:             return updated;
  115:         }
  116:  
  117:         ////////////////////////////////////////////////////////////////////////////
  118:         ////////////////////////////////////////////////////////////////////////////
  119:  
  120:         /// <summary>
  121:         ///
  122:         /// </summary>
  123:         public string ToSimpleTextString()
  124:         {
  125:             return Ia.Ftn.Cl.Model.Data.Ericsson.Subscriber.ToSimpleTextString(this);
  126:         }
  127:  
  128:         ////////////////////////////////////////////////////////////////////////////
  129:         ////////////////////////////////////////////////////////////////////////////
  130:     }
  131:  
  132:     ////////////////////////////////////////////////////////////////////////////
  133:     ////////////////////////////////////////////////////////////////////////////
  134: }