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

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

Service Entity Framework class for Fixed Telecommunications Network (FTN) business model.

    1: using System.Collections.Generic;
    2:  
    3: namespace Ia.Ftn.Cl.Models.Business
    4: {
    5:     ////////////////////////////////////////////////////////////////////////////
    6:  
    7:     /// <summary publish="true">
    8:     /// Service Entity Framework class for Fixed Telecommunications Network (FTN) business model.
    9:     /// </summary>
   10:     /// 
   11:     /// <remarks> 
   12:     /// Copyright © 2006-2019 Jasem Y. Al-Shamlan (info@ia.com.kw), Integrated Applications - Kuwait. All Rights Reserved.
   13:     /// </remarks> 
   14:     public class Service2
   15:     {
   16:         private static int sequentialQueueOriginalCount;
   17:         private static Queue<string> sequentialQueue = new Queue<string>();
   18:  
   19:         /// <summary/>
   20:         public Service2() { }
   21:  
   22:         ////////////////////////////////////////////////////////////////////////////
   23:  
   24:         /// <summary>
   25:         ///
   26:         /// </summary>
   27:         public static string ServiceId(string service, int serviceType)
   28:         {
   29:             string id;
   30:  
   31:             id = Ia.Ftn.Cl.Models.Business.Service.ServiceToServiceId(service, serviceType);
   32:  
   33:             return id;
   34:         }
   35:  
   36:         ////////////////////////////////////////////////////////////////////////////
   37:  
   38:         /// <summary>
   39:         ///
   40:         /// </summary>
   41:         public static string ServiceIdToService(string serviceId)
   42:         {
   43:             string service;
   44:  
   45:             service = Ia.Ftn.Cl.Models.Business.Service.ServiceIdToService(serviceId);
   46:  
   47:             return service;
   48:         }
   49:  
   50:         ////////////////////////////////////////////////////////////////////////////    
   51:  
   52:         /// <summary>
   53:         ///
   54:         /// </summary>
   55:         public static string SequentialServiceNotInServiceRequestServiceManager(out int sequentialQueueCount, out string progressCounterString)
   56:         {
   57:             string service;
   58:  
   59:             if (sequentialQueue.Count == 0)
   60:             {
   61:                 var dictionary = Ia.Ftn.Cl.Models.Data.Service2.ServiceNotInServiceRequestServiceToSiteDictionary;
   62:                 sequentialQueue = new Queue<string>(dictionary.Keys);
   63:  
   64:                 sequentialQueueOriginalCount = sequentialQueue.Count;
   65:             }
   66:  
   67:             if (sequentialQueue.Count > 0) service = sequentialQueue.Dequeue();
   68:             else service = string.Empty;
   69:  
   70:             progressCounterString = "(" + sequentialQueue.Count + "/" + sequentialQueueOriginalCount + ")";
   71:  
   72:             sequentialQueueCount = sequentialQueue.Count;
   73:  
   74:             return service;
   75:         }
   76:  
   77:         ////////////////////////////////////////////////////////////////////////////
   78:         ////////////////////////////////////////////////////////////////////////////
   79:     }
   80:  
   81:     ////////////////////////////////////////////////////////////////////////////
   82:     ////////////////////////////////////////////////////////////////////////////
   83: }