شركة التطبيقات المتكاملة لتصميم النظم البرمجية الخاصة

Integrated Applications Programming Company

Skip Navigation LinksHome » Code Library » Administration

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

Administration support class for Next Generation Network (NGN) ui model.

   1:  using System;
   2:  using System.Text;
   3:  using System.Data;
   4:  using System.Collections.Generic;
   5:  using System.Linq;
   6:   
   7:  namespace Ia.Ngn.Cl.Model.Ui
   8:  {
   9:      ////////////////////////////////////////////////////////////////////////////
  10:   
  11:      /// <summary publish="true">
  12:      /// Administration support class for Next Generation Network (NGN) ui model.
  13:      /// </summary>
  14:      /// 
  15:      /// <remarks> 
  16:      /// Copyright © 2006-2017 Jasem Y. Al-Shamlan (info@ia.com.kw), Internet Applications - Kuwait. All Rights Reserved.
  17:      ///
  18:      /// 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
  19:      /// the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
  20:      ///
  21:      /// This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
  22:      /// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
  23:      /// 
  24:      /// You should have received a copy of the GNU General Public License along with this library. If not, see http://www.gnu.org/licenses.
  25:      /// 
  26:      /// Copyright notice: This notice may not be removed or altered from any source distribution.
  27:      /// </remarks> 
  28:      public class Administration
  29:      {
  30:          ////////////////////////////////////////////////////////////////////////////
  31:   
  32:          /// <summary>
  33:          ///
  34:          /// </summary>
  35:          public Administration() { }
  36:   
  37:          /////////////////////////////////////////////////////////////////////////////////
  38:   
  39:          /// <summary>
  40:          ///
  41:          /// </summary>
  42:          public static void EmailDailyOfnStatusReport(string name, string email, out Ia.Cl.Model.Result result)
  43:          {
  44:              //bool b;
  45:              string content, subject;
  46:              DateTime now;
  47:   
  48:              now = DateTime.UtcNow.AddHours(3);
  49:   
  50:              // subject can't have \r\n
  51:              subject = "Daily Optical Fiber Network (OFN) Status Report (" + now.ToString("yyyy-MM-dd HH:mm") + ")";
  52:   
  53:              content = "Daily Optical Fiber Network (OFN) Status Report: " + now.ToString("yyyy-MM-dd HH:mm") + "\r\n"
  54:                  + "Status: undefined.\r\n"
  55:                  + @"For help send ""help"" in an email." + "\r\n";
  56:   
  57:              Ia.Ngn.Cl.Model.Ui.Mail.SendPlainMail(name, email, subject, content, out result);
  58:          }
  59:   
  60:          /////////////////////////////////////////////////////////////////////////////////
  61:   
  62:          /// <summary>
  63:          ///
  64:          /// </summary>
  65:          public static void EmailListWithOntListProvisionedAndReadyButDoNotExistInCustomerDepartmentDatabase(string name, string email, out Ia.Cl.Model.Result result)
  66:          {
  67:              //bool b;
  68:              string content, subject;
  69:              DataTable accessDataTable;
  70:              DateTime now;
  71:   
  72:              now = DateTime.UtcNow.AddHours(3);
  73:   
  74:              subject = "Table of latest 100 ONTs that are provisioned and ready within NGN access network but do not exist in the Customer Department's database (" + now.ToString("yyyy-MM-dd HH:mm") + ")";
  75:   
  76:              accessDataTable = Ia.Ngn.Cl.Model.Ui.Access.ReadListWithOntListProvisionedAndReadyButDoNotExistInCustomerDepartmentDatabaseDataTable(100);
  77:   
  78:              content = "Table of latest 100 ONTs that are provisioned and ready within NGN access network but do not exist in the Customer Department's database (" + now.ToString("yyyy-MM-dd HH:mm") + ")";
  79:   
  80:              content += "\r\n";
  81:              content += "\r\n";
  82:   
  83:              content += Ia.Cl.Model.Default.GenerateTabSeparatedTextFromDataTable(accessDataTable);
  84:   
  85:              Ia.Ngn.Cl.Model.Ui.Mail.SendPlainMail(name, email, subject, content, out result);
  86:          }
  87:   
  88:          /////////////////////////////////////////////////////////////////////////////////
  89:   
  90:          /// <summary>
  91:          ///
  92:          /// </summary>
  93:          public static void EmailStatistic(string name, string email, out Ia.Cl.Model.Result result)
  94:          {
  95:              //bool b;
  96:              string subject;
  97:              StringBuilder stringBuilder;
  98:              DateTime now;
  99:              List<Ia.Ngn.Cl.Model.Business.Administration.Statistic.Site> siteList;
 100:              List<Ia.Ngn.Cl.Model.Business.Administration.Statistic.KuwaitArea> serviceList;
 101:   
 102:              now = DateTime.UtcNow.AddHours(3);
 103:              stringBuilder = new StringBuilder();
 104:   
 105:              subject = "Statistics of Site, Access, and Service usage within the Optical Fiber Network (OFN) (" + now.ToString("yyyy-MM-dd HH:mm") + ")";
 106:   
 107:              siteList = Ia.Ngn.Cl.Model.Data.Administration.SiteStatistic;
 108:              serviceList = Ia.Ngn.Cl.Model.Data.Administration.ServiceAccessStatisticWithinKuwaitNgnArea;
 109:   
 110:              stringBuilder.AppendLine("Statistics of Site, Access, and Service usage within the Optical Fiber Network (OFN) (" + now.ToString("yyyy-MM-dd HH:mm") + ")");
 111:   
 112:              stringBuilder.AppendLine();
 113:              stringBuilder.AppendLine();
 114:   
 115:              foreach (var s in siteList)
 116:              {
 117:                  stringBuilder.AppendLine();
 118:                  stringBuilder.AppendLine(s.ToSimpleTextString());
 119:              }
 120:   
 121:              stringBuilder.AppendLine();
 122:              stringBuilder.AppendLine();
 123:   
 124:              foreach (var s in serviceList)
 125:              {
 126:                  stringBuilder.AppendLine();
 127:                  stringBuilder.AppendLine(s.ToSimpleTextString());
 128:              }
 129:   
 130:              stringBuilder.AppendLine();
 131:              stringBuilder.AppendLine();
 132:   
 133:              Ia.Ngn.Cl.Model.Ui.Mail.SendPlainMail(name, email, subject, stringBuilder.ToString(), out result);
 134:          }
 135:   
 136:          /////////////////////////////////////////////////////////////////////////////////
 137:   
 138:          /// <summary>
 139:          ///
 140:          /// </summary>
 141:          public static void EmailListOfNumberOfAgcfGatewayRecordInGroupOfMgcIp(string name, string email, out Ia.Cl.Model.Result result)
 142:          {
 143:              string content, subject;
 144:              Dictionary<string, int> dictionary;
 145:              DateTime now;
 146:   
 147:              now = DateTime.UtcNow.AddHours(3);
 148:   
 149:              subject = "List of the number of AGCF gateway records in groups of MGC IP (" + now.ToString("yyyy-MM-dd HH:mm") + ")";
 150:   
 151:              dictionary = Ia.Ngn.Cl.Model.Business.Nokia.Ims.NumberOfAgcfGatewayRecordInGroupOfMgcIpDictionary.OrderBy(u => u.Key).ToDictionary(u => u.Key, u => u.Value);
 152:   
 153:              content = "List of the number of AGCF gateway records in groups of MGC IP  (" + now.ToString("yyyy-MM-dd HH:mm") + ")";
 154:   
 155:              content += "\r\n";
 156:              content += "\r\n";
 157:   
 158:              content += Ia.Cl.Model.Default.GenerateTabSeparatedTextFromDictionary(dictionary);
 159:   
 160:              content += "\r\n";
 161:              content += "Total number of AGCF gateway records: " + dictionary.Sum(u => u.Value) + ". ";
 162:   
 163:              Ia.Ngn.Cl.Model.Ui.Mail.SendPlainMail(name, email, subject, content, out result);
 164:          }
 165:   
 166:          /////////////////////////////////////////////////////////////////////////////////
 167:   
 168:          /// <summary>
 169:          ///
 170:          /// </summary>
 171:          public static void EmailWeeklyOfnNokiaReport(string name, string email, out Ia.Cl.Model.Result result)
 172:          {
 173:              string content, subject;
 174:              DateTime now;
 175:              List<string> list;
 176:              SortedDictionary<string, int> sortedDictionary;
 177:   
 178:              now = DateTime.UtcNow.AddHours(3);
 179:   
 180:              // subject can't have \r\n
 181:              subject = "Weekly Optical Fiber Network (OFN) Nokia Report (" + now.ToString("yyyy-MM-dd HH:mm") + ")";
 182:   
 183:              content = "Weekly Optical Fiber Network (OFN) Nokia Report: " + now.ToString("yyyy-MM-dd HH:mm") + "\r\n"
 184:                  + "Status: Normal\r\n"
 185:                  + @"Please contact Jasem for any specific data that you may need on a weekly bases." + "\r\n";
 186:   
 187:              content += "\r\n";
 188:              content += "\r\n";
 189:   
 190:   
 191:              content += "List of the number of AGCF gateway records in groups of MGC IP: ";
 192:   
 193:              content += "\r\n";
 194:              content += "\r\n";
 195:   
 196:              sortedDictionary = new SortedDictionary<string, int>(Ia.Ngn.Cl.Model.Business.Nokia.Ims.NumberOfAgcfGatewayRecordInGroupOfMgcIpDictionary);
 197:   
 198:              content += Ia.Cl.Model.Default.GenerateTabSeparatedTextFromDictionary(sortedDictionary);
 199:   
 200:              content += "\r\n";
 201:              content += "\r\n";
 202:   
 203:   
 204:              content += "List of the number of AGCF gateway records in IMS pairs of MGC IP: ";
 205:   
 206:              content += "\r\n";
 207:              content += "\r\n";
 208:   
 209:              foreach (Ia.Ngn.Cl.Model.Business.Nokia.Ims.ImsBasicService imsBasicService in Ia.Ngn.Cl.Model.Business.Nokia.Ims.ImsBasicServiceList)
 210:              {
 211:                  content += imsBasicService.MgcIp + ", " + imsBasicService.MgcSecondaryIp + "\t" + (sortedDictionary[imsBasicService.MgcIp] + sortedDictionary[imsBasicService.MgcSecondaryIp]);
 212:                  content += "\r\n";
 213:              }
 214:   
 215:              content += "\r\n";
 216:              content += "\r\n";
 217:   
 218:   
 219:              content += "Number of Nokia subscribers per FSDB: ";
 220:   
 221:              content += "\r\n";
 222:              content += "\r\n";
 223:   
 224:              list = Ia.Ngn.Cl.Model.Business.Nokia.Ims.NumberOfNokiaSubsribersPerFsdb();
 225:   
 226:              content += string.Join("\r\n", list.ToArray());
 227:   
 228:              content += "\r\n";
 229:              content += "\r\n";
 230:   
 231:   
 232:              content += "Service and access name list where subscriber's AlternateOtasRealm group number is not equal to subparties AssocOtasRealm group number: ";
 233:   
 234:              content += "\r\n";
 235:              content += "\r\n";
 236:   
 237:              list.Clear();
 238:   
 239:              foreach (var w in Ia.Ngn.Cl.Model.Data.Nokia.Ims.ServiceWhereSubscriberAlternateOtasRealmGroupNumberDoesNotEqualSubPartyAssocOtasRealmGroupNumberList())
 240:              {
 241:                  if (w.Access != null)
 242:                  {
 243:                      list.Add(w.Service + ": " + w.Access.Name);
 244:                  }
 245:                  else list.Add(w.Service + ": ");
 246:              }
 247:   
 248:              content += string.Join("\r\n", list.ToArray());
 249:   
 250:              content += "\r\n";
 251:              content += "\r\n";
 252:   
 253:   
 254:              content += "AGCF gateway records within NDD ONT list with wrong secondary IP: ";
 255:   
 256:              content += "\r\n";
 257:              content += "\r\n";
 258:   
 259:              list.Clear();
 260:   
 261:              foreach (var w in Ia.Ngn.Cl.Model.Data.Nokia.Ims.AgcfGatewayRecordsWithinNddOntListWithWrongSecondaryIpList())
 262:              {
 263:                  list.Add(w.GwId.ToString());
 264:              }
 265:   
 266:              content += string.Join(", ", list.ToArray());
 267:   
 268:              content += "\r\n";
 269:              content += "\r\n";
 270:              content += "\r\n";
 271:   
 272:   
 273:              content += "SubParties' PrimaryPUIDCPEProfileNumber count distribution: ";
 274:   
 275:              content += "\r\n";
 276:              content += "\r\n";
 277:   
 278:              list.Clear();
 279:   
 280:              foreach (KeyValuePair<int, int> w in Ia.Ngn.Cl.Model.Data.Nokia.SubParty.PrimaryPuidCpeProfileNumberCountDistributionDictionary)
 281:              {
 282:                  list.Add(w.Key + "\t" + w.Value);
 283:              }
 284:   
 285:              content += string.Join("\r\n", list.ToArray());
 286:   
 287:              content += "\r\n";
 288:              content += "\r\n";
 289:   
 290:   
 291:              Ia.Ngn.Cl.Model.Ui.Mail.SendPlainMail(name, email, subject, content, out result);
 292:          }
 293:   
 294:          /////////////////////////////////////////////////////////////////////////////////
 295:   
 296:          /// <summary>
 297:          ///
 298:          /// </summary>
 299:          public static void EmailWeeklyOfnHuaweiReport(string name, string email, out Ia.Cl.Model.Result result)
 300:          {
 301:              string content, subject;
 302:              DateTime now;
 303:   
 304:              now = DateTime.UtcNow.AddHours(3);
 305:   
 306:              // subject can't have \r\n
 307:              subject = "Weekly Optical Fiber Network (OFN) Huawei Report (" + now.ToString("yyyy-MM-dd HH:mm") + ")";
 308:   
 309:              content = "Weekly Optical Fiber Network (OFN) Huawei Report: " + now.ToString("yyyy-MM-dd HH:mm") + "\r\n"
 310:                  + "Status:.\r\n"
 311:                  + @"Please contact Jasem for any specific data that you may need on a weekly bases." + "\r\n";
 312:   
 313:              Ia.Ngn.Cl.Model.Ui.Mail.SendPlainMail(name, email, subject, content, out result);
 314:          }
 315:   
 316:          /////////////////////////////////////////////////////////////////////////////////
 317:   
 318:          /// <summary>
 319:          ///
 320:          /// </summary>
 321:          public static void EmailListOfPstnToGponMigratedAndProvisionedServiceInAllowedToBeMigratedOlt(string name, string email, out Ia.Cl.Model.Result result)
 322:          {
 323:              string content, subject;
 324:              StringBuilder stringBuilder;
 325:              DateTime now;
 326:   
 327:              now = DateTime.UtcNow.AddHours(3);
 328:   
 329:              subject = "List of PSTN to GPON migrated and newly provisioned services in allowed to be migrated OLTs (" + now.ToString("yyyy-MM-dd HH:mm") + ")";
 330:   
 331:              content = "List of PSTN to GPON migrated and newly provisioned services in allowed to be migrated OLTs (" + now.ToString("yyyy-MM-dd HH:mm") + ")";
 332:   
 333:              content += "\r\n";
 334:              content += "\r\n";
 335:   
 336:              var dictionary = Ia.Ngn.Cl.Model.Data.Service.ServiceToOntRouterVendorInAllowedToBeMigratedOltDictionary;
 337:   
 338:              stringBuilder = new StringBuilder(dictionary.Count * 64);
 339:   
 340:              if (dictionary.Count > 0)
 341:              {
 342:                  stringBuilder.AppendLine("Services: ");
 343:                  stringBuilder.AppendLine(" ");
 344:   
 345:                  foreach (KeyValuePair<string, Ia.Ngn.Cl.Model.Business.NetworkDesignDocument.Vendor> kvp in dictionary)
 346:                  {
 347:                      stringBuilder.Append(kvp.Key + ", ");
 348:                  }
 349:              }
 350:   
 351:              content += stringBuilder.ToString().Trim();
 352:   
 353:              content += "\r\n";
 354:              content += "\r\n";
 355:   
 356:              Ia.Ngn.Cl.Model.Ui.Mail.SendPlainMail(name, email, subject, content, out result);
 357:          }
 358:   
 359:          ////////////////////////////////////////////////////////////////////////////    
 360:          ////////////////////////////////////////////////////////////////////////////    
 361:   
 362:          /// <summary>
 363:          /// 
 364:          /// </summary>
 365:          public static string FrameworkStructureDataTable()
 366:          {
 367:              string htmlTable;
 368:              List<Ia.Ngn.Cl.Model.Business.Administration.Framework> frameworkList;
 369:   
 370:              frameworkList = (from f in Ia.Ngn.Cl.Model.Data.Administration.FrameworkList where f.Type == "ministry" || f.Type == "supplier" select f).ToList();
 371:   
 372:              htmlTable = @"<div id=""framework-structure"">";
 373:   
 374:              foreach (Ia.Ngn.Cl.Model.Business.Administration.Framework framework in frameworkList)
 375:              {
 376:                  htmlTable += FrameworkStructureDataTableIteration(framework);
 377:              }
 378:   
 379:              htmlTable += "</div>";
 380:   
 381:              return htmlTable;
 382:          }
 383:   
 384:          ////////////////////////////////////////////////////////////////////////////    
 385:   
 386:          /// <summary>
 387:          /// 
 388:          /// </summary>
 389:          private static string FrameworkStructureDataTableIteration(Ia.Ngn.Cl.Model.Business.Administration.Framework framework)
 390:          {
 391:              string htmlTable;
 392:              Ia.Ngn.Cl.Model.Staff headStaff;
 393:              List<Ia.Ngn.Cl.Model.Staff> staffList;
 394:   
 395:              htmlTable = null;
 396:   
 397:              if (framework != null)
 398:              {
 399:                  headStaff = (from s in Ia.Ngn.Cl.Model.Data.Staff.List where s.Framework != null && s.Framework.Id == framework.Id && s.IsHead select s).SingleOrDefault();
 400:   
 401:                  htmlTable = "<table>";
 402:   
 403:                  if (framework.Children != null && framework.Children.Count > 0)
 404:                  {
 405:                      htmlTable += "<tr>";
 406:   
 407:                      htmlTable += @"<td class=""" + framework.Type + @""" colspan=""" + framework.Children.Count + @""">" + framework.ArabicName;
 408:                      if (headStaff != null) htmlTable += @"<span class=""head"">" + headStaff.FirstAndMiddleName + "</span>";
 409:                      htmlTable += @"</td>";
 410:   
 411:                      htmlTable += "</tr>";
 412:   
 413:                      htmlTable += "<tr>";
 414:   
 415:                      foreach (Ia.Ngn.Cl.Model.Business.Administration.Framework f in framework.Children)
 416:                      {
 417:                          htmlTable += @"<td class=""" + f.Type + @""">" + FrameworkStructureDataTableIteration(f) + "</td>";
 418:                      }
 419:   
 420:                      htmlTable += "</tr>";
 421:                  }
 422:                  else
 423:                  {
 424:                      staffList = (from s in Ia.Ngn.Cl.Model.Data.Staff.List where s.Framework != null && s.Framework.Id == framework.Id && !s.IsHead select s).ToList();
 425:   
 426:                      htmlTable += "<tr>";
 427:   
 428:                      htmlTable += @"<td class=""" + framework.Type + @""">" + framework.ArabicName;
 429:                      if (headStaff != null) htmlTable += @"<span class=""head"">" + headStaff.FirstAndMiddleName + "</span>";
 430:   
 431:                      foreach (Ia.Ngn.Cl.Model.Staff staff in staffList)
 432:                      {
 433:                          htmlTable += @"<span class=""staff"">" + staff.FirstAndMiddleName + "</span>";
 434:                      }
 435:   
 436:                      htmlTable += @"</td>";
 437:   
 438:                      htmlTable += "</tr>";
 439:                  }
 440:   
 441:                  htmlTable += "</table>";
 442:              }
 443:   
 444:              return htmlTable;
 445:          }
 446:   
 447:          /////////////////////////////////////////////////////////////////////////////////
 448:          /////////////////////////////////////////////////////////////////////////////////
 449:   
 450:          /// <summary>
 451:          ///
 452:          /// </summary>
 453:          public static void StatisticsListForTelegramBotApi(Ia.Ngn.Cl.Model.Business.Administration.Framework framework, string opcode, out string subject, out string content)
 454:          {
 455:              string inputType, horizontalRule;
 456:              StringBuilder stringBuilder;
 457:              DateTime now;
 458:   
 459:              inputType = string.Empty;
 460:              horizontalRule = " ";
 461:   
 462:              now = DateTime.UtcNow.AddHours(3);
 463:   
 464:              // subject can't have \r\n
 465:              subject = string.Empty; // "Optical Fiber Network (OFN) TNMD list: ";
 466:   
 467:              if (Ia.Ngn.Cl.Model.Business.Authority.FrameworkCanReadStatistics(framework))
 468:              {
 469:                  opcode = opcode.ToLower();
 470:   
 471:                  StatisticListForTelegramBotApiAndMailSimpleText(opcode, inputType, horizontalRule, out stringBuilder);
 472:   
 473:                  stringBuilder.AppendLine(horizontalRule);
 474:                  stringBuilder.AppendLine(Ia.Ngn.Cl.Model.Data.Help.Text(Ia.Ngn.Cl.Model.Data.Help.TelegramString.NeedHelpSendCommandSlashHelp));
 475:                  stringBuilder.AppendLine(horizontalRule);
 476:                  stringBuilder.AppendLine();
 477:   
 478:                  content = stringBuilder.ToString();
 479:              }
 480:              else
 481:              {
 482:                  content = "\r\n";
 483:                  content += "You are not authorized to modify this value. ";
 484:                  content += "\r\n";
 485:              }
 486:          }
 487:   
 488:          ////////////////////////////////////////////////////////////////////////////
 489:   
 490:          /// <summary>
 491:          ///
 492:          /// </summary>
 493:          public static void StatisticListForTelegramBotApiAndMailSimpleText(string opcode, string inputType, string horizontalRule, out StringBuilder contentStringBuilder)
 494:          {
 495:              StringBuilder stringBuilder;
 496:              DateTime now;
 497:              List<Ia.Ngn.Cl.Model.Business.Administration.Statistic.KuwaitArea> statisticList;
 498:   
 499:              stringBuilder = new StringBuilder();
 500:              now = DateTime.UtcNow.AddHours(3);
 501:   
 502:              //stringBuilder.AppendLine("Optical Fiber Network (OFN) Find Result: " + now.ToString("yyyy-MM-dd HH:mm"));
 503:   
 504:              //stringBuilder.AppendLine(@"Opcode: """ + opcode + @""".");
 505:              //responseContent += @"Operand: """ + operand + @"""." + "\r\n";
 506:              //stringBuilder.AppendLine();
 507:   
 508:              if (opcode.Contains("statistics"))
 509:              {
 510:                  statisticList = Ia.Ngn.Cl.Model.Data.Administration.ServiceAccessStatisticWithinKuwaitNgnAreaCachedDaily;
 511:   
 512:                  if (statisticList != null && statisticList.Count > 0)
 513:                  {
 514:                      stringBuilder.AppendLine(horizontalRule);
 515:                      stringBuilder.AppendLine("Statistics:");
 516:                      stringBuilder.AppendLine();
 517:                      foreach (var s in statisticList) stringBuilder.AppendLine(s.ToSimpleTextString());
 518:                      stringBuilder.AppendLine(horizontalRule);
 519:                      stringBuilder.AppendLine();
 520:                  }
 521:                  else
 522:                  {
 523:                      stringBuilder.AppendLine(horizontalRule);
 524:                      stringBuilder.AppendLine();
 525:                  }
 526:              }
 527:              else
 528:              {
 529:                  stringBuilder.AppendLine(horizontalRule);
 530:                  stringBuilder.AppendLine("Error: opcode: [" + opcode + "] is unrecognized. ");
 531:                  stringBuilder.AppendLine(horizontalRule);
 532:                  stringBuilder.AppendLine();
 533:              }
 534:   
 535:              contentStringBuilder = stringBuilder.Replace(Environment.NewLine + horizontalRule, horizontalRule);
 536:          }
 537:   
 538:          ////////////////////////////////////////////////////////////////////////////
 539:          ////////////////////////////////////////////////////////////////////////////    
 540:      }
 541:   
 542:      ////////////////////////////////////////////////////////////////////////////
 543:      ////////////////////////////////////////////////////////////////////////////   
 544:  }