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