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

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

    1:  
    2: namespace Ia.Ftn.Wa.Models.Maintenance
    3: {
    4:     ////////////////////////////////////////////////////////////////////////////
    5:  
    6:     /// <summary publish="true">
    7:     ///
    8:     /// </summary>
    9:     /// 
   10:     /// <remarks> 
   11:     /// Copyright © 2024-2025 Jasem Y. Al-Shamlan (info@ia.com.kw), Integrated Applications - Kuwait. All Rights Reserved.
   12:     ///
   13:     /// 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
   14:     /// the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
   15:     ///
   16:     /// This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
   17:     /// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
   18:     /// 
   19:     /// You should have received a copy of the GNU General Public License along with this library. If not, see http://www.gnu.org/licenses.
   20:     /// 
   21:     /// Copyright notice: This notice may not be removed or altered from any source distribution.
   22:     /// </remarks> 
   23:     public static class Sync
   24:     {
   25:         ////////////////////////////////////////////////////////////////////////////
   26:  
   27:         /// <summary>
   28:         ///
   29:         /// </summary>
   30:         public static void ViewModel(ref Ia.Ftn.Wa.Models.Maintenance.SyncViewModel syncViewModel)
   31:         {
   32:             var stopwatch = new Ia.Cl.Models.Stopwatch();
   33:  
   34:             var list = new List<string>()
   35:             { "23905552", "FNT.701.9" // Hu-Hu
   36: , "25215646", "SLA.15.30" // No-No
   37: , "24600860", "JBA.1245.12" // No-Hu SFU SIP
   38: , "24601445", "JBA.914.1    " // No-Hu MDU SIP
   39: , "23905344", "FNT.906.5" // Hu-Hu SFU SIP
   40: , "25651363", "MHL.2115.1" // Hu-Hu MDU SIP
   41: , "23711116", "MGF.60.17" // Hu-No SFU non-SIP
   42: , "25640006", "MHL.2021.2" // Hu-Hu MDU SIP
   43: };
   44:  
   45:             syncViewModel.RefreshRateBySecond = 30;
   46:  
   47:             //staff = Ia.Ftn.Cl.Models.Data.Staff.MembershipUser;
   48:  
   49:             var random = new Random();
   50:             var n = random.Next(1, 100);
   51:  
   52:             var label = string.Empty;
   53:             var content = string.Empty;
   54:  
   55:             var dateTime = DateTime.UtcNow.AddHours(3);
   56:  
   57:             if (n < 90)
   58:             {
   59:                 var input = list.PickRandom();
   60:  
   61:                 stopwatch.Start();
   62:  
   63:                 //_ = Ia.Ftn.Cl.Models.Business.Maintenance.Find.TriggerSearchToRefreshAspNetAndDatabaseConnection(input);
   64:  
   65:                 stopwatch.RecordElapsedMilliseconds();
   66:                 stopwatch.Stop();
   67:  
   68:                 label = "Refreshing with input: " + input + ", stopwatch.ElapsedMilliseconds: " + stopwatch.ElapsedMilliseconds;
   69:  
   70:                 stopwatch.Reset();
   71:             }
   72:             else if (n < 100)
   73:             {
   74:                 var m = Ia.Cl.Models.Default.Random(7);
   75:  
   76:                 switch (m)
   77:                 {
   78:                     case 0:
   79:                         {
   80:                             //var list = Ia.Ftn.Cl.Models.Data.Provision.ProvisionedImsServiceWithNullAccessNotInPstnNorInNceOntSipInfoNorVoipPstnUserNorMsanWithinMsanDomainListList(true);
   81:  
   82:                             //label = "Ia.Ftn.Cl.Models.Data.Provision.ProvisionedImsServiceWithNullAccessNotInPstnNorInNceOntSipInfoNorVoipPstnUserNorMsanWithinMsanDomainListList(true)";
   83:                             //content = string.Join(", ", list);
   84:  
   85:                             break;
   86:                         }
   87:                     case 1:
   88:                         {
   89:                             _ = Ia.Ftn.Cl.Models.Data.ServiceRequest.DbNameToServiceListDictionary;
   90:  
   91:                             label = "Ia.Ftn.Cl.Models.Data.ServiceRequest.DbNameToServiceListDictionary";
   92:  
   93:                             break;
   94:                         }
   95:                     case 2:
   96:                         {
   97:                             _ = Ia.Ftn.Cl.Models.Data.Administration.SiteStatistics();
   98:  
   99:                             label = "Ia.Ftn.Cl.Models.Data.Administration.SiteStatistics()";
  100:  
  101:                             break;
  102:                         }
  103:                     case 3:
  104:                         {
  105:                             _ = Ia.Ftn.Cl.Models.Data.Administration.ServiceAccessStatisticWithinKuwaitFtnArea();
  106:  
  107:                             label = "Ia.Ftn.Cl.Models.Data.Administration.ServiceAccessStatisticWithinKuwaitFtnArea()";
  108:  
  109:                             break;
  110:                         }
  111:                     case 4:
  112:                         {
  113:                             _ = Ia.Ftn.Cl.Models.Data.NetworkDesignDocument.OntList;
  114:  
  115:                             label = "Ia.Ftn.Cl.Models.Data.NetworkDesignDocument.OntList";
  116:  
  117:                             break;
  118:                         }
  119:                     case 5:
  120:                         {
  121:                             _ = Ia.Ftn.Cl.Models.Data.Nokia.Sdc.PonNameToTransactionTimestampValueListDictionary(true);
  122:  
  123:                             label = "Ia.Ftn.Cl.Models.Data.Nokia.Sdc.PonNameToTransactionTimestampValueListDictionary(true)";
  124:  
  125:                             break;
  126:                         }
  127:                     case 6:
  128:                         {
  129:                             _ = Ia.Ftn.Cl.Models.Data.Nokia.Sdc.PonNameToTransactionTimestampValueHourlyListDictionary(true);
  130:  
  131:                             label = "Ia.Ftn.Cl.Models.Data.Nokia.Sdc.PonNameToTransactionTimestampValueHourlyListDictionary(true)";
  132:  
  133:                             break;
  134:                         }
  135:                     default:
  136:                         {
  137:  
  138:                             break;
  139:                         }
  140:                 }
  141:             }
  142:             else label = "Default";
  143:  
  144:             if (dateTime.Minute % 10 == 0)
  145:             {
  146:                 Ia.Ftn.Cl.Models.Data.MessageQueue.SecretaryApplication.Enqueue(Ia.Ftn.Cl.Models.Business.MessageQueue.Application.FtnApplication, Ia.Ftn.Cl.Models.Business.MessageQueue.Process.Heartbeat);
  147:             }
  148:  
  149:             syncViewModel.Label = label;
  150:             syncViewModel.Content = content;
  151:  
  152:             Ia.Ftn.Wa.Models.Business.Default.ManageMessageQueue();
  153:         }
  154:  
  155:         ////////////////////////////////////////////////////////////////////////////
  156:         ////////////////////////////////////////////////////////////////////////////
  157:     }
  158:  
  159:     ////////////////////////////////////////////////////////////////////////////
  160:     ////////////////////////////////////////////////////////////////////////////
  161: }