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

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

    1: using System.Reflection;
    2: using System.Text;
    3: using System.Text.RegularExpressions;
    4:  
    5: namespace Ia.Ftn.Wa.Models.Maintenance
    6: {
    7:     ////////////////////////////////////////////////////////////////////////////
    8:  
    9:     /// <summary publish="true">
   10:     ///
   11:     /// </summary>
   12:     /// 
   13:     /// <remarks> 
   14:     /// Copyright © 2006-2025 Jasem Y. Al-Shamlan (info@ia.com.kw), Integrated Applications - Kuwait. All Rights Reserved.
   15:     ///
   16:     /// 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
   17:     /// the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
   18:     ///
   19:     /// This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
   20:     /// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
   21:     /// 
   22:     /// You should have received a copy of the GNU General Public License along with this library. If not, see http://www.gnu.org/licenses.
   23:     /// 
   24:     /// Copyright notice: This notice may not be removed or altered from any source distribution.
   25:     /// </remarks> 
   26:     public static class List
   27:     {
   28:         ////////////////////////////////////////////////////////////////////////////
   29:  
   30:         /// <summary>
   31:         ///
   32:         /// </summary>
   33:         public static void ViewModel(ref Ia.Ftn.Wa.Models.Maintenance.ListViewModel listViewModel)
   34:         {
   35:         }
   36:  
   37:         ////////////////////////////////////////////////////////////////////////////
   38:  
   39:         /// <summary>
   40:         ///
   41:         /// </summary>
   42:         public static void Post(ref Ia.Ftn.Wa.Models.Maintenance.ListViewModel listViewModel, string commandName)
   43:         {
   44:             //https://www.codeproject.com/articles/19911/dynamically-invoke-a-method-given-strings-with-met
   45:  
   46:             MethodInfo methodInfo = typeof(Ia.Ftn.Wa.Models.Maintenance.List).GetMethod(commandName);
   47:  
   48:             methodInfo.Invoke(null, new object[] { listViewModel });
   49:         }
   50:  
   51:         ////////////////////////////////////////////////////////////////////////////
   52:  
   53:         /// <summary>
   54:         ///
   55:         /// </summary>
   56:         public static void ReadNetworkDesignDocumentAccessNameListWithOntEquipmentIdNotNullAndAccessIsNullIncludeOntServiceVoipsButton(ref Ia.Ftn.Wa.Models.Maintenance.ListViewModel listViewModel)
   57:         {
   58:             string u;
   59:             StringBuilder stringBuilder;
   60:             List<string> list;
   61:  
   62:             list = Ia.Ftn.Cl.Models.Data.Nokia.Ont.ReadNetworkDesignDocumentAccessNameListWithOntEquipmentIdNotNullAndAccessIsNullIncludeOntServiceVoips;
   63:  
   64:             if (list.Count > 0)
   65:             {
   66:                 stringBuilder = new StringBuilder(list.Count);
   67:  
   68:                 foreach (string s in list)
   69:                 {
   70:                     u = @"<a href=""find.aspx?input=" + s + @""">" + s + "</a>";
   71:                     stringBuilder.Append(u + " ");
   72:                 }
   73:  
   74:                 listViewModel.ListLiteral = stringBuilder.ToString().Trim();
   75:  
   76:                 listViewModel.CountLabel = "List count: " + list.Count;
   77:             }
   78:             else listViewModel.CountLabel = "List count is zero.";
   79:         }
   80:  
   81:         ////////////////////////////////////////////////////////////////////////////
   82:  
   83:         /// <summary>
   84:         ///
   85:         /// </summary>
   86:         public static void NumberOfAgcfGatewayRecordInGroupOfMgcIpButton(ref Ia.Ftn.Wa.Models.Maintenance.ListViewModel listViewModel)
   87:         {
   88:             StringBuilder stringBuilder;
   89:             SortedDictionary<string, int> sortedDictionary, pairSortedDictionary;
   90:  
   91:             sortedDictionary = new SortedDictionary<string, int>(Ia.Ftn.Cl.Models.Business.Nokia.Ims.NumberOfAgcfGatewayRecordInGroupOfMgcIpDictionary);
   92:             pairSortedDictionary = new SortedDictionary<string, int>();
   93:  
   94:             if (sortedDictionary.Count > 0)
   95:             {
   96:                 stringBuilder = new StringBuilder(sortedDictionary.Count * 64);
   97:  
   98:                 stringBuilder.AppendLine("List of the number of AGCF gateway records in groups of MGC IP:" + "<br />");
   99:                 stringBuilder.AppendLine("<br />");
  100:  
  101:                 foreach (KeyValuePair<string, int> kvp in sortedDictionary)
  102:                 {
  103:                     stringBuilder.AppendLine(kvp.Key + "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" + kvp.Value + "<br />");
  104:                 }
  105:  
  106:                 stringBuilder.AppendLine("<br />");
  107:                 stringBuilder.AppendLine("Total number of AGCF gateway records: " + sortedDictionary.Sum(u => u.Value) + " ");
  108:  
  109:                 stringBuilder.AppendLine("<br />");
  110:                 stringBuilder.AppendLine("<br />");
  111:  
  112:                 stringBuilder.AppendLine("List of the number of AGCF gateway records in IMS pairs of MGC IP:" + "<br />");
  113:                 stringBuilder.AppendLine("<br />");
  114:  
  115:                 foreach (Ia.Ftn.Cl.Models.Business.Nokia.Ims.ImsBasicService imsBasicService in Ia.Ftn.Cl.Models.Business.Nokia.Ims.ImsBasicServiceList)
  116:                 {
  117:                     stringBuilder.AppendLine(imsBasicService.MgcIp + " " + imsBasicService.MgcSecondaryIp + "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" + (sortedDictionary[imsBasicService.MgcIp] + sortedDictionary[imsBasicService.MgcSecondaryIp]) + "<br />");
  118:                 }
  119:  
  120:                 listViewModel.ListLiteral = stringBuilder.ToString();
  121:  
  122:                 listViewModel.CountLabel = "Dictionary count: " + sortedDictionary.Count;
  123:             }
  124:             else listViewModel.CountLabel = "Dictionary count: zero. ";
  125:         }
  126:  
  127:         ////////////////////////////////////////////////////////////////////////////
  128:  
  129:         /// <summary>
  130:         ///
  131:         /// </summary>
  132:         public static void NetworkDesignDocumentOntWithAgcfGatewayRecordAndNonEmptyAgcfEndpointButNoAccessListButton(ref Ia.Ftn.Wa.Models.Maintenance.ListViewModel listViewModel)
  133:         {
  134:             string u;
  135:             StringBuilder stringBuilder;
  136:             List<Ia.Ftn.Cl.Models.Business.NetworkDesignDocument.Ont> list;
  137:  
  138:             list = Ia.Ftn.Cl.Models.Data.Nokia.Ims.NddOntWithAgcfGatewayRecordAndNotEmptyAgcfEndpointAndNullAccessList();
  139:  
  140:             if (list.Count > 0)
  141:             {
  142:                 stringBuilder = new StringBuilder(list.Count);
  143:  
  144:                 foreach (Ia.Ftn.Cl.Models.Business.NetworkDesignDocument.Ont nddOnt in list)
  145:                 {
  146:                     u = @"<a href=""find.aspx?input=" + nddOnt.Access.Name + @""">" + nddOnt.Access.Name + "</a>";
  147:                     stringBuilder.Append(u + " ");
  148:                 }
  149:  
  150:                 listViewModel.ListLiteral = stringBuilder.ToString().Trim();
  151:  
  152:                 listViewModel.CountLabel = "List count: " + list.Count;
  153:             }
  154:             else listViewModel.CountLabel = "List count is zero.";
  155:         }
  156:  
  157:         ////////////////////////////////////////////////////////////////////////////
  158:  
  159:         /// <summary>
  160:         ///
  161:         /// </summary>
  162:         public static void NokiaAmsNewOntEvent(ref Ia.Ftn.Wa.Models.Maintenance.ListViewModel listViewModel)
  163:         {
  164:             string serialNumber;
  165:             Match match;
  166:  
  167:             var count = 0;
  168:             var serialNumberList = new List<string>();
  169:             var stringBuilder = new StringBuilder();
  170:  
  171:             var list = Ia.Ftn.Cl.Models.Data.Event.NewOntList;
  172:  
  173:             var s = "System\tAid\tEventTime\tSerial<br/>";
  174:             stringBuilder.AppendLine(s);
  175:  
  176:             foreach (var l in list)
  177:             {
  178:                 match = Regex.Match(l.Detail, "(ALCL.{8})");
  179:  
  180:                 serialNumber = (match.Success) ? match.Value : string.Empty;
  181:  
  182:                 if (!serialNumberList.Contains(serialNumber))
  183:                 {
  184:                     serialNumberList.Add(serialNumber);
  185:  
  186:                     s = l.System + "\t" + l.Aid + "\t" + l.EventTime.ToString("yyyy-MM-dd") + "\t" + serialNumber + "<br/>";
  187:  
  188:                     stringBuilder.AppendLine(s);
  189:                     count++;
  190:                 }
  191:             }
  192:  
  193:             listViewModel.ListLiteral = stringBuilder.ToString().Trim();
  194:  
  195:             listViewModel.CountLabel = "List count: " + count;
  196:         }
  197:  
  198:         ////////////////////////////////////////////////////////////////////////////
  199:  
  200:         /// <summary>
  201:         ///
  202:         /// </summary>
  203:         public static void IpWithinAgcfGatewayRecordsThatDoNotBelongToNetworkDesignDocumentListButton(ref Ia.Ftn.Wa.Models.Maintenance.ListViewModel listViewModel)
  204:         {
  205:             string u;
  206:             StringBuilder stringBuilder;
  207:             List<string> list;
  208:  
  209:             list = Ia.Ftn.Cl.Models.Data.Nokia.AgcfGatewayRecord.IpWithinAgcfGatewayRecordsThatDoNotBelongToNetworkDesignDocumentList();
  210:  
  211:             if (list.Count > 0)
  212:             {
  213:                 stringBuilder = new StringBuilder(list.Count * 64);
  214:  
  215:                 foreach (string s in list)
  216:                 {
  217:                     u = @"<a href=""find.aspx?input=" + s + @""">" + s + "</a>";
  218:                     stringBuilder.Append(u + " ");
  219:                 }
  220:  
  221:                 listViewModel.ListLiteral = stringBuilder.ToString().Trim();
  222:  
  223:                 listViewModel.CountLabel = "List count: " + list.Count;
  224:             }
  225:             else listViewModel.CountLabel = "List count is zero.";
  226:         }
  227:  
  228:         ////////////////////////////////////////////////////////////////////////////
  229:  
  230:         /// <summary>
  231:         ///
  232:         /// </summary>
  233:         public static void NumberOfNokiaH248SubsribersPerFsdbListButton(ref Ia.Ftn.Wa.Models.Maintenance.ListViewModel listViewModel)
  234:         {
  235:             string s;
  236:             List<string> list;
  237:  
  238:             list = Ia.Ftn.Cl.Models.Business.Nokia.Ims.NumberOfNokiaH248SubsribersPerFsdb();
  239:  
  240:             if (list.Count > 0)
  241:             {
  242:                 list.Sort();
  243:  
  244:                 //stringBuilder = new StringBuilder(list.Count * 64);
  245:  
  246:                 s = string.Join("<br />", list.ToArray());
  247:  
  248:                 listViewModel.ListLiteral = s;
  249:  
  250:                 listViewModel.CountLabel = "List count: " + list.Count;
  251:             }
  252:             else listViewModel.CountLabel = "List count is zero.";
  253:         }
  254:  
  255:         ////////////////////////////////////////////////////////////////////////////
  256:  
  257:         /// <summary>
  258:         ///
  259:         /// </summary>
  260:         public static void NumberOfNokiaSipSubsribersPerFsdbListButton(ref Ia.Ftn.Wa.Models.Maintenance.ListViewModel listViewModel)
  261:         {
  262:             string s;
  263:             List<string> list;
  264:  
  265:             list = Ia.Ftn.Cl.Models.Business.Nokia.Ims.NumberOfNokiaSipSubsribersPerFsdb();
  266:  
  267:             if (list.Count > 0)
  268:             {
  269:                 list.Sort();
  270:  
  271:                 //stringBuilder = new StringBuilder(list.Count * 64);
  272:  
  273:                 s = string.Join("<br />", list.ToArray());
  274:  
  275:                 listViewModel.ListLiteral = s;
  276:  
  277:                 listViewModel.CountLabel = "List count: " + list.Count;
  278:             }
  279:             else listViewModel.CountLabel = "List count is zero.";
  280:         }
  281:  
  282:         ////////////////////////////////////////////////////////////////////////////
  283:  
  284:         /// <summary>
  285:         ///
  286:         /// </summary>
  287:         public static void ServiceWhereSubscriberAlternateOtasRealmGroupNumberDoesNotEqualSubPartyAssocOtasRealmGroupNumberListButton(ref Ia.Ftn.Wa.Models.Maintenance.ListViewModel listViewModel)
  288:         {
  289:             string s;
  290:             List<string> list;
  291:             //List<string> serviceList;
  292:  
  293:             list = new List<string>();
  294:  
  295:             var partyIdList = Ia.Ftn.Cl.Models.Data.Nokia.Ims.ServiceWhereSubscriberAlternateOtasRealmGroupNumberDoesNotEqualSubPartyAssocOtasRealmGroupNumberList();
  296:  
  297:             if (partyIdList.Count > 0)
  298:             {
  299:                 //stringBuilder = new StringBuilder(serviceAccessFlatTermIdList.Count * 64);
  300:  
  301:                 foreach (var t in partyIdList) list.Add(t);
  302:  
  303:                 s = string.Join("<br />", list.ToArray());
  304:  
  305:                 listViewModel.ListLiteral = s;
  306:  
  307:                 listViewModel.CountLabel = "List count: " + list.Count;
  308:             }
  309:             else listViewModel.CountLabel = "List count is zero.";
  310:         }
  311:  
  312:         ////////////////////////////////////////////////////////////////////////////
  313:  
  314:         /// <summary>
  315:         ///
  316:         /// </summary>
  317:         public static void AgcfGatewayRecordsWithinNddOntListWithWrongSecondaryIpListButton(ref Ia.Ftn.Wa.Models.Maintenance.ListViewModel listViewModel)
  318:         {
  319:             string s;
  320:             List<string> list;
  321:  
  322:             list = new List<string>();
  323:  
  324:             var v = Ia.Ftn.Cl.Models.Data.Nokia.Ims.AgcfGatewayRecordsWithinNddOntListWithWrongSecondaryIpList();
  325:  
  326:             if (v.Count > 0)
  327:             {
  328:                 //stringBuilder = new StringBuilder(v.Count * 64);
  329:  
  330:                 foreach (var w in v) list.Add(w.GwId.ToString());
  331:  
  332:                 s = string.Join(" ", list.ToArray());
  333:  
  334:                 listViewModel.ListLiteral = s;
  335:  
  336:                 listViewModel.CountLabel = "List count: " + list.Count;
  337:             }
  338:             else listViewModel.CountLabel = "List count is zero.";
  339:         }
  340:  
  341:         ////////////////////////////////////////////////////////////////////////////
  342:  
  343:         /// <summary>
  344:         ///
  345:         /// </summary>
  346:         public static void DistributionOfHuaweiOntOverNokiaPrimarySwitchButton(ref Ia.Ftn.Wa.Models.Maintenance.ListViewModel listViewModel)
  347:         {
  348:             listViewModel.ListLiteral = Ia.Ftn.Cl.Models.Data.Ims.DistributionOfHuaweiOntOverNokiaPrimarySwitchList();
  349:  
  350:             listViewModel.CountLabel = string.Empty;
  351:         }
  352:  
  353:         ////////////////////////////////////////////////////////////////////////////
  354:  
  355:         /// <summary>
  356:         ///
  357:         /// </summary>
  358:         public static void ServiceProvisionedManuallyWithNonStandardHenceNotFunctionalPartyIdNames(ref Ia.Ftn.Wa.Models.Maintenance.ListViewModel listViewModel)
  359:         {
  360:             List<string> list;
  361:  
  362:             list = Ia.Ftn.Cl.Models.Data.Nokia.Ims.ServiceProvisionedManuallyWithNonStandardHenceNotFunctionalPartyIdNames;
  363:  
  364:             if (list.Count > 0)
  365:             {
  366:                 //stringBuilder = new StringBuilder(list.Count * 64);
  367:  
  368:                 listViewModel.ListLiteral = string.Join(" ", list.ToArray());
  369:  
  370:                 listViewModel.CountLabel = "List count: " + list.Count;
  371:             }
  372:             else listViewModel.CountLabel = "List count is zero.";
  373:         }
  374:  
  375:         ////////////////////////////////////////////////////////////////////////////
  376:  
  377:         /// <summary>
  378:         ///
  379:         /// </summary>
  380:         public static void AgcfGatewayRecordWithNoNddNokiaSwitchOntInNonSipOltAndNullOrEmptyAgcfEndpointList(ref Ia.Ftn.Wa.Models.Maintenance.ListViewModel listViewModel)
  381:         {
  382:             StringBuilder stringBuilder;
  383:             List<int> list;
  384:  
  385:             list = Ia.Ftn.Cl.Models.Data.Nokia.Ims.AgcfGatewayRecordWithNoNddNokiaSwitchOntInNonSipOltAndNullOrEmptyAgcfEndpointList().Select(u => u.GwId).ToList();
  386:  
  387:             if (list.Count > 0)
  388:             {
  389:                 stringBuilder = new StringBuilder(list.Count * 64);
  390:  
  391:                 listViewModel.ListLiteral = string.Join(" ", list.ToArray());
  392:  
  393:                 listViewModel.CountLabel = "List count: " + list.Count;
  394:             }
  395:             else listViewModel.CountLabel = "List count is zero.";
  396:         }
  397:  
  398:         ////////////////////////////////////////////////////////////////////////////
  399:  
  400:         /// <summary>
  401:         ///
  402:         /// </summary>
  403:         public static void NddNokiaSwitchOntInNonSipOltWithAccessButNoAgcfGatewayRecordList(ref Ia.Ftn.Wa.Models.Maintenance.ListViewModel listViewModel)
  404:         {
  405:             string s;
  406:             StringBuilder stringBuilder;
  407:             List<string> list;
  408:  
  409:             list = Ia.Ftn.Cl.Models.Data.Nokia.Ims.NddNokiaSwitchOntInNonSipOltWithAccessButNoAgcfGatewayRecordList().Select(u => u.Access.Name).ToList();
  410:  
  411:             if (list.Count > 0)
  412:             {
  413:                 stringBuilder = new StringBuilder(list.Count * 64);
  414:  
  415:                 foreach (var u in list)
  416:                 {
  417:                     s = @"<a href=""find.aspx?input=" + u + @""">" + u + "</a>";
  418:                     stringBuilder.Append(s + " ");
  419:                 }
  420:  
  421:                 listViewModel.ListLiteral = stringBuilder.ToString().Trim();
  422:  
  423:                 listViewModel.CountLabel = "List count: " + list.Count;
  424:             }
  425:             else listViewModel.CountLabel = "List count is zero.";
  426:         }
  427:  
  428:         ////////////////////////////////////////////////////////////////////////////
  429:  
  430:         /// <summary>
  431:         ///
  432:         /// </summary>
  433:         public static void HuaweiAccessesWithNoEmsOntList(ref Ia.Ftn.Wa.Models.Maintenance.ListViewModel listViewModel)
  434:         {
  435:             string s;
  436:             StringBuilder stringBuilder;
  437:             List<Ia.Ftn.Cl.Models.Access> list;
  438:  
  439:             list = Ia.Ftn.Cl.Models.Data.Access.HuaweiAccessesWithNoEmsOntList;
  440:  
  441:             if (list.Count > 0)
  442:             {
  443:                 stringBuilder = new StringBuilder(list.Count * 64);
  444:  
  445:                 foreach (var o in list)
  446:                 {
  447:                     s = @"<a href=""find.aspx?input=" + o.Name + @""">" + o.Name + "</a>";
  448:                     stringBuilder.Append(s + " ");
  449:                 }
  450:  
  451:                 listViewModel.ListLiteral = stringBuilder.ToString().Trim();
  452:  
  453:                 listViewModel.CountLabel = "List count: " + list.Count;
  454:             }
  455:             else listViewModel.CountLabel = "List count is zero.";
  456:         }
  457:  
  458:         ////////////////////////////////////////////////////////////////////////////
  459:  
  460:         /// <summary>
  461:         ///
  462:         /// </summary>
  463:         public static void HuaweiAccessList(ref Ia.Ftn.Wa.Models.Maintenance.ListViewModel listViewModel)
  464:         {
  465:             string s, accessName, areaSymbol;
  466:             StringBuilder stringBuilder;
  467:             List<Ia.Ftn.Cl.Models.Access> list;
  468:  
  469:             list = Ia.Ftn.Cl.Models.Data.Access.HuaweiAccessList;
  470:  
  471:             var areaIdToSymbolDictionary = Ia.Ftn.Cl.Models.Data.Service.AreaIdToSymbolDictionary;
  472:  
  473:             if (list.Count > 0)
  474:             {
  475:                 stringBuilder = new StringBuilder(list.Count * 64);
  476:  
  477:                 s = "Access name\tAreaSymbol\tBlock\tStreet\tPremisesOld\tPremisesNew\tPaci\tNote\tCreated\tUpdated";
  478:                 stringBuilder.AppendLine(s + "<br/>");
  479:                 stringBuilder.AppendLine(" ");
  480:  
  481:                 foreach (var o in list)
  482:                 {
  483:                     areaSymbol = areaIdToSymbolDictionary[o.AreaId];
  484:                     accessName = areaSymbol + "." + o.Pon + "." + o.Ont;
  485:                     s = @"<a href=""find.aspx?input=" + accessName + @""">" + accessName + "</a>" + "\t" + areaSymbol + "\t" + o.Block + "\t" + o.Street + "\t" + o.PremisesOld + "\t" + o.PremisesNew + "\t" + o.Paci + "\t" + o.Note + "\t" + o.Created.ToString("yyyy-MM-dd") + "\t" + o.Updated.ToString("yyyy-MM-dd");
  486:                     stringBuilder.AppendLine(s + "<br/>");
  487:                 }
  488:  
  489:                 listViewModel.ListLiteral = stringBuilder.ToString().Trim();
  490:  
  491:                 listViewModel.CountLabel = "List count: " + list.Count;
  492:             }
  493:             else listViewModel.CountLabel = "List count is zero.";
  494:         }
  495:  
  496:         ////////////////////////////////////////////////////////////////////////////
  497:  
  498:         /// <summary>
  499:         ///
  500:         /// </summary>
  501:         public static void NokiaAccessList(ref Ia.Ftn.Wa.Models.Maintenance.ListViewModel listViewModel)
  502:         {
  503:             string s, accessName, areaSymbol;
  504:             StringBuilder stringBuilder;
  505:             List<Ia.Ftn.Cl.Models.Access> list;
  506:  
  507:             list = Ia.Ftn.Cl.Models.Data.Access.HuaweiAccessList;
  508:  
  509:             var areaIdToSymbolDictionary = Ia.Ftn.Cl.Models.Data.Service.AreaIdToSymbolDictionary;
  510:  
  511:             if (list.Count > 0)
  512:             {
  513:                 stringBuilder = new StringBuilder(list.Count * 64);
  514:  
  515:                 s = "Access name\tAreaSymbol\tBlock\tStreet\tPremisesOld\tPremisesNew\tPaci\tNote\tCreated\tUpdated";
  516:                 stringBuilder.AppendLine(s + "<br/>");
  517:                 stringBuilder.AppendLine(" ");
  518:  
  519:                 foreach (var o in list)
  520:                 {
  521:                     areaSymbol = areaIdToSymbolDictionary[o.AreaId];
  522:                     accessName = areaSymbol + "." + o.Pon + "." + o.Ont;
  523:                     s = @"<a href=""find.aspx?input=" + accessName + @""">" + accessName + "</a>" + "\t" + areaSymbol + "\t" + o.Block + "\t" + o.Street + "\t" + o.PremisesOld + "\t" + o.PremisesNew + "\t" + o.Paci + "\t" + o.Note + "\t" + o.Created.ToString("yyyy-MM-dd") + "\t" + o.Updated.ToString("yyyy-MM-dd");
  524:                     stringBuilder.AppendLine(s + "<br/>");
  525:                 }
  526:  
  527:                 listViewModel.ListLiteral = stringBuilder.ToString().Trim();
  528:  
  529:                 listViewModel.CountLabel = "List count: " + list.Count;
  530:             }
  531:             else listViewModel.CountLabel = "List count is zero.";
  532:         }
  533:  
  534:         ////////////////////////////////////////////////////////////////////////////
  535:  
  536:         /// <summary>
  537:         ///
  538:         /// </summary>
  539:         public static void SubPartiesPrimaryPuidCpeProfileNumberCountDistribution(ref Ia.Ftn.Wa.Models.Maintenance.ListViewModel listViewModel)
  540:         {
  541:             int primaryPuidCpeProfileNumber, count;
  542:             string s;
  543:             StringBuilder stringBuilder;
  544:             Dictionary<int, int> dictionary;
  545:  
  546:             stringBuilder = new StringBuilder();
  547:  
  548:             dictionary = Ia.Ftn.Cl.Models.Data.Nokia.SubParty.PrimaryPuidCpeProfileNumberCountDistributionDictionary;
  549:  
  550:             if (dictionary.Count > 0)
  551:             {
  552:                 s = "PrimaryPUIDCPEProfileNumber\tCount";
  553:  
  554:                 stringBuilder.AppendLine(s);
  555:                 stringBuilder.AppendLine(" ");
  556:  
  557:                 foreach (KeyValuePair<int, int> kvp in dictionary)
  558:                 {
  559:                     primaryPuidCpeProfileNumber = kvp.Key;
  560:                     count = kvp.Value;
  561:  
  562:                     s = primaryPuidCpeProfileNumber + "\t\t\t\t" + count;
  563:  
  564:                     stringBuilder.AppendLine(s + "<br/>");
  565:                 }
  566:  
  567:                 listViewModel.ListLiteral = stringBuilder.ToString().Trim();
  568:  
  569:                 listViewModel.CountLabel = string.Empty;
  570:             }
  571:             else listViewModel.CountLabel = string.Empty;
  572:         }
  573:  
  574:         ////////////////////////////////////////////////////////////////////////////
  575:  
  576:         /// <summary>
  577:         ///
  578:         /// </summary>
  579:         public static void SubPartiesSipNumberInGroupOfPrimaryExchange(ref Ia.Ftn.Wa.Models.Maintenance.ListViewModel listViewModel)
  580:         {
  581:             int tecCount, skbCount, otherCount;
  582:             string displayName, assocOtasRealm;
  583:             StringBuilder stringBuilder, tecStringBuilder, skbStringBuilder, otherStringBuilder;
  584:             Dictionary<string, string> dictionary;
  585:  
  586:             tecCount = skbCount = otherCount = 0;
  587:  
  588:             stringBuilder = new StringBuilder();
  589:             skbStringBuilder = new StringBuilder();
  590:             tecStringBuilder = new StringBuilder();
  591:             otherStringBuilder = new StringBuilder();
  592:  
  593:             dictionary = Ia.Ftn.Cl.Models.Data.Nokia.SubParty.SipNumberWithAssocOtasRealmList;
  594:  
  595:             if (dictionary.Count > 0)
  596:             {
  597:                 tecStringBuilder.AppendLine("TEC switch: "); // see below
  598:                 skbStringBuilder.AppendLine("SKB switch: "); // see below
  599:                 otherStringBuilder.AppendLine("Other switch: "); // see below
  600:  
  601:                 foreach (KeyValuePair<string, string> kvp in dictionary)
  602:                 {
  603:                     displayName = kvp.Key;
  604:                     assocOtasRealm = kvp.Value;
  605:  
  606:                     if (assocOtasRealm.Contains("tecics01"))
  607:                     {
  608:                         tecCount++;
  609:                         tecStringBuilder.Append(displayName + ", ");
  610:                     }
  611:                     else if (assocOtasRealm.Contains("skbics01"))
  612:                     {
  613:                         skbCount++;
  614:                         skbStringBuilder.Append(displayName + ", ");
  615:                     }
  616:                     else
  617:                     {
  618:                         otherCount++;
  619:                         otherStringBuilder.Append(displayName + ", ");
  620:                     }
  621:                 }
  622:  
  623:                 tecStringBuilder.Replace("TEC switch: ", "TEC switch (" + tecCount + "): ");
  624:                 skbStringBuilder.Replace("SKB switch: ", "SKB switch (" + skbCount + "): ");
  625:                 otherStringBuilder.Replace("Other switch: ", "Other switch (" + otherCount + "): ");
  626:  
  627:                 stringBuilder.AppendLine("<p>");
  628:                 stringBuilder.Append(tecStringBuilder.ToString().Trim());
  629:                 stringBuilder.AppendLine("</p>");
  630:  
  631:                 stringBuilder.AppendLine("<p>");
  632:                 stringBuilder.Append(skbStringBuilder.ToString().Trim());
  633:                 stringBuilder.AppendLine("</p>");
  634:  
  635:                 stringBuilder.AppendLine("<p>");
  636:                 stringBuilder.Append(otherStringBuilder.ToString().Trim());
  637:                 stringBuilder.AppendLine("</p>");
  638:  
  639:                 listViewModel.ListLiteral = stringBuilder.ToString().Trim();
  640:  
  641:                 listViewModel.CountLabel = string.Empty;
  642:             }
  643:             else listViewModel.CountLabel = string.Empty;
  644:         }
  645:  
  646:         ////////////////////////////////////////////////////////////////////////////
  647:  
  648:         /// <summary>
  649:         ///
  650:         /// </summary>
  651:         public static void DistributionOfOntTypesOfProvisionedAndReadyForServiceNokiaAndHuaweiOnts(ref Ia.Ftn.Wa.Models.Maintenance.ListViewModel listViewModel)
  652:         {
  653:             int familyTypeId, count;
  654:             string s, equipmentId;
  655:             StringBuilder stringBuilder;
  656:             Dictionary<int, int> ontDictionary;
  657:             Dictionary<string, int> emsOntDictionary;
  658:  
  659:             stringBuilder = new StringBuilder();
  660:  
  661:             ontDictionary = Ia.Ftn.Cl.Models.Data.Nokia.Ont.DistributionOfFamilyTypeIdInOntWhereSerialIsAssignedAndAccessIsNotNullDictionary;
  662:             emsOntDictionary = Ia.Ftn.Cl.Models.Data.Huawei.Ont.DistributionOfEquipmentIdInEmsOntWhereAccessIsNotNullDictionary;
  663:  
  664:             listViewModel.CountLabel = string.Empty;
  665:  
  666:             if (ontDictionary.Count > 0)
  667:             {
  668:                 stringBuilder.AppendLine("Nokia:<br/>");
  669:                 stringBuilder.AppendLine("FamilyType\tCount<br/>");
  670:                 stringBuilder.AppendLine("&nbsp;<br/>");
  671:  
  672:                 foreach (KeyValuePair<int, int> kvp in ontDictionary)
  673:                 {
  674:                     familyTypeId = kvp.Key;
  675:                     count = kvp.Value;
  676:  
  677:                     s = Ia.Ftn.Cl.Models.Business.Nokia.Ont.FamilyTypeStringFromFamilyTypeId(familyTypeId) + "\t\t" + count + "<br/>";
  678:  
  679:                     stringBuilder.AppendLine(s);
  680:                 }
  681:  
  682:                 stringBuilder.AppendLine("&nbsp;<br/>");
  683:                 stringBuilder.AppendLine("&nbsp;<br/>");
  684:             }
  685:  
  686:             if (emsOntDictionary.Count > 0)
  687:             {
  688:                 stringBuilder.AppendLine("Huawei:<br/>");
  689:                 stringBuilder.AppendLine("EquipmentId\tCount<br/>");
  690:                 stringBuilder.AppendLine("&nbsp;<br/>");
  691:  
  692:                 foreach (KeyValuePair<string, int> kvp in emsOntDictionary)
  693:                 {
  694:                     equipmentId = kvp.Key;
  695:                     count = kvp.Value;
  696:  
  697:                     s = equipmentId + "\t" + count + "<br/>";
  698:  
  699:                     stringBuilder.AppendLine(s);
  700:                 }
  701:             }
  702:  
  703:             listViewModel.ListLiteral = stringBuilder.ToString().Trim();
  704:         }
  705:  
  706:         ////////////////////////////////////////////////////////////////////////////
  707:  
  708:         /// <summary>
  709:         ///
  710:         /// </summary>
  711:         public static void ServiceInAllowedToBeMigratedOltList(ref Ia.Ftn.Wa.Models.Maintenance.ListViewModel listViewModel)
  712:         {
  713:             string s;
  714:             StringBuilder stringBuilder;
  715:  
  716:             var dictionary = Ia.Ftn.Cl.Models.Data.Service.ImsServiceToOntRouterVendorInAllowedToBeMigratedOltDictionary;
  717:  
  718:             if (dictionary.Count > 0)
  719:             {
  720:                 stringBuilder = new StringBuilder(dictionary.Count * 64);
  721:  
  722:                 stringBuilder.AppendLine("Services: ");
  723:  
  724:                 foreach (KeyValuePair<string, Ia.Ftn.Cl.Models.Business.NetworkDesignDocument.Vendor> kvp in dictionary)
  725:                 {
  726:                     s = @"<a href=""find.aspx?input=" + kvp.Key + @""">" + kvp.Key + "</a>";
  727:                     stringBuilder.Append(s + " ");
  728:                 }
  729:  
  730:                 listViewModel.ListLiteral = stringBuilder.ToString().Trim();
  731:  
  732:                 listViewModel.CountLabel = "List count: " + dictionary.Count;
  733:             }
  734:             else listViewModel.CountLabel = "List count is zero.";
  735:         }
  736:  
  737:         ////////////////////////////////////////////////////////////////////////////
  738:  
  739:         /// <summary>
  740:         ///
  741:         /// </summary>
  742:         public static void HuaweiRedundantDevList(ref Ia.Ftn.Wa.Models.Maintenance.ListViewModel listViewModel)
  743:         {
  744:             int did;
  745:             string s, dev, accessName;
  746:             StringBuilder stringBuilder;
  747:             List<Ia.Ftn.Cl.Models.Huawei.EmsDev> list;
  748:  
  749:             list = Ia.Ftn.Cl.Models.Data.Huawei.Dev.RedundantDevList();
  750:  
  751:             if (list.Count > 0)
  752:             {
  753:                 stringBuilder = new StringBuilder(list.Count * 64);
  754:  
  755:                 s = "DID\tDEV\tAccess name";
  756:                 stringBuilder.AppendLine(s);
  757:                 stringBuilder.AppendLine(" ");
  758:  
  759:                 foreach (var d in list)
  760:                 {
  761:                     did = d.DID;
  762:                     dev = d.DEV;
  763:                     accessName = (d.Access != null) ? d.Access.Name : string.Empty;
  764:  
  765:                     s = did + "\t" + dev + "\t" + @"<a href=""find.aspx?input=" + accessName + @""">" + accessName + "</a>";
  766:  
  767:                     stringBuilder.AppendLine(s);
  768:                 }
  769:  
  770:                 listViewModel.ListLiteral = stringBuilder.ToString().Trim();
  771:  
  772:                 listViewModel.CountLabel = "List count: " + list.Count;
  773:             }
  774:             else listViewModel.CountLabel = "List count is zero.";
  775:         }
  776:  
  777:         ////////////////////////////////////////////////////////////////////////////
  778:         ////////////////////////////////////////////////////////////////////////////
  779:  
  780:         /// <summary>
  781:         ///
  782:         /// </summary>
  783:         public static void ListOfAccessNameAndOntPositionAndVaprofAndFamilyTypeAndSipInfoTelAndVoipPstnUserPnAndVagProtocolTypeAndAgcfGatewayRecordIpAndServiceAndPortAndPrimaryPuidcpeProfileNumberForSdqAndAdsAndSaaAndLab(ref Ia.Ftn.Wa.Models.Maintenance.ListViewModel listViewModel)
  784:         {
  785:             StringBuilder stringBuilder;
  786:             List<string> oltSymbolList;
  787:  
  788:             oltSymbolList = new List<string> { "SDQ", "SAA", "ADS", "LAB" };
  789:  
  790:             var list = Ia.Ftn.Cl.Models.Data.Default.AccessIdNddOntEmsOntiIdDevFnSnPnVaprofEquipmentIdFamilTypeSipInfoTelVoipPstnUserPnVagProtocolTypeServicePortAgcfGatewayRecordIpSubpartyPuidceProfileNumberForOltSymbolListList(oltSymbolList);
  791:  
  792:             if (list.Count > 0)
  793:             {
  794:                 stringBuilder = new StringBuilder(list.Count * 200);
  795:  
  796:                 stringBuilder.AppendLine("Access name" + "\t" + "ONT Position" + "\t" + "VAPROF" + "\t" + "FamilyType" + "\t" + "SipInfoTel" + "\t" + "VoipPstnUserPn" + "\t" + "VagProtocolType" + "\t" + "AgcfGatewayRecordIp" + "\t" + "Service" + "\t" + "Port" + "\t" + "PrimaryPuidcpeProfileNumber");
  797:  
  798:                 stringBuilder.AppendLine(" ");
  799:  
  800:                 foreach (var u in list.OrderBy(uu => uu.AccessId))
  801:                 {
  802:                     stringBuilder.AppendLine(u.Ont.Access.Name + "\t" + u.DevFnSnPnOntId + "\t" + u.Vaprof + "\t" + u.EmsOntFamilyType.ToString() + "\t" + u.EmsOntSipInfoTel + "\t" + u.EmsVoipPstnUserPn + "\t" + u.EmsVagProtocolType + "\t" + u.AgcfGatewayRecordIp + "\t" + u.Service + "\t" + u.Port + "\t" + u.PrimaryPuidcpeProfileNumber);
  803:                 }
  804:  
  805:                 listViewModel.ListLiteral = stringBuilder.ToString().Trim();
  806:  
  807:                 listViewModel.CountLabel = "List count: " + list.Count;
  808:             }
  809:             else listViewModel.CountLabel = "List count is zero.";
  810:         }
  811:  
  812:         /*
  813:         ////////////////////////////////////////////////////////////////////////////
  814: 
  815:         /// <summary>
  816:         ///
  817:         /// </summary>
  818:         public static void ListOfAccessNameAndOntPositionAndVaprofForSdqAndAdsAndSaaAndLab(ref Ia.Ftn.Wa.Models.Maintenance.ListViewModel listViewModel)
  819:         {
  820:             StringBuilder stringBuilder;
  821:             List<string> oltSymbolList;
  822: 
  823:             oltSymbolList = new List<string> { "SDQ", "SAA", "ADS", "LAB" };
  824: 
  825:             var list = Ia.Ftn.Cl.Models.Data.Default.AccessIdNddOntDevFnSnPnOntIdVaprofForOltSymbolListList(oltSymbolList);
  826: 
  827:             if (list.Count > 0)
  828:             {
  829:                 stringBuilder = new StringBuilder(list.Count * 200);
  830: 
  831:                 stringBuilder = new StringBuilder();
  832: 
  833:                 stringBuilder.AppendLine("Access name" + "\t" + "ONT Position" + "\t" + "VAPROF");
  834: 
  835:                 stringBuilder.AppendLine(" ");
  836: 
  837:                 foreach (var u in list.OrderBy(uu => uu.AccessId))
  838:                 {
  839:                     stringBuilder.AppendLine(u.Ont.Access.Name + "\t" + u.DevFnSnPnOntId + "\t" + u.Vaprof);
  840:                 }
  841: 
  842:                 scriptLiteral.Text = stringBuilder.ToString().Trim();
  843: 
  844:                 listViewModel.CountLabel = "List count: " + list.Count;
  845:             }
  846:             else listViewModel.CountLabel = "List count is zero.";
  847:         }
  848: 
  849:         ////////////////////////////////////////////////////////////////////////////
  850: 
  851:         /// <summary>
  852:         ///
  853:         /// </summary>
  854:         public static void ListOfServiceAndAccessNameWherePrimaryPuidcpeProfileNumberIsNot10ForSdqAndAdsAndSaaAndLab(ref Ia.Ftn.Wa.Models.Maintenance.ListViewModel listViewModel)
  855:         {
  856:             StringBuilder stringBuilder;
  857:             List<string> oltSymbolList;
  858: 
  859:             oltSymbolList = new List<string> { "SDQ", "SAA", "ADS", "LAB" };
  860: 
  861:             var list = Ia.Ftn.Cl.Models.Data.Default.ServiceAndAccessNameWherePrimaryPuidcpeProfileNumberIsNot10ForOltSymbolListList(oltSymbolList);
  862: 
  863:             if (list.Count > 0)
  864:             {
  865:                 stringBuilder = new StringBuilder(list.Count * 200);
  866: 
  867:                 stringBuilder = new StringBuilder();
  868: 
  869:                 stringBuilder.AppendLine("Service" + "\t" + "Access name");
  870: 
  871:                 stringBuilder.AppendLine(" ");
  872: 
  873:                 foreach (var u in list.OrderBy(uu => uu.Service))
  874:                 {
  875:                     stringBuilder.AppendLine(u.Service + "\t" + u.AccessName);
  876:                 }
  877: 
  878:                 scriptLiteral.Text = stringBuilder.ToString().Trim();
  879: 
  880:                 listViewModel.CountLabel = "List count: " + list.Count;
  881:             }
  882:             else listViewModel.CountLabel = "List count is zero.";
  883:         }
  884: 
  885:         ////////////////////////////////////////////////////////////////////////////
  886: 
  887:         /// <summary>
  888:         ///
  889:         /// </summary>
  890:         public static void ListOfAccessNameWhereVaprofIsNotAluSipBForSdqAndAdsAndSaaAndLab(ref Ia.Ftn.Wa.Models.Maintenance.ListViewModel listViewModel)
  891:         {
  892:             StringBuilder stringBuilder;
  893:             List<string> oltSymbolList;
  894: 
  895:             oltSymbolList = new List<string> { "SDQ", "SAA", "ADS", "LAB" };
  896: 
  897:             var list = Ia.Ftn.Cl.Models.Data.Default.AccessNameWhereVaprofIsNotAluSipBForOltSymbolListList(oltSymbolList);
  898: 
  899:             if (list.Count > 0)
  900:             {
  901:                 stringBuilder = new StringBuilder(list.Count * 200);
  902: 
  903:                 stringBuilder = new StringBuilder();
  904: 
  905:                 stringBuilder.AppendLine("Access name");
  906: 
  907:                 stringBuilder.AppendLine(" ");
  908: 
  909:                 foreach (var u in list.OrderBy(uu => uu))
  910:                 {
  911:                     stringBuilder.AppendLine(u);
  912:                 }
  913: 
  914:                 scriptLiteral.Text = stringBuilder.ToString().Trim();
  915: 
  916:                 listViewModel.CountLabel = "List count: " + list.Count;
  917:             }
  918:             else listViewModel.CountLabel = "List count is zero.";
  919:         }
  920: 
  921:         ////////////////////////////////////////////////////////////////////////////
  922: 
  923:         /// <summary>
  924:         ///
  925:         /// </summary>
  926:         public static void ListOfServiceAndAccessNameWherePrimaryPuidcpeProfileNumberIsNot10AndEmsOntVaprofIsAluSipBForSdqAndAdsAndSaaAndLab(ref Ia.Ftn.Wa.Models.Maintenance.ListViewModel listViewModel)
  927:         {
  928:             StringBuilder stringBuilder;
  929:             List<string> oltSymbolList;
  930: 
  931:             oltSymbolList = new List<string> { "SDQ", "SAA", "ADS", "LAB" };
  932: 
  933:             var list = Ia.Ftn.Cl.Models.Data.Default.ServiceAndAccessNameWherePrimaryPuidcpeProfileNumberIsNot10AndEmsOntVaprofIsAluSipBForOltSymbolListList(oltSymbolList);
  934: 
  935:             if (list.Count > 0)
  936:             {
  937:                 stringBuilder = new StringBuilder(list.Count * 200);
  938: 
  939:                 stringBuilder = new StringBuilder();
  940: 
  941:                 stringBuilder.AppendLine("Service" + "\t" + "Access name");
  942: 
  943:                 stringBuilder.AppendLine(" ");
  944: 
  945:                 foreach (var u in list.OrderBy(uu => uu.Service))
  946:                 {
  947:                     stringBuilder.AppendLine(u.Service + "\t" + u.AccessName);
  948:                 }
  949: 
  950:                 scriptLiteral.Text = stringBuilder.ToString().Trim();
  951: 
  952:                 listViewModel.CountLabel = "List count: " + list.Count;
  953:             }
  954:             else listViewModel.CountLabel = "List count is zero.";
  955:         }
  956: 
  957:         ////////////////////////////////////////////////////////////////////////////
  958:         */
  959:  
  960:         ////////////////////////////////////////////////////////////////////////////
  961:  
  962:         /// <summary>
  963:         ///
  964:         /// </summary>
  965:         public static void AxeSubscriberList(ref Ia.Ftn.Wa.Models.Maintenance.ListViewModel listViewModel)
  966:         {
  967:             StringBuilder stringBuilder;
  968:  
  969:             var list = Ia.Ftn.Cl.Models.Data.Ericsson.Subscriber.ListWithoutContent();
  970:  
  971:             if (list.Count > 0)
  972:             {
  973:                 stringBuilder = new StringBuilder(list.Count * 200);
  974:  
  975:                 stringBuilder.AppendLine("SNB\tDEV\tDETY\tSUT\tSCL\tMIS\tCOS");
  976:  
  977:                 stringBuilder.AppendLine("<br/>");
  978:  
  979:                 foreach (var l in list)
  980:                 {
  981:                     stringBuilder.AppendLine(l.SNB + "\t" + l.DEV + "\t" + l.DETY + "\t" + l.SUT + "\t" + l.SCL + "\t" + l.MIS + "\t" + l.COS + "<br/>");
  982:                 }
  983:  
  984:                 listViewModel.ListLiteral = stringBuilder.ToString().Trim();
  985:  
  986:                 listViewModel.CountLabel = "List count: " + list.Count;
  987:             }
  988:             else listViewModel.CountLabel = "List count is zero.";
  989:         }
  990:  
  991:         ////////////////////////////////////////////////////////////////////////////
  992:  
  993:         /// <summary>
  994:         ///
  995:         /// </summary>
  996:         public static void EwsdSubscriberList(ref Ia.Ftn.Wa.Models.Maintenance.ListViewModel listViewModel)
  997:         {
  998:             StringBuilder stringBuilder;
  999:  
 1000:             var list = Ia.Ftn.Cl.Models.Data.Siemens.Subscriber.ListWithoutContent();
 1001:  
 1002:             if (list.Count > 0)
 1003:             {
 1004:                 stringBuilder = new StringBuilder(list.Count * 200);
 1005:  
 1006:                 stringBuilder.AppendLine("DN\tLAC\tEQN\tCAT\tLTT\tOPTRCL\tSUBTRCL\tNUMCAL\tORIG1\tTRARSTR\tLNATT\tDIV\tCOS\tADDINF\tNUMBCH\tCTDIVI\tBLK" + "<br/>");
 1007:  
 1008:                 /*
 1009:                  */
 1010:                 stringBuilder.AppendLine(" " + "<br/>");
 1011:  
 1012:                 foreach (var l in list)
 1013:                 {
 1014:                     stringBuilder.AppendLine(l.DN + "\t" + l.LAC + "\t" + l.EQN + "\t" + l.CAT + "\t" + l.LTT + "\t" + l.OPTRCL + "\t" + l.SUBTRCL + "\t" + l.NUMCAL + "\t" + l.ORIG1 + "\t" + l.TRARSTR + "\t" + l.LNATT + "\t" + l.DIV + "\t" + l.COS + "\t" + l.ADDINF + "\t" + l.NUMBCH + "\t" + l.CTDIVI + "\t" + l.BLK + "<br/>");
 1015:                 }
 1016:  
 1017:                 listViewModel.ListLiteral = stringBuilder.ToString().Trim();
 1018:  
 1019:                 listViewModel.CountLabel = "List count: " + list.Count;
 1020:             }
 1021:             else listViewModel.CountLabel = "List count is zero.";
 1022:         }
 1023:  
 1024:         ////////////////////////////////////////////////////////////////////////////
 1025:  
 1026:         /// <summary>
 1027:         ///
 1028:         /// </summary>
 1029:         public static void ServiceRequestDbBoxNameToServiceList(ref Ia.Ftn.Wa.Models.Maintenance.ListViewModel listViewModel)
 1030:         {
 1031:             string s;
 1032:             StringBuilder stringBuilder;
 1033:  
 1034:             var dictionary = Ia.Ftn.Cl.Models.Data.ServiceRequest.DbNameToServiceListDictionary;
 1035:  
 1036:             if (dictionary.Count > 0)
 1037:             {
 1038:                 stringBuilder = new StringBuilder(dictionary.Count * 64);
 1039:  
 1040:                 foreach (KeyValuePair<string, List<string>> kvp in dictionary)
 1041:                 {
 1042:                     s = kvp.Key + ": " + string.Join(",", kvp.Value);
 1043:                     //s = @"<a href=""find.aspx?input=" + kvp.Key + @""">" + kvp.Key + "</a>";
 1044:                     stringBuilder.AppendLine(s + "<br/>");
 1045:                 }
 1046:  
 1047:                 listViewModel.ListLiteral = stringBuilder.ToString().Trim();
 1048:  
 1049:                 listViewModel.CountLabel = "List count: " + dictionary.Count;
 1050:             }
 1051:             else listViewModel.CountLabel = "List count is zero.";
 1052:         }
 1053:  
 1054:         ////////////////////////////////////////////////////////////////////////////
 1055:  
 1056:         /// <summary>
 1057:         ///
 1058:         /// </summary>
 1059:         public static void ServiceCountWithinAccessList(ref Ia.Ftn.Wa.Models.Maintenance.ListViewModel listViewModel)
 1060:         {
 1061:             string s;
 1062:             StringBuilder stringBuilder;
 1063:  
 1064:             var dictionary = Ia.Ftn.Cl.Models.Data.Service2.AccessNameToSeviceCountDictionary();
 1065:  
 1066:             if (dictionary.Count > 0)
 1067:             {
 1068:                 stringBuilder = new StringBuilder(dictionary.Count * 64);
 1069:  
 1070:                 foreach (KeyValuePair<string, int> kvp in dictionary.OrderBy(u => u.Key))
 1071:                 {
 1072:                     s = kvp.Key + ": " + string.Join(",", kvp.Value);
 1073:                     //s = @"<a href=""find.aspx?input=" + kvp.Key + @""">" + kvp.Key + "</a>";
 1074:                     stringBuilder.AppendLine(s);
 1075:                 }
 1076:  
 1077:                 listViewModel.ListLiteral = stringBuilder.ToString().Trim();
 1078:  
 1079:                 listViewModel.CountLabel = "List count: " + dictionary.Count;
 1080:             }
 1081:             else listViewModel.CountLabel = "List count is zero.";
 1082:         }
 1083:  
 1084:         ////////////////////////////////////////////////////////////////////////////
 1085:  
 1086:         /// <summary>
 1087:         ///
 1088:         /// </summary>
 1089:         public static void ServiceWithinEmsOntSipInfoWhereEmsOntResultCodeOntIsOfflineOrDeviceOfflineErrorAndServiceWithinEmsVoipPstnUserWhereEmsDevResultCodeDeviceOfflineErrorList(ref Ia.Ftn.Wa.Models.Maintenance.ListViewModel listViewModel)
 1090:         {
 1091:             string s;
 1092:             StringBuilder stringBuilder;
 1093:  
 1094:             var emsOntIsOfflineList = Ia.Ftn.Cl.Models.Data.Huawei.OntSipInfo.ServiceWithinEmsOntSipInfoWhereEmsOntResultCodeOntIsOfflineOrDeviceOfflineErrorList();
 1095:             var emsDevDeviceOfflineError = Ia.Ftn.Cl.Models.Data.Huawei.VoipPstnUser.ServiceWithinEmsVoipPstnUserWhereEmsDevResultCodeDeviceOfflineError();
 1096:  
 1097:             var list = emsOntIsOfflineList.Union(emsDevDeviceOfflineError).ToList();
 1098:  
 1099:             if (list.Count > 0)
 1100:             {
 1101:                 stringBuilder = new StringBuilder(list.Count * 32);
 1102:  
 1103:                 foreach (var service in list)
 1104:                 {
 1105:                     s = @"<a href=""find.aspx?input=" + service + @""">" + service + "</a>";
 1106:                     stringBuilder.AppendLine(s);
 1107:                 }
 1108:  
 1109:                 listViewModel.ListLiteral = stringBuilder.ToString().Trim();
 1110:  
 1111:                 listViewModel.CountLabel = "List count: " + list.Count;
 1112:             }
 1113:             else listViewModel.CountLabel = "List count is zero.";
 1114:         }
 1115:  
 1116:         ////////////////////////////////////////////////////////////////////////////
 1117:  
 1118:         /// <summary>
 1119:         ///
 1120:         /// </summary>
 1121:         public static void AccessNameWithinEmsOntSipInfoWhereEmsOntResultCodeOntIsOfflineOrDeviceOfflineErrorAndAccessNameWithinEmsVoipPstnUserWhereEmsDevResultCodeDeviceOfflineErrorList(ref Ia.Ftn.Wa.Models.Maintenance.ListViewModel listViewModel)
 1122:         {
 1123:             string s;
 1124:             StringBuilder stringBuilder;
 1125:  
 1126:             var emsOntIsOfflineList = Ia.Ftn.Cl.Models.Data.Huawei.OntSipInfo.AccessNameWithinEmsOntSipInfoWhereEmsOntResultCodeOntIsOfflineOrDeviceOfflineErrorList();
 1127:             var emsDevDeviceOfflineError = Ia.Ftn.Cl.Models.Data.Huawei.VoipPstnUser.AccessNameWithinEmsVoipPstnUserWhereEmsDevResultCodeDeviceOfflineError();
 1128:  
 1129:             var list = emsOntIsOfflineList.Union(emsDevDeviceOfflineError).ToList();
 1130:  
 1131:             if (list.Count > 0)
 1132:             {
 1133:                 stringBuilder = new StringBuilder(list.Count * 32);
 1134:  
 1135:                 foreach (var accessName in list)
 1136:                 {
 1137:                     s = @"<a href=""find.aspx?input=" + accessName + @""">" + accessName + "</a>";
 1138:                     stringBuilder.AppendLine(s);
 1139:                 }
 1140:  
 1141:                 listViewModel.ListLiteral = stringBuilder.ToString().Trim();
 1142:  
 1143:                 listViewModel.CountLabel = "List count: " + list.Count;
 1144:             }
 1145:             else listViewModel.CountLabel = "List count is zero.";
 1146:         }
 1147:  
 1148:         ////////////////////////////////////////////////////////////////////////////
 1149:  
 1150:         /// <summary>
 1151:         ///
 1152:         /// </summary>
 1153:         public static void DuplicateEmsOntSipInfoSipUserNameAndEmsVoipPstnUserMduDnServiceWithCountryCodeOrMsanDnServiceImpuAidServiceList(ref Ia.Ftn.Wa.Models.Maintenance.ListViewModel listViewModel)
 1154:         {
 1155:             string s;
 1156:             StringBuilder stringBuilder;
 1157:  
 1158:             var list = Ia.Ftn.Cl.Models.Data.Huawei.Default.DuplicateEmsOntSipInfoSipUserNameAndEmsVoipPstnUserMduDnServiceWithCountryCodeOrMsanDnServiceImpuAidServiceList();
 1159:  
 1160:             if (list.Count > 0)
 1161:             {
 1162:                 stringBuilder = new StringBuilder(list.Count * 32);
 1163:  
 1164:                 foreach (var service in list)
 1165:                 {
 1166:                     s = @"<a href=""find.aspx?input=" + service + @""">" + service + "</a>";
 1167:                     stringBuilder.AppendLine(s);
 1168:                 }
 1169:  
 1170:                 listViewModel.ListLiteral = stringBuilder.ToString().Trim();
 1171:  
 1172:                 listViewModel.CountLabel = "List count: " + list.Count;
 1173:             }
 1174:             else listViewModel.CountLabel = "List count is zero.";
 1175:         }
 1176:  
 1177:         ////////////////////////////////////////////////////////////////////////////
 1178:  
 1179:         /// <summary>
 1180:         ///
 1181:         /// </summary>
 1182:         public static void NumbersWithinEmsOntSipInfoAndEmsVoipPstnUserThatDoNotBelongToListOfAllPossibleNetworkNumbers(ref Ia.Ftn.Wa.Models.Maintenance.ListViewModel listViewModel)
 1183:         {
 1184:             string s;
 1185:             StringBuilder stringBuilder;
 1186:  
 1187:             var list = Ia.Ftn.Cl.Models.Data.Service.NumbersWithinEmsOntSipInfoAndEmsVoipPstnUserThatDoNotBelongToListOfAllPossibleNetworkNumbers();
 1188:  
 1189:             if (list.Count > 0)
 1190:             {
 1191:                 stringBuilder = new StringBuilder(list.Count * 32);
 1192:  
 1193:                 foreach (var service in list)
 1194:                 {
 1195:                     s = @"<a href=""find.aspx?input=" + service + @""">" + service + "</a>";
 1196:                     stringBuilder.AppendLine(s);
 1197:                 }
 1198:  
 1199:                 listViewModel.ListLiteral = stringBuilder.ToString().Trim();
 1200:  
 1201:                 listViewModel.CountLabel = "List count: " + list.Count;
 1202:             }
 1203:             else listViewModel.CountLabel = "List count is zero.";
 1204:         }
 1205:  
 1206:         ////////////////////////////////////////////////////////////////////////////
 1207:  
 1208:         /// <summary>
 1209:         ///
 1210:         /// </summary>
 1211:         public static void DistributionOfNokiaSwitchRouterNumbersWithinHuaweiAccessNetwork(ref Ia.Ftn.Wa.Models.Maintenance.ListViewModel listViewModel)
 1212:         {
 1213:             string s;
 1214:             StringBuilder stringBuilder;
 1215:  
 1216:             var dictionary = Ia.Ftn.Cl.Models.Data.Default.RouterNameToServiceCountInNokiaRouterHuaweiAccessOltDictionary();
 1217:  
 1218:             if (dictionary.Count > 0)
 1219:             {
 1220:                 stringBuilder = new StringBuilder();
 1221:  
 1222:                 foreach (var kvp in dictionary)
 1223:                 {
 1224:                     s = kvp.Key + "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" + kvp.Value + "<br/>";
 1225:  
 1226:                     stringBuilder.AppendLine(s);
 1227:                 }
 1228:  
 1229:                 listViewModel.ListLiteral = stringBuilder.ToString().Trim();
 1230:  
 1231:                 listViewModel.CountLabel = "Service count: " + dictionary.Sum(u => u.Value);
 1232:             }
 1233:             else listViewModel.CountLabel = "Service count is zero.";
 1234:         }
 1235:  
 1236:         ////////////////////////////////////////////////////////////////////////////
 1237:  
 1238:         /// <summary>
 1239:         ///
 1240:         /// </summary>
 1241:         public static void MsanServicesThatHaveProvisionedImsServiceExceptWhereEmsOntSipInfoEmsOntIsOfflineAndExceptWhereEmsVoipPstnUserEmsDevHasDeviceOfflineErrorAndIgnoringNonSipNokiaOntList(ref Ia.Ftn.Wa.Models.Maintenance.ListViewModel listViewModel)
 1242:         {
 1243:             string s;
 1244:             StringBuilder stringBuilder;
 1245:  
 1246:             var list = Ia.Ftn.Cl.Models.Business.Provision.MsanServicesThatHaveProvisionedImsServiceExceptWhereEmsOntSipInfoEmsOntIsOfflineOrDeviceOfflineErrorAndExceptWhereEmsVoipPstnUserEmsDevHasDeviceOfflineErrorAndIgnoringNonSipNokiaOntList();
 1247:  
 1248:             list.Sort();
 1249:  
 1250:             if (list.Count > 0)
 1251:             {
 1252:                 stringBuilder = new StringBuilder(list.Count * 32);
 1253:  
 1254:                 foreach (var service in list)
 1255:                 {
 1256:                     s = @"<a href=""find.aspx?input=" + service + @""">" + service + "</a>";
 1257:                     stringBuilder.AppendLine(s);
 1258:                 }
 1259:  
 1260:                 listViewModel.ListLiteral = stringBuilder.ToString().Trim();
 1261:  
 1262:                 listViewModel.CountLabel = "List count: " + list.Count;
 1263:             }
 1264:             else listViewModel.CountLabel = "List count is zero.";
 1265:         }
 1266:  
 1267:         ////////////////////////////////////////////////////////////////////////////
 1268:  
 1269:         /// <summary>
 1270:         ///
 1271:         /// </summary>
 1272:         public static void MsanServiceInVoipPstnUserThatHaveNoEquivalentInServiceList(ref Ia.Ftn.Wa.Models.Maintenance.ListViewModel listViewModel)
 1273:         {
 1274:             string s;
 1275:             StringBuilder stringBuilder;
 1276:  
 1277:             var list = Ia.Ftn.Cl.Models.Business.Provision.MsanServiceInVoipPstnUserThatHaveNoEquivalentInServiceList();
 1278:  
 1279:             list.Sort();
 1280:  
 1281:             if (list.Count > 0)
 1282:             {
 1283:                 stringBuilder = new StringBuilder(list.Count * 32);
 1284:  
 1285:                 foreach (var service in list)
 1286:                 {
 1287:                     s = @"<a href=""find.aspx?input=" + service + @""">" + service + "</a>";
 1288:                     stringBuilder.AppendLine(s);
 1289:                 }
 1290:  
 1291:                 listViewModel.ListLiteral = stringBuilder.ToString().Trim();
 1292:  
 1293:                 listViewModel.CountLabel = "List count: " + list.Count;
 1294:             }
 1295:             else listViewModel.CountLabel = "List count is zero.";
 1296:         }
 1297:  
 1298:         ////////////////////////////////////////////////////////////////////////////
 1299:  
 1300:         /// <summary>
 1301:         ///
 1302:         /// </summary>
 1303:         public static void MsanServicesWithinNceThatDoNotBelongToMsanDomainListDefinedInTheNetworkDesignDocumentList(ref Ia.Ftn.Wa.Models.Maintenance.ListViewModel listViewModel)
 1304:         {
 1305:             string s;
 1306:             StringBuilder stringBuilder;
 1307:  
 1308:             var msanServiceList = Ia.Ftn.Cl.Models.Data.Huawei.VoipPstnUser.MsanServiceList;
 1309:             var msanDomainList = Ia.Ftn.Cl.Models.Data.Service.MsanDomainList;
 1310:  
 1311:             var list = new List<string>();
 1312:  
 1313:             foreach (var msanService in msanServiceList)
 1314:             {
 1315:                 if (!msanDomainList.Any(u => msanService.StartsWith(u.ToString())))
 1316:                 {
 1317:                     list.Add(msanService);
 1318:                 }
 1319:             }
 1320:  
 1321:             list.Sort();
 1322:  
 1323:             if (list.Count > 0)
 1324:             {
 1325:                 stringBuilder = new StringBuilder(list.Count * 32);
 1326:  
 1327:                 foreach (var service in list)
 1328:                 {
 1329:                     s = @"<a href=""find.aspx?input=" + service + @""">" + service + "</a>";
 1330:                     stringBuilder.AppendLine(s);
 1331:                 }
 1332:  
 1333:                 listViewModel.ListLiteral = stringBuilder.ToString().Trim();
 1334:  
 1335:                 listViewModel.CountLabel = "List count: " + list.Count;
 1336:             }
 1337:             else listViewModel.CountLabel = "List count is zero.";
 1338:         }
 1339:  
 1340:         ////////////////////////////////////////////////////////////////////////////
 1341:  
 1342:         /// <summary>
 1343:         ///
 1344:         /// </summary>
 1345:         public static void MduList(ref Ia.Ftn.Wa.Models.Maintenance.ListViewModel listViewModel)
 1346:         {
 1347:             string s;
 1348:             StringBuilder stringBuilder;
 1349:  
 1350:             var list = Ia.Ftn.Cl.Models.Data.Access.MduList();
 1351:  
 1352:             list = list.OrderBy(u => u.Name).ToList();
 1353:  
 1354:             if (list.Count > 0)
 1355:             {
 1356:                 stringBuilder = new StringBuilder(list.Count * 32);
 1357:  
 1358:                 foreach (var mdu in list)
 1359:                 {
 1360:                     s = @"<a href=""find.aspx?input=" + mdu.Name + @""">" + mdu.Name + "</a>";
 1361:  
 1362:                     stringBuilder.AppendLine(s + ",");
 1363:                 }
 1364:  
 1365:                 listViewModel.ListLiteral = stringBuilder.ToString().Trim();
 1366:  
 1367:                 listViewModel.CountLabel = "List count: " + list.Count;
 1368:             }
 1369:             else listViewModel.CountLabel = "List count is zero.";
 1370:         }
 1371:  
 1372:         ////////////////////////////////////////////////////////////////////////////
 1373:  
 1374:         /// <summary>
 1375:         ///
 1376:         /// </summary>
 1377:         public static void ChangedServiceToChangedToServiceDictionary(ref Ia.Ftn.Wa.Models.Maintenance.ListViewModel listViewModel)
 1378:         {
 1379:             string s;
 1380:  
 1381:             var dictionary = Ia.Ftn.Cl.Models.Data.ServiceRequest.ChangedServiceNumberToChangedToServiceNumberListDictionary();
 1382:  
 1383:             var stringBuilder = new StringBuilder();
 1384:  
 1385:             foreach (var kvp in dictionary)
 1386:             {
 1387:                 var changed = kvp.Key;
 1388:                 var changedToList = string.Join(", ", kvp.Value.ToArray().OrderBy(u => u.ToString()));
 1389:  
 1390:                 s = @"[<a href=""find.aspx?input=" + changed + @""">" + changed + "</a>: " + changedToList + "]";
 1391:  
 1392:                 stringBuilder.AppendLine(s + ", ");
 1393:             }
 1394:  
 1395:             listViewModel.ListLiteral = stringBuilder.ToString().Trim();
 1396:  
 1397:             listViewModel.CountLabel = "List count: " + dictionary.Count;
 1398:         }
 1399:  
 1400:         ////////////////////////////////////////////////////////////////////////////
 1401:  
 1402:         /// <summary>
 1403:         ///
 1404:         /// </summary>
 1405:         public static void ProvisionedImsServiceWithNullAccessNotInPstnNorInNceOntSipInfoNorVoipPstnUserNorMsanWithinMsanDomainListList(ref Ia.Ftn.Wa.Models.Maintenance.ListViewModel listViewModel)
 1406:         {
 1407:             string s;
 1408:             StringBuilder stringBuilder;
 1409:  
 1410:             var list = Ia.Ftn.Cl.Models.Data.Provision.ProvisionedImsServiceWithNullAccessNotInPstnNorInNceOntSipInfoNorVoipPstnUserNorMsanWithinMsanDomainListList(true);
 1411:  
 1412:             list.Sort();
 1413:  
 1414:             if (list.Count > 0)
 1415:             {
 1416:                 stringBuilder = new StringBuilder(list.Count * 32);
 1417:  
 1418:                 foreach (var service in list)
 1419:                 {
 1420:                     s = @"<a href=""find.aspx?input=" + service + @""">" + service + "</a>";
 1421:                     stringBuilder.AppendLine(s);
 1422:                 }
 1423:  
 1424:                 listViewModel.ListLiteral = stringBuilder.ToString().Trim();
 1425:  
 1426:                 listViewModel.CountLabel = "List count: " + list.Count;
 1427:             }
 1428:             else listViewModel.CountLabel = "List count is zero.";
 1429:         }
 1430:  
 1431:         ////////////////////////////////////////////////////////////////////////////
 1432:  
 1433:         /// <summary>
 1434:         ///
 1435:         /// </summary>
 1436:         public static void ServiceRequestServiceServicesThatDoNotExistInNeitherServiceRequestsNorServiceRequestHistoriesList(ref Ia.Ftn.Wa.Models.Maintenance.ListViewModel listViewModel)
 1437:         {
 1438:             string s;
 1439:             StringBuilder stringBuilder;
 1440:  
 1441:             var list = Ia.Ftn.Cl.Models.Data.ServiceRequestService.ServiceRequestServiceServicesThatDoNotExistInNeitherServiceRequestsNorServiceRequestHistoriesList();
 1442:  
 1443:             list.Sort();
 1444:  
 1445:             if (list.Count > 0)
 1446:             {
 1447:                 stringBuilder = new StringBuilder(list.Count * 32);
 1448:  
 1449:                 foreach (var service in list)
 1450:                 {
 1451:                     s = @"<a href=""find.aspx?input=" + service + @""">" + service + "</a>";
 1452:                     stringBuilder.AppendLine(s);
 1453:                 }
 1454:  
 1455:                 listViewModel.ListLiteral = stringBuilder.ToString().Trim();
 1456:  
 1457:                 listViewModel.CountLabel = "List count: " + list.Count;
 1458:             }
 1459:             else listViewModel.CountLabel = "List count is zero.";
 1460:         }
 1461:  
 1462:         ////////////////////////////////////////////////////////////////////////////
 1463:  
 1464:         /// <summary>
 1465:         ///
 1466:         /// </summary>
 1467:         public static void ServiceImsServicesThatDoNotExistInServiceRequestServicesList(ref Ia.Ftn.Wa.Models.Maintenance.ListViewModel listViewModel)
 1468:         {
 1469:             string s;
 1470:             StringBuilder stringBuilder;
 1471:  
 1472:             var list = Ia.Ftn.Cl.Models.Data.Service2.ServiceImsServicesThatDoNotExistInServiceRequestServicesList();
 1473:  
 1474:             list.Sort();
 1475:  
 1476:             if (list.Count > 0)
 1477:             {
 1478:                 stringBuilder = new StringBuilder(list.Count * 32);
 1479:  
 1480:                 foreach (var service in list)
 1481:                 {
 1482:                     s = @"<a href=""find.aspx?input=" + service + @""">" + service + "</a>";
 1483:                     stringBuilder.AppendLine(s);
 1484:                 }
 1485:  
 1486:                 listViewModel.ListLiteral = stringBuilder.ToString().Trim();
 1487:  
 1488:                 listViewModel.CountLabel = "List count: " + list.Count;
 1489:             }
 1490:             else listViewModel.CountLabel = "List count is zero.";
 1491:         }
 1492:  
 1493:         ////////////////////////////////////////////////////////////////////////////
 1494:  
 1495:         /// <summary>
 1496:         ///
 1497:         /// </summary>
 1498:         public static void AxeSubscribersThatAreRoutedToNokiaImsButAreStillInServiceInAxeSwitchList(ref Ia.Ftn.Wa.Models.Maintenance.ListViewModel listViewModel)
 1499:         {
 1500:             string s;
 1501:             StringBuilder stringBuilder;
 1502:  
 1503:             // See Nokia IMS router at Ia.Ftn.Cl.Models.Business.Ericsson.Subscriber.RouteName();
 1504:  
 1505:             var list = Ia.Ftn.Cl.Models.Data.Ericsson.Subscriber.SnbWhereSclHasIcs3AndSutNotNcList();
 1506:  
 1507:             list.Sort();
 1508:  
 1509:             if (list.Count > 0)
 1510:             {
 1511:                 stringBuilder = new StringBuilder(list.Count * 32);
 1512:  
 1513:                 foreach (var service in list)
 1514:                 {
 1515:                     s = @"<a href=""find.aspx?input=" + service + @""">" + service + "</a>";
 1516:                     stringBuilder.AppendLine(s);
 1517:                 }
 1518:  
 1519:                 listViewModel.ListLiteral = stringBuilder.ToString().Trim();
 1520:  
 1521:                 listViewModel.CountLabel = "List count: " + list.Count;
 1522:             }
 1523:             else listViewModel.CountLabel = "List count is zero.";
 1524:         }
 1525:  
 1526:         ////////////////////////////////////////////////////////////////////////////
 1527:  
 1528:         /// <summary>
 1529:         ///
 1530:         /// </summary>
 1531:         public static void AxeSubscribersWithATypeOfServiceSuspensionList(ref Ia.Ftn.Wa.Models.Maintenance.ListViewModel listViewModel)
 1532:         {
 1533:             string s;
 1534:             StringBuilder stringBuilder;
 1535:  
 1536:             var list = Ia.Ftn.Cl.Models.Data.Ericsson.Subscriber.SnbWhereSclHasTbiOrTboOrBicAndSutNotNcList();
 1537:  
 1538:             list.Sort();
 1539:  
 1540:             if (list.Count > 0)
 1541:             {
 1542:                 stringBuilder = new StringBuilder(list.Count * 32);
 1543:  
 1544:                 foreach (var service in list)
 1545:                 {
 1546:                     s = @"<a href=""find.aspx?input=" + service + @""">" + service + "</a>";
 1547:                     stringBuilder.AppendLine(s);
 1548:                 }
 1549:  
 1550:                 listViewModel.ListLiteral = stringBuilder.ToString().Trim();
 1551:  
 1552:                 listViewModel.CountLabel = "List count: " + list.Count;
 1553:             }
 1554:             else listViewModel.CountLabel = "List count is zero.";
 1555:         }
 1556:  
 1557:         ////////////////////////////////////////////////////////////////////////////
 1558:  
 1559:         /// <summary>
 1560:         ///
 1561:         /// </summary>
 1562:         public static void EwsdSubscribersWithATypeOfServiceSuspensionList(ref Ia.Ftn.Wa.Models.Maintenance.ListViewModel listViewModel)
 1563:         {
 1564:             string s;
 1565:             StringBuilder stringBuilder;
 1566:  
 1567:             var list = Ia.Ftn.Cl.Models.Data.Siemens.Subscriber.DnWhereBlkIsNotEmptyList();
 1568:  
 1569:             list.Sort();
 1570:  
 1571:             if (list.Count > 0)
 1572:             {
 1573:                 stringBuilder = new StringBuilder(list.Count * 32);
 1574:  
 1575:                 foreach (var service in list)
 1576:                 {
 1577:                     s = @"<a href=""find.aspx?input=" + service + @""">" + service + "</a>";
 1578:                     stringBuilder.AppendLine(s);
 1579:                 }
 1580:  
 1581:                 listViewModel.ListLiteral = stringBuilder.ToString().Trim();
 1582:  
 1583:                 listViewModel.CountLabel = "List count: " + list.Count;
 1584:             }
 1585:             else listViewModel.CountLabel = "List count is zero.";
 1586:         }
 1587:  
 1588:         ////////////////////////////////////////////////////////////////////////////
 1589:  
 1590:         /// <summary>
 1591:         ///
 1592:         /// </summary>
 1593:         public static void DistributionOfServicesWithinNokiaOlts(ref Ia.Ftn.Wa.Models.Maintenance.ListViewModel listViewModel)
 1594:         {
 1595:             string s;
 1596:  
 1597:             var dictionary = Ia.Ftn.Cl.Models.Data.Default.NokiaOltToServiceCountDictionary();
 1598:  
 1599:             var stringBuilder = new StringBuilder();
 1600:  
 1601:             var totalCount = 0;
 1602:  
 1603:             foreach (var kvp in dictionary)
 1604:             {
 1605:                 var name = kvp.Key;
 1606:                 var count = kvp.Value;
 1607:  
 1608:                 totalCount += count;
 1609:  
 1610:                 s = name + ": " + count + "<br/>";
 1611:  
 1612:                 stringBuilder.AppendLine(s);
 1613:             }
 1614:  
 1615:             listViewModel.ListLiteral = stringBuilder.ToString().Trim();
 1616:  
 1617:             listViewModel.CountLabel = "List count: " + totalCount;
 1618:         }
 1619:  
 1620:         ////////////////////////////////////////////////////////////////////////////
 1621:  
 1622:         /// <summary>
 1623:         ///
 1624:         /// </summary>
 1625:         public static void DistributionOfServicesWithinHuaweiOlts(ref Ia.Ftn.Wa.Models.Maintenance.ListViewModel listViewModel)
 1626:         {
 1627:             string s;
 1628:  
 1629:             var dictionary = Ia.Ftn.Cl.Models.Data.Default.HuaweiOltToServiceCountDictionary();
 1630:  
 1631:             var stringBuilder = new StringBuilder();
 1632:  
 1633:             var totalCount = 0;
 1634:  
 1635:             foreach (var kvp in dictionary)
 1636:             {
 1637:                 var name = kvp.Key;
 1638:                 var count = kvp.Value;
 1639:  
 1640:                 totalCount += count;
 1641:  
 1642:                 s = name + ": " + count + "<br/>";
 1643:  
 1644:                 stringBuilder.AppendLine(s);
 1645:             }
 1646:  
 1647:             listViewModel.ListLiteral = stringBuilder.ToString().Trim();
 1648:  
 1649:             listViewModel.CountLabel = "List count: " + totalCount;
 1650:         }
 1651:  
 1652:         ////////////////////////////////////////////////////////////////////////////
 1653:  
 1654:         /// <summary>
 1655:         ///
 1656:         /// </summary>
 1657:         public static void SynchronizationBetweenServiceRequestOntDetailAndCustomerDepartmentDatabaseListsOfEntriesToCreateAndDeleteInCustomerDatabase(ref Ia.Ftn.Wa.Models.Maintenance.ListViewModel listViewModel)
 1658:         {
 1659:             string s;
 1660:  
 1661:             Ia.Ftn.Cl.Models.Data.Service.DifferenceBetweenServiceAndServiceRequestOntDetailsOfTheCustomerDepartmentDatabase(out List<Ia.Ftn.Cl.Models.Business.ServiceServiceRequestOnt> insertList, out List<Ia.Ftn.Cl.Models.Business.ServiceServiceRequestOnt> deleteList);
 1662:  
 1663:             var stringBuilder = new StringBuilder();
 1664:  
 1665:             stringBuilder.AppendLine("Services to insert: ");
 1666:  
 1667:             foreach (var ssro in insertList)
 1668:             {
 1669:                 s = @"<a href=""find.aspx?input=" + ssro.Service + @""">" + ssro.Service + "</a>";
 1670:  
 1671:                 stringBuilder.AppendLine(s);
 1672:             }
 1673:  
 1674:             stringBuilder.AppendLine("<br/>");
 1675:             stringBuilder.AppendLine("<br/>");
 1676:  
 1677:             stringBuilder.AppendLine("Services to delete: ");
 1678:  
 1679:             foreach (var ssro in deleteList)
 1680:             {
 1681:                 s = @"<a href=""find.aspx?input=" + ssro.Service + @""">" + ssro.Service + "</a>";
 1682:  
 1683:                 stringBuilder.AppendLine(s);
 1684:             }
 1685:  
 1686:             listViewModel.ListLiteral = stringBuilder.ToString().Trim();
 1687:  
 1688:             listViewModel.CountLabel = "List count: " + (insertList.Count + deleteList.Count);
 1689:         }
 1690:  
 1691:         ////////////////////////////////////////////////////////////////////////////
 1692:  
 1693:         /// <summary>
 1694:         ///
 1695:         /// </summary>
 1696:         public static void InconsistentRecordsWhereEmsOntIsNullAndDnIsImpuAidHasPlusFormatOrEmsOntIsNotNullAndDnIsInServiceWithCountryCodeNoPlusFormatList(ref Ia.Ftn.Wa.Models.Maintenance.ListViewModel listViewModel)
 1697:         {
 1698:             string s;
 1699:  
 1700:             var list = Ia.Ftn.Cl.Models.Data.Huawei.VoipPstnUser.InconsistentRecordsWhereEmsOntIsNullAndDnIsImpuAidHasPlusFormatOrEmsOntIsNotNullAndDnIsInServiceWithCountryCodeNoPlusFormatList();
 1701:  
 1702:             list.Sort();
 1703:  
 1704:             if (list.Count > 0)
 1705:             {
 1706:                 var stringBuilder = new StringBuilder(list.Count * 32);
 1707:  
 1708:                 foreach (var service in list)
 1709:                 {
 1710:                     s = @"<a href=""find.aspx?input=" + service + @""">" + service + "</a>";
 1711:                     stringBuilder.AppendLine(s);
 1712:                 }
 1713:  
 1714:                 listViewModel.ListLiteral = stringBuilder.ToString().Trim();
 1715:  
 1716:                 listViewModel.CountLabel = "List count: " + list.Count;
 1717:             }
 1718:             else listViewModel.CountLabel = "List count is zero.";
 1719:         }
 1720:  
 1721:         ////////////////////////////////////////////////////////////////////////////
 1722:  
 1723:         /// <summary>
 1724:         ///
 1725:         /// </summary>
 1726:         public static void PbxNumberListButton(ref Ia.Ftn.Wa.Models.Maintenance.ListViewModel listViewModel)
 1727:         {
 1728:             List<string> list;
 1729:  
 1730:             list = Ia.Ftn.Cl.Models.Data.Service.ServicePbxList;
 1731:  
 1732:             if (list.Count > 0)
 1733:             {
 1734:                 //stringBuilder = new StringBuilder(list.Count * 64);
 1735:  
 1736:                 listViewModel.ListLiteral = string.Join(" ", list.ToArray());
 1737:  
 1738:                 listViewModel.CountLabel = "List count: " + list.Count;
 1739:             }
 1740:             else listViewModel.CountLabel = "List count is zero.";
 1741:         }
 1742:  
 1743:         ////////////////////////////////////////////////////////////////////////////
 1744:  
 1745:         /// <summary>
 1746:         ///
 1747:         /// </summary>
 1748:         public static void SeviceRequestPbxServiceKeyToPbxServiceBranchListDictionary(ref Ia.Ftn.Wa.Models.Maintenance.ListViewModel listViewModel)
 1749:         {
 1750:             string s;
 1751:  
 1752:             var dictionary = Ia.Ftn.Cl.Models.Data.ServiceRequest.PbxServiceKeyToPbxServiceBranchListDictionary();
 1753:  
 1754:             var stringBuilder = new StringBuilder();
 1755:  
 1756:             foreach (var kvp in dictionary)
 1757:             {
 1758:                 var key = kvp.Key;
 1759:                 var branchList = string.Join(", ", kvp.Value.ToArray().OrderBy(u => u.ToString()));
 1760:  
 1761:                 s = @"<a href=""find.aspx?input=" + key + @""">" + key + "</a>: " + branchList;
 1762:  
 1763:                 stringBuilder.AppendLine(s + "<br/>");
 1764:             }
 1765:  
 1766:             listViewModel.ListLiteral = stringBuilder.ToString().Trim();
 1767:  
 1768:             listViewModel.CountLabel = "List count: " + dictionary.Count;
 1769:         }
 1770:  
 1771:         ////////////////////////////////////////////////////////////////////////////
 1772:  
 1773:         /// <summary>
 1774:         ///
 1775:         /// </summary>
 1776:         public static void UnrecognizedEmsDevAndEmsOntList(ref Ia.Ftn.Wa.Models.Maintenance.ListViewModel listViewModel)
 1777:         {
 1778:             string s;
 1779:  
 1780:             Ia.Ftn.Cl.Models.Data.Huawei.Default.UnrecognizedEmsDevAndEmsOntList(out List<string> unrecognizedDevList, out List<string> unrecognizedOntList);
 1781:  
 1782:             var stringBuilder = new StringBuilder();
 1783:  
 1784:             s = "Unrecognized EmsDev list:<br/>" + string.Join("<br/>", unrecognizedDevList);
 1785:             stringBuilder.AppendLine(s + "<br/><br/>");
 1786:  
 1787:             s = "Unrecognized EmsOnt list:<br/>" + string.Join("<br/>", unrecognizedOntList);
 1788:             stringBuilder.AppendLine(s + "<br/>");
 1789:  
 1790:             listViewModel.ListLiteral = stringBuilder.ToString().Trim();
 1791:  
 1792:             listViewModel.CountLabel = "";
 1793:         }
 1794:  
 1795:         ////////////////////////////////////////////////////////////////////////////
 1796:  
 1797:         /// <summary>
 1798:         ///
 1799:         /// </summary>
 1800:         public static void ServicesThatAppearMostInReportsWithAppearanceCountList(ref Ia.Ftn.Wa.Models.Maintenance.ListViewModel listViewModel)
 1801:         {
 1802:             string s;
 1803:  
 1804:             var dictionary = Ia.Ftn.Cl.Models.Data.Report.ReportServiceToCountTopNDictionary(100);
 1805:  
 1806:             var stringBuilder = new StringBuilder();
 1807:  
 1808:             foreach (var kvp in dictionary)
 1809:             {
 1810:                 var service = kvp.Key;
 1811:                 var count = kvp.Value;
 1812:  
 1813:                 s = @"<a href=""find.aspx?input=" + service + @""">" + service + "</a> (" + count + ")";
 1814:  
 1815:                 stringBuilder.AppendLine(s + ", ");
 1816:             }
 1817:  
 1818:             listViewModel.ListLiteral = stringBuilder.ToString().Trim();
 1819:  
 1820:             listViewModel.CountLabel = "List count: " + dictionary.Count;
 1821:         }
 1822:  
 1823:         ////////////////////////////////////////////////////////////////////////////
 1824:  
 1825:         /// <summary>
 1826:         ///
 1827:         /// </summary>
 1828:         public static void SoftXAsbrServiceNotWithinSoftXDomainList(ref Ia.Ftn.Wa.Models.Maintenance.ListViewModel listViewModel)
 1829:         {
 1830:             string s;
 1831:  
 1832:             var list = Ia.Ftn.Cl.Models.Data.Huawei.Asbr.ServiceNotWithinSoftXDomainList();
 1833:  
 1834:             list.Sort();
 1835:  
 1836:             if (list.Count > 0)
 1837:             {
 1838:                 var stringBuilder = new StringBuilder(list.Count * 32);
 1839:  
 1840:                 foreach (var service in list)
 1841:                 {
 1842:                     s = @"<a href=""find.aspx?input=" + service + @""">" + service + "</a>";
 1843:                     stringBuilder.AppendLine(s);
 1844:                 }
 1845:  
 1846:                 listViewModel.ListLiteral = stringBuilder.ToString().Trim();
 1847:  
 1848:                 listViewModel.CountLabel = "List count: " + list.Count;
 1849:             }
 1850:             else listViewModel.CountLabel = "List count is zero.";
 1851:         }
 1852:  
 1853:         ////////////////////////////////////////////////////////////////////////////
 1854:  
 1855:         /// <summary>
 1856:         ///
 1857:         /// </summary>
 1858:         public static void NpSpsFnrSeruattrServiceNotWithinSpsDomainList(ref Ia.Ftn.Wa.Models.Maintenance.ListViewModel listViewModel)
 1859:         {
 1860:             string s;
 1861:  
 1862:             var list = Ia.Ftn.Cl.Models.Data.Huawei.Seruattr.ServiceNotWithinSpsDomainList();
 1863:  
 1864:             list.Sort();
 1865:  
 1866:             if (list.Count > 0)
 1867:             {
 1868:                 var stringBuilder = new StringBuilder(list.Count * 32);
 1869:  
 1870:                 foreach (var service in list)
 1871:                 {
 1872:                     s = @"<a href=""find.aspx?input=" + service + @""">" + service + "</a>";
 1873:                     stringBuilder.AppendLine(s);
 1874:                 }
 1875:  
 1876:                 listViewModel.ListLiteral = stringBuilder.ToString().Trim();
 1877:  
 1878:                 listViewModel.CountLabel = "List count: " + list.Count;
 1879:             }
 1880:             else listViewModel.CountLabel = "List count is zero.";
 1881:         }
 1882:  
 1883:         ////////////////////////////////////////////////////////////////////////////
 1884:  
 1885:         /// <summary>
 1886:         ///
 1887:         /// </summary>
 1888:         public static void SiemensEwsdSubscriberServiceNotWithinEwsdPstnDomainList(ref Ia.Ftn.Wa.Models.Maintenance.ListViewModel listViewModel)
 1889:         {
 1890:             string s;
 1891:  
 1892:             var list = Ia.Ftn.Cl.Models.Data.Siemens.Subscriber.ServiceNotWithinEwsdPstnDomainList();
 1893:  
 1894:             list.Sort();
 1895:  
 1896:             if (list.Count > 0)
 1897:             {
 1898:                 var stringBuilder = new StringBuilder(list.Count * 32);
 1899:  
 1900:                 foreach (var service in list)
 1901:                 {
 1902:                     s = @"<a href=""find.aspx?input=" + service + @""">" + service + "</a>";
 1903:                     stringBuilder.AppendLine(s);
 1904:                 }
 1905:  
 1906:                 listViewModel.ListLiteral = stringBuilder.ToString().Trim();
 1907:  
 1908:                 listViewModel.CountLabel = "List count: " + list.Count;
 1909:             }
 1910:             else listViewModel.CountLabel = "List count is zero.";
 1911:         }
 1912:  
 1913:         ////////////////////////////////////////////////////////////////////////////
 1914:  
 1915:         /// <summary>
 1916:         ///
 1917:         /// </summary>
 1918:         public static void EricssonAxeSubscriberServiceNotWithinAxePstnDomainList(ref Ia.Ftn.Wa.Models.Maintenance.ListViewModel listViewModel)
 1919:         {
 1920:             string s;
 1921:  
 1922:             var list = Ia.Ftn.Cl.Models.Data.Ericsson.Subscriber.ServiceNotWithinAxePstnDomainList();
 1923:  
 1924:             list.Sort();
 1925:  
 1926:             if (list.Count > 0)
 1927:             {
 1928:                 var stringBuilder = new StringBuilder(list.Count * 32);
 1929:  
 1930:                 foreach (var service in list)
 1931:                 {
 1932:                     s = @"<a href=""find.aspx?input=" + service + @""">" + service + "</a>";
 1933:                     stringBuilder.AppendLine(s);
 1934:                 }
 1935:  
 1936:                 listViewModel.ListLiteral = stringBuilder.ToString().Trim();
 1937:  
 1938:                 listViewModel.CountLabel = "List count: " + list.Count;
 1939:             }
 1940:             else listViewModel.CountLabel = "List count is zero.";
 1941:         }
 1942:  
 1943:         ////////////////////////////////////////////////////////////////////////////
 1944:  
 1945:         /// <summary>
 1946:         ///
 1947:         /// </summary>
 1948:         public static void DistributionOfServicesWithinMsanDevicesList(ref Ia.Ftn.Wa.Models.Maintenance.ListViewModel listViewModel)
 1949:         {
 1950:             string s;
 1951:  
 1952:             var dictionary = Ia.Ftn.Cl.Models.Data.Huawei.Default.MsanDevDevToDnCountDictionary;
 1953:  
 1954:             var stringBuilder = new StringBuilder();
 1955:  
 1956:             foreach (var kvp in dictionary)
 1957:             {
 1958:                 var msanDeviceName = kvp.Key;
 1959:                 var count = kvp.Value;
 1960:  
 1961:                 s = msanDeviceName + " (" + count + ")";
 1962:  
 1963:                 stringBuilder.AppendLine(s + "<br/>");
 1964:             }
 1965:  
 1966:             listViewModel.ListLiteral = stringBuilder.ToString().Trim();
 1967:  
 1968:             listViewModel.CountLabel = "List count: " + dictionary.Count;
 1969:         }
 1970:  
 1971:         ////////////////////////////////////////////////////////////////////////////
 1972:         ////////////////////////////////////////////////////////////////////////////
 1973:     }
 1974:  
 1975:     ////////////////////////////////////////////////////////////////////////////
 1976:     ////////////////////////////////////////////////////////////////////////////
 1977: }