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

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

    1: using Microsoft.AspNetCore.Mvc.Rendering;
    2: using MimeKit.Cryptography;
    3: using System.Text;
    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 Table
   27:     {
   28:         ////////////////////////////////////////////////////////////////////////////
   29:  
   30:         /// <summary>
   31:         ///
   32:         /// </summary>
   33:         public static void ViewModel(ref Ia.Ftn.Wa.Models.Maintenance.TableViewModel tableViewModel)
   34:         {
   35:             // statisticallyObtainOntIdFromServiceRequestAddress
   36:             var list1 = (from s in Ia.Ftn.Cl.Models.Data.NetworkDesignDocument.SiteList
   37:                          where s.AreaSymbolList.Count > 0
   38:                          select s).ToList();
   39:             tableViewModel.SelectList1 = new SelectList(list1, "Id", "NameArabicName");
   40:  
   41:             // accessNameListInAreaBlock
   42:             var list2 = Ia.Ftn.Cl.Models.Data.Access.DistinctAccessKuwaitFtnAreaIdAndBlockDictionary.OrderBy(u => u.Value);
   43:             tableViewModel.SelectList2 = new SelectList(list2, "Key", "Value");
   44:  
   45:             // servicesWithinSiteWithAccessName
   46:             var list3 = (from s in Ia.Ftn.Cl.Models.Data.NetworkDesignDocument.SiteList where s.AreaSymbolList.Count > 0 select s).ToList();
   47:             tableViewModel.SelectList3 = new SelectList(list3, "Id", "NameArabicName");
   48:  
   49:             // servicesWithinAreaWithAccessName
   50:             var list4 = Ia.Ftn.Cl.Models.Data.Access.DistinctAccessKuwaitFtnAreaIdToNameArabicNameDictionary.OrderBy(u => u.Value);
   51:             tableViewModel.SelectList4 = new SelectList(list4, "Key", "Value");
   52:  
   53:             // servicesWithinDomainWithAccessName
   54:             var domainList = Ia.Ftn.Cl.Models.Data.Service.DomainList;
   55:             var list5 = domainList.ConvertAll(delegate (int i) { return i.ToString(); });
   56:  
   57:             list5.Sort();
   58:  
   59:             tableViewModel.SelectList5 = new SelectList(list5);
   60:  
   61:             // accessNamesWithinAreaWithoutServices
   62:             var list6 = Ia.Ftn.Cl.Models.Data.Access.DistinctAccessKuwaitFtnAreaIdToNameArabicNameDictionary.OrderBy(u => u.Value);
   63:             tableViewModel.SelectList6 = new SelectList(list6, "Key", "Value");
   64:  
   65:             // accessListInArea
   66:             var list7 = Ia.Ftn.Cl.Models.Data.Access.DistinctAccessKuwaitFtnAreaIdToNameArabicNameDictionary.OrderBy(u => u.Value); ;
   67:             tableViewModel.SelectList7 = new SelectList(list7, "Key", "Value");
   68:  
   69:             // servicesWithinOltWithAccessName
   70:             var list8 = Ia.Ftn.Cl.Models.Data.Access.DistinctAccessKuwaitFtnAreaIdToNameArabicNameDictionary.OrderBy(u => u.Value); ;
   71:             tableViewModel.SelectList8 = new SelectList(list8, "Key", "Value");
   72:  
   73:             // msanServiceDistribution
   74:             var dictionary9 = Ia.Ftn.Cl.Models.Data.Huawei.Default.MsanSiteToServiceCountDictionary();
   75:             var list9 = (from d in dictionary9 select new { d.Key.Id, d.Key.NameArabicName });
   76:             tableViewModel.SelectList9 = new SelectList(list9, "Id", "NameArabicName");
   77:  
   78:             // msanLicServiceDistribution
   79:             var dictionary10 = Ia.Ftn.Cl.Models.Data.Huawei.Default.MsanSiteToServiceCountDictionary();
   80:             var list10 = (from d in dictionary10 select new { d.Key.Id, d.Key.NameArabicName });
   81:             tableViewModel.SelectList10 = new SelectList(list10, "Id", "NameArabicName");
   82:  
   83:             // provisioningStateOfServicesWithinPstnSite
   84:             // note SiteDropDownList_DataBound
   85:             var list11 = (from s in Ia.Ftn.Cl.Models.Data.NetworkDesignDocument.PstnList select new { Id = s.Id, NameArabicName = s.Name + " (" + s.ArabicName + ")" }).ToList();
   86:             tableViewModel.SelectList11 = new SelectList(list11, "Id", "NameArabicName");
   87:  
   88:             // serviceRequestServiceServicesWithinOltWithAccessName
   89:             var list12 = (from ponGroup in Ia.Ftn.Cl.Models.Data.NetworkDesignDocument.PonGroupList select new { Value = ponGroup.Olt.Id, Text = ponGroup.Olt.EmsName }).ToList();
   90:             tableViewModel.SelectList12 = new SelectList(list12, "Value", "Text");
   91:         }
   92:  
   93:         ////////////////////////////////////////////////////////////////////////////
   94:  
   95:         /// <summary>
   96:         ///
   97:         /// </summary>
   98:         public static void Post(ref Ia.Ftn.Wa.Models.Maintenance.TableViewModel tableViewModel, string commandName)
   99:         {
  100:             StringBuilder stringBuilder;
  101:  
  102:             if (commandName == "statisticallyObtainOntIdFromServiceRequestAddress") // 1
  103:             {
  104:                 if (!string.IsNullOrEmpty(tableViewModel.SelectedValue1))
  105:                 {
  106:                     var siteId = int.Parse(tableViewModel.SelectedValue1);
  107:  
  108:                     var list = Ia.Ftn.Cl.Models.Data.Default.DifferentOntNameAndStatisticalOntNameList(siteId);
  109:  
  110:                     list = list.OrderBy(o => o.AccessName).ToList();
  111:  
  112:                     if (list.Count > 0)
  113:                     {
  114:                         stringBuilder = new StringBuilder(list.Count * 256);
  115:  
  116:                         var s = @"Service | CustomerAddress | AccessName | OntAddress | StatisticalAddress | Note";
  117:                         stringBuilder.AppendLine(s + "<br/>\r");
  118:  
  119:                         foreach (var statistic in list)
  120:                         {
  121:                             s = @"<a href=""find?input=" + statistic.Service + @""">" + statistic.Service + "</a>" + " | " + statistic.CustomerAddress + " | " + statistic.AccessName + " | " + statistic.OntAddress + " | " + statistic.StatisticalAddress + " | " + statistic.Note;
  122:  
  123:                             stringBuilder.AppendLine(s + "<br/>\r");
  124:                         }
  125:  
  126:                         tableViewModel.ListLiteral1 = stringBuilder.ToString().Trim();
  127:  
  128:                         tableViewModel.CountLabel1 = "List count: " + list.Count;
  129:                     }
  130:                     else tableViewModel.CountLabel1 = "List count is zero.";
  131:                 }
  132:                 else
  133:                 {
  134:  
  135:                 }
  136:             }
  137:             else if (commandName == "accessNameListInAreaBlock") // 2
  138:             {
  139:                 if (!string.IsNullOrEmpty(tableViewModel.SelectedValue2))
  140:                 {
  141:                     int kuwaitFtnAreaId;
  142:                     string areaBlockId, areaIdString, blockString;
  143:  
  144:                     areaBlockId = tableViewModel.SelectedValue2;
  145:  
  146:                     areaIdString = areaBlockId.Split(',')[0].ToString();
  147:                     blockString = areaBlockId.Split(',')[1].ToString();
  148:  
  149:                     if (int.TryParse(areaIdString, out kuwaitFtnAreaId) && !string.IsNullOrEmpty(blockString))
  150:                     {
  151:                         AAAAAAAA(ref tableViewModel, kuwaitFtnAreaId, blockString);
  152:                     }
  153:                     else
  154:                     {
  155:                     }
  156:                 }
  157:                 else
  158:                 {
  159:                 }
  160:             }
  161:             else if (commandName == "servicesWithinSiteWithAccessName") // 3
  162:             {
  163:                 if (!string.IsNullOrEmpty(tableViewModel.SelectedValue3))
  164:                 {
  165:                     var siteId = int.Parse(tableViewModel.SelectedValue3);
  166:  
  167:                     var list = Ia.Ftn.Cl.Models.Data.Service2.ServiceOntBySiteIdList(siteId);
  168:                     list = list.OrderBy(s0 => s0.AccessId).ToList();
  169:  
  170:                     if (list.Count > 0)
  171:                     {
  172:                         stringBuilder = new StringBuilder(list.Count);
  173:  
  174:                         stringBuilder.Append("\r\n");
  175:  
  176:                         var dictionary = new Dictionary<string, List<string>>();
  177:  
  178:                         dictionary["MSAN"] = new List<string>();
  179:                         dictionary["Unknown"] = new List<string>();
  180:  
  181:                         foreach (var serviceOnt in list)
  182:                         {
  183:                             if (!string.IsNullOrEmpty(serviceOnt.AccessId))
  184:                             {
  185:                                 if (serviceOnt.Ont.Access.Name != null)
  186:                                 {
  187:                                     var accessName = serviceOnt.Ont.Access.Name;
  188:  
  189:                                     if (!dictionary.ContainsKey(accessName)) dictionary[accessName] = new List<string>();
  190:  
  191:                                     if (dictionary[accessName] == null) dictionary[accessName] = new List<string>();
  192:  
  193:                                     dictionary[accessName].Add(serviceOnt.Service);
  194:                                 }
  195:                                 else
  196:                                 {
  197:                                     dictionary["Unknown"].Add(serviceOnt.Service);
  198:                                 }
  199:                             }
  200:                             else
  201:                             {
  202:                                 dictionary["MSAN"].Add(serviceOnt.Service);
  203:                             }
  204:                         }
  205:  
  206:                         foreach (var kvp in dictionary.OrderBy(u => u.Key == "Unknown" || u.Key == "MSAN").ThenBy(u => u.Key))
  207:                         {
  208:                             var s = @"<a href=""find.aspx?input=" + kvp.Key + @""">" + kvp.Key + "</a>: " + string.Join(", ", kvp.Value);
  209:  
  210:                             stringBuilder.Append(s + "\r\n<br/>");
  211:                         }
  212:  
  213:                         tableViewModel.ListLiteral3 = stringBuilder.ToString().Trim();
  214:  
  215:                         tableViewModel.CountLabel3 = "List count: " + list.Count;
  216:                     }
  217:                     else tableViewModel.CountLabel3 = "List count is zero.";
  218:                 }
  219:                 else if (commandName == "servicesWithinAreaWithAccessName") // 4
  220:                 {
  221:                     if (!string.IsNullOrEmpty(tableViewModel.SelectedValue4))
  222:                     {
  223:                         var areaId = int.Parse(tableViewModel.SelectedValue4);
  224:  
  225:                         var list = Ia.Ftn.Cl.Models.Data.Service2.ServiceOntByAreaIdList(areaId);
  226:                         list = list.OrderBy(s0 => s0.AccessId).ToList();
  227:  
  228:                         if (list.Count > 0)
  229:                         {
  230:                             stringBuilder = new StringBuilder(list.Count);
  231:  
  232:                             stringBuilder.Append("\r\n");
  233:  
  234:                             var dictionary = new Dictionary<string, List<string>>();
  235:  
  236:                             dictionary["Unknown"] = new List<string>();
  237:  
  238:                             foreach (var serviceOnt in list)
  239:                             {
  240:                                 if (serviceOnt.Ont != null)
  241:                                 {
  242:                                     if (serviceOnt.Ont.Access.Name != null)
  243:                                     {
  244:                                         var accessName = serviceOnt.Ont.Access.Name;
  245:  
  246:                                         if (!dictionary.ContainsKey(accessName)) dictionary[accessName] = new List<string>();
  247:  
  248:                                         if (dictionary[accessName] == null) dictionary[accessName] = new List<string>();
  249:  
  250:                                         dictionary[accessName].Add(serviceOnt.Service);
  251:                                     }
  252:                                     else
  253:                                     {
  254:                                         dictionary["Unknown"].Add(serviceOnt.Service);
  255:                                     }
  256:                                 }
  257:                                 else
  258:                                 {
  259:                                 }
  260:                             }
  261:  
  262:                             foreach (var kvp in dictionary.OrderBy(u => u.Key == "Unknown").ThenBy(u => u.Key))
  263:                             {
  264:                                 var s = @"<a href=""find.aspx?input=" + kvp.Key + @""">" + kvp.Key + "</a>: " + string.Join(", ", kvp.Value);
  265:  
  266:                                 stringBuilder.Append(s + "\r\n<br/>");
  267:                             }
  268:  
  269:                             tableViewModel.ListLiteral4 = stringBuilder.ToString().Trim();
  270:  
  271:                             tableViewModel.CountLabel4 = "List count: " + list.Count;
  272:                         }
  273:                         else tableViewModel.CountLabel4 = "List count is zero.";
  274:                     }
  275:                     else
  276:                     {
  277:  
  278:                     }
  279:                 }
  280:                 else if (commandName == "servicesWithinDomainWithAccessName") // 5
  281:                 {
  282:                     if (!string.IsNullOrEmpty(tableViewModel.SelectedValue5))
  283:                     {
  284:                         var domain = tableViewModel.SelectedValue5;
  285:  
  286:                         var list = Ia.Ftn.Cl.Models.Data.Service2.ServiceOntByDomainList(domain);
  287:                         list = list.OrderBy(s0 => s0.AccessId).ToList();
  288:  
  289:                         if (list.Count > 0)
  290:                         {
  291:                             stringBuilder = new StringBuilder(list.Count);
  292:  
  293:                             stringBuilder.Append("\r\n");
  294:  
  295:                             var dictionary = new Dictionary<string, List<string>>();
  296:  
  297:                             dictionary["Unknown"] = new List<string>();
  298:  
  299:                             foreach (var serviceOnt in list)
  300:                             {
  301:                                 if (serviceOnt.Ont != null)
  302:                                 {
  303:                                     if (serviceOnt.Ont.Access.Name != null)
  304:                                     {
  305:                                         var accessName = serviceOnt.Ont.Access.Name;
  306:  
  307:                                         if (!dictionary.ContainsKey(accessName)) dictionary[accessName] = new List<string>();
  308:  
  309:                                         if (dictionary[accessName] == null) dictionary[accessName] = new List<string>();
  310:  
  311:                                         dictionary[accessName].Add(serviceOnt.Service);
  312:                                     }
  313:                                     else
  314:                                     {
  315:                                         dictionary["Unknown"].Add(serviceOnt.Service);
  316:                                     }
  317:                                 }
  318:                                 else
  319:                                 {
  320:                                 }
  321:                             }
  322:  
  323:                             foreach (var kvp in dictionary.OrderBy(u => u.Key == "Unknown").ThenBy(u => u.Key))
  324:                             {
  325:                                 var s = @"<a href=""find.aspx?input=" + kvp.Key + @""">" + kvp.Key + "</a>: " + string.Join(", ", kvp.Value);
  326:  
  327:                                 stringBuilder.Append(s + "\r\n<br/>");
  328:                             }
  329:  
  330:                             tableViewModel.ListLiteral5 = stringBuilder.ToString().Trim();
  331:  
  332:                             tableViewModel.CountLabel5 = "List count: " + list.Count;
  333:                         }
  334:                         else tableViewModel.CountLabel5 = "List count is zero.";
  335:                     }
  336:                     else
  337:                     {
  338:  
  339:                     }
  340:                 }
  341:                 else if (commandName == "accessNamesWithinAreaWithoutServices") // 6
  342:                 {
  343:                     if (!string.IsNullOrEmpty(tableViewModel.SelectedValue6))
  344:                     {
  345:                         var areaId = int.Parse(tableViewModel.SelectedValue6);
  346:  
  347:                         stringBuilder = new StringBuilder();
  348:                         stringBuilder.Append("\r\n");
  349:  
  350:                         var list = Ia.Ftn.Cl.Models.Data.Access.AccessNamesWithoutServicesByKuwaitFtnAreaId(areaId);
  351:  
  352:                         if (list.Count > 0)
  353:                         {
  354:                             foreach (var u in list)
  355:                             {
  356:                                 var s = @"<a href=""find.aspx?input=" + u + @""">" + u + "</a> ";
  357:  
  358:                                 stringBuilder.Append(s);
  359:                             }
  360:  
  361:                             tableViewModel.ListLiteral6 = stringBuilder.ToString().Trim();
  362:  
  363:                             tableViewModel.CountLabel6 = "List count: " + list.Count;
  364:                         }
  365:                         else tableViewModel.CountLabel6 = "List count is zero.";
  366:                     }
  367:                     else
  368:                     {
  369:  
  370:                     }
  371:                 }
  372:                 else if (commandName == "accessListInArea") // 7
  373:                 {
  374:                     if (!string.IsNullOrEmpty(tableViewModel.SelectedValue7))
  375:                     {
  376:                         var kuwaitFtnAreaId = int.Parse(tableViewModel.SelectedValue7);
  377:  
  378:                         var list = Ia.Ftn.Cl.Models.Data.Access.NameListByKuwaitFtnAreaId(kuwaitFtnAreaId);
  379:  
  380:                         if (list.Count > 0)
  381:                         {
  382:                             stringBuilder = new StringBuilder(list.Count * 32);
  383:  
  384:                             foreach (var accessName in list)
  385:                             {
  386:                                 var s = @"<a href=""find.aspx?input=" + accessName + @""">" + accessName + "</a>";
  387:  
  388:                                 stringBuilder.AppendLine(s + " ");
  389:                             }
  390:  
  391:                             tableViewModel.ListLiteral7 = stringBuilder.ToString().Trim();
  392:  
  393:                             tableViewModel.CountLabel7 = "List count: " + list.Count;
  394:                         }
  395:                         else tableViewModel.CountLabel7 = "List count is zero.";
  396:                     }
  397:                 }
  398:                 else if (commandName == "servicesWithinOltWithAccessName") // 8
  399:                 {
  400:                     if (!string.IsNullOrEmpty(tableViewModel.SelectedValue8))
  401:                     {
  402:                     }
  403:                 }
  404:                 else if (commandName == "msanServiceDistribution") // 9
  405:                 {
  406:                     if (!string.IsNullOrEmpty(tableViewModel.SelectedValue9))
  407:                     {
  408:                         var siteId = int.Parse(tableViewModel.SelectedValue9);
  409:  
  410:                         var list = Ia.Ftn.Cl.Models.Data.Huawei.Default.MsanServiceListBySiteId(siteId);
  411:  
  412:                         if (list.Count > 0)
  413:                         {
  414:                             stringBuilder = new StringBuilder(list.Count);
  415:  
  416:                             stringBuilder.Append("\r\n");
  417:  
  418:                             foreach (var l in list)
  419:                             {
  420:                                 var u = @"<a href=""find.aspx?input=" + l + @""">" + l + "</a>\t";
  421:  
  422:                                 stringBuilder.Append(u + "\r\n");
  423:                             }
  424:  
  425:                             stringBuilder.Remove(stringBuilder.Length - 2, 2);
  426:  
  427:                             tableViewModel.ListLiteral9 = stringBuilder.ToString();
  428:                         }
  429:                         else tableViewModel.ListLiteral9 = "Count is zero.";
  430:                     }
  431:                     else
  432:                     {
  433:  
  434:                     }
  435:                 }
  436:                 else if (commandName == "msanLicServiceDistribution") // 10
  437:                 {
  438:                     if (!string.IsNullOrEmpty(tableViewModel.SelectedValue10))
  439:                     {
  440:                         var siteId = int.Parse(tableViewModel.SelectedValue10);
  441:  
  442:                         var site = (from s in Ia.Ftn.Cl.Models.Data.NetworkDesignDocument.SiteList where s.Id == siteId select s).Single();
  443:  
  444:                         var msan = site.Msans.First();
  445:  
  446:                         var dic = Ia.Ftn.Cl.Models.Data.Huawei.Default.MsanDevLicCabinetFrameSnPnTextStringToServiceByMsanDictionary(msan);
  447:  
  448:                         if (dic.Count > 0)
  449:                         {
  450:                             stringBuilder = new StringBuilder(dic.Count * 64);
  451:  
  452:                             foreach (var kvp in dic)
  453:                             {
  454:                                 var u = kvp.Key + ": " + @"<a href=""find.aspx?input=" + kvp.Value + @""">" + kvp.Value + "</a>";
  455:  
  456:                                 stringBuilder.Append(u + "<br/>");
  457:                             }
  458:  
  459:                             tableViewModel.ListLiteral10 = stringBuilder.ToString();
  460:                         }
  461:                         else tableViewModel.ListLiteral10 = "Count is zero.";
  462:                     }
  463:                     else
  464:                     {
  465:  
  466:                     }
  467:                 }
  468:                 else if (commandName == "provisioningStateOfServicesWithinPstnSite") // 11
  469:                 {
  470:                     if (!string.IsNullOrEmpty(tableViewModel.SelectedValue11))
  471:                     {
  472:                         var siteId = int.Parse(tableViewModel.SelectedValue11);
  473:  
  474:                         Ia.Ftn.Cl.Models.Data.Service2.ProvisioningStateOfServicesWithinPstnSite(siteId, out List<string> provisionedServiceList, out List<string> unprovisionedServiceList);
  475:  
  476:                         if (provisionedServiceList.Count > 0 && unprovisionedServiceList.Count > 0)
  477:                         {
  478:                             stringBuilder = new StringBuilder(provisionedServiceList.Count);
  479:  
  480:                             stringBuilder.Append("\r\n");
  481:                             stringBuilder.Append("Provisioned service list تعمل (" + provisionedServiceList.Count + "):<br/>\r\n");
  482:                             stringBuilder.Append("\r\n");
  483:  
  484:                             foreach (var service in provisionedServiceList)
  485:                             {
  486:                                 var s = @"<a href=""find.aspx?input=" + service + @""">" + service + "</a>";
  487:  
  488:                                 stringBuilder.AppendLine(s);
  489:                             }
  490:  
  491:                             stringBuilder.Append("<br/><br/>\r\n");
  492:  
  493:                             stringBuilder.Append("\r\n");
  494:                             stringBuilder.Append("Unprovisioned service list مرفوعة (" + unprovisionedServiceList.Count + "):<br/>\r\n");
  495:                             stringBuilder.Append("\r\n");
  496:  
  497:                             foreach (var service in unprovisionedServiceList)
  498:                             {
  499:                                 var s = @"<a href=""find.aspx?input=" + service + @""">" + service + "</a>";
  500:  
  501:                                 stringBuilder.AppendLine(s);
  502:                             }
  503:  
  504:                             tableViewModel.ListLiteral11 = stringBuilder.ToString().Trim();
  505:  
  506:                             tableViewModel.CountLabel11 = "Total count: " + (provisionedServiceList.Count + unprovisionedServiceList.Count);
  507:                         }
  508:                         else tableViewModel.CountLabel11 = "List count is zero.";
  509:                     }
  510:                     else if (commandName == "serviceRequestServiceServicesWithinOltWithAccessName") // 12
  511:                     {
  512:                         if (!string.IsNullOrEmpty(tableViewModel.SelectedValue12))
  513:                         {
  514:                             var oltId = int.Parse(tableViewModel.SelectedValue12);
  515:  
  516:                             List<Ia.Ftn.Cl.Models.ServiceRequestService> list;
  517:  
  518:                             list = Ia.Ftn.Cl.Models.Data.ServiceRequestService.WithinOltList(oltId).OrderBy(srs => srs.Service).ToList();
  519:  
  520:                             if (list.Count > 0)
  521:                             {
  522:                                 stringBuilder = new StringBuilder(list.Count);
  523:  
  524:                                 foreach (var l in list)
  525:                                 {
  526:                                     var u = @"<a href=""find.aspx?input=" + l.Service + @""">" + l.Service + "</a> ";
  527:  
  528:                                     if (l.Access != null) u += @"<a href=""find.aspx?input=" + l.Access.Name + @""">" + l.Access.Name + "</a>";
  529:  
  530:                                     stringBuilder.Append(u + "<br/>");
  531:                                 }
  532:  
  533:                                 tableViewModel.ListLiteral12 = stringBuilder.ToString();
  534:                             }
  535:                             else tableViewModel.ListLiteral12 = "Count is zero.";
  536:                         }
  537:                         else tableViewModel.ListLiteral12 = "Count is zero.";
  538:                     }
  539:                     else
  540:                     {
  541:  
  542:                     }
  543:                 }
  544:                 else
  545:                 {
  546:                 }
  547:             }
  548:         }
  549:  
  550:         ////////////////////////////////////////////////////////////////////////////
  551:  
  552:         /// <summary>
  553:         ///
  554:         /// </summary>
  555:         private static void AAAAAAAA(ref Ia.Ftn.Wa.Models.Maintenance.TableViewModel tableViewModel, int kuwaitFtnAreaId, string block)
  556:         {
  557:             string s;
  558:             StringBuilder stringBuilder;
  559:             List<string> list;
  560:  
  561:             list = Ia.Ftn.Cl.Models.Data.Access.ReadAccessNameListByKuwaitFtnAreaIdAndBlock(kuwaitFtnAreaId, block);
  562:  
  563:             if (list.Count > 0)
  564:             {
  565:                 stringBuilder = new StringBuilder(list.Count * 32);
  566:  
  567:                 foreach (var accessName in list)
  568:                 {
  569:                     s = @"<a href=""find.aspx?input=" + accessName + @""">" + accessName + "</a>";
  570:  
  571:                     stringBuilder.AppendLine(s + " ");
  572:                 }
  573:  
  574:                 tableViewModel.ListLiteral2 = stringBuilder.ToString().Trim();
  575:  
  576:                 tableViewModel.CountLabel2 = "List count: " + list.Count;
  577:             }
  578:             else tableViewModel.CountLabel2 = "List count is zero.";
  579:         }
  580:  
  581:         ////////////////////////////////////////////////////////////////////////////
  582:         ////////////////////////////////////////////////////////////////////////////
  583:  
  584:  
  585:  
  586:  
  587:  
  588:  
  589:         ////////////////////////////////////////////////////////////////////////////
  590:         ////////////////////////////////////////////////////////////////////////////
  591:     }
  592:  
  593:     ////////////////////////////////////////////////////////////////////////////
  594:     ////////////////////////////////////////////////////////////////////////////
  595: }