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

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

ONT support class for Fixed Telecommunications Network (FTN) Nokia data model.

    1: using Microsoft.EntityFrameworkCore;
    2: using System;
    3: using System.Collections;
    4: using System.Collections.Generic;
    5: using System.Linq;
    6: using System.Text;
    7:  
    8: namespace Ia.Ftn.Cl.Models.Data.Nokia
    9: {
   10:     ////////////////////////////////////////////////////////////////////////////
   11:  
   12:     /// <summary publish="true">
   13:     /// ONT support class for Fixed Telecommunications Network (FTN) Nokia data model.
   14:     /// </summary>
   15:     /// 
   16:     /// <remarks> 
   17:     /// Copyright © 2006-2022 Jasem Y. Al-Shamlan (info@ia.com.kw), Integrated Applications - Kuwait. All Rights Reserved.
   18:     /// </remarks> 
   19:     public class Ont
   20:     {
   21:         /// <summary/>
   22:         public Ont() { }
   23:  
   24:         ////////////////////////////////////////////////////////////////////////////
   25:  
   26:         /// <summary>
   27:         ///
   28:         /// </summary>
   29:         public static bool Create(Ia.Ftn.Cl.Models.Ont ont, out string result)
   30:         {
   31:             bool b;
   32:  
   33:             b = false;
   34:             result = string.Empty;
   35:  
   36:             using (var db = new Ia.Ftn.Cl.Db())
   37:             {
   38:                 ont.Created = ont.Updated = DateTime.UtcNow.AddHours(3);
   39:  
   40:                 db.Onts.Add(ont);
   41:                 db.SaveChanges();
   42:  
   43:                 b = true;
   44:             }
   45:  
   46:             return b;
   47:         }
   48:  
   49:         ////////////////////////////////////////////////////////////////////////////
   50:  
   51:         /// <summary>
   52:         ///
   53:         /// </summary>
   54:         public static Ia.Ftn.Cl.Models.Ont Read(string id)
   55:         {
   56:             Ia.Ftn.Cl.Models.Ont ont;
   57:  
   58:             using (var db = new Ia.Ftn.Cl.Db())
   59:             {
   60:                 ont = (from o in db.Onts
   61:                        where o.Id == id
   62:                        select o).Include(o => o.OntServiceVoips).AsNoTracking().SingleOrDefault();
   63:             }
   64:  
   65:             return ont;
   66:         }
   67:  
   68:         ////////////////////////////////////////////////////////////////////////////
   69:  
   70:         /// <summary>
   71:         ///
   72:         /// </summary>
   73:         public static Ia.Ftn.Cl.Models.Ont ReadIncludeAccess(string id)
   74:         {
   75:             Ia.Ftn.Cl.Models.Ont item;
   76:  
   77:             using (var db = new Ia.Ftn.Cl.Db())
   78:             {
   79:                 item = (from o in db.Onts where o.Id == id select o).Include(u => u.Access).SingleOrDefault();
   80:             }
   81:  
   82:             return item;
   83:         }
   84:  
   85:         ////////////////////////////////////////////////////////////////////////////
   86:  
   87:         /// <summary>
   88:         ///
   89:         /// </summary>
   90:         public static List<Ia.Ftn.Cl.Models.Ont> List()
   91:         {
   92:             List<Ia.Ftn.Cl.Models.Ont> ontList;
   93:  
   94:             using (var db = new Ia.Ftn.Cl.Db())
   95:             {
   96:                 ontList = (from o in db.Onts select o).ToList();
   97:             }
   98:  
   99:             return ontList;
  100:         }
  101:  
  102:         ////////////////////////////////////////////////////////////////////////////
  103:  
  104:         /// <summary>
  105:         ///
  106:         /// </summary>
  107:         public static Dictionary<string, string> IdToAccessIdDictionary
  108:         {
  109:             get
  110:             {
  111:                 Dictionary<string, string> dictionary, nullDictionary;
  112:  
  113:                 using (var db = new Ia.Ftn.Cl.Db())
  114:                 {
  115:                     dictionary = (from o in db.Onts where o.Access != null select new { o.Id, o.Access }).ToDictionary(u => u.Id, u => u.Access.Id);
  116:  
  117:                     nullDictionary = (from o in db.Onts where o.Access == null select o.Id).ToDictionary(u => u, null);
  118:                 }
  119:  
  120:                 return dictionary.Union(nullDictionary).ToDictionary(u => u.Key, u => u.Value);
  121:             }
  122:         }
  123:  
  124:  
  125:         ////////////////////////////////////////////////////////////////////////////
  126:  
  127:         /// <summary>
  128:         ///
  129:         /// </summary>
  130:         public static Dictionary<string, string> AccessIdToIdDictionary
  131:         {
  132:             get
  133:             {
  134:                 Dictionary<string, string> dictionary, idToAccessIdDictionary;
  135:  
  136:                 using (var db = new Ia.Ftn.Cl.Db())
  137:                 {
  138:                     idToAccessIdDictionary = IdToAccessIdDictionary;
  139:  
  140:                     dictionary = new Dictionary<string, string>(idToAccessIdDictionary.Count);
  141:  
  142:                     foreach (KeyValuePair<string, string> kvp in idToAccessIdDictionary)
  143:                     {
  144:                         if (!dictionary.ContainsKey(kvp.Value)) dictionary[kvp.Value] = kvp.Key;
  145:                     }
  146:                 }
  147:  
  148:                 return dictionary;
  149:             }
  150:         }
  151:  
  152:         ////////////////////////////////////////////////////////////////////////////
  153:  
  154:         /// <summary>
  155:         ///
  156:         /// </summary>
  157:         public static Dictionary<string, string> IdToDescription1ForNonNullAccessDictionary
  158:         {
  159:             get
  160:             {
  161:                 Dictionary<string, string> dictionary;
  162:  
  163:                 using (var db = new Ia.Ftn.Cl.Db())
  164:                 {
  165:                     dictionary = (from s in db.Onts
  166:                                   where s.Access != null
  167:                                   select new
  168:                                   {
  169:                                       s.Id,
  170:                                       s.Description1
  171:                                   }).AsNoTracking().ToDictionary(u => u.Id, u => u.Description1);
  172:                 }
  173:  
  174:                 return dictionary;
  175:             }
  176:         }
  177:  
  178:         ////////////////////////////////////////////////////////////////////////////
  179:  
  180:         /// <summary>
  181:         ///
  182:         /// </summary>
  183:         public static Dictionary<string, string> IdToDescription1ForNullAccessDictionary
  184:         {
  185:             get
  186:             {
  187:                 Dictionary<string, string> dictionary;
  188:  
  189:                 using (var db = new Ia.Ftn.Cl.Db())
  190:                 {
  191:                     dictionary = (from s in db.Onts
  192:                                   where s.Access == null
  193:                                   select new
  194:                                   {
  195:                                       s.Id,
  196:                                       s.Description1
  197:                                   }).AsNoTracking().ToDictionary(u => u.Id, u => u.Description1);
  198:                 }
  199:  
  200:                 return dictionary;
  201:             }
  202:         }
  203:  
  204:         ////////////////////////////////////////////////////////////////////////////
  205:  
  206:         /// <summary>
  207:         ///
  208:         /// </summary>
  209:         public static Dictionary<int, int> DistributionOfFamilyTypeIdInOntWhereSerialIsAssignedAndAccessIsNotNullDictionary
  210:         {
  211:             get
  212:             {
  213:                 Dictionary<int, int> dictionary;
  214:  
  215:                 using (var db = new Ia.Ftn.Cl.Db())
  216:                 {
  217:                     var v = (from s in db.Onts where s.Serial != null && s.Serial != "ALCL00000000" && s.Access != null group s by s.FamilyTypeId into g select new { FamilyTypeId = g.Key, Count = g.Count() });
  218:                     dictionary = v.ToDictionary(u => u.FamilyTypeId, u => u.Count);
  219:                 }
  220:  
  221:                 return dictionary;
  222:             }
  223:         }
  224:  
  225:         ////////////////////////////////////////////////////////////////////////////
  226:  
  227:         /// <summary>
  228:         ///
  229:         /// </summary>
  230:         public static Hashtable IdWithNullAccessHashtable
  231:         {
  232:             get
  233:             {
  234:                 List<string> list;
  235:                 Hashtable ht;
  236:  
  237:                 using (var db = new Ia.Ftn.Cl.Db())
  238:                 {
  239:                     list = (from o in db.Onts where o.Access == null select o.Id).ToList();
  240:  
  241:                     if (list.Count > 0)
  242:                     {
  243:                         ht = new Hashtable(list.Count);
  244:  
  245:                         foreach (string s in list) ht[s] = null;
  246:                     }
  247:                     else ht = null;
  248:                 }
  249:  
  250:                 return ht;
  251:             }
  252:         }
  253:  
  254:         ////////////////////////////////////////////////////////////////////////////
  255:  
  256:         /// <summary>
  257:         ///
  258:         /// </summary>
  259:         public static Dictionary<string, string> SerialToIdListDictionary
  260:         {
  261:             get
  262:             {
  263:                 Dictionary<string, string> dictionary;
  264:  
  265:                 dictionary = IdToSerialDictionary.Reverse();
  266:  
  267:                 return dictionary;
  268:             }
  269:         }
  270:  
  271:         ////////////////////////////////////////////////////////////////////////////
  272:  
  273:         /// <summary>
  274:         ///
  275:         /// </summary>
  276:         public static Dictionary<string, string> IdToSerialDictionary
  277:         {
  278:             get
  279:             {
  280:                 Dictionary<string, string> dictionary;
  281:  
  282:                 using (var db = new Ia.Ftn.Cl.Db())
  283:                 {
  284:                     dictionary = (from s in db.Onts
  285:                                   select new
  286:                                   {
  287:                                       s.Id,
  288:                                       s.Serial
  289:                                   }).AsNoTracking().ToDictionary(u => u.Id, u => u.Serial);
  290:                 }
  291:  
  292:                 return dictionary.ToDictionary(u => u.Key, u => u.Value);
  293:             }
  294:         }
  295:  
  296:         ////////////////////////////////////////////////////////////////////////////
  297:  
  298:         /// <summary>
  299:         ///
  300:         /// </summary>
  301:         public static List<string> IdList()
  302:         {
  303:             List<string> list;
  304:  
  305:             using (var db = new Ia.Ftn.Cl.Db())
  306:             {
  307:                 list = (from o in db.Onts select o.Id).ToList();
  308:             }
  309:  
  310:             return list;
  311:         }
  312:  
  313:         ////////////////////////////////////////////////////////////////////////////
  314:  
  315:         /// <summary>
  316:         ///
  317:         /// </summary>
  318:         public static List<string> IdList(int oltId)
  319:         {
  320:             List<string> list;
  321:  
  322:             using (var db = new Ia.Ftn.Cl.Db())
  323:             {
  324:                 list = (from o in db.Onts where o.Access.Olt == oltId select o.Id).ToList();
  325:             }
  326:  
  327:             return list;
  328:         }
  329:  
  330:         ////////////////////////////////////////////////////////////////////////////
  331:  
  332:         /// <summary>
  333:         ///
  334:         /// </summary>
  335:         public static bool Update(Ia.Ftn.Cl.Models.Ont ont, out string result)
  336:         {
  337:             bool b;
  338:  
  339:             b = false;
  340:             result = string.Empty;
  341:  
  342:             using (var db = new Ia.Ftn.Cl.Db())
  343:             {
  344:                 ont = (from o in db.Onts where o.Id == ont.Id select o).SingleOrDefault();
  345:  
  346:                 ont.Updated = DateTime.UtcNow.AddHours(3);
  347:  
  348:                 db.Onts.Attach(ont);
  349:  
  350:                 db.Entry(ont).State = Microsoft.EntityFrameworkCore.EntityState.Modified;
  351:                 db.SaveChanges();
  352:  
  353:                 b = true;
  354:             }
  355:  
  356:             return b;
  357:         }
  358:  
  359:         ////////////////////////////////////////////////////////////////////////////
  360:  
  361:         /// <summary>
  362:         ///
  363:         /// </summary>
  364:         public static bool NullifyAccessIdByAccessId(string accessId, out string result)
  365:         {
  366:             bool b;
  367:             int numberOfRecordsWhereAccessIsNullified;
  368:             Ia.Ftn.Cl.Models.Ont ont;
  369:  
  370:             b = false;
  371:             numberOfRecordsWhereAccessIsNullified = 0;
  372:  
  373:             using (var db = new Ia.Ftn.Cl.Db())
  374:             {
  375:                 // --update Onts set Access_Id = null where Access_Id = '1040101010040004'
  376:                 //var query = (from o in db.Onts where o.Access.Id == accessId select o).ToList();
  377:  
  378:                 //foreach (var q in query)
  379:                 //{
  380:                 //ont = (from o in db.Onts where o.Id == q.Id select o).SingleOrDefault();
  381:                 ont = (from o in db.Onts where o.Access.Id == accessId select o).Include(u => u.Access).FirstOrDefault(); //.SingleOrDefault();
  382:  
  383:                 if (ont != null)
  384:                 {
  385:                     ont.Access = null;
  386:                     //ont.StaffIdentityUser.Id = userId;
  387:                     ont.Updated = DateTime.UtcNow.AddHours(3);
  388:  
  389:                     db.Onts.Attach(ont);
  390:                     db.Entry(ont).Property(u => u.Updated).IsModified = true;
  391:  
  392:                     db.SaveChanges();
  393:  
  394:                     numberOfRecordsWhereAccessIsNullified++;
  395:                 }
  396:                 //}
  397:  
  398:                 b = true;
  399:             }
  400:  
  401:             result = "Number of records where access is nullified: " + numberOfRecordsWhereAccessIsNullified;
  402:  
  403:             return b;
  404:         }
  405:  
  406:         ////////////////////////////////////////////////////////////////////////////
  407:  
  408:         /// <summary>
  409:         ///
  410:         /// </summary>
  411:         public static bool Delete(string id, out string result)
  412:         {
  413:             bool b;
  414:  
  415:             b = false;
  416:             result = string.Empty;
  417:  
  418:             using (var db = new Ia.Ftn.Cl.Db())
  419:             {
  420:                 var v = (from o in db.Onts where o.Id == id select o).FirstOrDefault();
  421:  
  422:                 db.Onts.Remove(v);
  423:                 db.SaveChanges();
  424:  
  425:                 b = true;
  426:             }
  427:  
  428:             return b;
  429:         }
  430:  
  431:         ////////////////////////////////////////////////////////////////////////////
  432:         ////////////////////////////////////////////////////////////////////////////
  433:  
  434:         /// <summary>
  435:         ///
  436:         /// </summary>
  437:         public static string FamilyTypeStringFromId(int familyTypeId)
  438:         {
  439:             string s;
  440:             Ia.Ftn.Cl.Models.Business.Nokia.Ont.FamilyType familyType;
  441:  
  442:             familyType = (Ia.Ftn.Cl.Models.Business.Nokia.Ont.FamilyType)familyTypeId;
  443:  
  444:             s = familyType.ToString().ToUpper();
  445:  
  446:             return s;
  447:         }
  448:  
  449:         ////////////////////////////////////////////////////////////////////////////
  450:  
  451:         /// <summary>
  452:         ///
  453:         /// </summary>
  454:         public static List<Ia.Ftn.Cl.Models.Ont> List(string serial)
  455:         {
  456:             List<Ia.Ftn.Cl.Models.Ont> list;
  457:  
  458:             using (var db = new Ia.Ftn.Cl.Db())
  459:             {
  460:                 list = (from o in db.Onts where o.Serial == serial select o).ToList();
  461:             }
  462:  
  463:             return list;
  464:         }
  465:  
  466:         ////////////////////////////////////////////////////////////////////////////
  467:  
  468:         /// <summary>
  469:         ///
  470:         /// </summary>
  471:         public static List<Ia.Ftn.Cl.Models.Ont> List(int oltId)
  472:         {
  473:             List<Ia.Ftn.Cl.Models.Ont> list;
  474:  
  475:             using (var db = new Ia.Ftn.Cl.Db())
  476:             {
  477:                 list = (from o in db.Onts where o.Access.Olt == oltId select o).ToList();
  478:             }
  479:  
  480:             return list;
  481:         }
  482:  
  483:         ////////////////////////////////////////////////////////////////////////////
  484:  
  485:         /// <summary>
  486:         ///
  487:         /// </summary>
  488:         public static List<Ia.Ftn.Cl.Models.Ont> ReadListIncludeOntServiceVoipsAndAccess(int oltId)
  489:         {
  490:             List<Ia.Ftn.Cl.Models.Ont> list;
  491:  
  492:             using (var db = new Ia.Ftn.Cl.Db())
  493:             {
  494:                 list = (from o in db.Onts where o.Access.Olt == oltId select o).Include(u => u.Access).Include(u => u.OntServiceVoips).ToList();
  495:             }
  496:  
  497:             return list;
  498:         }
  499:  
  500:         ////////////////////////////////////////////////////////////////////////////
  501:  
  502:         /// <summary>
  503:         ///
  504:         /// </summary>
  505:         public static List<Ia.Ftn.Cl.Models.Ont> ListIncludeAccess()
  506:         {
  507:             List<Ia.Ftn.Cl.Models.Ont> ontList;
  508:  
  509:             using (var db = new Ia.Ftn.Cl.Db())
  510:             {
  511:                 ontList = (from o in db.Onts select o).Include(u => u.Access).AsNoTracking().ToList();
  512:             }
  513:  
  514:             return ontList;
  515:         }
  516:  
  517:         ////////////////////////////////////////////////////////////////////////////
  518:  
  519:         /// <summary>
  520:         ///
  521:         /// </summary>
  522:         public static List<Ia.Ftn.Cl.Models.Ont> ListIncludeAccessAndOntOntPots()
  523:         {
  524:             List<Ia.Ftn.Cl.Models.Ont> ontList;
  525:  
  526:             using (var db = new Ia.Ftn.Cl.Db())
  527:             {
  528:                 ontList = (from o in db.Onts select o).Include(u => u.Access).Include(v => v.OntOntPotses).ToList();
  529:  
  530:                 /*
  531:                 ontList = (from o in db.Onts 
  532:                            join a in db.Accesses on o.Access equals a 
  533:                            join oop in db.OntOntPotses on o equals oop.Ont select o).ToList();
  534:                  */
  535:             }
  536:  
  537:             return ontList;
  538:         }
  539:  
  540:         ////////////////////////////////////////////////////////////////////////////
  541:  
  542:         /// <summary>
  543:         ///
  544:         /// </summary>
  545:         public static List<Ia.Ftn.Cl.Models.Ont> ListIncludeAccessAndOntOntPots(int oltId)
  546:         {
  547:             List<Ia.Ftn.Cl.Models.Ont> ontList;
  548:  
  549:             using (var db = new Ia.Ftn.Cl.Db())
  550:             {
  551:                 ontList = (from o in db.Onts where o.Access.Olt == oltId select o).Include(u => u.Access).Include(v => v.OntOntPotses).ToList();
  552:             }
  553:  
  554:             return ontList;
  555:         }
  556:  
  557:         ////////////////////////////////////////////////////////////////////////////
  558:  
  559:         /// <summary>
  560:         ///
  561:         /// </summary>
  562:         public static List<Ia.Ftn.Cl.Models.Ont> ListIncludeAccess(int oltId)
  563:         {
  564:             List<Ia.Ftn.Cl.Models.Ont> ontList;
  565:  
  566:             using (var db = new Ia.Ftn.Cl.Db())
  567:             {
  568:                 ontList = (from o in db.Onts where o.Access.Olt == oltId select o).Include(u => u.Access).ToList();
  569:             }
  570:  
  571:             return ontList;
  572:         }
  573:  
  574:         ////////////////////////////////////////////////////////////////////////////
  575:  
  576:         /// <summary>
  577:         ///
  578:         /// </summary>
  579:         public static Dictionary<string, int> IdToFamilyTypeIdOfNonNullAccessDictionary()
  580:         {
  581:             var dictionary = new Dictionary<string, int>();
  582:  
  583:             using (var db = new Ia.Ftn.Cl.Db())
  584:             {
  585:                 dictionary = (from o in db.Onts
  586:                               where o.Access != null
  587:                               select new { o.Id, o.FamilyTypeId }).ToDictionary(n => n.Id, n => n.FamilyTypeId);
  588:             }
  589:  
  590:             return dictionary;
  591:         }
  592:  
  593:         ////////////////////////////////////////////////////////////////////////////
  594:  
  595:         /// <summary>
  596:         ///
  597:         /// </summary>
  598:         public static List<Ia.Ftn.Cl.Models.Ont> NonNullAccessList()
  599:         {
  600:             List<Ia.Ftn.Cl.Models.Ont> ontList;
  601:  
  602:             using (var db = new Ia.Ftn.Cl.Db())
  603:             {
  604:                 ontList = (from o in db.Onts
  605:                            where o.Access != null
  606:                            select o).Include(u => u.Access).ToList();
  607:             }
  608:  
  609:             return ontList;
  610:         }
  611:  
  612:         ////////////////////////////////////////////////////////////////////////////
  613:  
  614:         /// <summary>
  615:         ///
  616:         /// </summary>
  617:         public static List<Ia.Ftn.Cl.Models.Ont> NonNullAccessList(int oltId)
  618:         {
  619:             List<Ia.Ftn.Cl.Models.Ont> ontList;
  620:  
  621:             using (var db = new Ia.Ftn.Cl.Db())
  622:             {
  623:                 ontList = (from o in db.Onts
  624:                            where o.Access != null && o.Access.Olt == oltId
  625:                            select o).Include(u => u.Access).ToList();
  626:             }
  627:  
  628:             return ontList;
  629:         }
  630:  
  631:         ////////////////////////////////////////////////////////////////////////////
  632:  
  633:         /// <summary>
  634:         ///
  635:         /// </summary>
  636:         public static List<string> ReadNetworkDesignDocumentAccessNameListWithOntEquipmentIdNotNullAndAccessIsNullIncludeOntServiceVoips
  637:         {
  638:             get
  639:             {
  640:                 Dictionary<string, string> di;
  641:                 List<string> ontNameList;
  642:                 List<Ia.Ftn.Cl.Models.Ont> ontList;
  643:  
  644:                 using (var db = new Ia.Ftn.Cl.Db())
  645:                 {
  646:                     ontList = (from o in db.Onts where o.EquipmentId != null && o.Access == null select o).ToList();
  647:  
  648:                     ontNameList = new List<string>(ontList.Count);
  649:  
  650:                     di = Ia.Ftn.Cl.Models.Data.NetworkDesignDocument.OntAccessIdToOntAccessNameDictionary;
  651:  
  652:                     foreach (var ont in ontList)
  653:                     {
  654:                         if (di.ContainsKey(ont.Id)) ontNameList.Add(di[ont.Id]);
  655:                     }
  656:                 }
  657:  
  658:                 return ontNameList;
  659:             }
  660:         }
  661:  
  662:         ////////////////////////////////////////////////////////////////////////////
  663:  
  664:         /// <summary>
  665:         ///
  666:         /// </summary>
  667:         public static List<string> ServiceWhereOntIsOfflineList()
  668:         {
  669:             string service;
  670:             List<string> list, serviceList;
  671:  
  672:             // Nokia ONT is not SIP therefore I can't read the service anywhere from the GPON
  673:             /*
  674:             using (var db = new Ia.Ftn.Cl.Model.Ftn())
  675:             {
  676:                 list = (from o in db.Onts where o.Id == id select o).Include(u => u.Access).SingleOrDefault();
  677: 
  678:                 list = (from oop in db.OntOntPots
  679:                         join o in db.Onts on oop.Ont.Id equals o.Id
  680:                         where o.StateId == (int)Ia.Ftn.Cl.Model.Business.Nokia.Ams.BellcoreState.IsNr
  681:                         select oop.).AsNoTracking().ToList();
  682:             }
  683: 
  684:             if (list != null && list.Count > 0)
  685:             {
  686:                 serviceList = new List<string>(list.Count);
  687: 
  688:                 foreach (var s in list)
  689:                 {
  690:                     service = Ia.Ftn.Cl.Model.Business.NumberFormatConverter.Service(s);
  691: 
  692:                     serviceList.Add(service);
  693:                 }
  694:             }
  695:             else
  696:             {
  697:                 serviceList = new List<string>();
  698:             }
  699:             */
  700:  
  701:             serviceList = new List<string>();
  702:  
  703:             return serviceList;
  704:         }
  705:  
  706:         ////////////////////////////////////////////////////////////////////////////
  707:         ////////////////////////////////////////////////////////////////////////////
  708:  
  709:         /// <summary>
  710:         ///
  711:         /// </summary>
  712:         public static string ToSimpleTextString(Ia.Ftn.Cl.Models.Ont ont)
  713:         {
  714:             StringBuilder sb;
  715:  
  716:             sb = new StringBuilder();
  717:  
  718:             //sb.AppendLine("Vendor: " + Ia.Ftn.Cl.Model.Business.NetworkDesignDocument.Vendor.Nokia.Name);
  719:             sb.AppendLine("State: " + ont.State);
  720:             sb.AppendLine("FamilyType: " + Ia.Ftn.Cl.Models.Data.Nokia.Ont.FamilyTypeStringFromId(ont.FamilyTypeId));
  721:             sb.AppendLine("Serial: " + ont.Serial);
  722:             sb.AppendLine("EquipmentId: " + ont.EquipmentId);
  723:             sb.AppendLine("ActiveSoftware: " + ont.ActiveSoftware);
  724:             //sb.AppendLine("PassiveSoftware: " + ont.PassiveSoftware);
  725:             sb.AppendLine("PlannedSoftware: " + ont.PlannedSoftware);
  726:             //sb.AppendLine("BatteryBackupAvailable: " + ont.BatteryBackupAvailable);
  727:             sb.AppendLine("Description1: " + ont.Description1);
  728:             sb.AppendLine("Description2: " + ont.Description2);
  729:  
  730:             return sb.ToString();
  731:         }
  732:  
  733:         ////////////////////////////////////////////////////////////////////////////
  734:         ////////////////////////////////////////////////////////////////////////////
  735:     }
  736:  
  737:     ////////////////////////////////////////////////////////////////////////////
  738:     ////////////////////////////////////////////////////////////////////////////
  739: }