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

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

Default class for TentPlay Trek UI model

    1: using System;
    2: using System.Text;
    3:  
    4: namespace Ia.TentPlay.Cl.Models.Ui.Trek
    5: {
    6:     ////////////////////////////////////////////////////////////////////////////
    7:  
    8:     /// <summary publish="true">
    9:     /// Default class for TentPlay Trek UI model
   10:     /// </summary>
   11:     /// 
   12:     /// <remarks> 
   13:     /// Copyright © 2006-2024 Jasem Y. Al-Shamlan (info@ia.com.kw), Integrated Applications - Kuwait. All Rights Reserved.
   14:     ///
   15:     /// 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
   16:     /// the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
   17:     ///
   18:     /// This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
   19:     /// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
   20:     /// 
   21:     /// You should have received a copy of the GNU General Public License along with this library. If not, see http://www.gnu.org/licenses.
   22:     /// 
   23:     /// Copyright notice: This notice may not be removed or altered from any source distribution.
   24:     /// </remarks> 
   25:     public static class Default
   26:     {
   27:         ////////////////////////////////////////////////////////////////////////////
   28:  
   29:         /// <summary>
   30:         ///
   31:         /// </summary>
   32:         public static string WebSitemapSiteMapNodeListOfAllCountriesInStringFormat()
   33:         {
   34:             var stringBuilder = new StringBuilder();
   35:  
   36:             foreach (var country in Ia.Cl.Models.Country.List)
   37:             {
   38:                 stringBuilder.AppendLine(@"<siteMapNode title=""" + country.Name + @""" url=""" + Ia.TentPlay.Cl.Models.Business.Trek.Default.CountryUrl(country.Iso3) + @"/>");
   39:             }
   40:  
   41:             var s = stringBuilder.ToString();
   42:  
   43:             s = s.Replace("'", "&#39;"); // use &#39; instead of &apos; to work 
   44:             s = s.Replace("<", "&lt;");
   45:             s = s.Replace(">", "&gt;");
   46:             s = s.Replace(" & ", " &amp;amp; ");
   47:  
   48:             s = "<pre>" + s + "</pre>";
   49:  
   50:             return s;
   51:         }
   52:  
   53:         ////////////////////////////////////////////////////////////////////////////
   54:  
   55:         /// <summary>
   56:         ///
   57:         /// </summary>
   58:         public static string ApplicationNameAndPlayStoreUrlLinkListStringFormat()
   59:         {
   60:             var stringBuilder = new StringBuilder();
   61:  
   62:             foreach (Ia.TentPlay.Cl.Models.Data.Trek.ApplicationInformation.Country country in Ia.TentPlay.Cl.Models.Data.Trek.ApplicationInformation.CountryList)
   63:             {
   64:                 stringBuilder.AppendLine(@" <a href=""" + country.ApplicationUrl + @"""/>" + country.Name + "</a> ");
   65:             }
   66:  
   67:             return stringBuilder.ToString();
   68:         }
   69:  
   70:         /*
   71:         ////////////////////////////////////////////////////////////////////////////
   72: 
   73:         /// <summary>
   74:         ///
   75:         /// </summary>
   76:         public static void GridView_RowDataBound(System.Web.UI.Page page, object sender, GridViewRowEventArgs e)
   77:         {
   78:             Ia.TentPlay.Cl.Model.Data.Trek.ApplicationInformation.Country country;
   79:             Ia.TentPlay.Cl.Model.Trek.Feature feature;
   80: 
   81:             var senderId = e.Row.Parent.Parent.ID;
   82: 
   83:             if (e.Row.RowType == DataControlRowType.Header || e.Row.RowType == DataControlRowType.Footer || e.Row.RowType == DataControlRowType.DataRow)
   84:             {
   85:                 country = null;
   86:                 feature = null;
   87: 
   88:                 var senderKnown = true;
   89: 
   90:                 switch (senderId)
   91:                 {
   92:                     case "featureGridView":
   93:                         {
   94:                             feature = (e.Row.DataItem as Ia.TentPlay.Cl.Model.Trek.Feature);
   95: 
   96:                             break;
   97:                         }
   98:                     default:
   99:                         {
  100:                             senderKnown = false;
  101:                             break;
  102:                         }
  103:                 }
  104: 
  105:                 if (senderKnown)
  106:                 {
  107:                     if (e.Row.RowType == DataControlRowType.Header)
  108:                     {
  109:                     }
  110:                     else if (e.Row.RowType == DataControlRowType.DataRow)
  111:                     {
  112:                         foreach (Control control in e.Row.Controls)
  113:                         {
  114:                             try
  115:                             {
  116:                                 if (control.Controls.Count > 0)
  117:                                 {
  118:                                     if (control.Controls[0].GetType().ToString() == "System.Web.UI.WebControls.Label")
  119:                                     {
  120:                                         Label l = (Label)control.Controls[0];
  121: 
  122:                                         if (l.ID == "applicationNameDictionaryEnglishLabel") l.Text = country.ApplicationNameDictionary["en"];
  123:                                         else if (l.ID == "designationIdLabel") l.Text = feature.Designation.Id;
  124:                                         else if (l.ID == "designationEnglishLabel") l.Text = Ia.TentPlay.Cl.Model.Data.Trek.FeatureDesignation.ById(feature.Designation.Id).En;
  125:                                         else if (l.ID == "designationArabicLabel") l.Text = Ia.TentPlay.Cl.Model.Data.Trek.FeatureDesignation.ById(feature.Designation.Id).Ar;
  126:                                         else if (l.ID == "countryLabel") l.Text = Ia.Cl.Models.Country.ByIso3(feature.Country).Name;
  127:                                     }
  128:                                     else if (control.Controls[0].GetType().ToString() == "System.Web.UI.WebControls.HyperLink")
  129:                                     {
  130:                                         HyperLink hl = (HyperLink)control.Controls[0];
  131: 
  132:                                         switch (hl.ID)
  133:                                         {
  134:                                             case "countryHyperLink":
  135:                                                 {
  136:                                                     var iso3 = feature.Country;
  137: 
  138:                                                     hl.Text = Ia.Cl.Models.Country.ByIso3(iso3).Name;
  139:                                                     hl.NavigateUrl = Ia.TentPlay.Cl.Model.Business.Trek.Default.CountryUrl(iso3);
  140: 
  141:                                                     break;
  142:                                                 }
  143:                                             default: break;
  144:                                         }
  145:                                     }
  146:                                     else if (control.Controls[0].GetType().ToString() == "System.Web.UI.WebControls.TextBox")
  147:                                     {
  148:                                         TextBox tb = (TextBox)control.Controls[0];
  149: 
  150:                                         switch (tb.ID)
  151:                                         {
  152:                                             // case "staffEmploymentIdTextBox": tb.Text = staff.EmploymentId.ToString(); break;
  153:                                             default: break;
  154:                                         }
  155:                                     }
  156:                                     else if (control.Controls[0].GetType().ToString() == "System.Web.UI.WebControls.DropDownList")
  157:                                     {
  158:                                         DropDownList ddl = (DropDownList)control.Controls[0];
  159: 
  160:                                         switch (ddl.ID)
  161:                                         {
  162:                                             case "staffAdministrativeFrameworkIdDropDownList":
  163:                                                 {
  164:                                                     //ddl.DataSource = Ia.Ngn.Cl.Model.Data.Administration.FrameworkList;
  165:                                                     //ddl.DataValueField = "Id";
  166:                                                     //ddl.DataTextField = "FullyQualifiedArabicName";
  167:                                                     //ddl.DataBind();
  168: 
  169:                                                     //ddl.SelectedIndex = ddl.Items.IndexOf(ddl.Items.FindByValue(staff.AdministrativeFrameworkId.ToString()));
  170:                                                     break;
  171:                                                 }
  172: 
  173:                                             default: break;
  174:                                         }
  175:                                     }
  176:                                     else if (control.Controls[0].GetType().ToString() == "System.Web.UI.WebControls.CheckBox")
  177:                                     {
  178:                                         CheckBox cb = (CheckBox)control.Controls[0];
  179: 
  180:                                         switch (cb.ID)
  181:                                         {
  182:                                             //case "staffIsHeadCheckBox": cb.Checked = staff.IsHead; break;
  183:                                             default: break;
  184:                                         }
  185:                                     }
  186:                                     else if (control.Controls[0].GetType().ToString() == "System.Web.UI.WebControls.Image")
  187:                                     {
  188:                                         Image im = (Image)control.Controls[0];
  189: 
  190:                                         switch (im.ID)
  191:                                         {
  192:                                             case "nddOntPonOltOdfAccessVendorIconImage":
  193:                                                 {
  194:                                                     //vendor = (from o in Ia.Ngn.Cl.Model.Data.NetworkDesignDocument.OntList where o.Id == nddOnt.Id select o.Pon.PonGroup.Olt.Odf.Vendor).SingleOrDefault();
  195:                                                     //vendor = nddOnt?.Pon.PonGroup.Olt.Odf.Vendor;
  196: 
  197:                                                     /*
  198:                                                     if (vendor != null)
  199:                                                     {
  200:                                                         im.ImageUrl = vendor.ImageUrl;
  201:                                                         im.ToolTip = vendor.Name;
  202:                                                     }
  203:                                                     * / 
  204: 
  205:                                                     break;
  206:                                                 }
  207:                                             default: break;
  208:                                         }
  209:                                     }
  210:                                     else
  211:                                     {
  212: 
  213:                                     }
  214:                                 }
  215:                             }
  216:                             catch (Exception)
  217:                             {
  218:                             }
  219:                         }
  220:                     }
  221:                     else if (e.Row.RowType == DataControlRowType.Footer)
  222:                     {
  223:                     }
  224:                     else
  225:                     {
  226:                     }
  227:                 }
  228:                 else
  229:                 {
  230:                     if (e.Row.RowType == DataControlRowType.Header)
  231:                     {
  232:                     }
  233:                     else if (e.Row.RowType == DataControlRowType.DataRow)
  234:                     {
  235:                         foreach (Control control in e.Row.Controls)
  236:                         {
  237:                             try
  238:                             {
  239:                                 if (control.Controls.Count > 0)
  240:                                 {
  241:                                     if (control.Controls[0].GetType().ToString() == "System.Web.UI.WebControls.Label")
  242:                                     {
  243:                                         Label l = (Label)control.Controls[0];
  244: 
  245:                                         switch (l.ID)
  246:                                         {
  247:                                             case "staffUserActivityIsApprovedLabel":
  248:                                                 {
  249:                                                     var b = Convert.ToBoolean(DataBinder.Eval(e.Row.DataItem, "IsApproved"));
  250:                                                     l.Text = Ia.Cl.Models.Default.YesNo(b);
  251:                                                     break;
  252:                                                 }
  253:                                             case "staffUserActivityIsOnlineLabel":
  254:                                                 {
  255:                                                     var b = Convert.ToBoolean(DataBinder.Eval(e.Row.DataItem, "IsOnline"));
  256:                                                     l.Text = Ia.Cl.Models.Default.YesNo(b);
  257:                                                     break;
  258:                                                 }
  259:                                             case "staffUserActivityIsLockedOutLabel":
  260:                                                 {
  261:                                                     var b = Convert.ToBoolean(DataBinder.Eval(e.Row.DataItem, "IsLockedOut"));
  262:                                                     l.Text = Ia.Cl.Models.Default.YesNo(b);
  263:                                                     break;
  264:                                                 }
  265:                                             default: break;
  266:                                         }
  267:                                     }
  268:                                     else if (control.Controls[0].GetType().ToString() == "System.Web.UI.WebControls.HyperLink")
  269:                                     {
  270:                                         HyperLink hl = (HyperLink)control.Controls[0];
  271: 
  272:                                         switch (hl.ID)
  273:                                         {
  274:                                             /*
  275:                                             case "reportServiceHyperLink":
  276:                                                 {
  277:                                                     s = Ia.Ngn.Cl.Model.Business.Service.ServiceName(report.Service, report.ServiceType);
  278:                                                     hl.Text = s;
  279:                                                     hl.NavigateUrl = Ia.Ngn.Cl.Model.Business.Maintenance.Find.Url(s);
  280:                                                     break;
  281:                                                 }
  282:                                             * /
  283:                                             default: break;
  284:                                         }
  285:                                     }
  286:                                     else if (control.Controls[0].GetType().ToString() == "System.Web.UI.WebControls.TextBox")
  287:                                     {
  288:                                         TextBox tb = (TextBox)control.Controls[0];
  289: 
  290:                                         switch (tb.ID)
  291:                                         {
  292:                                             //case "staffEmploymentIdTextBox": tb.Text = staff.EmploymentId.ToString(); break;
  293:                                             default: break;
  294:                                         }
  295:                                     }
  296:                                     else if (control.Controls[0].GetType().ToString() == "System.Web.UI.WebControls.DropDownList")
  297:                                     {
  298:                                         DropDownList ddl = (DropDownList)control.Controls[0];
  299: 
  300:                                         switch (ddl.ID)
  301:                                         {
  302:                                             /*
  303:                                             case "staffAdministrativeFrameworkIdDropDownList":
  304:                                                 {
  305:                                                     ddl.DataSource = Ia.Ngn.Cl.Model.Data.Administration.FrameworkList;
  306:                                                     ddl.DataValueField = "Id";
  307:                                                     ddl.DataTextField = "FullyQualifiedArabicName";
  308:                                                     ddl.DataBind();
  309: 
  310:                                                     ddl.SelectedIndex = ddl.Items.IndexOf(ddl.Items.FindByValue(staff.AdministrativeFrameworkId.ToString()));
  311:                                                     break;
  312:                                                 }
  313:                                             * /
  314: 
  315:                                             default: break;
  316:                                         }
  317:                                     }
  318:                                     else if (control.Controls[0].GetType().ToString() == "System.Web.UI.WebControls.CheckBox")
  319:                                     {
  320:                                         CheckBox cb = (CheckBox)control.Controls[0];
  321: 
  322:                                         switch (cb.ID)
  323:                                         {
  324:                                             //case "staffIsHeadCheckBox": cb.Checked = staff.IsHead; break;
  325:                                             default: break;
  326:                                         }
  327:                                     }
  328:                                     else if (control.Controls[0].GetType().ToString() == "System.Web.UI.WebControls.Image")
  329:                                     {
  330:                                         Image im = (Image)control.Controls[0];
  331: 
  332:                                         switch (im.ID)
  333:                                         {
  334:                                             /*
  335:                                             case "nddOntPonOltOdfAccessVendorIconImage":
  336:                                                 {
  337:                                                     //vendor = (from o in Ia.Ngn.Cl.Model.Data.NetworkDesignDocument.OntList where o.Id == nddOnt.Id select o.Pon.PonGroup.Olt.Odf.Vendor).SingleOrDefault();
  338:                                                     vendor = nddOnt?.Pon.PonGroup.Olt.Odf.Vendor;
  339: 
  340:                                                     if (vendor != null)
  341:                                                     {
  342:                                                         im.ImageUrl = vendor.ImageUrl;
  343:                                                         im.ToolTip = vendor.Name;
  344:                                                     }
  345: 
  346:                                                     break;
  347:                                                 }
  348:                                             * /
  349:                                             default: break;
  350:                                         }
  351:                                     }
  352:                                     else
  353:                                     {
  354: 
  355:                                     }
  356:                                 }
  357:                             }
  358:                             catch (Exception)
  359:                             {
  360:                             }
  361:                         }
  362:                     }
  363:                     else if (e.Row.RowType == DataControlRowType.Footer)
  364:                     {
  365:                     }
  366:                     else
  367:                     {
  368:                     }
  369:                 }
  370:             }
  371:             else
  372:             {
  373:             }
  374:         }
  375: 
  376:         ////////////////////////////////////////////////////////////////////////////
  377: 
  378:         /// <summary>
  379:         ///
  380:         /// </summary>
  381:         public static void Repeater_ItemDataBound(System.Web.UI.Page page, object sender, RepeaterItemEventArgs e)
  382:         {
  383:             Ia.TentPlay.Cl.Model.Data.Trek.ApplicationInformation.Country country;
  384:             Ia.TentPlay.Cl.Model.Trek.Feature feature;
  385: 
  386:             ListItemType itemType = e.Item.ItemType;
  387: 
  388:             var senderId = e.Item.Parent.ID;
  389: 
  390:             if (itemType == ListItemType.Item || itemType == ListItemType.AlternatingItem)
  391:             {
  392:                 country = null;
  393:                 feature = null;
  394: 
  395:                 var senderKnown = true;
  396: 
  397:                 switch (senderId)
  398:                 {
  399:                     case "repeater":
  400:                         {
  401:                             country = (e.Item.DataItem as Ia.TentPlay.Cl.Model.Data.Trek.ApplicationInformation.Country);
  402: 
  403:                             break;
  404:                         }
  405:                     default:
  406:                         {
  407:                             senderKnown = false;
  408:                             break;
  409:                         }
  410:                 }
  411: 
  412:                 if (senderKnown)
  413:                 {
  414:                     //country = (Ia.TentPlay.Cl.Model.Data.Trek.ApplicationInformation.Country)e.Item.DataItem;
  415: 
  416:                     for (int i = 0; i < e.Item.Controls.Count; i++)
  417:                     {
  418:                         try
  419:                         {
  420:                             if (e.Item.Controls[i].GetType().ToString() == "System.Web.UI.WebControls.Label")
  421:                             {
  422:                                 Label l = (Label)e.Item.Controls[i];
  423: 
  424:                                 if (l.ID == "applicationNameDictionaryEnglishLabel") l.Text = country.ApplicationNameDictionary["en"];
  425:                                 else if (l.ID == "designationIdLabel") l.Text = feature.Designation.Id;
  426:                                 else if (l.ID == "designationEnLabel") l.Text = Ia.TentPlay.Cl.Model.Data.Trek.FeatureDesignation.ById(feature.Designation.Id).En;
  427:                                 else if (l.ID == "designationArLabel") l.Text = Ia.TentPlay.Cl.Model.Data.Trek.FeatureDesignation.ById(feature.Designation.Id).Ar;
  428:                             }
  429:                             else if (e.Item.Controls[i].GetType().ToString() == "System.Web.UI.WebControls.HyperLink")
  430:                             {
  431:                                 System.Web.UI.WebControls.HyperLink hl = (System.Web.UI.WebControls.HyperLink)e.Item.Controls[i];
  432: 
  433:                                 if (hl.ID == "applicationPageHyperLink")
  434:                                 {
  435:                                     hl.NavigateUrl = Ia.TentPlay.Cl.Model.Business.Trek.Default.CountryUrl(country.Iso3);
  436: 
  437:                                     hl.Text = country.ApplicationNameDictionary["en"];
  438:                                 }
  439:                                 else if (hl.ID == "applicationPageImageHyperLink")
  440:                                 {
  441:                                     hl.NavigateUrl = Ia.TentPlay.Cl.Model.Business.Trek.Default.CountryUrl(country.Iso3);
  442:                                     hl.ImageUrl = country.HiResIconImageUrl;
  443: 
  444:                                     hl.Text = country.ApplicationNameDictionary["en"];
  445:                                 }
  446:                             }
  447:                         }
  448:                         catch { }
  449:                     }
  450:                 }
  451:                 else
  452:                 {
  453:                 }
  454:             }
  455:         }
  456: 
  457:         ////////////////////////////////////////////////////////////////////////////
  458:         ////////////////////////////////////////////////////////////////////////////
  459: 
  460:         /// <summary>
  461:         ///
  462:         /// </summary>
  463:         public static void DropDownList_DataBound(System.Web.UI.Page page, object sender, EventArgs e)
  464:         {
  465:             DropDownList ddl;
  466: 
  467:             ddl = (DropDownList)sender;
  468: 
  469:             foreach (ListItem listItem in ddl.Items)
  470:             {
  471:                 /*
  472:                 kuwaitOfnAreaList = (from k in Ia.Ngn.Cl.Model.Data.Service.KuwaitOfnAreaList where k.SiteList != null && k.SiteList.Any(u => u.Id == int.Parse(listItem.Value)) select k).ToList();
  473: 
  474:                 if (kuwaitOfnAreaList != null && kuwaitOfnAreaList.Count > 0)
  475:                 {
  476:                     kuwaitOfnAreaListString = string.Join(", ", kuwaitOfnAreaList.Select(n => n.ArabicName).ToArray());
  477:                 }
  478:                 else kuwaitOfnAreaListString = null;
  479: 
  480:                 listItem.Text = kuwaitOfnAreaListString;
  481:                 * /
  482:             }
  483:         }
  484: 
  485:         ////////////////////////////////////////////////////////////////////////////
  486:         ////////////////////////////////////////////////////////////////////////////
  487: 
  488:         /// <summary>
  489:         ///
  490:         /// </summary>
  491:         public static void DataList_ItemDataBound(System.Web.UI.Page page, object sender, DataListItemEventArgs e)
  492:         {
  493:             bool senderKnown;
  494:             string senderId;
  495:             DataList dataList;
  496: 
  497:             senderKnown = true;
  498:             dataList = (DataList)sender;
  499:             senderId = dataList.ID;
  500: 
  501:             string accessName;
  502: 
  503:             accessName = null;
  504: 
  505:             switch (senderId)
  506:             {
  507:                 case "accessNameDataList":
  508:                     {
  509:                         //access = (e.Item.DataItem as Ia.Ngn.Cl.Model.Access);
  510:                         accessName = (e.Item.DataItem as string);
  511:                         break;
  512:                     }
  513:                 default:
  514:                     senderKnown = false;
  515:                     break;
  516:             }
  517: 
  518:             senderKnown = true;
  519: 
  520:             if (senderKnown)
  521:             {
  522:                 if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem)
  523:                 {
  524:                     //CheckBox chk = e.Item.FindControl("AApBlue") as CheckBox;
  525:                     //Label lbl = e.Item.FindControl("Label1") as Label;
  526: 
  527:                     //chk.Checked = (lbl.Text == "Y") ? true : false;
  528: 
  529:                     HyperLink hl = e.Item.FindControl("accessNameHyperLink") as HyperLink;
  530: 
  531:                     //hl.Text = accessName;
  532:                     //hl.NavigateUrl = Ia.Ngn.Cl.Model.Business.Maintenance.Find.Url(accessName);
  533:                 }
  534: 
  535:                 //foreach (DataListItem dataListItem in dataList.Items)
  536:                 // {
  537:                 foreach (Control control in dataList.Controls) // dataListItem.Controls)
  538:                 {
  539:                     try
  540:                     {
  541:                         if (control is Label)
  542:                         {
  543:                             // CheckBox cb = (CheckBox)control.Controls[0];
  544:                             //Label l = (Label)control;
  545: 
  546:                             //switch (l.ID)
  547:                             //{
  548:                             /*
  549:                             case "accessAreaLabel": l.Text = (from kna in Ia.Ngn.Cl.Model.Data.Service.KuwaitNgnAreaList where kna.Id == accessName.AreaId select kna.ArabicName).SingleOrDefault(); break;
  550:                             case "accessOltLabel": l.Text = (from o in Ia.Ngn.Cl.Model.Data.NetworkDesignDocument.OltList where o.Id == accessName.Olt select o.AmsName).SingleOrDefault(); break;
  551:                             case "accessBlockLabel": l.Text = accessName.Block.ToString(); break;
  552:                             case "accessStreetLabel": l.Text = accessName.Street; break;
  553:                             case "accessPremisesOldLabel": l.Text = accessName.PremisesOld; break;
  554:                             case "accessPremisesNewLabel": l.Text = accessName.PremisesNew; break;
  555:                             case "accessPaciLabel": l.Text = accessName.Paci; break;
  556:                             case "accessNoteLabel": l.Text = accessName.Note; break;
  557:                             case "accessStaffNameLabel": l.Text = (from _s in Ia.Ngn.Cl.Model.Data.Staff.List where _s.UserId == accessName.UserId select _s.FirstName).SingleOrDefault(); break;
  558:                             * /    /*
  559:                             case "accessOntFamilyTypeCapacityLabel":
  560:                                 {
  561:                                     // temp: later quickly find vendor from accessId
  562:                                     try
  563:                                     {
  564:                                         if (access.Onts != null && access.Onts.Count > 0)
  565:                                         {
  566:                                             l.Text = Ia.Ngn.Cl.Model.Data.Nokia.Ont.FamilyTypeFromId(access.Onts.FirstOrDefault().FamilyTypeId);
  567: 
  568:                                             l.Text += " (" + Ia.Ngn.Cl.Model.Business.Nokia.Ams.PossibleNumberOfTdForOntFamilyType(access.Onts.FirstOrDefault().FamilyTypeId) + ")";
  569:                                         }
  570:                                         else l.Text = string.Empty;
  571:                                     }
  572:                                     catch (Exception)// ex)
  573:                                     {
  574:                                         l.Text = string.Empty;
  575:                                     }
  576: 
  577:                                     break;
  578:                                 }
  579: 
  580:                             case "accessFamilyTypeInAreaBlockLabel": l.Text = (from kna in Ia.Ngn.Cl.Model.Data.Service.KuwaitNgnAreaList where kna.Id == accessFamilyTypeInAreaBlock.AreaId select kna.NameArabicName).SingleOrDefault(); break;
  581:                             * /
  582:                             //}
  583:                         }
  584:                         else if (control is HyperLink) // .GetType().ToString() == "System.Web.UI.WebControls.HyperLink")
  585:                         {
  586:                             HyperLink hl = (HyperLink)control;
  587: 
  588:                             switch (hl.ID)
  589:                             {
  590:                                 case "accessNameHyperLink":
  591:                                     {
  592:                                         //hl.Text = accessName; //.Name;
  593:                                         //hl.NavigateUrl = Ia.Ngn.Cl.Model.Business.Maintenance.Find.Url(accessName); //.Name;
  594:                                         break;
  595:                                     }
  596:                                 default:
  597:                                     {
  598:                                         break;
  599:                                     }
  600:                             }
  601:                         }
  602:                         else
  603:                         {
  604: 
  605:                         }
  606:                     }
  607:                     catch (Exception)
  608:                     {
  609: 
  610:                     }
  611:                 }
  612:                 //}
  613:             }
  614:             else
  615:             {
  616: 
  617:             }
  618:         }
  619:         */
  620:  
  621:         ////////////////////////////////////////////////////////////////////////////
  622:         ////////////////////////////////////////////////////////////////////////////
  623:     }
  624: }