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

Integrated Applications Programming Company

Skip Navigation LinksHome » Code Library » ServiceAddress

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

ServiceAddress Framework class for Next Generation Network (NGN) business model.

   1:  using System.Linq;
   2:   
   3:  namespace Ia.Ngn.Cl.Model.Business
   4:  {
   5:      ////////////////////////////////////////////////////////////////////////////
   6:   
   7:      /// <summary publish="true">
   8:      /// ServiceAddress Framework class for Next Generation Network (NGN) business model.
   9:      /// </summary>
  10:      /// 
  11:      /// <remarks> 
  12:      /// Copyright © 2006-2019 Jasem Y. Al-Shamlan (info@ia.com.kw), Integrated Applications - Kuwait. All Rights Reserved.
  13:      ///
  14:      /// 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
  15:      /// the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
  16:      ///
  17:      /// This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
  18:      /// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
  19:      /// 
  20:      /// You should have received a copy of the GNU General Public License along with this library. If not, see http://www.gnu.org/licenses.
  21:      /// 
  22:      /// Copyright notice: This notice may not be removed or altered from any source distribution.
  23:      /// </remarks> 
  24:      public partial class ServiceAddress
  25:      {
  26:          /// <summary/>
  27:          public ServiceAddress() { }
  28:   
  29:          /// <summary/>
  30:          public string Service { get; set; }
  31:          /// <summary/>
  32:          public int AreaId { get; set; }
  33:          /// <summary/>
  34:          public string Block { get; set; }
  35:          /// <summary/>
  36:          public string Street { get; set; }
  37:          /// <summary/>
  38:          public string Boulevard { get; set; }
  39:          /// <summary/>
  40:          public string PremisesOld { get; set; }
  41:          /// <summary/>
  42:          public string PremisesNew { get; set; }
  43:          /// <summary/>
  44:          public string Paci { get; set; }
  45:   
  46:          /// <summary/>
  47:          public string Address
  48:          {
  49:              get
  50:              {
  51:                  string address;
  52:   
  53:                  if (AreaId != 0)
  54:                  {
  55:                      address = (from kna in Ia.Ngn.Cl.Model.Data.Service.KuwaitNgnAreaList where kna.Id == this.AreaId select kna.Name).SingleOrDefault();
  56:   
  57:                      if (!string.IsNullOrEmpty(this.Block) && this.Block != "0") address += ", block " + this.Block;
  58:                      if (!string.IsNullOrEmpty(this.Street) && this.Street != "0") address += ", street " + this.Street;
  59:                      if (!string.IsNullOrEmpty(this.Boulevard) && this.Boulevard != "0") address += ", boulevard " + this.Boulevard;
  60:                      if (!string.IsNullOrEmpty(this.PremisesOld) && this.PremisesOld != "0") address += ", old premises " + this.PremisesOld;
  61:                      if (!string.IsNullOrEmpty(this.PremisesNew) && this.PremisesNew != "0") address += ", new premises " + this.PremisesNew;
  62:                  }
  63:                  else address = string.Empty;
  64:   
  65:                  return address;
  66:              }
  67:          }
  68:   
  69:          /// <summary/>
  70:          public Ia.Ngn.Cl.Model.Business.Service.KuwaitNgnArea KuwaitNgnArea
  71:          {
  72:              get
  73:              {
  74:                  Ia.Ngn.Cl.Model.Business.Service.KuwaitNgnArea kna;
  75:   
  76:                  if (AreaId != 0)
  77:                  {
  78:                      kna = (from k in Ia.Ngn.Cl.Model.Data.Service.KuwaitNgnAreaList where k.Id == this.AreaId select k).SingleOrDefault();
  79:                  }
  80:                  else kna = null;
  81:   
  82:                  return kna;
  83:              }
  84:          }
  85:   
  86:          ////////////////////////////////////////////////////////////////////////////
  87:      }
  88:   
  89:      ////////////////////////////////////////////////////////////////////////////
  90:      ////////////////////////////////////////////////////////////////////////////
  91:  }