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

Integrated Applications Programming Company

Skip Navigation LinksHome » Code Library » Access

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

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

   1:  using System;
   2:  using System.Data;
   3:  using System.IO;
   4:  using System.Linq;
   5:  using System.Text;
   6:  using System.Text.RegularExpressions;
   7:   
   8:  namespace Ia.Ngn.Cl.Model.Ui.Provision
   9:  {
  10:      ////////////////////////////////////////////////////////////////////////////
  11:   
  12:      /// <summary publish="true">
  13:      /// Access support class for Next Generation Network (NGN) ui model.
  14:      /// </summary>
  15:      /// 
  16:      /// <remarks> 
  17:      /// Copyright © 2006-2019 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:      public partial class Access
  30:      {
  31:          /// <summary/>
  32:          public Access() { }
  33:   
  34:          /////////////////////////////////////////////////////////////////////////////////
  35:   
  36:          /// <summary>
  37:          ///
  38:          /// </summary>
  39:          public static void Manage(Ia.Ngn.Cl.Model.Business.Administration.StaffContact staffContact, string opcode, string operand, out string responseSubject, out string responseContent)
  40:          {
  41:              int i;
  42:              string line, accessNameRow, accessName, odf, kuwaitNgnAreaSymbol, block, street, premisesOld, premisesNew, paci, note;
  43:              string ontEquipmentTypeString, ontSerialNumber, ip;
  44:              StringBuilder stringBuilder;
  45:              DateTime now;
  46:              Ia.Cl.Model.Result documentValidityResult;
  47:              Ia.Ngn.Cl.Model.Business.Nokia.Ont.FamilyType ontFamilyType;
  48:              Ia.Ngn.Cl.Model.Business.Huawei.Ont.EquipmentType emsOntEquipmentType;
  49:              Ia.Ngn.Cl.Model.Access access;
  50:              Ia.Ngn.Cl.Model.Business.NetworkDesignDocument.Ont nddOnt;
  51:   
  52:              documentValidityResult = new Ia.Cl.Model.Result();
  53:   
  54:              opcode = opcode.ToLower();
  55:   
  56:              now = DateTime.UtcNow.AddHours(3);
  57:   
  58:              // subject can't have \r\n
  59:              responseSubject = "Optical Fiber Network (OFN) Access Manager (" + now.ToString("yyyy-MM-dd HH:mm") + ")";
  60:              responseContent = "Optical Fiber Network (OFN) Access Manager: " + now.ToString("yyyy-MM-dd HH:mm") + "\r\n";
  61:   
  62:              if (opcode.Contains("help"))
  63:              {
  64:                  responseContent += Ia.Ngn.Cl.Model.Data.Help.Text("mail/provision/access");
  65:                  responseContent += "\r\n";
  66:              }
  67:              else
  68:              {
  69:                  if (opcode.StartsWith("mail/provision/access/create"))
  70:                  {
  71:                      if (Ia.Ngn.Cl.Model.Business.Authority.StaffContactCanCreateReadUpdateDeleteAccessList(Ia.Ngn.Cl.Model.Business.Authority.PersistentStorageFunction.Create, staffContact))
  72:                      {
  73:                          responseContent += @"Opcode: """ + opcode + @"""." + "\r\n";
  74:                          //content += @"Operand: """ + operand + @"""." + "\r\n";
  75:                          responseContent += "\r\n";
  76:   
  77:                          stringBuilder = new StringBuilder(10000);
  78:   
  79:                          using (StringReader reader = new StringReader(operand))
  80:                          {
  81:                              if (operand.Length > 0)
  82:                              {
  83:                                  while ((line = reader.ReadLine()) != null)
  84:                                  {
  85:                                      if (!string.IsNullOrEmpty(line)) // skip empty lines
  86:                                      {
  87:                                          if (ParseLine(line, ref stringBuilder, out accessNameRow, out kuwaitNgnAreaSymbol, out block, out street, out premisesOld, out premisesNew, out ontSerialNumber, out ip, out ontEquipmentTypeString, out odf, out paci))
  88:                                          {
  89:                                              if (ontSerialNumber != "0" && !string.IsNullOrEmpty(ontSerialNumber))
  90:                                              {
  91:                                                  if (Ia.Ngn.Cl.Model.Business.Huawei.Ont.IsValidSerialNumber(ontSerialNumber) || Ia.Ngn.Cl.Model.Business.Nokia.Ont.IsValidSerialNumber(ontSerialNumber)) // to check Huawei and Nokia ONTs
  92:                                                  {
  93:                                                      block = Ia.Ngn.Cl.Model.Business.Access.NormalizeBlockEntry(block);
  94:                                                      street = Ia.Ngn.Cl.Model.Business.Access.NormalizeStreetEntry(street);
  95:                                                      premisesOld = Ia.Ngn.Cl.Model.Business.Access.NormalizePremisesEntry(premisesOld);
  96:                                                      premisesNew = Ia.Ngn.Cl.Model.Business.Access.NormalizePremisesEntry(premisesNew);
  97:                                                      paci = Ia.Ngn.Cl.Model.Business.Access.NormalizePaciEntry(paci);
  98:                                                      odf = string.Empty; // odfPort;
  99:   
 100:                                                      if (!string.IsNullOrEmpty(paci) && int.TryParse(paci, out i))
 101:                                                      {
 102:                                                          var accessListByPaci = Ia.Ngn.Cl.Model.Data.Access.ReadListByPaci(paci);
 103:   
 104:                                                          // the new access is acceptable if the PACI is new or PACI exists with similar block and premises-old
 105:                                                          if (accessListByPaci.Count == 0 || accessListByPaci.Any(u => u.Block == block && u.PremisesOld == premisesOld))
 106:                                                          {
 107:                                                              if (!string.IsNullOrEmpty(block) /*&& int.TryParse(block, out i)*/) // there are blocks with letters like block 7B
 108:                                                              {
 109:                                                                  //if (!string.IsNullOrEmpty(street) && int.TryParse(street, out i))
 110:                                                                  //{
 111:                                                                  if (string.IsNullOrEmpty(premisesOld) || int.TryParse(premisesOld, out i))
 112:                                                                  {
 113:                                                                      //if (string.IsNullOrEmpty(premisesNew) || int.TryParse(premisesNew, out i))
 114:                                                                      //{
 115:                                                                      accessName = Ia.Ngn.Cl.Model.Business.Default.ExtractAccessNameWithValidSymbolAndLegalFormatForPonAndOntFromValue(accessNameRow);
 116:   
 117:                                                                      //nddOnt = (from o in Ia.Ngn.Cl.Model.Data.NetworkDesignDocument.OntList where o.Access.Name == accessName select o).SingleOrDefault();
 118:                                                                      nddOnt = Ia.Ngn.Cl.Model.Data.NetworkDesignDocument.OntAccessNameToOntDictionary.ContainsKey(accessName) ? Ia.Ngn.Cl.Model.Data.NetworkDesignDocument.OntAccessNameToOntDictionary[accessName] : null;
 119:   
 120:                                                                      if (nddOnt != null)
 121:                                                                      {
 122:                                                                          if (nddOnt.Pon.PonGroup.Olt.Odf.Vendor == Ia.Ngn.Cl.Model.Business.NetworkDesignDocument.Vendor.Nokia)
 123:                                                                          {
 124:                                                                              ontFamilyType = Ia.Ngn.Cl.Model.Business.Nokia.Ont.FamilyTypeFromString(ontEquipmentTypeString);
 125:   
 126:                                                                              if (ontFamilyType != Ia.Ngn.Cl.Model.Business.Nokia.Ont.FamilyType.Undefined)
 127:                                                                              {
 128:                                                                                  if (string.IsNullOrEmpty(ip) || ip == nddOnt.Ip)
 129:                                                                                  {
 130:                                                                                      note = ontEquipmentTypeString + ": " + Ia.Ngn.Cl.Model.Business.Access.NormalizeOntSerialNumberEntry(ontSerialNumber);
 131:   
 132:                                                                                      access = Ia.Ngn.Cl.Model.Business.Access.Create(accessName, kuwaitNgnAreaSymbol, block, street, premisesOld, premisesNew, odf, paci, note, staffContact.UserId, out documentValidityResult);
 133:   
 134:                                                                                      Ia.Ngn.Cl.Model.Data.Msmq.AccessNameQueue.ProvisionAccessQueue.Enqueue(accessName);
 135:   
 136:                                                                                      stringBuilder.AppendLine(@"> [" + line.Trim() + @"]");
 137:                                                                                      stringBuilder.AppendLine(documentValidityResult.Message);
 138:                                                                                      stringBuilder.AppendLine(" ");
 139:                                                                                  }
 140:                                                                                  else
 141:                                                                                  {
 142:                                                                                      stringBuilder.AppendLine(@"> [" + line.Trim() + @"]");
 143:                                                                                      stringBuilder.AppendLine(@"Error: Submitted IP: " + ip + " does not match the Network Design Document (NDD) IP: " + nddOnt.Ip + ". ");
 144:                                                                                      stringBuilder.AppendLine(" ");
 145:                                                                                  }
 146:                                                                              }
 147:                                                                              else
 148:                                                                              {
 149:                                                                                  stringBuilder.AppendLine(@"> [" + line.Trim() + @"]");
 150:                                                                                  stringBuilder.AppendLine(@"Error: ONT family type is undefined. ");
 151:                                                                                  stringBuilder.AppendLine(" ");
 152:                                                                              }
 153:                                                                          }
 154:                                                                          else if (nddOnt.Pon.PonGroup.Olt.Odf.Vendor == Ia.Ngn.Cl.Model.Business.NetworkDesignDocument.Vendor.Huawei)
 155:                                                                          {
 156:                                                                              /// This is used to verify the ONT type in the contactors access submittal files 
 157:                                                                              emsOntEquipmentType = (from e in Ia.Ngn.Cl.Model.Business.Huawei.Ont.EquipmentTypeList where e.Name == ontEquipmentTypeString select e).SingleOrDefault();
 158:   
 159:                                                                              if (emsOntEquipmentType != null) //  Ia.Ngn.Cl.Model.Business.Huawei.Ont.EquipmentType.Undefined)
 160:                                                                              {
 161:                                                                                  note = ontEquipmentTypeString + ": " + Ia.Ngn.Cl.Model.Business.Access.NormalizeOntSerialNumberEntry(ontSerialNumber);
 162:   
 163:                                                                                  access = Ia.Ngn.Cl.Model.Business.Access.Create(accessName, kuwaitNgnAreaSymbol, block, street, premisesOld, premisesNew, odf, paci, note, staffContact.UserId, out documentValidityResult);
 164:   
 165:                                                                                  Ia.Ngn.Cl.Model.Data.Msmq.AccessNameQueue.ProvisionAccessQueue.Enqueue(accessName);
 166:   
 167:                                                                                  stringBuilder.AppendLine(@"> [" + line.Trim() + @"]");
 168:                                                                                  stringBuilder.AppendLine(documentValidityResult.Message);
 169:                                                                                  stringBuilder.AppendLine(" ");
 170:                                                                              }
 171:                                                                              else
 172:                                                                              {
 173:                                                                                  stringBuilder.AppendLine(@"> [" + line.Trim() + @"]");
 174:                                                                                  stringBuilder.AppendLine(@"Error: ONT family type is undefined. ");
 175:                                                                                  stringBuilder.AppendLine(" ");
 176:                                                                              }
 177:                                                                          }
 178:                                                                          else
 179:                                                                          {
 180:                                                                              stringBuilder.AppendLine(@"> [" + line.Trim() + @"]");
 181:                                                                              stringBuilder.AppendLine(@"Error: Access vendor is undefined. ");
 182:                                                                              stringBuilder.AppendLine(" ");
 183:                                                                          }
 184:                                                                      }
 185:                                                                      else
 186:                                                                      {
 187:                                                                          stringBuilder.AppendLine(@"> [" + line.Trim() + @"]");
 188:                                                                          stringBuilder.AppendLine(@"Error: Network design document does not recognize the access name " + accessNameRow + ". Access vendor is undefined. ");
 189:                                                                          stringBuilder.AppendLine(" ");
 190:                                                                      }
 191:                                                                  }
 192:                                                                  //else
 193:                                                                  //{
 194:                                                                  //    stringBuilder.AppendLine(@"> [" + line.Trim() + @"]");
 195:                                                                  //    stringBuilder.AppendLine(@"Error: PremisesNew number is undefined or invalid. ");
 196:                                                                  //    stringBuilder.AppendLine(" ");
 197:                                                                  //}
 198:                                                                  //}
 199:                                                                  else
 200:                                                                  {
 201:                                                                      stringBuilder.AppendLine(@"> [" + line.Trim() + @"]");
 202:                                                                      stringBuilder.AppendLine(@"Error: PremisesOld (Parcel) number is undefined or invalid. ");
 203:                                                                      stringBuilder.AppendLine(" ");
 204:                                                                  }
 205:                                                                  //}
 206:                                                                  //else
 207:                                                                  //{
 208:                                                                  //    stringBuilder.AppendLine(@"> [" + line.Trim() + @"]");
 209:                                                                  //    stringBuilder.AppendLine(@"Error: Street number is undefined or invalid. ");
 210:                                                                  //    stringBuilder.AppendLine(" ");
 211:                                                                  //}
 212:                                                              }
 213:                                                              else
 214:                                                              {
 215:                                                                  stringBuilder.AppendLine(@"> [" + line.Trim() + @"]");
 216:                                                                  stringBuilder.AppendLine(@"Error: Block number is undefined or invalid. ");
 217:                                                                  stringBuilder.AppendLine(" ");
 218:                                                              }
 219:                                                          }
 220:                                                          else
 221:                                                          {
 222:                                                              stringBuilder.AppendLine(@"> [" + line.Trim() + @"]");
 223:                                                              stringBuilder.AppendLine(@"Error: PACI number " + paci + " is already assigned to another ONT. To submit other ONTs with this same PACI their address must also have the same block and old permises numbers. ");
 224:                                                              stringBuilder.AppendLine(" ");
 225:                                                          }
 226:                                                      }
 227:                                                      else
 228:                                                      {
 229:                                                          stringBuilder.AppendLine(@"> [" + line.Trim() + @"]");
 230:                                                          stringBuilder.AppendLine(@"Error: PACI is undefined or invalid. ");
 231:                                                          stringBuilder.AppendLine(" ");
 232:                                                      }
 233:                                                  }
 234:                                                  else
 235:                                                  {
 236:                                                      stringBuilder.AppendLine(@"> [" + line.Trim() + @"]");
 237:                                                      stringBuilder.AppendLine(@"Error: ONT serial """ + ontSerialNumber + @""" is not valid. ");
 238:                                                      stringBuilder.AppendLine(" ");
 239:                                                  }
 240:                                              }
 241:                                              else
 242:                                              {
 243:                                                  stringBuilder.AppendLine(@"> [" + line.Trim() + @"]");
 244:                                                  stringBuilder.AppendLine(@"Error: ONT serial is null or zero. ");
 245:                                                  stringBuilder.AppendLine(" ");
 246:                                              }
 247:                                          }
 248:                                          else
 249:                                          {
 250:                                              // ref stringBuilder has a response
 251:                                              //stringBuilder.AppendLine(@"> [" + line.Trim() + @"]");
 252:                                              //stringBuilder.AppendLine(@"Error: Line format was incorrect and was not matched. ");
 253:                                              //stringBuilder.AppendLine(" ");
 254:                                          }
 255:                                      }
 256:                                  }
 257:                              }
 258:                              else
 259:                              {
 260:                                  stringBuilder.AppendLine("Error: Operand is empty. ");
 261:                                  stringBuilder.AppendLine(" ");
 262:                              }
 263:                          }
 264:   
 265:                          responseContent += stringBuilder.ToString();
 266:                          responseContent += "\r\n";
 267:                          //content += "\r\nResult: " + result.Message;
 268:   
 269:                          responseContent += "\r\n";
 270:                          responseContent += "\r\n";
 271:                          responseContent += @"Help? Send email with subject ""mail/provision/access/help"". ";
 272:                          responseContent += "\r\n";
 273:                          responseContent += "\r\n";
 274:                      }
 275:                      else
 276:                      {
 277:                          responseContent += "\r\n";
 278:                          responseContent += "You are not authorized to modify this value. ";
 279:                          responseContent += "\r\n";
 280:                      }
 281:                  }
 282:                  else if (opcode.StartsWith("mail/provision/access/read"))
 283:                  {
 284:                      responseContent += "\r\n";
 285:                      responseContent += "This opcode is not defined yet. ";
 286:                      responseContent += "\r\n";
 287:                  }
 288:                  else if (opcode.StartsWith("mail/provision/access/delete"))
 289:                  {
 290:                      if (Ia.Ngn.Cl.Model.Business.Authority.StaffContactCanCreateReadUpdateDeleteAccessList(Ia.Ngn.Cl.Model.Business.Authority.PersistentStorageFunction.Create, staffContact))
 291:                      {
 292:                          responseContent += @"Opcode: """ + opcode + @"""." + "\r\n";
 293:                          //content += @"Operand: """ + operand + @"""." + "\r\n";
 294:                          responseContent += "\r\n";
 295:   
 296:                          stringBuilder = new StringBuilder(10000);
 297:   
 298:                          using (StringReader reader = new StringReader(operand))
 299:                          {
 300:                              if (operand.Length > 0)
 301:                              {
 302:                                  while ((line = reader.ReadLine()) != null)
 303:                                  {
 304:                                      if (!string.IsNullOrEmpty(line)) // skip empty lines
 305:                                      {
 306:                                          accessName = Ia.Ngn.Cl.Model.Business.Default.ExtractAccessNameWithValidSymbolAndLegalFormatForPonAndOntFromValue(line);
 307:   
 308:                                          //nddOnt = (from o in Ia.Ngn.Cl.Model.Data.NetworkDesignDocument.OntList where o.Access.Name == accessName select o).SingleOrDefault();
 309:                                          nddOnt = Ia.Ngn.Cl.Model.Data.NetworkDesignDocument.OntAccessNameToOntDictionary.ContainsKey(accessName) ? Ia.Ngn.Cl.Model.Data.NetworkDesignDocument.OntAccessNameToOntDictionary[accessName] : null;
 310:   
 311:                                          if (nddOnt != null)
 312:                                          {
 313:                                              Ia.Ngn.Cl.Model.Business.Access.Delete(nddOnt.Access.Name, staffContact.UserId, out documentValidityResult);
 314:   
 315:                                              Ia.Ngn.Cl.Model.Data.Msmq.AccessNameQueue.ProvisionAccessQueue.Enqueue(accessName);
 316:   
 317:                                              stringBuilder.AppendLine(@"> [" + line.Trim() + @"]");
 318:                                              stringBuilder.AppendLine(documentValidityResult.Message);
 319:                                              stringBuilder.AppendLine(" ");
 320:                                          }
 321:                                          else
 322:                                          {
 323:                                              stringBuilder.AppendLine(@"> [" + line.Trim() + @"]");
 324:                                              stringBuilder.AppendLine(@"Error: Network design document does not recognize the access name " + line + ". Access vendor is undefined. ");
 325:                                              stringBuilder.AppendLine(" ");
 326:                                          }
 327:                                      }
 328:                                  }
 329:                              }
 330:                              else
 331:                              {
 332:                                  stringBuilder.AppendLine("Error: Operand is empty. ");
 333:                                  stringBuilder.AppendLine(" ");
 334:                              }
 335:                          }
 336:   
 337:                          responseContent += stringBuilder.ToString();
 338:                          responseContent += "\r\n";
 339:                          //content += "\r\nResult: " + result.Message;
 340:   
 341:                          responseContent += "\r\n";
 342:                          responseContent += "\r\n";
 343:                          responseContent += @"Help? Send email with subject ""mail/provision/access/help"". ";
 344:                          responseContent += "\r\n";
 345:                          responseContent += "\r\n";
 346:                      }
 347:                      else
 348:                      {
 349:                          responseContent += "\r\n";
 350:                          responseContent += "You are not authorized to delete this value. ";
 351:                          responseContent += "\r\n";
 352:                      }
 353:                  }
 354:                  else
 355:                  {
 356:                      responseContent += "\r\n";
 357:                      responseContent += "This opcode is not known. ";
 358:                      responseContent += "\r\n";
 359:                  }
 360:              }
 361:          }
 362:   
 363:          /////////////////////////////////////////////////////////////////////////////////
 364:   
 365:          /// <summary>
 366:          ///
 367:          /// </summary>
 368:          private static bool ParseLine(string line, ref StringBuilder stringBuilder, out string accessName, out string kuwaitNgnAreaSymbol, out string block, out string street, out string premisesOld, out string premisesNew, out string ontSerialNumber, out string ip, out string ontEquipmentTypeString, out string odf, out string paci)
 369:          {
 370:              bool matchSuccess;
 371:              int slNo, pon, pon2, pon3;
 372:              string accessName2, areaSymbol;
 373:              Match match;
 374:   
 375:              accessName = kuwaitNgnAreaSymbol = block = street = premisesOld = premisesNew = ontSerialNumber = ip = ontEquipmentTypeString = odf = paci = string.Empty;
 376:   
 377:              // parse Huawei submittal line
 378:              match = Regex.Match(line, @"(\d+?)\t(\d+?)\t(\w\w\w)\.(\d+?)\.(\d+?)\t(\w\w\w)\.(\d+?)\.(\d+?)\t(.*?)\t(\w\w\w)\t(.*?)\t(.*?)\t(.*?)\t(.*?)\t(.*?)\t(.*?)\t(.*?)\t(.*?)\t(.*?)\t(.*?)$");
 379:              // [5  1126  SMC.1126.002      SMC.1126.002      SHX011      SMC   1     NA    5      PUBLICSERVICCO    18032043    4857544390755A78  10.150.131.34     NA    66081089      MA5616-96]
 380:              if (match.Success)
 381:              {
 382:                  slNo = int.Parse(match.Groups[1].Value);
 383:                  pon = int.Parse(match.Groups[2].Value);
 384:                  pon2 = int.Parse(match.Groups[4].Value);
 385:                  pon3 = int.Parse(match.Groups[7].Value);
 386:   
 387:                  if (pon == pon2 && pon == pon3 && pon2 == pon3)
 388:                  {
 389:                      accessName = match.Groups[3].Value + "." + match.Groups[4].Value + "." + match.Groups[5].Value;
 390:                      accessName2 = match.Groups[6].Value + "." + match.Groups[7].Value + "." + match.Groups[8].Value;
 391:   
 392:                      kuwaitNgnAreaSymbol = match.Groups[10].Value;
 393:   
 394:                      if (accessName == accessName2 && accessName.StartsWith(kuwaitNgnAreaSymbol))
 395:                      {
 396:                          //mhNo = match.Groups[9].Value;
 397:                          block = match.Groups[11].Value;
 398:                          premisesNew = match.Groups[12].Value;
 399:                          street = match.Groups[13].Value;
 400:                          premisesOld = match.Groups[14].Value;
 401:                          paci = match.Groups[15].Value;
 402:                          ontSerialNumber = match.Groups[16].Value;
 403:                          ip = match.Groups[17].Value;
 404:                          ontEquipmentTypeString = match.Groups[20].Value;
 405:                          //odfPort = match.Groups[19].Value;
 406:                          //oltPort = match.Groups[20].Value;
 407:   
 408:                          matchSuccess = true;
 409:                      }
 410:                      else
 411:                      {
 412:                          stringBuilder.AppendLine(@"> [" + line.Trim() + @"]");
 413:                          stringBuilder.AppendLine(@"Error: TB.ID, ONT ID, and/or area symbol values don't match in line. ");
 414:                          stringBuilder.AppendLine(" ");
 415:   
 416:                          matchSuccess = false;
 417:                      }
 418:                  }
 419:                  else
 420:                  {
 421:                      stringBuilder.AppendLine(@"> [" + line.Trim() + @"]");
 422:                      stringBuilder.AppendLine(@"Error: Inconsistent PON, TB.ID and ONT ID values in line. ");
 423:                      stringBuilder.AppendLine(" ");
 424:   
 425:                      matchSuccess = false;
 426:                  }
 427:              }
 428:              else
 429:              {
 430:                  // parse Nokia submittal line
 431:                  match = Regex.Match(line, @"([a-zA-Z]{3})\.(\d{1,4})\.(\d{1,3})\t(.*?)\t(.*?)\t(.*?)\t(.*?)\t(.*?)\t(.*?)\t(.+?)$");
 432:   
 433:                  if (match.Success)
 434:                  {
 435:                      areaSymbol = match.Groups[1].Value;
 436:                      kuwaitNgnAreaSymbol = areaSymbol;
 437:   
 438:                      accessName = areaSymbol + "." + match.Groups[2].Value + "." + match.Groups[3].Value;
 439:   
 440:                      premisesOld = match.Groups[6].Value;
 441:                      premisesNew = match.Groups[7].Value;
 442:                      street = match.Groups[5].Value;
 443:                      block = match.Groups[4].Value;
 444:                      paci = match.Groups[8].Value;
 445:   
 446:                      ontSerialNumber = match.Groups[9].Value;
 447:                      ip = string.Empty;
 448:                      ontEquipmentTypeString = match.Groups[10].Value;
 449:   
 450:                      matchSuccess = true;
 451:                  }
 452:                  else
 453:                  {
 454:                      stringBuilder.AppendLine(@"> [" + line.Trim() + @"]");
 455:                      stringBuilder.AppendLine(@"Error: Line format was incorrect and was not matched. ");
 456:                      stringBuilder.AppendLine(" ");
 457:   
 458:                      matchSuccess = false;
 459:                  }
 460:              }
 461:   
 462:              return matchSuccess;
 463:          }
 464:   
 465:          ////////////////////////////////////////////////////////////////////////////
 466:          ////////////////////////////////////////////////////////////////////////////
 467:      }
 468:  }