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