Professional Applications Programmers/Consultants برمجة واستشارات تطبيقات الإنترنت
Skip Navigation LinksHome » Code Library » Service2

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

Service class for Next Generation Network (NGN) UI model.

   1:  using System;
   2:  using System.Collections;
   3:  using System.Collections.Generic;
   4:  using System.Runtime.Serialization;
   5:  using System.Text;
   6:   
   7:  namespace Ia.Ngn.Cl.Model.Ui
   8:  {
   9:      ////////////////////////////////////////////////////////////////////////////
  10:   
  11:      /// <summary publish="true">
  12:      /// Service class for Next Generation Network (NGN) UI model.
  13:      /// </summary>
  14:      /// 
  15:      /// <remarks> 
  16:      /// Copyright © 2006-2017 Jasem Y. Al-Shamlan (info@ia.com.kw), Internet Applications - Kuwait. All Rights Reserved.
  17:      ///
  18:      /// 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
  19:      /// the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
  20:      ///
  21:      /// This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
  22:      /// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
  23:      /// 
  24:      /// You should have received a copy of the GNU General Public License along with this library. If not, see http://www.gnu.org/licenses.
  25:      /// 
  26:      /// Copyright notice: This notice may not be removed or altered from any source distribution.
  27:      /// </remarks> 
  28:      [DataContract(IsReference = true, Namespace = "kw.com.ia.ngn.api", Name = "apiService")]
  29:      public partial class Service2
  30:      {
  31:          ////////////////////////////////////////////////////////////////////////////
  32:   
  33:          /// <summary>
  34:          ///
  35:          /// </summary>
  36:          public Service2()
  37:          {
  38:          }
  39:   
  40:          ////////////////////////////////////////////////////////////////////////////
  41:   
  42:          /// <summary>
  43:          /// Constructure will take in a Service type object and will copy its values to the new Ui.Service object.
  44:          /// </summary>
  45:          public Service2(Ia.Ngn.Cl.Model.Service2 service)
  46:          {
  47:              this.AbbriviatedCalling = service.AbbriviatedCalling;
  48:              this.AlarmCall = service.AlarmCall;
  49:              this.CallBarring = service.CallBarring;
  50:              this.CallerId = service.CallerId;
  51:              this.CallForwarding = service.CallForwarding;
  52:              this.CallWaiting = service.CallWaiting;
  53:              this.ConferenceCall = service.ConferenceCall;
  54:              this.Created = service.Created;
  55:              this.InternationalCalling = service.InternationalCalling;
  56:              this.InternationalCallingUserControlled = service.InternationalCallingUserControlled;
  57:              this.LineCard = service.LineCard;
  58:              this.Pin = service.Pin;
  59:              this.Service = service.Service;
  60:              this.ServiceSuspension = service.ServiceSuspension;
  61:              this.ServiceTypeName = service.ServiceType.ToString();
  62:              this.Updated = service.Updated;
  63:          }
  64:   
  65:          ////////////////////////////////////////////////////////////////////////////
  66:   
  67:          /// <summary>
  68:          ///
  69:          /// </summary>
  70:          [DataMember(Name = "id")]
  71:          public string Id { get; set; }
  72:   
  73:          ////////////////////////////////////////////////////////////////////////////
  74:   
  75:          /// <summary>
  76:          ///
  77:          /// </summary>
  78:          [DataMember(Name = "service")]
  79:          public string Service { get; set; }
  80:   
  81:          ////////////////////////////////////////////////////////////////////////////
  82:   
  83:          /// <summary>
  84:          ///
  85:          /// </summary>
  86:          [DataMember(Name = "serviceType")]
  87:          public int ServiceType { get; set; }
  88:   
  89:          ////////////////////////////////////////////////////////////////////////////
  90:   
  91:          /// <summary>
  92:          ///
  93:          /// </summary>
  94:          [DataMember(Name = "serviceTypeName")]
  95:          public string ServiceTypeName { get; set; }
  96:   
  97:          ////////////////////////////////////////////////////////////////////////////
  98:   
  99:          /// <summary>
 100:          ///
 101:          /// </summary>
 102:          [DataMember(Name = "callWaiting")]
 103:          public bool CallWaiting { get; set; }
 104:   
 105:          ////////////////////////////////////////////////////////////////////////////
 106:   
 107:          /// <summary>
 108:          ///
 109:          /// </summary>
 110:          [DataMember(Name = "callForwarding")]
 111:          public bool CallForwarding { get; set; }
 112:   
 113:          ////////////////////////////////////////////////////////////////////////////
 114:   
 115:          /// <summary>
 116:          ///
 117:          /// </summary>
 118:          [DataMember(Name = "alarmCall")]
 119:          public bool AlarmCall { get; set; }
 120:   
 121:          ////////////////////////////////////////////////////////////////////////////
 122:   
 123:          /// <summary>
 124:          ///
 125:          /// </summary>
 126:          [DataMember(Name = "internationalCallingUserControlled")]
 127:          public bool InternationalCallingUserControlled { get; set; }
 128:   
 129:          ////////////////////////////////////////////////////////////////////////////
 130:   
 131:          /// <summary>
 132:          ///
 133:          /// </summary>
 134:          [DataMember(Name = "internationalCalling")]
 135:          public bool InternationalCalling { get; set; }
 136:   
 137:          ////////////////////////////////////////////////////////////////////////////
 138:   
 139:          /// <summary>
 140:          ///
 141:          /// </summary>
 142:          [DataMember(Name = "callerId")]
 143:          public bool CallerId { get; set; }
 144:   
 145:          ////////////////////////////////////////////////////////////////////////////
 146:   
 147:          /// <summary>
 148:          ///
 149:          /// </summary>
 150:          [DataMember(Name = "conferenceCall")]
 151:          public bool ConferenceCall { get; set; }
 152:   
 153:          ////////////////////////////////////////////////////////////////////////////
 154:   
 155:          /// <summary>
 156:          ///
 157:          /// </summary>
 158:          [DataMember(Name = "callBarring")]
 159:          public bool CallBarring { get; set; }
 160:   
 161:          ////////////////////////////////////////////////////////////////////////////
 162:   
 163:          /// <summary>
 164:          ///
 165:          /// </summary>
 166:          [DataMember(Name = "serviceSuspension")]
 167:          public bool ServiceSuspension { get; set; }
 168:   
 169:          ////////////////////////////////////////////////////////////////////////////
 170:   
 171:          /// <summary>
 172:          ///
 173:          /// </summary>
 174:          [DataMember(Name = "abbriviatedCalling")]
 175:          public bool AbbriviatedCalling { get; set; }
 176:   
 177:          ////////////////////////////////////////////////////////////////////////////
 178:   
 179:          /// <summary>
 180:          ///
 181:          /// </summary>
 182:          [DataMember(Name = "pin")]
 183:          public int Pin { get; set; }
 184:   
 185:          ////////////////////////////////////////////////////////////////////////////
 186:   
 187:          /// <summary>
 188:          ///
 189:          /// </summary>
 190:          [DataMember(Name = "lineCard")]
 191:          public string LineCard { get; set; }
 192:   
 193:          ////////////////////////////////////////////////////////////////////////////
 194:   
 195:          /// <summary>
 196:          ///
 197:          /// </summary>
 198:          [DataMember(Name = "accessId")]
 199:          public string AccessId { get; set; }
 200:   
 201:          ////////////////////////////////////////////////////////////////////////////
 202:   
 203:          /// <summary>
 204:          ///
 205:          /// </summary>
 206:          [DataMember(Name = "accessName")]
 207:          public string AccessName {
 208:              get
 209:              {
 210:                  return Ia.Ngn.Cl.Model.Business.Access.Name(this.AccessId);
 211:              }
 212:          }
 213:   
 214:          ////////////////////////////////////////////////////////////////////////////
 215:   
 216:          /// <summary>
 217:          ///
 218:          /// </summary>
 219:          [DataMember(Name = "created")]
 220:          public DateTime Created { get; set; }
 221:   
 222:          ////////////////////////////////////////////////////////////////////////////
 223:   
 224:          /// <summary>
 225:          ///
 226:          /// </summary>
 227:          [DataMember(Name = "updated")]
 228:          public DateTime Updated { get; set; }
 229:   
 230:          ////////////////////////////////////////////////////////////////////////////
 231:          ////////////////////////////////////////////////////////////////////////////
 232:   
 233:          /// <summary>
 234:          ///
 235:          /// </summary>
 236:          public string ToSimpleTextString()
 237:          {
 238:              StringBuilder sb;
 239:   
 240:              sb = new StringBuilder();
 241:   
 242:              sb.AppendLine("Service: " + this.Service);
 243:              sb.AppendLine("AccessName: " + this.AccessName);
 244:              sb.AppendLine("CallerId: " + Ia.Cl.Model.Default.YesNoText(this.CallerId));
 245:              sb.AppendLine("CallForwarding: " + Ia.Cl.Model.Default.YesNoText(this.CallForwarding));
 246:              sb.AppendLine("CallWaiting: " + Ia.Cl.Model.Default.YesNoText(this.CallWaiting));
 247:              sb.AppendLine("ConferenceCall: " + Ia.Cl.Model.Default.YesNoText(this.ConferenceCall));
 248:              sb.AppendLine("AbbriviatedCalling: " + Ia.Cl.Model.Default.YesNoText(this.AbbriviatedCalling));
 249:              sb.AppendLine("AlarmCall: " + Ia.Cl.Model.Default.YesNoText(this.AlarmCall));
 250:              sb.AppendLine("CallBarring: " + Ia.Cl.Model.Default.YesNoText(this.CallBarring));
 251:              sb.AppendLine("InternationalCalling: " + Ia.Cl.Model.Default.YesNoText(this.InternationalCalling));
 252:              sb.AppendLine("InternationalCallingUserControlled: " + Ia.Cl.Model.Default.YesNoText(this.InternationalCallingUserControlled));
 253:              sb.AppendLine("ServiceSuspension: " + Ia.Cl.Model.Default.YesNoText(this.ServiceSuspension));
 254:   
 255:              return sb.ToString();
 256:          }
 257:   
 258:          ////////////////////////////////////////////////////////////////////////////
 259:          ////////////////////////////////////////////////////////////////////////////
 260:      }
 261:   
 262:      ////////////////////////////////////////////////////////////////////////////
 263:      ////////////////////////////////////////////////////////////////////////////
 264:  }