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

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

ServiceAddress Framework class for Fixed Telecommunications Network (FTN) business model.

    1: using System.Linq;
    2:  
    3: namespace Ia.Ftn.Cl.Models.Business
    4: {
    5:     ////////////////////////////////////////////////////////////////////////////
    6:  
    7:     /// <summary publish="true">
    8:     /// ServiceAddress Framework class for Fixed Telecommunications Network (FTN) 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 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 (this.AreaId != 0)
   54:                 {
   55:                     var kuwaitFtnArea = Ia.Ftn.Cl.Models.Data.Service.KuwaitFtnAreaById(this.AreaId);
   56:  
   57:                     address = kuwaitFtnArea != null ? kuwaitFtnArea.Name : string.Empty;
   58:  
   59:                     if (!string.IsNullOrEmpty(this.Block) && this.Block != "0") address += ", block " + this.Block;
   60:                     if (!string.IsNullOrEmpty(this.Street) && this.Street != "0") address += ", street " + this.Street;
   61:                     if (!string.IsNullOrEmpty(this.Boulevard) && this.Boulevard != "0") address += ", boulevard " + this.Boulevard;
   62:                     if (!string.IsNullOrEmpty(this.PremisesOld) && this.PremisesOld != "0") address += ", old premises " + this.PremisesOld;
   63:                     if (!string.IsNullOrEmpty(this.PremisesNew) && this.PremisesNew != "0") address += ", new premises " + this.PremisesNew;
   64:                 }
   65:                 else address = string.Empty;
   66:  
   67:                 return address;
   68:             }
   69:         }
   70:  
   71:         /// <summary/>
   72:         public Ia.Ftn.Cl.Models.Business.Service.KuwaitFtnArea KuwaitFtnArea
   73:         {
   74:             get
   75:             {
   76:                 Ia.Ftn.Cl.Models.Business.Service.KuwaitFtnArea kuwaitFtnArea;
   77:  
   78:                 if (AreaId != 0)
   79:                 {
   80:                     kuwaitFtnArea = Ia.Ftn.Cl.Models.Data.Service.KuwaitFtnAreaById(this.AreaId);
   81:                 }
   82:                 else kuwaitFtnArea = null;
   83:  
   84:                 return kuwaitFtnArea;
   85:             }
   86:         }
   87:  
   88:         ////////////////////////////////////////////////////////////////////////////
   89:     }
   90:  
   91:     ////////////////////////////////////////////////////////////////////////////
   92:     ////////////////////////////////////////////////////////////////////////////
   93: }