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

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

Huawei's Owsbr 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.Huawei
    9: {
   10:     ////////////////////////////////////////////////////////////////////////////
   11:  
   12:     /// <summary publish="true">
   13:     /// Huawei's Owsbr Entity Framework class for Fixed Telecommunications Network (FTN) entity model.
   14:     /// </summary>
   15:     /// 
   16:     /// <remarks> 
   17:     /// Copyright © 2014-2021 Jasem Y. Al-Shamlan (info@ia.com.kw), Integrated Applications - Kuwait. All Rights Reserved.
   18:     /// </remarks> 
   19:     public class Owsbr
   20:     {
   21:         /// <summary/>
   22:         public enum ServiceTypeList 
   23:         {
   24:             /// <summary/>
   25:             IMPU = 1,
   26:  
   27:             /// <summary/>
   28:             US
   29:         }
   30:  
   31:         /// <summary/>
   32:         public Owsbr() { }
   33:  
   34:         /// <summary/>
   35:         public long Id { get; set; }
   36:  
   37:         /// <summary>
   38:         /// It specifies the IMPU of a specific subscriber. It can be a TEL URI or a SIP URI. The rules for setting the parameter are as follows:
   39:         /// To configure an IMPU in SIP URI format, type a string such as sip:userinfo@huawei.com or userinfo@huawei.com.
   40:         /// To configure an IMPU in TEL URI format, type a string such as tel:+867557780000 or +867557780000.
   41:         ///. Value: a string of a maximum of 128 characters. Default value: none. This parameter is mandatory.
   42:         /// </summary>
   43:         [Key]
   44:         public string IMPU { get; set; }
   45:  
   46:         /// <summary>
   47:         /// Options:
   48:         /// 0: NORMAL (NORMAL): The subscriber can originate and answer calls normally.
   49:         /// 1: OUTOWN (OUTOWN): The subscriber can answer calls but is forbidden to originate any call except for owing override calls.
   50:         /// 2: INOWN (INOWN): The subscriber is forbidden to answer calls but can originate calls.
   51:         /// 3: BOTHOWN (BOTHOWN): The subscriber is forbidden to answer and originate any calls.
   52:         /// </summary>
   53:         public int US { get; set; }
   54:  
   55:         /// <summary/>
   56:         public DateTime Created { get; set; }
   57:  
   58:         /// <summary/>
   59:         public DateTime Updated { get; set; }
   60:  
   61:         ////////////////////////////////////////////////////////////////////////////
   62:  
   63:         /// <summary>
   64:         ///
   65:         /// </summary>
   66:         public bool Equal(Owsbr owsbr)
   67:         {
   68:             // below: this will not check the Id, Created, Updated, or Viewed fields
   69:             bool areEqual;
   70:  
   71:             if (this.IMPU != owsbr.IMPU) areEqual = false;
   72:             else if (this.US != owsbr.US) { areEqual = false; }
   73:             else areEqual = true;
   74:  
   75:             return areEqual;
   76:         }
   77:  
   78:         ////////////////////////////////////////////////////////////////////////////
   79:  
   80:         /// <summary>
   81:         ///
   82:         /// </summary>
   83:         public bool Update(Owsbr owsbr)
   84:         {
   85:             // below: this will not update Id, IMPU, Created
   86:             bool updated;
   87:  
   88:             updated = false;
   89:  
   90:             if (this.US != owsbr.US) { this.US = owsbr.US; updated = true; }
   91:  
   92:             if (updated) this.Updated = DateTime.UtcNow.AddHours(3);
   93:  
   94:             return updated;
   95:         }
   96:  
   97:         ////////////////////////////////////////////////////////////////////////////
   98:         ////////////////////////////////////////////////////////////////////////////
   99:  
  100:         /// <summary>
  101:         ///
  102:         /// </summary>
  103:         public string ToSimpleTextString()
  104:         {
  105:             return Ia.Ftn.Cl.Models.Data.Huawei.Owsbr.ToSimpleTextString(this);
  106:         }
  107:  
  108:         ////////////////////////////////////////////////////////////////////////////
  109:         ////////////////////////////////////////////////////////////////////////////
  110:     }
  111:  
  112:     ////////////////////////////////////////////////////////////////////////////
  113:     ////////////////////////////////////////////////////////////////////////////
  114: }