شركة التطبيقات المتكاملة لتصميم النظم البرمجية الخاصة

Integrated Applications Programming Company

Skip Navigation LinksHome » Code Library » ServiceExemption

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

ServiceExemption Framework class for Next Generation Network (NGN) entity model.

   1:  using System;
   2:   
   3:  namespace Ia.Ngn.Cl.Model
   4:  {
   5:      ////////////////////////////////////////////////////////////////////////////
   6:   
   7:      /// <summary publish="true">
   8:      /// ServiceExemption Framework class for Next Generation Network (NGN) entity model.
   9:      /// </summary>
  10:      /// 
  11:      /// <remarks> 
  12:      /// Copyright © 2006-2017 Jasem Y. Al-Shamlan (info@ia.com.kw), Internet Applications - Kuwait. All Rights Reserved.
  13:      ///
  14:      /// 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
  15:      /// the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
  16:      ///
  17:      /// This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
  18:      /// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
  19:      /// 
  20:      /// You should have received a copy of the GNU General Public License along with this library. If not, see http://www.gnu.org/licenses.
  21:      /// 
  22:      /// Copyright notice: This notice may not be removed or altered from any source distribution.
  23:      /// </remarks> 
  24:      public partial class ServiceExemption
  25:      {
  26:          /// <summary/>
  27:          public ServiceExemption() { }
  28:   
  29:          /// <summary/>
  30:          public string Id { get; set; }
  31:   
  32:          /// <summary/>
  33:          public string Service { get; set; }
  34:   
  35:          /// <summary/>
  36:          public int ServiceType { get; set; }
  37:   
  38:          /// <summary/>
  39:          public int CallWaiting { get; set; }
  40:   
  41:          /// <summary/>
  42:          public int CallForwarding { get; set; }
  43:   
  44:          /// <summary/>
  45:          public int AlarmCall { get; set; }
  46:   
  47:          /// <summary/>
  48:          public int InternationalCallingUserControlled { get; set; }
  49:   
  50:          /// <summary/>
  51:          public int InternationalCalling { get; set; }
  52:   
  53:          /// <summary/>
  54:          public int CallerId { get; set; }
  55:   
  56:          /// <summary/>
  57:          public int WakeupCall { get; set; }
  58:   
  59:          /// <summary/>
  60:          public int ConferenceCall { get; set; }
  61:   
  62:          /// <summary/>
  63:          public int CallBarring { get; set; }
  64:   
  65:          /// <summary/>
  66:          public int ServiceSuspension { get; set; }
  67:   
  68:          /// <summary/>
  69:          public string Note { get; set; }
  70:   
  71:          /// <summary/>
  72:          public DateTime Created { get; set; }
  73:   
  74:          /// <summary/>
  75:          public DateTime Updated { get; set; }
  76:   
  77:          /// <summary/>
  78:          public System.Guid UserId { get; set; }
  79:   
  80:          ////////////////////////////////////////////////////////////////////////////
  81:   
  82:          /// <summary>
  83:          ///
  84:          /// </summary>
  85:          public static string ServiceServiceExemptionId(string service, int serviceType)
  86:          {
  87:              // below:
  88:              string id;
  89:   
  90:              id = Ia.Ngn.Cl.Model.Business.Service2.ServiceId(service, serviceType);
  91:   
  92:              return id;
  93:          }
  94:   
  95:          ////////////////////////////////////////////////////////////////////////////
  96:   
  97:          /// <summary>
  98:          ///
  99:          /// </summary>
 100:          public bool Update(Ia.Ngn.Cl.Model.ServiceExemption updateServiceExemption)
 101:          {
 102:              // below: this will not update Id, Created
 103:              bool updated;
 104:   
 105:              updated = false;
 106:   
 107:              if (this.Note != updateServiceExemption.Note) { this.Note = updateServiceExemption.Note; updated = true; }
 108:              if (this.UserId != updateServiceExemption.UserId) { this.UserId = updateServiceExemption.UserId; updated = true; }
 109:   
 110:              if (updated) this.Updated = DateTime.UtcNow.AddHours(3);
 111:   
 112:              return updated;
 113:          }
 114:   
 115:          ////////////////////////////////////////////////////////////////////////////
 116:          ////////////////////////////////////////////////////////////////////////////
 117:      }
 118:   
 119:      ////////////////////////////////////////////////////////////////////////////
 120:      ////////////////////////////////////////////////////////////////////////////
 121:  }