)>}]
شركة التطبيقات المتكاملة لتصميم وبرمجة البرمجيات الخاصة ش.ش.و.
Integrated Applications Programming Company
Home » Code Library » Service2 (Ia.Ftn.Cl.Model.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.Model.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:     ///
   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 class Service2
   25:     {
   26:         private static int sequentialQueueOriginalCount;
   27:         private static Queue<string> sequentialQueue = new Queue<string>();
   28:  
   29:         /// <summary/>
   30:         public Service2() { }
   31:  
   32:         ////////////////////////////////////////////////////////////////////////////
   33:  
   34:         /// <summary>
   35:         ///
   36:         /// </summary>
   37:         public static string ServiceId(string service, int serviceType)
   38:         {
   39:             string id;
   40:  
   41:             id = Ia.Ftn.Cl.Model.Business.Service.ServiceToServiceId(service, serviceType);
   42:  
   43:             return id;
   44:         }
   45:  
   46:         ////////////////////////////////////////////////////////////////////////////
   47:  
   48:         /// <summary>
   49:         ///
   50:         /// </summary>
   51:         public static string ServiceIdToService(string serviceId)
   52:         {
   53:             string service;
   54:  
   55:             service = Ia.Ftn.Cl.Model.Business.Service.ServiceIdToService(serviceId);
   56:  
   57:             return service;
   58:         }
   59:  
   60:         ////////////////////////////////////////////////////////////////////////////    
   61:  
   62:         /// <summary>
   63:         ///
   64:         /// </summary>
   65:         public static string SequentialServiceNotInServiceRequestServiceManager(out int sequentialQueueCount, out string progressCounterString)
   66:         {
   67:             string service;
   68:  
   69:             if (sequentialQueue.Count == 0)
   70:             {
   71:                 var dictionary = Ia.Ftn.Cl.Model.Data.Service2.ServiceNotInServiceRequestServiceToSiteDictionary;
   72:                 sequentialQueue = new Queue<string>(dictionary.Keys);
   73:  
   74:                 sequentialQueueOriginalCount = sequentialQueue.Count;
   75:             }
   76:  
   77:             if (sequentialQueue.Count > 0) service = sequentialQueue.Dequeue();
   78:             else service = string.Empty;
   79:  
   80:             progressCounterString = "(" + sequentialQueue.Count + "/" + sequentialQueueOriginalCount + ")";
   81:  
   82:             sequentialQueueCount = sequentialQueue.Count;
   83:  
   84:             return service;
   85:         }
   86:  
   87:         ////////////////////////////////////////////////////////////////////////////
   88:         ////////////////////////////////////////////////////////////////////////////
   89:     }
   90:  
   91:     ////////////////////////////////////////////////////////////////////////////
   92:     ////////////////////////////////////////////////////////////////////////////
   93: }