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

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

Media Gateway (MGW) support class for Huawei's Fixed Telecommunications Network (FTN) data model.

    1: using System;
    2: using System.Collections.Generic;
    3: using System.Data;
    4: using System.Linq;
    5: using System.Text;
    6:  
    7: namespace Ia.Ftn.Cl.Models.Data.Huawei
    8: {
    9:     ////////////////////////////////////////////////////////////////////////////
   10:  
   11:     /// <summary publish="true">
   12:     /// Media Gateway (MGW) support class for Huawei's Fixed Telecommunications Network (FTN) data model.
   13:     /// </summary>
   14:     /// 
   15:     /// <remarks> 
   16:     /// Copyright © 2019-2020 Jasem Y. Al-Shamlan (info@ia.com.kw), Integrated Applications - Kuwait. All Rights Reserved.
   17:     /// </remarks> 
   18:     public class Mgw
   19:     {
   20:         /// <summary/>
   21:         public Mgw() { }
   22:  
   23:         ////////////////////////////////////////////////////////////////////////////
   24:  
   25:         /// <summary>
   26:         ///
   27:         /// </summary>
   28:         public static bool Update(Ia.Ftn.Cl.Models.Business.Huawei.SoftX.Response response, out Ia.Cl.Models.Result result)
   29:         {
   30:             bool isUpdated;
   31:             int readItemCount, existingItemCount, insertedItemCount, updatedItemCount, deletedItemCount;
   32:             string id, queryEid, queryCommand;
   33:             Ia.Ftn.Cl.Models.Huawei.Mgw mgw, newMgw;
   34:  
   35:             isUpdated = false;
   36:             readItemCount = existingItemCount = insertedItemCount = updatedItemCount = deletedItemCount = 0;
   37:             result = new Ia.Cl.Models.Result();
   38:  
   39:             queryCommand = response.CommandString;
   40:  
   41:             // LST MGW: EID="10.12.42.190:2944";
   42:             queryEid = Ia.Cl.Models.Default.Match(queryCommand, @"EID=""(.+?)""");
   43:  
   44:             readItemCount = response.Count;
   45:  
   46:             id = Ia.Ftn.Cl.Models.Business.Huawei.Mgw.MgwId(response.NetworkElement, queryEid);
   47:  
   48:             using (var db = new Ia.Ftn.Cl.Db())
   49:             {
   50:                 mgw = (from m in db.Mgws where m.Id == id select m).SingleOrDefault();
   51:  
   52:                 if (response.Count >= 1)
   53:                 {
   54:                     newMgw = new Ia.Ftn.Cl.Models.Huawei.Mgw()
   55:                     {
   56:                         Id = id,
   57:                         EID = queryEid,
   58:                         NetworkElement = response.NetworkElement,
   59:                         GWTP = response.QueryDictionary.ContainsKey("GWTP") ? response.QueryDictionary["GWTP"] : string.Empty,
   60:                         MGWDESC = response.QueryDictionary.ContainsKey("MGWDESC") ? response.QueryDictionary["MGWDESC"] : string.Empty,
   61:                         MGCMODULENO = response.QueryDictionary.ContainsKey("MGCMODULENO") ? int.Parse(response.QueryDictionary["MGCMODULENO"]) : 0,
   62:                         PTYPE = response.QueryDictionary.ContainsKey("PTYPE") ? response.QueryDictionary["PTYPE"] : string.Empty,
   63:                         LA = response.QueryDictionary.ContainsKey("LA") ? response.QueryDictionary["LA"] : string.Empty,
   64:                         DYNIP = response.QueryDictionary.ContainsKey("DYNIP") ? response.QueryDictionary["DYNIP"] : string.Empty,
   65:                         RA1 = response.QueryDictionary.ContainsKey("RA1") ? response.QueryDictionary["RA1"] : string.Empty,
   66:                         RA2 = response.QueryDictionary.ContainsKey("RA2") ? response.QueryDictionary["RA2"] : string.Empty,
   67:                         RA3 = response.QueryDictionary.ContainsKey("RA3") ? response.QueryDictionary["RA3"] : string.Empty,
   68:                         RA4 = response.QueryDictionary.ContainsKey("RA4") ? response.QueryDictionary["RA4"] : string.Empty,
   69:                         RA5 = response.QueryDictionary.ContainsKey("RA5") ? response.QueryDictionary["RA5"] : string.Empty,
   70:                         RP = response.QueryDictionary.ContainsKey("RP") ? int.Parse(response.QueryDictionary["RP"]) : 0,
   71:                         LISTOFCODEC = response.QueryDictionary.ContainsKey("LISTOFCODEC") ? response.QueryDictionary["LISTOFCODEC"] : string.Empty,
   72:                         MRSCAP = response.QueryDictionary.ContainsKey("MRSCAP") ? response.QueryDictionary["MRSCAP"] : string.Empty,
   73:                         HAIRPIN = response.QueryDictionary.ContainsKey("HAIRPIN") ? response.QueryDictionary["HAIRPIN"] : string.Empty,
   74:                         EC = response.QueryDictionary.ContainsKey("EC") ? response.QueryDictionary["EC"] : string.Empty,
   75:                         CODETYPE = response.QueryDictionary.ContainsKey("CODETYPE") ? response.QueryDictionary["CODETYPE"] : string.Empty,
   76:                         UCATT = response.QueryDictionary.ContainsKey("UCATT") ? response.QueryDictionary["UCATT"] : string.Empty,
   77:                         ET = response.QueryDictionary.ContainsKey("ET") ? response.QueryDictionary["ET"] : string.Empty,
   78:                         SPI = response.QueryDictionary.ContainsKey("SPI") ? int.Parse(response.QueryDictionary["SPI"]) : 0,
   79:                         KEY = response.QueryDictionary.ContainsKey("KEY") ? response.QueryDictionary["KEY"] : string.Empty,
   80:                         CAPABILITY = response.QueryDictionary.ContainsKey("CAPABILITY") ? response.QueryDictionary["CAPABILITY"] : string.Empty,
   81:                         RATEOFTONE = response.QueryDictionary.ContainsKey("RATEOFTONE") ? int.Parse(response.QueryDictionary["RATEOFTONE"]) : 0,
   82:                         RATEOFMPTY = response.QueryDictionary.ContainsKey("RATEOFMPTY") ? int.Parse(response.QueryDictionary["RATEOFMPTY"]) : 0,
   83:                         RATEOFDETECTDTMF = response.QueryDictionary.ContainsKey("RATEOFDETECTDTMF") ? int.Parse(response.QueryDictionary["RATEOFDETECTDTMF"]) : 0,
   84:                         RATEOFSENDDTMF = response.QueryDictionary.ContainsKey("RATEOFSENDDTMF") ? int.Parse(response.QueryDictionary["RATEOFSENDDTMF"]) : 0,
   85:                         MINTERMID = response.QueryDictionary.ContainsKey("MINTERMID") ? int.Parse(response.QueryDictionary["MINTERMID"]) : 0,
   86:                         MAXTERMID = response.QueryDictionary.ContainsKey("MAXTERMID") ? int.Parse(response.QueryDictionary["MAXTERMID"]) : 0,
   87:                         CHOICE = response.QueryDictionary.ContainsKey("CHOICE") ? response.QueryDictionary["CHOICE"] : string.Empty,
   88:                         TDMIFC1 = response.QueryDictionary.ContainsKey("TDMIFC1") ? response.QueryDictionary["TDMIFC1"] : string.Empty,
   89:                         TDMIFC2 = response.QueryDictionary.ContainsKey("TDMIFC2") ? response.QueryDictionary["TDMIFC2"] : string.Empty,
   90:                         TDMIFC3 = response.QueryDictionary.ContainsKey("TDMIFC3") ? response.QueryDictionary["TDMIFC3"] : string.Empty,
   91:                         TDMIFC4 = response.QueryDictionary.ContainsKey("TDMIFC4") ? response.QueryDictionary["TDMIFC4"] : string.Empty,
   92:                         TDMIFC5 = response.QueryDictionary.ContainsKey("TDMIFC5") ? response.QueryDictionary["TDMIFC5"] : string.Empty,
   93:                         TDMIFC6 = response.QueryDictionary.ContainsKey("TDMIFC6") ? response.QueryDictionary["TDMIFC6"] : string.Empty,
   94:                         TDMIFC7 = response.QueryDictionary.ContainsKey("TDMIFC7") ? response.QueryDictionary["TDMIFC7"] : string.Empty,
   95:                         TDMIFC8 = response.QueryDictionary.ContainsKey("TDMIFC8") ? response.QueryDictionary["TDMIFC8"] : string.Empty,
   96:                         TDMIFC9 = response.QueryDictionary.ContainsKey("TDMIFC9") ? response.QueryDictionary["TDMIFC9"] : string.Empty,
   97:                         TDMIFC10 = response.QueryDictionary.ContainsKey("TDMIFC10") ? response.QueryDictionary["TDMIFC10"] : string.Empty,
   98:                         TDMIFC11 = response.QueryDictionary.ContainsKey("TDMIFC11") ? response.QueryDictionary["TDMIFC11"] : string.Empty,
   99:                         TDMIFC12 = response.QueryDictionary.ContainsKey("TDMIFC12") ? response.QueryDictionary["TDMIFC12"] : string.Empty,
  100:                         TDMIFC13 = response.QueryDictionary.ContainsKey("TDMIFC13") ? response.QueryDictionary["TDMIFC13"] : string.Empty,
  101:                         TDMIFC14 = response.QueryDictionary.ContainsKey("TDMIFC14") ? response.QueryDictionary["TDMIFC14"] : string.Empty,
  102:                         TDMIFC15 = response.QueryDictionary.ContainsKey("TDMIFC15") ? response.QueryDictionary["TDMIFC15"] : string.Empty,
  103:                         TDMIFC16 = response.QueryDictionary.ContainsKey("TDMIFC16") ? response.QueryDictionary["TDMIFC16"] : string.Empty,
  104:                         RTPIFC = response.QueryDictionary.ContainsKey("RTPIFC") ? response.QueryDictionary["RTPIFC"] : string.Empty,
  105:                         MSTYPE = response.QueryDictionary.ContainsKey("MSTYPE") ? response.QueryDictionary["MSTYPE"] : string.Empty,
  106:                         USRRATE = response.QueryDictionary.ContainsKey("USRRATE") ? int.Parse(response.QueryDictionary["USRRATE"]) : 0,
  107:                         OIPDM = response.QueryDictionary.ContainsKey("OIPDM") ? int.Parse(response.QueryDictionary["OIPDM"]) : 0,
  108:                         ENVOICEATTR = response.QueryDictionary.ContainsKey("ENVOICEATTR") ? response.QueryDictionary["ENVOICEATTR"] : string.Empty,
  109:                         RATEOFRECORD = response.QueryDictionary.ContainsKey("RATEOFRECORD") ? response.QueryDictionary["RATEOFRECORD"] : string.Empty,
  110:                         OWDYNA = response.QueryDictionary.ContainsKey("OWDYNA") ? response.QueryDictionary["OWDYNA"] : string.Empty,
  111:                         TOS = response.QueryDictionary.ContainsKey("TOS") ? response.QueryDictionary["TOS"] : string.Empty,
  112:                         E2ET = response.QueryDictionary.ContainsKey("E2ET") ? response.QueryDictionary["E2ET"] : string.Empty,
  113:                         PREMRS1 = response.QueryDictionary.ContainsKey("PREMRS1") ? Ia.Ftn.Cl.Models.Business.Huawei.SoftX.SpecialIntegerParameterHandling("PREMRS1", response.QueryDictionary["PREMRS1"]) : 0,
  114:                         PREMRS2 = response.QueryDictionary.ContainsKey("PREMRS2") ? response.QueryDictionary["PREMRS2"] : string.Empty,
  115:                         PREMRS3 = response.QueryDictionary.ContainsKey("PREMRS3") ? response.QueryDictionary["PREMRS3"] : string.Empty,
  116:                         AGID = response.QueryDictionary.ContainsKey("AGID") ? response.QueryDictionary["AGID"] : string.Empty,
  117:                         IMSFLAG = response.QueryDictionary.ContainsKey("IMSFLAG") ? bool.Parse(response.QueryDictionary["IMSFLAG"]) : false,
  118:                         MMFLAG = response.QueryDictionary.ContainsKey("MMFLAG") ? response.QueryDictionary["MMFLAG"] : string.Empty,
  119:                         CMTSIDX = response.QueryDictionary.ContainsKey("CMTSIDX") ? int.Parse(response.QueryDictionary["CMTSIDX"]) : 0,
  120:                         RTPTYPE = response.QueryDictionary.ContainsKey("RTPTYPE") ? response.QueryDictionary["RTPTYPE"] : string.Empty,
  121:                         ACTGATENUM = response.QueryDictionary.ContainsKey("ACTGATENUM") ? int.Parse(response.QueryDictionary["ACTGATENUM"]) : 0,
  122:                         MEDSSEC = response.QueryDictionary.ContainsKey("MEDSSEC") ? response.QueryDictionary["MEDSSEC"] : string.Empty,
  123:                         RTPSECPARA1 = response.QueryDictionary.ContainsKey("RTPSECPARA1") ? response.QueryDictionary["RTPSECPARA1"] : string.Empty,
  124:                         RTPSECPARA2 = response.QueryDictionary.ContainsKey("RTPSECPARA2") ? response.QueryDictionary["RTPSECPARA2"] : string.Empty,
  125:                         RTPSECPARA3 = response.QueryDictionary.ContainsKey("RTPSECPARA3") ? response.QueryDictionary["RTPSECPARA3"] : string.Empty,
  126:                         RTPSECPARA4 = response.QueryDictionary.ContainsKey("RTPSECPARA4") ? response.QueryDictionary["RTPSECPARA4"] : string.Empty,
  127:                         RTPSECPARA5 = response.QueryDictionary.ContainsKey("RTPSECPARA5") ? response.QueryDictionary["RTPSECPARA5"] : string.Empty,
  128:                         RTPSECPARA6 = response.QueryDictionary.ContainsKey("RTPSECPARA6") ? response.QueryDictionary["RTPSECPARA6"] : string.Empty,
  129:                         RTPSECPARA7 = response.QueryDictionary.ContainsKey("RTPSECPARA7") ? response.QueryDictionary["RTPSECPARA7"] : string.Empty,
  130:                         RTPSECPARA8 = response.QueryDictionary.ContainsKey("RTPSECPARA8") ? response.QueryDictionary["RTPSECPARA8"] : string.Empty,
  131:                         RTPSECPARA9 = response.QueryDictionary.ContainsKey("RTPSECPARA9") ? response.QueryDictionary["RTPSECPARA9"] : string.Empty,
  132:                         RTPSECPARA10 = response.QueryDictionary.ContainsKey("RTPSECPARA10") ? response.QueryDictionary["RTPSECPARA10"] : string.Empty,
  133:                         RTPSECPARA11 = response.QueryDictionary.ContainsKey("RTPSECPARA11") ? response.QueryDictionary["RTPSECPARA11"] : string.Empty,
  134:                         RTPSECPARA12 = response.QueryDictionary.ContainsKey("RTPSECPARA12") ? response.QueryDictionary["RTPSECPARA12"] : string.Empty,
  135:                         RTPSECPARA13 = response.QueryDictionary.ContainsKey("RTPSECPARA13") ? response.QueryDictionary["RTPSECPARA13"] : string.Empty,
  136:                         RTCPSECPARA1 = response.QueryDictionary.ContainsKey("RTCPSECPARA1") ? response.QueryDictionary["RTCPSECPARA1"] : string.Empty,
  137:                         RTCPSECPARA2 = response.QueryDictionary.ContainsKey("RTCPSECPARA2") ? response.QueryDictionary["RTCPSECPARA2"] : string.Empty,
  138:                         RTCPSECPARA3 = response.QueryDictionary.ContainsKey("RTCPSECPARA3") ? response.QueryDictionary["RTCPSECPARA3"] : string.Empty,
  139:                         RTCPSECPARA4 = response.QueryDictionary.ContainsKey("RTCPSECPARA4") ? response.QueryDictionary["RTCPSECPARA4"] : string.Empty,
  140:                         RTCPSECPARA5 = response.QueryDictionary.ContainsKey("RTCPSECPARA5") ? response.QueryDictionary["RTCPSECPARA5"] : string.Empty,
  141:                         RTCPSECPARA6 = response.QueryDictionary.ContainsKey("RTCPSECPARA6") ? response.QueryDictionary["RTCPSECPARA6"] : string.Empty,
  142:                         RTCPSECPARA7 = response.QueryDictionary.ContainsKey("RTCPSECPARA7") ? response.QueryDictionary["RTCPSECPARA7"] : string.Empty,
  143:                         RTCPSECPARA8 = response.QueryDictionary.ContainsKey("RTCPSECPARA8") ? response.QueryDictionary["RTCPSECPARA8"] : string.Empty,
  144:                         RTCPSECPARA9 = response.QueryDictionary.ContainsKey("RTCPSECPARA9") ? response.QueryDictionary["RTCPSECPARA9"] : string.Empty,
  145:                         RTCPSECPARA10 = response.QueryDictionary.ContainsKey("RTCPSECPARA10") ? response.QueryDictionary["RTCPSECPARA10"] : string.Empty,
  146:                         RTCPSECPARA11 = response.QueryDictionary.ContainsKey("RTCPSECPARA11") ? response.QueryDictionary["RTCPSECPARA11"] : string.Empty,
  147:                         NOTHWDEV = response.QueryDictionary.ContainsKey("NOTHWDEV") ? Ia.Ftn.Cl.Models.Business.Huawei.SoftX.SpecialBooleanParameterHandling("NOTHWDEV", response.QueryDictionary["NOTHWDEV"]) : false,
  148:                         MIXVOICE = response.QueryDictionary.ContainsKey("MIXVOICE") ? Ia.Ftn.Cl.Models.Business.Huawei.SoftX.SpecialBooleanParameterHandling("MIXVOICE", response.QueryDictionary["MIXVOICE"]) : false,
  149:                         SUPROOTPKG = response.QueryDictionary.ContainsKey("SUPROOTPKG") ? response.QueryDictionary["SUPROOTPKG"] : string.Empty,
  150:                         MGWFCFLAG = response.QueryDictionary.ContainsKey("MGWFCFLAG") ? response.QueryDictionary["MGWFCFLAG"] : string.Empty,
  151:                         OBJRATE = response.QueryDictionary.ContainsKey("OBJRATE") ? int.Parse(response.QueryDictionary["OBJRATE"]) : 0,
  152:                         PROTCTTM = response.QueryDictionary.ContainsKey("PROTCTTM") ? int.Parse(response.QueryDictionary["PROTCTTM"]) : 0,
  153:                         VBDCODECMODE = response.QueryDictionary.ContainsKey("VBDCODECMODE") ? response.QueryDictionary["VBDCODECMODE"] : string.Empty,
  154:                         MRSLISTOFCODEC = response.QueryDictionary.ContainsKey("MRSLISTOFCODEC") ? response.QueryDictionary["MRSLISTOFCODEC"] : string.Empty,
  155:                         HEARTBEATTIMES = response.QueryDictionary.ContainsKey("HEARTBEATTIMES") ? int.Parse(response.QueryDictionary["HEARTBEATTIMES"]) : 0,
  156:                         MGWGROUPNO = response.QueryDictionary.ContainsKey("MGWGROUPNO") ? int.Parse(response.QueryDictionary["MGWGROUPNO"]) : 0,
  157:                         IPDOMAIN = response.QueryDictionary.ContainsKey("IPDOMAIN") ? int.Parse(response.QueryDictionary["IPDOMAIN"]) : 0,
  158:                         CP = response.QueryDictionary.ContainsKey("CP") ? response.QueryDictionary["CP"] : string.Empty,
  159:                         UCATTEX = response.QueryDictionary.ContainsKey("UCATTEX") ? response.QueryDictionary["UCATTEX"] : string.Empty,
  160:                     };
  161:  
  162:                     if (mgw == null)
  163:                     {
  164:                         newMgw.Created = newMgw.Updated = DateTime.UtcNow.AddHours(3);
  165:  
  166:                         db.Mgws.Add(newMgw);
  167:  
  168:                         insertedItemCount++;
  169:                     }
  170:                     else
  171:                     {
  172:                         existingItemCount = 1;
  173:  
  174:                         if (mgw.Update(newMgw))
  175:                         {
  176:                             db.Mgws.Attach(mgw);
  177:                             db.Entry(mgw).State = Microsoft.EntityFrameworkCore.EntityState.Modified;
  178:  
  179:                             updatedItemCount++;
  180:                         }
  181:                     }
  182:                 }
  183:                 else
  184:                 {
  185:                     // below: remove since reading was empty
  186:  
  187:                     if (mgw != null)
  188:                     {
  189:                         existingItemCount = 1;
  190:  
  191:                         mgw = (from m in db.Mgws where m.Id == id select m).SingleOrDefault();
  192:  
  193:                         db.Mgws.Remove(mgw);
  194:  
  195:                         deletedItemCount++;
  196:                     }
  197:                 }
  198:  
  199:                 db.SaveChanges();
  200:             }
  201:  
  202:             if (insertedItemCount != 0 || updatedItemCount != 0 || deletedItemCount != 0) isUpdated = true;
  203:             else isUpdated = false;
  204:  
  205:             result.AddSuccess("(" + readItemCount + "/" + existingItemCount + "/" + insertedItemCount + "," + updatedItemCount + "," + deletedItemCount + ")");
  206:  
  207:             return isUpdated;
  208:         }
  209:  
  210:         ////////////////////////////////////////////////////////////////////////////
  211:  
  212:         /// <summary>
  213:         ///
  214:         /// </summary>
  215:         public static List<Ia.Ftn.Cl.Models.Huawei.Mgw> List()
  216:         {
  217:             List<Ia.Ftn.Cl.Models.Huawei.Mgw> list;
  218:  
  219:             using (var db = new Ia.Ftn.Cl.Db())
  220:             {
  221:                 list = (from s in db.Mgws select s).ToList();
  222:             }
  223:  
  224:             return list;
  225:         }
  226:  
  227:         ////////////////////////////////////////////////////////////////////////////
  228:  
  229:         /// <summary>
  230:         /// 
  231:         /// </summary>
  232:         public static Ia.Ftn.Cl.Models.Huawei.Mgw List(string service)
  233:         {
  234:             Ia.Ftn.Cl.Models.Huawei.Mgw mgw;
  235:  
  236:             var pui = Ia.Ftn.Cl.Models.Business.NumberFormatConverter.Pui(service);
  237:  
  238:             using (var db = new Ia.Ftn.Cl.Db())
  239:             {
  240:                 mgw = (from m in db.Mgws
  241:                        join a in db.Asbrs on m.Id equals a.Mgw.Id
  242:                        where a.PUI == pui
  243:                        select m).SingleOrDefault();
  244:             }
  245:  
  246:             return mgw;
  247:         }
  248:  
  249:         ////////////////////////////////////////////////////////////////////////////
  250:  
  251:         /// <summary>
  252:         ///
  253:         /// </summary>
  254:         public static List<string> EidList(string networkElementDomain)
  255:         {
  256:             List<string> list;
  257:  
  258:             using (var db = new Ia.Ftn.Cl.Db())
  259:             {
  260:                 list = (from m in db.Mgws where m.NetworkElement == networkElementDomain select m.EID).ToList();
  261:             }
  262:  
  263:             return list;
  264:         }
  265:  
  266:         ////////////////////////////////////////////////////////////////////////////
  267:  
  268:         /// <summary>
  269:         ///
  270:         /// </summary>
  271:         public static List<string> EidList()
  272:         {
  273:             List<string> list;
  274:  
  275:             using (var db = new Ia.Ftn.Cl.Db())
  276:             {
  277:                 list = (from m in db.Mgws select m.EID).ToList();
  278:             }
  279:  
  280:             return list;
  281:         }
  282:  
  283:         ////////////////////////////////////////////////////////////////////////////
  284:  
  285:         /// <summary>
  286:         ///
  287:         /// </summary>
  288:         public static Dictionary<string, Ia.Ftn.Cl.Models.Business.Default.SwitchRoute> PstnServiceToSwitchRouteDictionary()
  289:         {
  290:             Dictionary<string, Ia.Ftn.Cl.Models.Business.Default.SwitchRoute> dictionary;
  291:  
  292:             dictionary = new Dictionary<string, Ia.Ftn.Cl.Models.Business.Default.SwitchRoute>();
  293:  
  294:             using (var db = new Ia.Ftn.Cl.Db())
  295:             {
  296:                 var list = (from s in db.Mgws select new { s.Id/*.USRNUM, s.RNIDX2*/ }).ToList();
  297:  
  298:                 foreach (var l in list)
  299:                 {
  300:                     //dictionary[l.USRNUM] = Ia.Ftn.Cl.Model.Business.Huawei.Mgw.RnidxRouteToSwitchRoute(l.RNIDX2);
  301:                 }
  302:             }
  303:  
  304:             return dictionary;
  305:         }
  306:  
  307:         ////////////////////////////////////////////////////////////////////////////
  308:         ////////////////////////////////////////////////////////////////////////////
  309:  
  310:         /// <summary>
  311:         ///
  312:         /// </summary>
  313:         public static string ToSimpleTextString(Ia.Ftn.Cl.Models.Huawei.Mgw mgw)
  314:         {
  315:             StringBuilder sb;
  316:  
  317:             sb = new StringBuilder();
  318:  
  319:             sb.AppendLine("EID: " + mgw.EID);
  320:             //sb.AppendLine("MGWID: " + mgw.MGWID);
  321:             sb.AppendLine("MGWDESC: " + mgw.MGWDESC);
  322:             sb.AppendLine("GWTP: " + mgw.GWTP);
  323:             sb.AppendLine("PTYPE: " + mgw.PTYPE);
  324:             sb.AppendLine("MGCMODULENO: " + mgw.MGCMODULENO);
  325:             sb.AppendLine("MSTYPE: " + mgw.MSTYPE);
  326:             //sb.AppendLine("MAX: " + mgw.MAX);
  327:             //sb.AppendLine("IPADDR: " + mgw.IPADDR);
  328:             //sb.AppendLine("IPPORT: " + mgw.IPPORT);
  329:             //sb.AppendLine("PREMRS: " + mgw.PREMRS);
  330:             sb.AppendLine("MGWGROUPNO: " + mgw.MGWGROUPNO);
  331:             //sb.AppendLine("SBC: " + mgw.SBC);
  332:  
  333:             return sb.ToString();
  334:         }
  335:  
  336:         ////////////////////////////////////////////////////////////////////////////
  337:         ////////////////////////////////////////////////////////////////////////////
  338:     }
  339:  
  340:     ////////////////////////////////////////////////////////////////////////////
  341:     ////////////////////////////////////////////////////////////////////////////
  342: }