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

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

Service Request Administrative Issue support class of Fixed Telecommunications Network (FTN) business model.

    1: using Microsoft.EntityFrameworkCore.Metadata.Internal;
    2: using System;
    3: using System.Collections.Generic;
    4: using System.Linq;
    5: using System.Runtime.CompilerServices;
    6: using System.Runtime.Serialization;
    7:  
    8: namespace Ia.Ftn.Cl.Model.Business
    9: {
   10:     ////////////////////////////////////////////////////////////////////////////
   11:  
   12:     /// <summary publish="true">
   13:     /// Service Request Administrative Issue support class of Fixed Telecommunications Network (FTN) business 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 ServiceRequestAdministrativeIssue
   30:     {
   31:         private static List<ServiceRequestAdministrativeIssueType> serviceRequestAdministrativeIssueTypeList;
   32:  
   33:         private static readonly object objectLock = new object();
   34:  
   35:         public enum DisconnectionType
   36:         {
   37:             None = 0,
   38:             Accounting = 1,
   39:             ProgrammedAccounting = 2,
   40:             ResidentialServiceInCommercialProperty = 3,
   41:             DisconnectionAndRemovalService = 4,
   42:             InternationalCallTrading = 5,
   43:             DestroyingMinistryEquipment = 6,
   44:             Harassment = 7,
   45:             ContactCustomerService = 8,
   46:             DueToOtherService = 9,
   47:             ProgrammedInternationalCalling = 10,
   48:         };
   49:  
   50:  
   51:         /// <summary/>
   52:         [DataContract(IsReference = true, Namespace = "kw.com.ia.ftn.api.serviceRequestAdministrativeIssue", Name = "ServiceRequestAdministrativeIssueType")]
   53:         public class ServiceRequestAdministrativeIssueType
   54:         {
   55:             /// <summary/>
   56:             [DataMember]
   57:             public DisconnectionType DisconnectionType { get; set; }
   58:  
   59:             /// <summary/>
   60:             [DataMember]
   61:             public string Name { get; set; }
   62:  
   63:             /// <summary/>
   64:             [DataMember]
   65:             public string ArabicName { get; set; }
   66:  
   67:             /// <summary/>
   68:             [DataMember]
   69:             public string NameArabicName
   70:             {
   71:                 get
   72:                 {
   73:                     return this.Name + " (" + this.ArabicName + ")";
   74:                 }
   75:             }
   76:         }
   77:  
   78:         ////////////////////////////////////////////////////////////////////////////
   79:  
   80:         /// <summary>
   81:         ///
   82:         /// </summary>
   83:         public static Ia.Ftn.Cl.Model.Business.ServiceRequestAdministrativeIssue.ServiceRequestAdministrativeIssueType ServiceRequestAdministrativeIssueTypeByDisconnectionType(DisconnectionType disconnectionType)
   84:         {
   85:             return (from srait in Ia.Ftn.Cl.Model.Business.ServiceRequestAdministrativeIssue.ServiceRequestAdministrativeIssueTypeList
   86:                     where srait.DisconnectionType == disconnectionType
   87:                     select srait).Single();
   88:         }
   89:  
   90:         ////////////////////////////////////////////////////////////////////////////
   91:  
   92:         /// <summary>
   93:         ///
   94:         /// </summary>
   95:         public static List<Ia.Ftn.Cl.Model.Business.ServiceRequestAdministrativeIssue.ServiceRequestAdministrativeIssueType> ServiceRequestAdministrativeIssueTypeList
   96:         {
   97:             get
   98:             {
   99:                 if (serviceRequestAdministrativeIssueTypeList == null || serviceRequestAdministrativeIssueTypeList.Count == 0)
  100:                 {
  101:                     lock (objectLock)
  102:                     {
  103:                         serviceRequestAdministrativeIssueTypeList = new List<Ia.Ftn.Cl.Model.Business.ServiceRequestAdministrativeIssue.ServiceRequestAdministrativeIssueType>
  104:                         {
  105:                             new Ia.Ftn.Cl.Model.Business.ServiceRequestAdministrativeIssue.ServiceRequestAdministrativeIssueType{ DisconnectionType = DisconnectionType.None, Name="None", ArabicName="لا مسألة" },
  106:                             new Ia.Ftn.Cl.Model.Business.ServiceRequestAdministrativeIssue.ServiceRequestAdministrativeIssueType{ DisconnectionType = DisconnectionType.Accounting, Name="Accounting", ArabicName="قطع إداري" },
  107:                             new Ia.Ftn.Cl.Model.Business.ServiceRequestAdministrativeIssue.ServiceRequestAdministrativeIssueType{ DisconnectionType = DisconnectionType.ProgrammedAccounting, Name="Programmed accounting", ArabicName="قطع مبرمج" },
  108:                             new Ia.Ftn.Cl.Model.Business.ServiceRequestAdministrativeIssue.ServiceRequestAdministrativeIssueType{ DisconnectionType = DisconnectionType.ResidentialServiceInCommercialProperty, Name="Residential service in commercial property", ArabicName="قطع لجنة: هاتف منزلي يعمل في محل تجاري" },
  109:                             new Ia.Ftn.Cl.Model.Business.ServiceRequestAdministrativeIssue.ServiceRequestAdministrativeIssueType{ DisconnectionType = DisconnectionType.DisconnectionAndRemovalService, Name="Disconnection and removal service", ArabicName="رفع لجنة: قطع حرارة مع رفع الفيوز" },
  110:                             new Ia.Ftn.Cl.Model.Business.ServiceRequestAdministrativeIssue.ServiceRequestAdministrativeIssueType{ DisconnectionType = DisconnectionType.InternationalCallTrading, Name="International call trading", ArabicName="قطع لجنة: متاجرة بالمكالمات الدولية" },
  111:                             new Ia.Ftn.Cl.Model.Business.ServiceRequestAdministrativeIssue.ServiceRequestAdministrativeIssueType{ DisconnectionType = DisconnectionType.DestroyingMinistryEquipment, Name="Destroying Ministry equipment", ArabicName="قطع لجنة: إتلاف خدمات وزارة" },
  112:                             new Ia.Ftn.Cl.Model.Business.ServiceRequestAdministrativeIssue.ServiceRequestAdministrativeIssueType{ DisconnectionType = DisconnectionType.Harassment, Name="Harassment", ArabicName="قطع معاكسة" },
  113:                             new Ia.Ftn.Cl.Model.Business.ServiceRequestAdministrativeIssue.ServiceRequestAdministrativeIssueType{ DisconnectionType = DisconnectionType.ContactCustomerService, Name="Contact customer service", ArabicName="قطع: مراجعة خدمة العملاء" },
  114:                             new Ia.Ftn.Cl.Model.Business.ServiceRequestAdministrativeIssue.ServiceRequestAdministrativeIssueType{ DisconnectionType = DisconnectionType.DueToOtherService, Name="Due to other service", ArabicName="قطع حرارة هاتف بسبب عدم السداد لهاتف ءاخر" },
  115:                             new Ia.Ftn.Cl.Model.Business.ServiceRequestAdministrativeIssue.ServiceRequestAdministrativeIssueType{ DisconnectionType = DisconnectionType.ProgrammedInternationalCalling, Name="Programmed International calling", ArabicName="قطع مبرمج: قطع الدولي" },
  116:                         };
  117:                     }
  118:                 }
  119:  
  120:                 return serviceRequestAdministrativeIssueTypeList;
  121:             }
  122:         }
  123:  
  124:         ////////////////////////////////////////////////////////////////////////////
  125:  
  126:         /// <summary>
  127:         ///
  128:         /// </summary>
  129:         public ServiceRequestAdministrativeIssue() { }
  130:  
  131:         ////////////////////////////////////////////////////////////////////////////
  132:  
  133:         /// <summary>
  134:         ///
  135:         /// </summary>
  136:         public static string ServiceRequestAdministrativeIssueId(string service, int serviceType)
  137:         {
  138:             return Ia.Ftn.Cl.Model.Business.Service2.ServiceId(service, serviceType);
  139:         }
  140:  
  141:         ////////////////////////////////////////////////////////////////////////////
  142:  
  143:         /// <summary>
  144:         ///
  145:         /// </summary>
  146:         public static string ColoredTypeCode(int type)
  147:         {
  148:             string s;
  149:  
  150:             var nameArabicName = Ia.Ftn.Cl.Model.Business.ServiceRequestAdministrativeIssue.ServiceRequestAdministrativeIssueTypeList.Where(u => (int)u.DisconnectionType == type).Select(u => u.NameArabicName).SingleOrDefault();
  151:  
  152:             if (type == 0) s = "<span style=\"color:green\">" + nameArabicName + "</span>"; // "None (لا مسألة)"
  153:             else s = "<span style=\"color:red\">" + nameArabicName + "</span>";
  154:  
  155:             return s;
  156:         }
  157:  
  158:         ////////////////////////////////////////////////////////////////////////////
  159:         ////////////////////////////////////////////////////////////////////////////
  160:     }
  161:  
  162:     ////////////////////////////////////////////////////////////////////////////
  163:     ////////////////////////////////////////////////////////////////////////////
  164: }