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

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

Service class for Fixed Telecommunications Network (FTN) UI model.

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