)>}]
شركة التطبيقات المتكاملة لتصميم وبرمجة البرمجيات الخاصة ش.ش.و.
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 Optical Fiber Network (OFN) entity model.

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