)>}]
شركة التطبيقات المتكاملة لتصميم وبرمجة البرمجيات الخاصة ش.ش.و.
Integrated Applications Programming Company
Skip Navigation LinksHome » Code Library » Find

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

Find subscriber and network information support class for the Optical Fiber Network ui model

    1: using System;
    2: using System.Collections.Generic;
    3: using System.Runtime.Serialization;
    4: using System.Text;
    5:  
    6: namespace Ia.Ngn.Cl.Model.Ui.Maintenance
    7: {
    8:     ////////////////////////////////////////////////////////////////////////////
    9:  
   10:     /// <summary publish="true">
   11:     /// Find subscriber and network information support class for the Optical Fiber Network ui model
   12:     /// </summary>
   13:     /// 
   14:     /// <remarks> 
   15:     /// Copyright © 2006-2017 Jasem Y. Al-Shamlan (info@ia.com.kw), Integrated Applications - Kuwait. All Rights Reserved.
   16:     ///
   17:     /// 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
   18:     /// the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
   19:     ///
   20:     /// This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
   21:     /// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
   22:     /// 
   23:     /// You should have received a copy of the GNU General Public License along with this library. If not, see http://www.gnu.org/licenses.
   24:     /// 
   25:     /// Copyright notice: This notice may not be removed or altered from any source distribution.
   26:     /// </remarks> 
   27:     [DataContract(IsReference = true, Namespace = "kw.com.ia.ngn.api", Name = "apiFind")]
   28:     public class Find
   29:     {
   30:         private static List<Ia.Ngn.Cl.Model.Ui.Service2> serviceList;
   31:         private static List<Ia.Ngn.Cl.Model.Ui.Nokia.AgcfGatewayRecord> agcfGatewayRecordList;
   32:         private static List<Ia.Ngn.Cl.Model.Ui.Nokia.AgcfEndpoint> agcfEndpointList;
   33:         private static List<Ia.Ngn.Cl.Model.Huawei.Mgw> mgwList;
   34:         private static List<Ia.Ngn.Cl.Model.Huawei.Asbr> asbrList;
   35:         private static List<Ia.Ngn.Cl.Model.Ui.Nokia.SubParty> subPartyList;
   36:         private static List<Ia.Ngn.Cl.Model.Ui.Nokia.Subscriber> subscriberList;
   37:         private static List<Ia.Ngn.Cl.Model.Ui.Huawei.HuSbr> huSbrList;
   38:         private static List<Ia.Ngn.Cl.Model.Huawei.Owsbr> owsbrList;
   39:         private static List<Ia.Ngn.Cl.Model.Huawei.Seruattr> seruattrList;
   40:         private static List<Ia.Ngn.Cl.Model.Ericsson.AxeSubscriber> axeSubscriberList;
   41:         private static List<Ia.Ngn.Cl.Model.Siemens.EwsdSubscriber> ewsdSubscriberList;
   42:         private static List<Ia.Ngn.Cl.Model.Ont> ontList;
   43:         private static List<Ia.Ngn.Cl.Model.Business.NetworkDesignDocument.Ont> nddOntList;
   44:         private static List<Ia.Ngn.Cl.Model.OntServiceVoip> ontServiceVoipList;
   45:         private static List<Ia.Ngn.Cl.Model.OntOntPots> ontOntPotsList;
   46:         private static List<Ia.Ngn.Cl.Model.Huawei.EmsDev> emsDevList;
   47:         private static List<Ia.Ngn.Cl.Model.Huawei.EmsBoard> emsBoardList;
   48:         private static List<Ia.Ngn.Cl.Model.Huawei.EmsPort> emsPortList;
   49:         private static List<Ia.Ngn.Cl.Model.Ui.Huawei.EmsOnt> emsOntList;
   50:         private static List<Ia.Ngn.Cl.Model.Huawei.EmsOntSipInfo> emsOntSipInfoList;
   51:         private static List<Ia.Ngn.Cl.Model.Huawei.EmsVoipPstnUser> emsVoipPstnUserList;
   52:         private static List<Ia.Ngn.Cl.Model.Huawei.EmsVag> emsVagList;
   53:         private static List<Ia.Ngn.Cl.Model.Event> eventList;
   54:         private static List<Ia.Ngn.Cl.Model.Access> accessList;
   55:         private static List<Ia.Ngn.Cl.Model.Ui.ServiceRequestService> serviceRequestServiceList;
   56:         private static List<Ia.Ngn.Cl.Model.ServiceRequest> serviceRequestList;
   57:         private static List<Ia.Ngn.Cl.Model.ServiceRequestAdministrativeIssue> serviceRequestAdministrativeIssueList;
   58:         private static List<Ia.Ngn.Cl.Model.ServiceRequestHistory> serviceRequestHistoryList;
   59:         private static List<Ia.Ngn.Cl.Model.ServiceRequestType> serviceRequestTypeList;
   60:         private static List<Ia.Ngn.Cl.Model.ServiceRequestOnt> serviceRequestOntList;
   61:         private static List<Ia.Ngn.Cl.Model.ServiceRequestOntDetail> serviceRequestOntDetailList;
   62:         private static List<Ia.Ngn.Cl.Model.Report> reportList;
   63:         private static List<Ia.Ngn.Cl.Model.ReportHistory> reportHistoryList;
   64:  
   65:         /// <summary/>
   66:         [DataMember(Name = "serviceList")]
   67:         public List<Ia.Ngn.Cl.Model.Ui.Service2> ServiceList { get; set; }
   68:  
   69:         /// <summary/>
   70:         [DataMember(Name = "result")]
   71:         public Ia.Cl.Model.Result Result { get; set; }
   72:  
   73:         /////////////////////////////////////////////////////////////////////////////////
   74:  
   75:         /// <summary>
   76:         ///
   77:         /// </summary>
   78:         public static void SearchForApi(Ia.Ngn.Cl.Model.Business.Administration.Framework framework, string input, out List<Ia.Ngn.Cl.Model.Ui.Service2> serviceList, out Ia.Cl.Model.Result result)
   79:         {
   80:             string inputType;
   81:             result = new Ia.Cl.Model.Result();
   82:  
   83:             inputType = string.Empty;
   84:             serviceList = null;
   85:  
   86:             if (Ia.Ngn.Cl.Model.Business.Authority.FrameworkCanCreateReadUpdateDeleteMaintenanceFind(Ia.Ngn.Cl.Model.Business.Authority.PersistentStorageFunction.Read, framework))
   87:             {
   88:                 Ia.Ngn.Cl.Model.Business.Maintenance.Find.Search(framework, input, inputType, out serviceList, out agcfGatewayRecordList, out agcfEndpointList, out mgwList, out asbrList, out subPartyList, out subscriberList, out huSbrList, out owsbrList, out seruattrList, out axeSubscriberList, out ewsdSubscriberList, out nddOntList, out ontList, out ontServiceVoipList, out ontOntPotsList, out emsDevList, out emsBoardList, out emsPortList, out emsOntList, out emsOntSipInfoList, out emsVoipPstnUserList, out emsVagList, out eventList, out accessList, out serviceRequestServiceList, out serviceRequestList, out serviceRequestAdministrativeIssueList, out serviceRequestHistoryList, out serviceRequestTypeList, out serviceRequestOntList, out serviceRequestOntDetailList, out reportList, out reportHistoryList, out result);
   89:  
   90:                 if (!result.HasError)
   91:                 {
   92:  
   93:                 }
   94:                 else
   95:                 {
   96:  
   97:                 }
   98:             }
   99:             else
  100:             {
  101:                 result.AddError("You are not authorized to modify this value (لست مخولاً بتعديل هذه القيمة).");
  102:             }
  103:         }
  104:  
  105:         /////////////////////////////////////////////////////////////////////////////////
  106:  
  107:         /// <summary>
  108:         ///
  109:         /// </summary>
  110:         public static void SearchToEnqueueAndUpdateRelatedInformation(string input)
  111:         {
  112:             Ia.Ngn.Cl.Model.Business.Maintenance.Find.Search(null, input, string.Empty, out _, out _, out _, out _, out _, out _, out _, out _, out _, out _, out _, out _, out _, out _, out _, out _, out _, out _, out _, out _, out _, out _, out _, out _, out _, out _, out _, out _, out _, out _, out _, out _, out _, out _, out _);
  113:         }
  114:  
  115:         /////////////////////////////////////////////////////////////////////////////////
  116:  
  117:         /// <summary>
  118:         ///
  119:         /// </summary>
  120:         public static void SearchForMail(Ia.Ngn.Cl.Model.Business.Administration.Framework framework, string opcode, string operand, out string subject, out StringBuilder contentStringBuilder)
  121:         {
  122:             string inputType, horizontalRule;
  123:             DateTime now;
  124:  
  125:             inputType = string.Empty;
  126:             horizontalRule = "===============================================";
  127:  
  128:             now = DateTime.UtcNow.AddHours(3);
  129:  
  130:             // subject can't have \r\n
  131:             //responseSubject = "Optical Fiber Network's Operations Support System (OFN OSS) Find Result (" + now.ToString("yyyy-MM-dd HH:mm") + ")";
  132:  
  133:             //if (Ia.Ngn.Cl.Model.Business.Authority.StaffContactCanCreateReadUpdateDeleteAccessList(Ia.Ngn.Cl.Model.Business.Authority.PersistentStorageFunction.Create, staffContact))
  134:             //{
  135:             opcode = opcode.ToLower();
  136:  
  137:             SearchForTelegramBotApiAndMailSimpleText(framework, opcode, operand, inputType, horizontalRule, out subject, out contentStringBuilder);
  138:  
  139:             contentStringBuilder.AppendLine(horizontalRule);
  140:             contentStringBuilder.AppendLine(@"Help? Send message with ""mail/maintenance/find/help""");
  141:             contentStringBuilder.AppendLine(horizontalRule);
  142:             contentStringBuilder.AppendLine();
  143:             /*}
  144:              else
  145:              {
  146:                  responseContent += "\r\n";
  147:                  responseContent += "You are not authorized to modify this value. ";
  148:                  responseContent += "\r\n";
  149:              }*/
  150:         }
  151:  
  152:         /////////////////////////////////////////////////////////////////////////////////
  153:  
  154:         /// <summary>
  155:         ///
  156:         /// </summary>
  157:         public static void SearchForTelegramBotApi(Ia.Ngn.Cl.Model.Business.Administration.Framework framework, string opcode, string operand, out string subject, out string content)
  158:         {
  159:             string inputType, horizontalRule;
  160:             StringBuilder contentStringBuilder;
  161:             DateTime now;
  162:  
  163:             inputType = string.Empty;
  164:             horizontalRule = " ";
  165:  
  166:             now = DateTime.UtcNow.AddHours(3);
  167:  
  168:             //if (Ia.Ngn.Cl.Model.Business.Authority.StaffContactCanCreateReadUpdateDeleteAccessList(Ia.Ngn.Cl.Model.Business.Authority.PersistentStorageFunction.Create, staffContact))
  169:             //{
  170:             opcode = opcode.ToLower();
  171:  
  172:             SearchForTelegramBotApiAndMailSimpleText(framework, opcode, operand, inputType, horizontalRule, out subject, out contentStringBuilder);
  173:  
  174:             contentStringBuilder.AppendLine(Ia.Ngn.Cl.Model.Data.Help.Text(Ia.Ngn.Cl.Model.Data.Help.TelegramString.NeedHelpSendCommandSlashHelp));
  175:             contentStringBuilder.AppendLine(horizontalRule);
  176:             contentStringBuilder.AppendLine();
  177:  
  178:             content = contentStringBuilder.ToString();
  179:             //}
  180:             //else
  181:             //{
  182:             //    responseContent += "\r\n";
  183:             //    responseContent += "You are not authorized to modify this value. ";
  184:             //    responseContent += "\r\n";
  185:             //}
  186:         }
  187:  
  188:         ////////////////////////////////////////////////////////////////////////////
  189:  
  190:         /// <summary>
  191:         ///
  192:         /// </summary>
  193:         public static void SearchForTelegramBotApiAndMailSimpleText(Ia.Ngn.Cl.Model.Business.Administration.Framework framework, string opcode, string operand, string inputType, string horizontalRule, out string subject, out StringBuilder contentStringBuilder)
  194:         {
  195:             StringBuilder stringBuilder;
  196:             DateTime now;
  197:             Ia.Cl.Model.Result result;
  198:  
  199:             stringBuilder = new StringBuilder();
  200:  
  201:             subject = string.Empty;
  202:             now = DateTime.UtcNow.AddHours(3);
  203:  
  204:             if (opcode.Contains("help"))
  205:             {
  206:                 // subject can't have \r\n
  207:                 //subject = "Help:";
  208:  
  209:                 stringBuilder.AppendLine(Ia.Ngn.Cl.Model.Data.Help.Text(opcode));
  210:                 stringBuilder.AppendLine();
  211:             }
  212:             else if (opcode.Contains("find"))
  213:             {
  214:                 // subject can't have \r\n
  215:                 subject = "Optical Fiber Network's Operations Support System (OFN OSS) Find Result (" + now.ToString("yyyy-MM-dd HH:mm") + ")";
  216:  
  217:                 Ia.Ngn.Cl.Model.Business.Maintenance.Find.Search(framework, operand, inputType, out serviceList, out agcfGatewayRecordList, out agcfEndpointList, out mgwList, out asbrList, out subPartyList, out subscriberList, out huSbrList, out owsbrList, out seruattrList, out axeSubscriberList, out ewsdSubscriberList, out nddOntList, out ontList, out ontServiceVoipList, out ontOntPotsList, out emsDevList, out emsBoardList, out emsPortList, out emsOntList, out emsOntSipInfoList, out emsVoipPstnUserList, out emsVagList, out eventList, out accessList, out serviceRequestServiceList, out serviceRequestList, out serviceRequestAdministrativeIssueList, out serviceRequestHistoryList, out serviceRequestTypeList, out serviceRequestOntList, out serviceRequestOntDetailList, out reportList, out reportHistoryList, out result);
  218:  
  219:                 if (result.IsSuccessful)
  220:                 {
  221:                     if (serviceList != null && serviceList.Count > 0)
  222:                     {
  223:                         stringBuilder.AppendLine(horizontalRule);
  224:                         stringBuilder.AppendLine("Services:"); //("Service2s:");
  225:                         stringBuilder.AppendLine();
  226:                         foreach (var s in serviceList) stringBuilder.AppendLine(s.ToSimpleTextString());
  227:                         stringBuilder.AppendLine(horizontalRule);
  228:                         stringBuilder.AppendLine();
  229:                     }
  230:  
  231:                     if (subscriberList != null && subscriberList.Count > 0)
  232:                     {
  233:                         stringBuilder.AppendLine(horizontalRule);
  234:                         stringBuilder.AppendLine("Subscribers:");
  235:                         stringBuilder.AppendLine();
  236:                         foreach (var s in subscriberList) stringBuilder.AppendLine(s.ToSimpleTextString());
  237:                         stringBuilder.AppendLine(horizontalRule);
  238:                         stringBuilder.AppendLine();
  239:                     }
  240:  
  241:                     if (subPartyList != null && subPartyList.Count > 0)
  242:                     {
  243:                         stringBuilder.AppendLine(horizontalRule);
  244:                         stringBuilder.AppendLine("SubParties:");
  245:                         stringBuilder.AppendLine();
  246:                         foreach (var sp in subPartyList) stringBuilder.AppendLine(sp.ToSimpleTextString());
  247:                         stringBuilder.AppendLine(horizontalRule);
  248:                         stringBuilder.AppendLine();
  249:                     }
  250:  
  251:                     if (huSbrList != null && huSbrList.Count > 0)
  252:                     {
  253:                         stringBuilder.AppendLine(horizontalRule);
  254:                         stringBuilder.AppendLine("Sbrs:");
  255:                         stringBuilder.AppendLine();
  256:                         foreach (var h in huSbrList) stringBuilder.AppendLine(h.ToSimpleTextString());
  257:                         stringBuilder.AppendLine(horizontalRule);
  258:                         stringBuilder.AppendLine();
  259:                     }
  260:  
  261:                     if (owsbrList != null && owsbrList.Count > 0)
  262:                     {
  263:                         stringBuilder.AppendLine(horizontalRule);
  264:                         stringBuilder.AppendLine("Owsbrs:");
  265:                         stringBuilder.AppendLine();
  266:                         foreach (var o in owsbrList) stringBuilder.AppendLine(o.ToSimpleTextString());
  267:                         stringBuilder.AppendLine(horizontalRule);
  268:                         stringBuilder.AppendLine();
  269:                     }
  270:  
  271:                     if (seruattrList != null && seruattrList.Count > 0)
  272:                     {
  273:                         stringBuilder.AppendLine(horizontalRule);
  274:                         stringBuilder.AppendLine("Seruattrs:");
  275:                         stringBuilder.AppendLine();
  276:                         foreach (var s in seruattrList) stringBuilder.AppendLine(s.ToSimpleTextString());
  277:                         stringBuilder.AppendLine(horizontalRule);
  278:                         stringBuilder.AppendLine();
  279:                     }
  280:  
  281:                     if (axeSubscriberList != null && axeSubscriberList.Count > 0)
  282:                     {
  283:                         stringBuilder.AppendLine(horizontalRule);
  284:                         stringBuilder.AppendLine("AXE Subscriber:");
  285:                         stringBuilder.AppendLine();
  286:                         foreach (var s in axeSubscriberList) stringBuilder.AppendLine(s.ToSimpleTextString());
  287:                         stringBuilder.AppendLine(horizontalRule);
  288:                         stringBuilder.AppendLine();
  289:                     }
  290:  
  291:                     if (ewsdSubscriberList != null && ewsdSubscriberList.Count > 0)
  292:                     {
  293:                         stringBuilder.AppendLine(horizontalRule);
  294:                         stringBuilder.AppendLine("EWSD Subscriber:");
  295:                         stringBuilder.AppendLine();
  296:                         foreach (var s in ewsdSubscriberList) stringBuilder.AppendLine(s.ToSimpleTextString());
  297:                         stringBuilder.AppendLine(horizontalRule);
  298:                         stringBuilder.AppendLine();
  299:                     }
  300:  
  301:                     if (nddOntList != null && nddOntList.Count > 0)
  302:                     {
  303:                         stringBuilder.AppendLine(horizontalRule);
  304:                         stringBuilder.AppendLine("Network Design Document ONTs (Standard):");
  305:                         stringBuilder.AppendLine();
  306:                         foreach (var o in nddOntList) stringBuilder.AppendLine(o.ToSimpleTextString());
  307:                         stringBuilder.AppendLine(horizontalRule);
  308:                         stringBuilder.AppendLine();
  309:                     }
  310:  
  311:                     if (agcfEndpointList != null && agcfEndpointList.Count > 0)
  312:                     {
  313:                         stringBuilder.AppendLine(horizontalRule);
  314:                         stringBuilder.AppendLine("AGCF Endpoints:");
  315:                         stringBuilder.AppendLine();
  316:                         foreach (var ep in agcfEndpointList) stringBuilder.AppendLine(ep.ToSimpleTextString());
  317:                         stringBuilder.AppendLine(horizontalRule);
  318:                         stringBuilder.AppendLine();
  319:                     }
  320:  
  321:                     if (agcfGatewayRecordList != null && agcfGatewayRecordList.Count > 0)
  322:                     {
  323:                         stringBuilder.AppendLine(horizontalRule);
  324:                         stringBuilder.AppendLine("AGCF Gateway Records:");
  325:                         stringBuilder.AppendLine();
  326:                         foreach (var gr in agcfGatewayRecordList) stringBuilder.AppendLine(gr.ToSimpleTextString());
  327:                         stringBuilder.AppendLine(horizontalRule);
  328:                         stringBuilder.AppendLine();
  329:                     }
  330:  
  331:                     if (asbrList != null && asbrList.Count > 0)
  332:                     {
  333:                         stringBuilder.AppendLine(horizontalRule);
  334:                         stringBuilder.AppendLine("AGCF Users:");
  335:                         stringBuilder.AppendLine();
  336:                         foreach (var a in asbrList) stringBuilder.AppendLine(a.ToSimpleTextString());
  337:                         stringBuilder.AppendLine(horizontalRule);
  338:                         stringBuilder.AppendLine();
  339:                     }
  340:  
  341:                     if (mgwList != null && mgwList.Count > 0)
  342:                     {
  343:                         stringBuilder.AppendLine(horizontalRule);
  344:                         stringBuilder.AppendLine("Media Gateway:");
  345:                         stringBuilder.AppendLine();
  346:                         foreach (var m in mgwList) stringBuilder.AppendLine(m.ToSimpleTextString());
  347:                         stringBuilder.AppendLine(horizontalRule);
  348:                         stringBuilder.AppendLine();
  349:                     }
  350:  
  351:                     if (ontList != null && ontList.Count > 0)
  352:                     {
  353:                         stringBuilder.AppendLine(horizontalRule);
  354:                         stringBuilder.AppendLine("ONTs (Nokia AMS):");
  355:                         stringBuilder.AppendLine();
  356:                         foreach (var o in ontList) stringBuilder.AppendLine(o.ToSimpleTextString());
  357:                         stringBuilder.AppendLine(horizontalRule);
  358:                         stringBuilder.AppendLine();
  359:                     }
  360:  
  361:                     if (ontServiceVoipList != null && ontServiceVoipList.Count > 0)
  362:                     {
  363:                         stringBuilder.AppendLine(horizontalRule);
  364:                         stringBuilder.AppendLine("ONT (Nokia AMS) Service VOIPs:");
  365:                         stringBuilder.AppendLine();
  366:                         foreach (var osv in ontServiceVoipList) stringBuilder.AppendLine(osv.ToSimpleTextString());
  367:                         stringBuilder.AppendLine(horizontalRule);
  368:                         stringBuilder.AppendLine();
  369:                     }
  370:  
  371:                     if (ontOntPotsList != null && ontOntPotsList.Count > 0)
  372:                     {
  373:                         stringBuilder.AppendLine(horizontalRule);
  374:                         stringBuilder.AppendLine("ONT (Nokia AMS) POTSs:");
  375:                         stringBuilder.AppendLine();
  376:                         foreach (var oop in ontOntPotsList) stringBuilder.AppendLine(oop.ToSimpleTextString());
  377:                         stringBuilder.AppendLine(horizontalRule);
  378:                         stringBuilder.AppendLine();
  379:                     }
  380:  
  381:                     if (emsDevList != null && emsDevList.Count > 0)
  382:                     {
  383:                         stringBuilder.AppendLine(horizontalRule);
  384:                         stringBuilder.AppendLine("DEVs (EMS):");
  385:                         stringBuilder.AppendLine();
  386:                         foreach (var ed in emsDevList) stringBuilder.AppendLine(ed.ToSimpleTextString());
  387:                         stringBuilder.AppendLine(horizontalRule);
  388:                         stringBuilder.AppendLine();
  389:                     }
  390:  
  391:                     if (emsBoardList != null && emsBoardList.Count > 0)
  392:                     {
  393:                         stringBuilder.AppendLine(horizontalRule);
  394:                         stringBuilder.AppendLine("Boards (EMS):");
  395:                         stringBuilder.AppendLine();
  396:                         foreach (var eb in emsBoardList) stringBuilder.AppendLine(eb.ToSimpleTextString());
  397:                         stringBuilder.AppendLine(horizontalRule);
  398:                         stringBuilder.AppendLine();
  399:                     }
  400:  
  401:                     if (emsPortList != null && emsPortList.Count > 0)
  402:                     {
  403:                         stringBuilder.AppendLine(horizontalRule);
  404:                         stringBuilder.AppendLine("Ports (EMS):");
  405:                         stringBuilder.AppendLine();
  406:                         foreach (var ep in emsPortList) stringBuilder.AppendLine(ep.ToSimpleTextString());
  407:                         stringBuilder.AppendLine(horizontalRule);
  408:                         stringBuilder.AppendLine();
  409:                     }
  410:  
  411:                     if (emsOntList != null && emsOntList.Count > 0)
  412:                     {
  413:                         stringBuilder.AppendLine(horizontalRule);
  414:                         stringBuilder.AppendLine("ONTs (EMS):");
  415:                         stringBuilder.AppendLine();
  416:                         foreach (var eo in emsOntList) stringBuilder.AppendLine(eo.ToSimpleTextString());
  417:                         stringBuilder.AppendLine(horizontalRule);
  418:                         stringBuilder.AppendLine();
  419:                     }
  420:  
  421:                     if (emsOntSipInfoList != null && emsOntSipInfoList.Count > 0)
  422:                     {
  423:                         stringBuilder.AppendLine(horizontalRule);
  424:                         stringBuilder.AppendLine("ONTSIPINFOs (EMS):");
  425:                         stringBuilder.AppendLine();
  426:                         foreach (var eosi in emsOntSipInfoList) stringBuilder.AppendLine(eosi.ToSimpleTextString());
  427:                         stringBuilder.AppendLine(horizontalRule);
  428:                         stringBuilder.AppendLine();
  429:                     }
  430:  
  431:                     if (emsVoipPstnUserList != null && emsVoipPstnUserList.Count > 0)
  432:                     {
  433:                         stringBuilder.AppendLine(horizontalRule);
  434:                         stringBuilder.AppendLine("VOIPPSTNUSERs (EMS):");
  435:                         stringBuilder.AppendLine();
  436:                         foreach (var evpu in emsVoipPstnUserList) stringBuilder.AppendLine(evpu.ToSimpleTextString());
  437:                         stringBuilder.AppendLine(horizontalRule);
  438:                         stringBuilder.AppendLine();
  439:                     }
  440:  
  441:                     if (emsVagList != null && emsVagList.Count > 0)
  442:                     {
  443:                         stringBuilder.AppendLine(horizontalRule);
  444:                         stringBuilder.AppendLine("VAGs (EMS):");
  445:                         stringBuilder.AppendLine();
  446:                         foreach (var v in emsVagList) stringBuilder.AppendLine(v.ToSimpleTextString());
  447:                         stringBuilder.AppendLine(horizontalRule);
  448:                         stringBuilder.AppendLine();
  449:                     }
  450:  
  451:                     // , out eventList
  452:  
  453:                     if (accessList != null && accessList.Count > 0)
  454:                     {
  455:                         stringBuilder.AppendLine(horizontalRule);
  456:                         stringBuilder.AppendLine("Accesses:");
  457:                         stringBuilder.AppendLine();
  458:                         foreach (var a in accessList) stringBuilder.AppendLine(a.ToSimpleTextString());
  459:                         stringBuilder.AppendLine(horizontalRule);
  460:                         stringBuilder.AppendLine();
  461:                     }
  462:  
  463:                     if (serviceRequestServiceList != null && serviceRequestServiceList.Count > 0)
  464:                     {
  465:                         stringBuilder.AppendLine(horizontalRule);
  466:                         stringBuilder.AppendLine("Service Request Services:");
  467:                         stringBuilder.AppendLine();
  468:                         foreach (var srs in serviceRequestServiceList) stringBuilder.AppendLine(srs.ToSimpleTextString());
  469:                         stringBuilder.AppendLine(horizontalRule);
  470:                         stringBuilder.AppendLine();
  471:                     }
  472:  
  473:                     if (serviceRequestList != null && serviceRequestList.Count > 0)
  474:                     {
  475:                         stringBuilder.AppendLine(horizontalRule);
  476:                         stringBuilder.AppendLine("Service Requests:");
  477:                         stringBuilder.AppendLine();
  478:                         foreach (var sr in serviceRequestList) stringBuilder.AppendLine(sr.ToSimpleTextString());
  479:                         stringBuilder.AppendLine(horizontalRule);
  480:                         stringBuilder.AppendLine();
  481:                     }
  482:  
  483:                     if (serviceRequestAdministrativeIssueList != null && serviceRequestAdministrativeIssueList.Count > 0)
  484:                     {
  485:                         stringBuilder.AppendLine(horizontalRule);
  486:                         stringBuilder.AppendLine("Service Request Administrative Issue:");
  487:                         stringBuilder.AppendLine();
  488:                         foreach (var srai in serviceRequestAdministrativeIssueList) stringBuilder.AppendLine(srai.ToSimpleTextString());
  489:                         stringBuilder.AppendLine(horizontalRule);
  490:                         stringBuilder.AppendLine();
  491:                     }
  492:  
  493:                     if (serviceRequestHistoryList != null && serviceRequestHistoryList.Count > 0)
  494:                     {
  495:                         stringBuilder.AppendLine(horizontalRule);
  496:                         stringBuilder.AppendLine("Service Request History:");
  497:                         stringBuilder.AppendLine();
  498:                         foreach (var srh in serviceRequestHistoryList) stringBuilder.AppendLine(srh.ToSimpleTextString());
  499:                         stringBuilder.AppendLine(horizontalRule);
  500:                         stringBuilder.AppendLine();
  501:                     }
  502:  
  503:                     //out serviceRequestTypeList, out serviceRequestOntList, out serviceRequestOntDetailList, out reportList, out reportHistoryList
  504:  
  505:                     if (result.HasWarning)
  506:                     {
  507:                         stringBuilder.AppendLine(horizontalRule);
  508:                         stringBuilder.AppendLine(result.Message);
  509:                         stringBuilder.AppendLine();
  510:                         stringBuilder.AppendLine(horizontalRule);
  511:                         stringBuilder.AppendLine();
  512:                     }
  513:                     else
  514:                     {
  515:                         stringBuilder.AppendLine(horizontalRule);
  516:                         stringBuilder.AppendLine(result.Message);
  517:                         stringBuilder.AppendLine();
  518:                         stringBuilder.AppendLine(horizontalRule);
  519:                         stringBuilder.AppendLine();
  520:                     }
  521:                 }
  522:                 else
  523:                 {
  524:                     stringBuilder.AppendLine(horizontalRule);
  525:                     stringBuilder.AppendLine(result.Message);
  526:                     stringBuilder.AppendLine();
  527:                     stringBuilder.AppendLine(horizontalRule);
  528:                     stringBuilder.AppendLine();
  529:                 }
  530:             }
  531:             else
  532:             {
  533:                 stringBuilder.AppendLine(horizontalRule);
  534:                 stringBuilder.AppendLine("Error: opcode: [" + opcode + "] is unrecognized. ");
  535:                 stringBuilder.AppendLine(horizontalRule);
  536:                 stringBuilder.AppendLine();
  537:             }
  538:  
  539:             contentStringBuilder = stringBuilder.Replace(Environment.NewLine + horizontalRule, horizontalRule);
  540:         }
  541:  
  542:         ////////////////////////////////////////////////////////////////////////////
  543:         ////////////////////////////////////////////////////////////////////////////    
  544:     }
  545:  
  546:     ////////////////////////////////////////////////////////////////////////////
  547:     ////////////////////////////////////////////////////////////////////////////   
  548: }