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

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

Maintenance Report data support class for the Fixed Telecommunications Network ui model

    1: using Microsoft.AspNetCore.Identity;
    2: using System;
    3: using System.Collections.Generic;
    4: using System.Linq;
    5: using System.Runtime.Serialization;
    6: using System.Text;
    7:  
    8: namespace Ia.Ftn.Cl.Models.Ui.Maintenance.Report
    9: {
   10:     ////////////////////////////////////////////////////////////////////////////
   11:  
   12:     /// <summary publish="true">
   13:     /// Maintenance Report data support class for the Fixed Telecommunications Network ui model
   14:     /// </summary>
   15:     /// 
   16:     /// <remarks> 
   17:     /// Copyright © 2017-2018 Jasem Y. Al-Shamlan (info@ia.com.kw), Integrated Applications - Kuwait. All Rights Reserved.
   18:     ///
   19:     /// 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
   20:     /// the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
   21:     ///
   22:     /// This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
   23:     /// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
   24:     /// 
   25:     /// You should have received a copy of the GNU General Public License along with this library. If not, see http://www.gnu.org/licenses.
   26:     /// 
   27:     /// Copyright notice: This notice may not be removed or altered from any source distribution.
   28:     /// </remarks> 
   29:     [DataContract(IsReference = true, Namespace = "kw.com.ia.ftn.api", Name = "apiMaintenanceReport")]
   30:     public class Default
   31:     {
   32:         private static List<Ia.Ftn.Cl.Models.Ui.ReportAccessServiceRequest> reportAccessServiceRequestList;
   33:  
   34:         /// <summary/>
   35:         [DataMember(Name = "result")]
   36:         public Ia.Cl.Models.Result Result { get; set; }
   37:  
   38:         /////////////////////////////////////////////////////////////////////////////////
   39:  
   40:         /// <summary>
   41:         ///
   42:         /// </summary>
   43:         public static void TnmdListForMail(Ia.Ftn.Cl.Models.Business.Administration.Framework framework, string opcode, string operand, out string subject, out string content)
   44:         {
   45:             string inputType, horizontalRule;
   46:             StringBuilder stringBuilder;
   47:             DateTime now;
   48:  
   49:             inputType = string.Empty;
   50:             horizontalRule = "===============================================";
   51:  
   52:             now = DateTime.UtcNow.AddHours(3);
   53:  
   54:             // subject can't have \r\n
   55:             subject = "Fixed Telecommunications Network's Operations Support System (FTN OSS) Find Result (" + now.ToString("yyyy-MM-dd HH:mm") + ")";
   56:             content = string.Empty;
   57:  
   58:             if (Ia.Ftn.Cl.Models.Business.Authority.FrameworkCanCreateReadUpdateDeleteAccessList(Ia.Ftn.Cl.Models.Business.Authority.PersistentStorageFunction.Create, framework))
   59:             {
   60:                 opcode = opcode.ToLower();
   61:  
   62:                 FieldTnmdSupplierListForTelegramBotApiAndMailSimpleText(framework, opcode, operand, inputType, horizontalRule, out stringBuilder);
   63:  
   64:                 stringBuilder.AppendLine(horizontalRule);
   65:                 stringBuilder.AppendLine(@"Help? Send message with ""mail/maintenance/find/help""");
   66:                 stringBuilder.AppendLine(horizontalRule);
   67:                 stringBuilder.AppendLine();
   68:  
   69:                 content = stringBuilder.ToString();
   70:             }
   71:             else
   72:             {
   73:                 content += "\r\n";
   74:                 content += "You are not authorized to modify this value. ";
   75:                 content += "\r\n";
   76:             }
   77:         }
   78:  
   79:         /////////////////////////////////////////////////////////////////////////////////
   80:  
   81:         /// <summary>
   82:         ///
   83:         /// </summary>
   84:         public static void TnmdListForTelegramBotApi(Ia.Ftn.Cl.Models.Business.Administration.Framework framework, string opcode, out string subject, out string content)
   85:         {
   86:             string inputType, horizontalRule;
   87:             StringBuilder contentStringBuilder;
   88:             DateTime now;
   89:  
   90:             inputType = string.Empty;
   91:             horizontalRule = " ";
   92:  
   93:             now = DateTime.UtcNow.AddHours(3);
   94:  
   95:             // subject can't have \r\n
   96:             subject = string.Empty; // "Fixed Telecommunications Network's Operations Support System (FTN OSS) TNMD list: ";
   97:  
   98:             //if (Ia.Ftn.Cl.Model.Business.Authority.StaffContactCanCreateReadUpdateDeleteAccessList(Ia.Ftn.Cl.Model.Business.Authority.PersistentStorageFunction.Create, staffContact))
   99:             //{
  100:             opcode = opcode.ToLower();
  101:  
  102:             FieldTnmdSupplierListForTelegramBotApiAndMailSimpleText(framework, opcode, string.Empty, inputType, horizontalRule, out contentStringBuilder);
  103:  
  104:             contentStringBuilder.AppendLine(horizontalRule);
  105:             contentStringBuilder.AppendLine(Ia.Ftn.Cl.Models.Data.Help.Text(Ia.Ftn.Cl.Models.Data.Help.TelegramString.NeedHelpSendCommandSlashHelp));
  106:             contentStringBuilder.AppendLine(horizontalRule);
  107:             contentStringBuilder.AppendLine();
  108:  
  109:             content = contentStringBuilder.ToString();
  110:             //}
  111:             //else
  112:             //{
  113:             //    responseContent += "\r\n";
  114:             //    responseContent += "You are not authorized to modify this value. ";
  115:             //    responseContent += "\r\n";
  116:             //}
  117:         }
  118:  
  119:         /////////////////////////////////////////////////////////////////////////////////
  120:  
  121:         /// <summary>
  122:         ///
  123:         /// </summary>
  124:         public static void FieldListForTelegramBotApi(Ia.Ftn.Cl.Models.Business.Administration.Framework framework, string opcode, string operand, out string subject, out string content)
  125:         {
  126:             string inputType, horizontalRule;
  127:             StringBuilder contentStringBuilder;
  128:             DateTime now;
  129:  
  130:             inputType = string.Empty;
  131:             horizontalRule = " ";
  132:  
  133:             now = DateTime.UtcNow.AddHours(3);
  134:  
  135:             // subject can't have \r\n
  136:             subject = string.Empty; // "Fixed Telecommunications Network's Operations Support System (FTN OSS) Field list: ";
  137:  
  138:             //if (Ia.Ftn.Cl.Model.Business.Authority.StaffContactCanCreateReadUpdateDeleteAccessList(Ia.Ftn.Cl.Model.Business.Authority.PersistentStorageFunction.Create, staffContact))
  139:             //{
  140:             opcode = opcode.ToLower();
  141:             operand = operand.ToLower();
  142:  
  143:             FieldTnmdSupplierListForTelegramBotApiAndMailSimpleText(framework, opcode, operand, inputType, horizontalRule, out contentStringBuilder);
  144:  
  145:             contentStringBuilder.AppendLine(horizontalRule);
  146:             contentStringBuilder.AppendLine(Ia.Ftn.Cl.Models.Data.Help.Text(Ia.Ftn.Cl.Models.Data.Help.TelegramString.NeedHelpSendCommandSlashHelp));
  147:             contentStringBuilder.AppendLine(horizontalRule);
  148:             contentStringBuilder.AppendLine();
  149:  
  150:             content = contentStringBuilder.ToString();
  151:             //}
  152:             //else
  153:             //{
  154:             //    responseContent += "\r\n";
  155:             //    responseContent += "You are not authorized to modify this value. ";
  156:             //    responseContent += "\r\n";
  157:             //}
  158:         }
  159:  
  160:         /////////////////////////////////////////////////////////////////////////////////
  161:  
  162:         /// <summary>
  163:         ///
  164:         /// </summary>
  165:         public static void ReportForTelegramBotApi(Ia.Ftn.Cl.Models.Business.Administration.Framework framework, string opcode, string operand, out string subject, out string content)
  166:         {
  167:             string inputType, horizontalRule;
  168:             StringBuilder contentStringBuilder;
  169:             DateTime now;
  170:  
  171:             inputType = string.Empty;
  172:             horizontalRule = " ";
  173:  
  174:             now = DateTime.UtcNow.AddHours(3);
  175:  
  176:             // subject can't have \r\n
  177:             subject = string.Empty; // "Fixed Telecommunications Network's Operations Support System (FTN OSS) Field list: ";
  178:  
  179:             //if (Ia.Ftn.Cl.Model.Business.Authority.StaffContactCanCreateReadUpdateDeleteAccessList(Ia.Ftn.Cl.Model.Business.Authority.PersistentStorageFunction.Create, staffContact))
  180:             //{
  181:             opcode = opcode.ToLower();
  182:             operand = operand.ToLower();
  183:  
  184:             ReportForTelegramBotApiAndMailSimpleText(framework, opcode, operand, inputType, horizontalRule, out contentStringBuilder);
  185:  
  186:             contentStringBuilder.AppendLine(horizontalRule);
  187:             contentStringBuilder.AppendLine(Ia.Ftn.Cl.Models.Data.Help.Text(Ia.Ftn.Cl.Models.Data.Help.TelegramString.NeedHelpSendCommandSlashHelp));
  188:             contentStringBuilder.AppendLine(horizontalRule);
  189:             contentStringBuilder.AppendLine();
  190:  
  191:             content = contentStringBuilder.ToString();
  192:             //}
  193:             //else
  194:             //{
  195:             //    responseContent += "\r\n";
  196:             //    responseContent += "You are not authorized to modify this value. ";
  197:             //    responseContent += "\r\n";
  198:             //}
  199:         }
  200:  
  201:         /////////////////////////////////////////////////////////////////////////////////
  202:  
  203:         /// <summary>
  204:         ///
  205:         /// </summary>
  206:         public static void NokiaListForTelegramBotApi(Ia.Ftn.Cl.Models.Business.Administration.Framework framework, string opcode, out string subject, out string content)
  207:         {
  208:             string inputType, horizontalRule;
  209:             StringBuilder contentStringBuilder;
  210:             DateTime now;
  211:  
  212:             inputType = string.Empty;
  213:             horizontalRule = " ";
  214:  
  215:             now = DateTime.UtcNow.AddHours(3);
  216:  
  217:             // subject can't have \r\n
  218:             subject = string.Empty; // "Fixed Telecommunications Network's Operations Support System (FTN OSS) TNMD list: ";
  219:  
  220:             //if (Ia.Ftn.Cl.Model.Business.Authority.StaffContactCanCreateReadUpdateDeleteAccessList(Ia.Ftn.Cl.Model.Business.Authority.PersistentStorageFunction.Create, staffContact))
  221:             //{
  222:             opcode = opcode.ToLower();
  223:  
  224:             FieldTnmdSupplierListForTelegramBotApiAndMailSimpleText(framework, opcode, string.Empty, inputType, horizontalRule, out contentStringBuilder);
  225:  
  226:             contentStringBuilder.AppendLine(horizontalRule);
  227:             contentStringBuilder.AppendLine(Ia.Ftn.Cl.Models.Data.Help.Text(Ia.Ftn.Cl.Models.Data.Help.TelegramString.NeedHelpSendCommandSlashHelp));
  228:             contentStringBuilder.AppendLine(horizontalRule);
  229:             contentStringBuilder.AppendLine();
  230:  
  231:             content = contentStringBuilder.ToString();
  232:             //}
  233:             //else
  234:             //{
  235:             //    responseContent += "\r\n";
  236:             //    responseContent += "You are not authorized to modify this value. ";
  237:             //    responseContent += "\r\n";
  238:             //}
  239:         }
  240:  
  241:         /////////////////////////////////////////////////////////////////////////////////
  242:  
  243:         /// <summary>
  244:         ///
  245:         /// </summary>
  246:         public static void HuaweiListForTelegramBotApi(Ia.Ftn.Cl.Models.Business.Administration.Framework framework, string opcode, out string subject, out string content)
  247:         {
  248:             string inputType, horizontalRule;
  249:             StringBuilder contentStringBuilder;
  250:             DateTime now;
  251:  
  252:             inputType = string.Empty;
  253:             horizontalRule = " ";
  254:  
  255:             now = DateTime.UtcNow.AddHours(3);
  256:  
  257:             // subject can't have \r\n
  258:             subject = string.Empty; // "Fixed Telecommunications Network's Operations Support System (FTN OSS) TNMD list: ";
  259:  
  260:             //if (Ia.Ftn.Cl.Model.Business.Authority.StaffContactCanCreateReadUpdateDeleteAccessList(Ia.Ftn.Cl.Model.Business.Authority.PersistentStorageFunction.Create, staffContact))
  261:             //{
  262:             opcode = opcode.ToLower();
  263:  
  264:             FieldTnmdSupplierListForTelegramBotApiAndMailSimpleText(framework, opcode, string.Empty, inputType, horizontalRule, out contentStringBuilder);
  265:  
  266:             contentStringBuilder.AppendLine(horizontalRule);
  267:             contentStringBuilder.AppendLine(Ia.Ftn.Cl.Models.Data.Help.Text(Ia.Ftn.Cl.Models.Data.Help.TelegramString.NeedHelpSendCommandSlashHelp));
  268:             contentStringBuilder.AppendLine(horizontalRule);
  269:             contentStringBuilder.AppendLine();
  270:  
  271:             content = contentStringBuilder.ToString();
  272:             //}
  273:             //else
  274:             //{
  275:             //    responseContent += "\r\n";
  276:             //    responseContent += "You are not authorized to modify this value. ";
  277:             //    responseContent += "\r\n";
  278:             //}
  279:         }
  280:  
  281:         /////////////////////////////////////////////////////////////////////////////////
  282:  
  283:         /// <summary>
  284:         ///
  285:         /// </summary>
  286:         public static void NetworkDesignDocumentForTelegramBotApi(out string subject, out string content)
  287:         {
  288:             string horizontalRule;
  289:             StringBuilder contentStringBuilder;
  290:             DateTime now;
  291:  
  292:             horizontalRule = " ";
  293:             now = DateTime.UtcNow.AddHours(3);
  294:  
  295:             // subject can't have \r\n
  296:             subject = "Network Design Document (" + now.ToString("yyyy-MM-dd HH:mm") + ")";
  297:  
  298:             contentStringBuilder = new StringBuilder();
  299:  
  300:             contentStringBuilder.AppendLine(Ia.Ftn.Cl.Models.Ui.NetworkDesignDocument.StructureToSimpleTextString());
  301:             contentStringBuilder.AppendLine(horizontalRule);
  302:             contentStringBuilder.AppendLine();
  303:  
  304:             contentStringBuilder.AppendLine(horizontalRule);
  305:             contentStringBuilder.AppendLine(Ia.Ftn.Cl.Models.Data.Help.Text(Ia.Ftn.Cl.Models.Data.Help.TelegramString.NeedHelpSendCommandSlashHelp));
  306:             contentStringBuilder.AppendLine(horizontalRule);
  307:             contentStringBuilder.AppendLine();
  308:  
  309:             contentStringBuilder = contentStringBuilder.Replace(Environment.NewLine + horizontalRule, horizontalRule);
  310:  
  311:             content = contentStringBuilder.ToString();
  312:         }
  313:  
  314:         /////////////////////////////////////////////////////////////////////////////////
  315:  
  316:         /// <summary>
  317:         ///
  318:         /// </summary>
  319:         public static void ServiceRequestFromTodayForTelegramBotApi(out string subject, out string content)
  320:         {
  321:             string horizontalRule;
  322:             StringBuilder contentStringBuilder;
  323:             DateTime now;
  324:  
  325:             horizontalRule = " ";
  326:  
  327:             contentStringBuilder = new StringBuilder();
  328:  
  329:             now = DateTime.UtcNow.AddHours(3);
  330:  
  331:             // subject can't have \r\n
  332:             subject = "Service Requests from Today (" + now.ToString("yyyy-MM-dd HH:mm") + ")";
  333:  
  334:             var serviceRequestList = Ia.Ftn.Cl.Models.Data.ServiceRequest.ForRequestDate(now).OrderBy(u => u.Id).ToList();
  335:  
  336:             if (serviceRequestList.Count > 0)
  337:             {
  338:                 if (serviceRequestList != null && serviceRequestList.Count > 0)
  339:                 {
  340:                     foreach (var sr in serviceRequestList) contentStringBuilder.AppendLine(sr.ToSimpleTextString());
  341:                     contentStringBuilder.AppendLine(horizontalRule);
  342:                     contentStringBuilder.AppendLine();
  343:                 }
  344:             }
  345:             else
  346:             {
  347:                 contentStringBuilder.AppendLine(horizontalRule);
  348:                 contentStringBuilder.AppendLine("No results. ");
  349:                 contentStringBuilder.AppendLine();
  350:             }
  351:  
  352:             contentStringBuilder.AppendLine(horizontalRule);
  353:             contentStringBuilder.AppendLine(Ia.Ftn.Cl.Models.Data.Help.Text(Ia.Ftn.Cl.Models.Data.Help.TelegramString.NeedHelpSendCommandSlashHelp));
  354:             contentStringBuilder.AppendLine(horizontalRule);
  355:             contentStringBuilder.AppendLine();
  356:  
  357:             contentStringBuilder = contentStringBuilder.Replace(Environment.NewLine + horizontalRule, horizontalRule);
  358:  
  359:             content = contentStringBuilder.ToString();
  360:         }
  361:  
  362:         ////////////////////////////////////////////////////////////////////////////
  363:  
  364:         /// <summary>
  365:         ///
  366:         /// </summary>
  367:         public static void FieldTnmdSupplierListForTelegramBotApiAndMailSimpleText(Ia.Ftn.Cl.Models.Business.Administration.Framework framework, string opcode, string operand, string inputType, string horizontalRule, out StringBuilder contentStringBuilder)
  368:         {
  369:             List<int> siteIdList;
  370:             StringBuilder stringBuilder;
  371:             DateTime now;
  372:  
  373:             stringBuilder = new StringBuilder();
  374:             now = DateTime.UtcNow.AddHours(3);
  375:  
  376:             //stringBuilder.AppendLine("Fixed Telecommunications Network's Operations Support System (FTN OSS) Find Result: " + now.ToString("yyyy-MM-dd HH:mm"));
  377:  
  378:             //stringBuilder.AppendLine(@"Opcode: """ + opcode + @""".");
  379:             //responseContent += @"Operand: """ + operand + @"""." + "\r\n";
  380:             //stringBuilder.AppendLine();
  381:  
  382:             if (opcode.Contains("division"))
  383:             {
  384:                 if (!string.IsNullOrEmpty(operand))
  385:                 {
  386:                     // get the siteId from the site name in operand
  387:                     siteIdList = (from s in Ia.Ftn.Cl.Models.Data.NetworkDesignDocument.SiteList where s.Name.ToLower() == operand select s.Id).ToList();
  388:  
  389:                     if (framework == null || framework != null && framework.Sites.Count > 0 && framework.Sites.Any(u => siteIdList.Contains(u.Id)))
  390:                     {
  391:                         _FieldTnmdSupplierListForTelegramBotApiAndMailSimpleText(Ia.Ftn.Cl.Models.Business.Administration.Framework.CustomerServiceSectorSectionDivisionFrameworkAndStaffIdList(), siteIdList, "Field List:", horizontalRule, ref stringBuilder);
  392:                     }
  393:                     else
  394:                     {
  395:                         stringBuilder.AppendLine(horizontalRule);
  396:                         stringBuilder.AppendLine(Ia.Ftn.Cl.Models.Data.Help.Text(Ia.Ftn.Cl.Models.Data.Help.TelegramString.FrameworkNotAuthorized));
  397:                     }
  398:  
  399:                     stringBuilder.AppendLine(horizontalRule);
  400:                 }
  401:                 else
  402:                 {
  403:                     siteIdList = (framework != null && framework.Sites.Count > 0) ? framework.Sites.Select(u => u.Id).ToList() : new List<int>();
  404:  
  405:                     _FieldTnmdSupplierListForTelegramBotApiAndMailSimpleText(Ia.Ftn.Cl.Models.Business.Administration.Framework.CustomerServiceSectorSectionDivisionFrameworkAndStaffIdList(), siteIdList, "Field List:", horizontalRule, ref stringBuilder);
  406:                 }
  407:             }
  408:             else if (opcode.Contains("tnmd000")) // dummy
  409:             {
  410:                 siteIdList = (framework != null && framework.Sites.Count > 0) ? framework.Sites.Select(u => u.Id).ToList() : new List<int>();
  411:  
  412:                 _FieldTnmdSupplierListForTelegramBotApiAndMailSimpleText(Ia.Ftn.Cl.Models.Business.Administration.Framework.TelephoneNetworkMaintenanceDepartmentFrameworkAndStaffIdList(), siteIdList, "TNMD List:", horizontalRule, ref stringBuilder);
  413:             }
  414:             else if (opcode.Contains("nokia"))
  415:             {
  416:                 siteIdList = (framework != null && framework.Sites.Count > 0) ? framework.Sites.Select(u => u.Id).ToList() : new List<int>();
  417:  
  418:                 _FieldTnmdSupplierListForTelegramBotApiAndMailSimpleText(Ia.Ftn.Cl.Models.Business.Administration.Framework.NokiaFrameworkAndStaffdList(), siteIdList, "Nokia List:", horizontalRule, ref stringBuilder);
  419:             }
  420:             else if (opcode.Contains("huawei"))
  421:             {
  422:                 siteIdList = (framework != null && framework.Sites.Count > 0) ? framework.Sites.Select(u => u.Id).ToList() : new List<int>();
  423:  
  424:                 _FieldTnmdSupplierListForTelegramBotApiAndMailSimpleText(Ia.Ftn.Cl.Models.Business.Administration.Framework.HuaweiFrameworkAndStaffIdList(), siteIdList, "Huawei List:", horizontalRule, ref stringBuilder);
  425:             }
  426:             else
  427:             {
  428:                 stringBuilder.AppendLine(horizontalRule);
  429:                 stringBuilder.AppendLine("Error: opcode: [" + opcode + "] is unrecognized. ");
  430:                 stringBuilder.AppendLine(horizontalRule);
  431:             }
  432:  
  433:             contentStringBuilder = stringBuilder.Replace(Environment.NewLine + horizontalRule, horizontalRule);
  434:         }
  435:  
  436:         ////////////////////////////////////////////////////////////////////////////
  437:  
  438:         /// <summary>
  439:         ///
  440:         /// </summary>
  441:         private static void _FieldTnmdSupplierListForTelegramBotApiAndMailSimpleText(List<string> frameworkAndStaffIdList, List<int> siteIdList, string caption, string horizontalRule, ref StringBuilder stringBuilder)
  442:         {
  443:             string text;
  444:  
  445:             reportAccessServiceRequestList = Ia.Ftn.Cl.Models.Ui.Report.ReportWithReportOpenStatusByUserIdListAndFrameworkIdList(frameworkAndStaffIdList, new List<string>());// siteIdList);
  446:  
  447:             stringBuilder.AppendLine(horizontalRule);
  448:             stringBuilder.AppendLine(caption);
  449:             stringBuilder.AppendLine();
  450:  
  451:             if (reportAccessServiceRequestList != null && reportAccessServiceRequestList.Count > 0)
  452:             {
  453:                 foreach (var rasr in reportAccessServiceRequestList)
  454:                 {
  455:                     text = rasr.ToSimpleTextString();
  456:                     text = text.Replace("{report}", "/report_");
  457:  
  458:                     stringBuilder.AppendLine(text);
  459:                 }
  460:  
  461:             }
  462:             else stringBuilder.AppendLine("No records were found. ");
  463:  
  464:             stringBuilder.AppendLine(horizontalRule);
  465:         }
  466:  
  467:         ////////////////////////////////////////////////////////////////////////////
  468:  
  469:         /// <summary>
  470:         ///
  471:         /// </summary>
  472:         public static void ReportForTelegramBotApiAndMailSimpleText(Ia.Ftn.Cl.Models.Business.Administration.Framework framework, string opcode, string operand, string inputType, string horizontalRule, out StringBuilder contentStringBuilder)
  473:         {
  474:             StringBuilder stringBuilder;
  475:             DateTime now;
  476:  
  477:             stringBuilder = new StringBuilder();
  478:             now = DateTime.UtcNow.AddHours(3);
  479:  
  480:             if (opcode.Contains("report"))
  481:             {
  482:                 if (!string.IsNullOrEmpty(operand))
  483:                 {
  484:                     if (framework == null || framework != null && framework.Sites.Count > 0)
  485:                     {
  486:                         _ReportForTelegramBotApiAndMailSimpleText(Ia.Ftn.Cl.Models.Business.Administration.Framework.CustomerServiceSectorSectionDivisionFrameworkAndStaffIdList(), "Report:", horizontalRule, ref stringBuilder);
  487:                     }
  488:                     else
  489:                     {
  490:                         stringBuilder.AppendLine(horizontalRule);
  491:                         stringBuilder.AppendLine(Ia.Ftn.Cl.Models.Data.Help.Text(Ia.Ftn.Cl.Models.Data.Help.TelegramString.FrameworkNotAuthorized));
  492:                     }
  493:  
  494:                     stringBuilder.AppendLine(horizontalRule);
  495:                 }
  496:                 else
  497:                 {
  498:                     stringBuilder.AppendLine(horizontalRule);
  499:                     stringBuilder.AppendLine("Error: operand: is null. ");
  500:                     stringBuilder.AppendLine(horizontalRule);
  501:                 }
  502:             }
  503:             else
  504:             {
  505:                 stringBuilder.AppendLine(horizontalRule);
  506:                 stringBuilder.AppendLine("Error: opcode: [" + opcode + "] is unrecognized. ");
  507:                 stringBuilder.AppendLine(horizontalRule);
  508:             }
  509:  
  510:             contentStringBuilder = stringBuilder.Replace(Environment.NewLine + horizontalRule, horizontalRule);
  511:         }
  512:  
  513:         ////////////////////////////////////////////////////////////////////////////
  514:  
  515:         /// <summary>
  516:         ///
  517:         /// </summary>
  518:         private static void _ReportForTelegramBotApiAndMailSimpleText(List<string> frameworkAndStaffIdList, string caption, string horizontalRule, ref StringBuilder stringBuilder)
  519:         {
  520:             string text;
  521:  
  522:             stringBuilder.AppendLine(horizontalRule);
  523:             stringBuilder.AppendLine(caption);
  524:             stringBuilder.AppendLine();
  525:  
  526:             text = "Hi";
  527:  
  528:             stringBuilder.AppendLine(text);
  529:  
  530:             stringBuilder.AppendLine(horizontalRule);
  531:         }
  532:  
  533:         ////////////////////////////////////////////////////////////////////////////
  534:         ////////////////////////////////////////////////////////////////////////////    
  535:     }
  536:  
  537:     ////////////////////////////////////////////////////////////////////////////
  538:     ////////////////////////////////////////////////////////////////////////////   
  539: }