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

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

Access support class for Fixed Telecommunications Network (FTN) ui model.

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