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

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

Service Initial State Entity Framework class for Next Generation Network (NGN) entity model.

    1: using System;
    2: using System.Collections;
    3: using System.Collections.Generic;
    4: using System.Linq;
    5: using System.ComponentModel.DataAnnotations;
    6: using System.ComponentModel.DataAnnotations.Schema;
    7: using System.Data;
    8: using System.Data.Entity;
    9: using EntityFramework.Triggers;
   10:  
   11: namespace Ia.Ngn.Cl.Models
   12: {
   13:     ////////////////////////////////////////////////////////////////////////////
   14:  
   15:     /// <summary publish="true">
   16:     /// Service Initial State Entity Framework class for Next Generation Network (NGN) entity model.
   17:     /// </summary>
   18:     /// 
   19:     /// <remarks> 
   20:     /// Copyright © 2006-2017 Jasem Y. Al-Shamlan (info@ia.com.kw), Integrated Applications - Kuwait. All Rights Reserved.
   21:     ///
   22:     /// 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
   23:     /// the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
   24:     ///
   25:     /// This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
   26:     /// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
   27:     /// 
   28:     /// You should have received a copy of the GNU General Public License along with this library. If not, see http://www.gnu.org/licenses.
   29:     /// 
   30:     /// Copyright notice: This notice may not be removed or altered from any source distribution.
   31:     /// </remarks> 
   32:     public partial class ServiceInitialState : ITriggerable
   33:     {
   34:         /// <summary/>
   35:         public ServiceInitialState()
   36:         {
   37:             this.Triggers().Inserting += entry => { TriggeredInstanceQueue.Enqueue(entry.Entity); };
   38:             this.Triggers().Updating += entry => { TriggeredInstanceQueue.Enqueue(entry.Entity); };
   39:             this.Triggers().Deleting += entry => { TriggeredInstanceQueue.Enqueue(entry.Entity); };
   40:         }
   41:  
   42:         /// <summary/>
   43:         [Key, DatabaseGenerated(DatabaseGeneratedOption.None)]
   44:         public string Id { get; set; }
   45:  
   46:         /// <summary/>
   47:         public string Service { get; set; }
   48:  
   49:         /// <summary/>
   50:         public int ServiceType { get; set; }
   51:  
   52:         /// <summary/>
   53:         public int AreaCode { get; set; }
   54:  
   55:         /// <summary/>
   56:         public bool CallWaiting { get; set; }
   57:  
   58:         /// <summary/>
   59:         public bool CallForwarding { get; set; }
   60:  
   61:         /// <summary/>
   62:         public bool AlarmCall { get; set; }
   63:  
   64:         /// <summary/>
   65:         public bool InternationalCallingUserControlled { get; set; }
   66:  
   67:         /// <summary/>
   68:         public bool InternationalCalling { get; set; }
   69:  
   70:         /// <summary/>
   71:         public bool CallerId { get; set; }
   72:  
   73:         /// <summary/>
   74:         public bool WakeupCall { get; set; }
   75:  
   76:         /// <summary/>
   77:         public bool ConferenceCall { get; set; }
   78:         /// <summary/>
   79:         public bool CallBarring { get; set; }
   80:         /// <summary/>
   81:         public bool ServiceSuspension { get; set; }
   82:  
   83:         /// <summary/>
   84:         public int ServiceSuspensionTypeId { get; set; }
   85:  
   86:         /// <summary/>
   87:         public bool AbbriviatedCalling { get; set; }
   88:  
   89:         /// <summary/>
   90:         public bool CallForwardingUnconditional { get; set; }
   91:  
   92:         /// <summary/>
   93:         public bool CallingLineIdentificationRestriction { get; set; }
   94:  
   95:         /// <summary/>
   96:         public bool ConnectedLineIdentificationRestriction { get; set; }
   97:  
   98:         /// <summary/>
   99:         public bool WakeUp { get; set; }
  100:  
  101:         /// <summary/>
  102:         public bool CallForwardingByTime { get; set; }
  103:  
  104:         /// <summary/>
  105:         public bool MutlimediaInformationPresentation { get; set; }
  106:  
  107:         /// <summary/>
  108:         public bool SelectiveOutgoingCallBarring { get; set; }
  109:  
  110:         /// <summary/>
  111:         public bool DialNumberCallOutAllow { get; set; }
  112:  
  113:         /// <summary/>
  114:         public bool DoNotDisturb { get; set; }
  115:  
  116:         /// <summary/>
  117:         public bool OutgoingCallBarring { get; set; }
  118:  
  119:         /// <summary/>
  120:         public bool TemporaryLine { get; set; }
  121:  
  122:         /// <summary/>
  123:         public bool CodecControl { get; set; }
  124:  
  125:         /// <summary/>
  126:         public bool SelectiveIncomingCallBarring { get; set; }
  127:  
  128:         /// <summary/>
  129:         public bool SelectiveCallForwarding { get; set; }
  130:  
  131:         /// <summary/>
  132:         public bool DialNumberCallOutBarring { get; set; }
  133:  
  134:         /// <summary/>
  135:         public bool CallForwardingBasedonBlackList { get; set; }
  136:  
  137:         /// <summary/>
  138:         public bool CallForwardingBusy { get; set; }
  139:  
  140:         /// <summary/>
  141:         public bool CallForwardingNoReply { get; set; }
  142:  
  143:         /// <summary/>
  144:         public bool CallForwardingOffline { get; set; }
  145:  
  146:         /// <summary/>
  147:         public bool CallForwardingOnUserNotReachable { get; set; }
  148:  
  149:         /// <summary/>
  150:         public bool CallForwardingNoReplyinCallWaiting { get; set; }
  151:  
  152:         /// <summary/>
  153:         public bool MultiRinging { get; set; }
  154:  
  155:         /// <summary/>
  156:         public bool ConvergentInterPersonalService { get; set; }
  157:  
  158:         /// <summary/>
  159:         public bool CallForwardingBySequence { get; set; }
  160:  
  161:         /// <summary/>
  162:         public bool UserNumberChange { get; set; }
  163:  
  164:         /// <summary/>
  165:         public bool BlackNumberData { get; set; }
  166:  
  167:         /// <summary/>
  168:         public bool WhiteNumberData { get; set; }
  169:  
  170:         /// <summary/>
  171:         public bool OwedRestriction { get; set; }
  172:  
  173:         /// <summary/>
  174:         public bool Strategy { get; set; }
  175:  
  176:         /// <summary/>
  177:         public bool GreenNumberData { get; set; }
  178:  
  179:         /// <summary/>
  180:         public bool RedNumberData { get; set; }
  181:  
  182:         /// <summary/>
  183:         public bool BarringOfAllOutgoingCalls { get; set; }
  184:  
  185:         /// <summary/>
  186:         public bool BarringOfAllOutgoingInternationalCalls { get; set; }
  187:  
  188:         /// <summary/>
  189:         public bool BarringOfOutgoingInternationalCallsExceptThoseDirectedToTheHomePlmnCountry { get; set; }
  190:  
  191:         /// <summary/>
  192:         public bool BarringOfAllIncomingCalls { get; set; }
  193:  
  194:         /// <summary/>
  195:         public bool BarringOfIncomingCallsWhenRoamingOutsideTheHomePlmnCountry { get; set; }
  196:  
  197:         /// <summary/>
  198:         public bool SpeedDial { get; set; }
  199:  
  200:         /// <summary/>
  201:         public bool GreenCall { get; set; }
  202:  
  203:         /// <summary/>
  204:         public bool SetDataUpgrade { get; set; }
  205:  
  206:         /// <summary/>
  207:         public bool AutoConsole { get; set; }
  208:  
  209:         /// <summary/>
  210:         public bool NightService { get; set; }
  211:  
  212:         /// <summary/>
  213:         public bool BackupNumber { get; set; }
  214:  
  215:         /// <summary/>
  216:         public bool Absence { get; set; }
  217:  
  218:         /// <summary/>
  219:         public bool AuthorizedCodeForStdIdd { get; set; }
  220:  
  221:         /// <summary/>
  222:         public bool Hotline { get; set; }
  223:  
  224:         /// <summary/>
  225:         public bool CetMaliciousCommunicationIdentification { get; set; }
  226:  
  227:         /// <summary/>
  228:         public bool MissCallNotify { get; set; }
  229:  
  230:         /// <summary/>
  231:         public bool SubscriptionStatus { get; set; }
  232:  
  233:         /// <summary/>
  234:         public bool UsbDongleOneKeyService { get; set; }
  235:  
  236:         /// <summary/>
  237:         public bool IRoamingInboundSingleImsiMultiMsisdn { get; set; }
  238:  
  239:         /// <summary/>
  240:         public bool IRoamingOutboundSingleImsiMultiMsisdn { get; set; }
  241:  
  242:         /// <summary/>
  243:         public bool NpaSplit { get; set; }
  244:  
  245:         /// <summary/>
  246:         public bool AllCallForwardingGroup { get; set; }
  247:  
  248:         /// <summary/>
  249:         public bool ConditionalCallForwardingGroup { get; set; }
  250:  
  251:         /// <summary/>
  252:         public bool GeneralOrigIdentificationRestriction { get; set; }
  253:  
  254:         /// <summary/>
  255:         public bool MultimediaOfOrigIdRestriction { get; set; }
  256:  
  257:         /// <summary/>
  258:         public bool TerminatingIdentityRestriction { get; set; }
  259:  
  260:         /// <summary/>
  261:         public bool DistinctiveRing { get; set; }
  262:  
  263:         /// <summary/>
  264:         public bool VisitedNetworkImpu { get; set; }
  265:  
  266:         /// <summary/>
  267:         public bool SeasonalSuspend { get; set; }
  268:  
  269:         /// <summary/>
  270:         public bool NumberInvalidation { get; set; }
  271:  
  272:         /// <summary/>
  273:         public bool IroamingServiceProvision { get; set; }
  274:  
  275:         /// <summary/>
  276:         public bool IptvCallerId { get; set; }
  277:  
  278:         /// <summary/>
  279:         public bool IptvVideoCall { get; set; }
  280:  
  281:         /// <summary/>
  282:         public bool NumberPortability { get; set; }
  283:  
  284:         /// <summary/>
  285:         public bool SecretaryService { get; set; }
  286:  
  287:         /// <summary/>
  288:         public bool SalesBlock { get; set; }
  289:  
  290:         /// <summary/>
  291:         public bool FilterCriteria { get; set; }
  292:  
  293:         /// <summary/>
  294:         public bool CallerInformation { get; set; }
  295:  
  296:         /// <summary/>
  297:         public bool PresenceStatus { get; set; }
  298:  
  299:         /// <summary/>
  300:         public bool OneNumberService { get; set; }
  301:  
  302:         /// <summary/>
  303:         public bool AssociationList { get; set; }
  304:  
  305:         /// <summary/>
  306:         public int Pin { get; set; }
  307:  
  308:         /// <summary/>
  309:         public virtual Access Access { get; set; }
  310:  
  311:         /// <summary/>
  312:         public virtual ICollection<ServiceRequest> ServiceRequests { get; set; }
  313:  
  314:         /// <summary/>
  315:         public DateTime Created { get; set; }
  316:  
  317:         /// <summary/>
  318:         public DateTime Updated { get; set; }
  319:  
  320:         /// <summary/>
  321:         public System.Guid UserId { get; set; }
  322:  
  323:         /// <summary/>
  324:         [NotMapped]
  325:         public static Queue<ServiceInitialState> TriggeredInstanceQueue = new Queue<ServiceInitialState>();
  326:  
  327:         ////////////////////////////////////////////////////////////////////////////
  328:  
  329:         /// <summary>
  330:         ///
  331:         /// </summary>
  332:         public static string ServiceInitialStateId(string service, int serviceType)
  333:         {
  334:             // below:
  335:             string id;
  336:  
  337:             id = Ia.Ngn.Cl.Models.Business.Service2.ServiceId(service, serviceType);
  338:  
  339:             return id;
  340:         }
  341:  
  342:         ////////////////////////////////////////////////////////////////////////////
  343:  
  344:         /// <summary>
  345:         ///
  346:         /// </summary>
  347:         public bool Update(ServiceInitialState updatedServiceRequestService)
  348:         {
  349:             // below: this will not update Id, Created
  350:             bool updated;
  351:  
  352:             updated = false;
  353:  
  354:             if (this.Service != updatedServiceRequestService.Service) { this.Service = updatedServiceRequestService.Service; updated = true; }
  355:             if (this.ServiceType != updatedServiceRequestService.ServiceType) { this.ServiceType = updatedServiceRequestService.ServiceType; updated = true; }
  356:             if (this.AreaCode != updatedServiceRequestService.AreaCode) { this.AreaCode = updatedServiceRequestService.AreaCode; updated = true; }
  357:             if (this.CallWaiting != updatedServiceRequestService.CallWaiting) { this.CallWaiting = updatedServiceRequestService.CallWaiting; updated = true; }
  358:             if (this.CallForwarding != updatedServiceRequestService.CallForwarding) { this.CallForwarding = updatedServiceRequestService.CallForwarding; updated = true; }
  359:  
  360:             if (this.AlarmCall != updatedServiceRequestService.AlarmCall) { this.AlarmCall = updatedServiceRequestService.AlarmCall; updated = true; }
  361:             if (this.WakeupCall != updatedServiceRequestService.WakeupCall) { this.WakeupCall = updatedServiceRequestService.WakeupCall; updated = true; }
  362:  
  363:             if (this.CallBarring != updatedServiceRequestService.CallBarring) { this.CallBarring = updatedServiceRequestService.CallBarring; updated = true; }
  364:             if (this.InternationalCallingUserControlled != updatedServiceRequestService.InternationalCallingUserControlled) { this.InternationalCallingUserControlled = updatedServiceRequestService.InternationalCallingUserControlled; updated = true; }
  365:             if (this.InternationalCalling != updatedServiceRequestService.InternationalCalling) { this.InternationalCalling = updatedServiceRequestService.InternationalCalling; updated = true; }
  366:             if (this.CallerId != updatedServiceRequestService.CallerId) { this.CallerId = updatedServiceRequestService.CallerId; updated = true; }
  367:             if (this.ConferenceCall != updatedServiceRequestService.ConferenceCall) { this.ConferenceCall = updatedServiceRequestService.ConferenceCall; updated = true; }
  368:             if (this.ServiceSuspensionTypeId != updatedServiceRequestService.ServiceSuspensionTypeId) { this.ServiceSuspensionTypeId = updatedServiceRequestService.ServiceSuspensionTypeId; updated = true; }
  369:             if (this.AbbriviatedCalling != updatedServiceRequestService.AbbriviatedCalling) { this.AbbriviatedCalling = updatedServiceRequestService.AbbriviatedCalling; updated = true; }
  370:             if (this.CallForwardingUnconditional != updatedServiceRequestService.CallForwardingUnconditional) { this.CallForwardingUnconditional = updatedServiceRequestService.CallForwardingUnconditional; updated = true; }
  371:             if (this.CallingLineIdentificationRestriction != updatedServiceRequestService.CallingLineIdentificationRestriction) { this.CallingLineIdentificationRestriction = updatedServiceRequestService.CallingLineIdentificationRestriction; updated = true; }
  372:             if (this.ConnectedLineIdentificationRestriction != updatedServiceRequestService.ConnectedLineIdentificationRestriction) { this.ConnectedLineIdentificationRestriction = updatedServiceRequestService.ConnectedLineIdentificationRestriction; updated = true; }
  373:             if (this.WakeUp != updatedServiceRequestService.WakeUp) { this.WakeUp = updatedServiceRequestService.WakeUp; updated = true; }
  374:             if (this.CallForwardingByTime != updatedServiceRequestService.CallForwardingByTime) { this.CallForwardingByTime = updatedServiceRequestService.CallForwardingByTime; updated = true; }
  375:             if (this.MutlimediaInformationPresentation != updatedServiceRequestService.MutlimediaInformationPresentation) { this.MutlimediaInformationPresentation = updatedServiceRequestService.MutlimediaInformationPresentation; updated = true; }
  376:             if (this.SelectiveOutgoingCallBarring != updatedServiceRequestService.SelectiveOutgoingCallBarring) { this.SelectiveOutgoingCallBarring = updatedServiceRequestService.SelectiveOutgoingCallBarring; updated = true; }
  377:             if (this.DialNumberCallOutAllow != updatedServiceRequestService.DialNumberCallOutAllow) { this.DialNumberCallOutAllow = updatedServiceRequestService.DialNumberCallOutAllow; updated = true; }
  378:             if (this.DoNotDisturb != updatedServiceRequestService.DoNotDisturb) { this.DoNotDisturb = updatedServiceRequestService.DoNotDisturb; updated = true; }
  379:             if (this.OutgoingCallBarring != updatedServiceRequestService.OutgoingCallBarring) { this.OutgoingCallBarring = updatedServiceRequestService.OutgoingCallBarring; updated = true; }
  380:             if (this.TemporaryLine != updatedServiceRequestService.TemporaryLine) { this.TemporaryLine = updatedServiceRequestService.TemporaryLine; updated = true; }
  381:             if (this.CodecControl != updatedServiceRequestService.CodecControl) { this.CodecControl = updatedServiceRequestService.CodecControl; updated = true; }
  382:             if (this.SelectiveIncomingCallBarring != updatedServiceRequestService.SelectiveIncomingCallBarring) { this.SelectiveIncomingCallBarring = updatedServiceRequestService.SelectiveIncomingCallBarring; updated = true; }
  383:             if (this.SelectiveCallForwarding != updatedServiceRequestService.SelectiveCallForwarding) { this.SelectiveCallForwarding = updatedServiceRequestService.SelectiveCallForwarding; updated = true; }
  384:             if (this.DialNumberCallOutBarring != updatedServiceRequestService.DialNumberCallOutBarring) { this.DialNumberCallOutBarring = updatedServiceRequestService.DialNumberCallOutBarring; updated = true; }
  385:             if (this.CallForwardingBasedonBlackList != updatedServiceRequestService.CallForwardingBasedonBlackList) { this.CallForwardingBasedonBlackList = updatedServiceRequestService.CallForwardingBasedonBlackList; updated = true; }
  386:             if (this.CallForwardingBusy != updatedServiceRequestService.CallForwardingBusy) { this.CallForwardingBusy = updatedServiceRequestService.CallForwardingBusy; updated = true; }
  387:             if (this.CallForwardingNoReply != updatedServiceRequestService.CallForwardingNoReply) { this.CallForwardingNoReply = updatedServiceRequestService.CallForwardingNoReply; updated = true; }
  388:             if (this.CallForwardingOffline != updatedServiceRequestService.CallForwardingOffline) { this.CallForwardingOffline = updatedServiceRequestService.CallForwardingOffline; updated = true; }
  389:             if (this.CallForwardingOnUserNotReachable != updatedServiceRequestService.CallForwardingOnUserNotReachable) { this.CallForwardingOnUserNotReachable = updatedServiceRequestService.CallForwardingOnUserNotReachable; updated = true; }
  390:             if (this.CallForwardingNoReplyinCallWaiting != updatedServiceRequestService.CallForwardingNoReplyinCallWaiting) { this.CallForwardingNoReplyinCallWaiting = updatedServiceRequestService.CallForwardingNoReplyinCallWaiting; updated = true; }
  391:             if (this.MultiRinging != updatedServiceRequestService.MultiRinging) { this.MultiRinging = updatedServiceRequestService.MultiRinging; updated = true; }
  392:             if (this.ConvergentInterPersonalService != updatedServiceRequestService.ConvergentInterPersonalService) { this.ConvergentInterPersonalService = updatedServiceRequestService.ConvergentInterPersonalService; updated = true; }
  393:             if (this.CallForwardingBySequence != updatedServiceRequestService.CallForwardingBySequence) { this.CallForwardingBySequence = updatedServiceRequestService.CallForwardingBySequence; updated = true; }
  394:             if (this.UserNumberChange != updatedServiceRequestService.UserNumberChange) { this.UserNumberChange = updatedServiceRequestService.UserNumberChange; updated = true; }
  395:             if (this.BlackNumberData != updatedServiceRequestService.BlackNumberData) { this.BlackNumberData = updatedServiceRequestService.BlackNumberData; updated = true; }
  396:             if (this.WhiteNumberData != updatedServiceRequestService.WhiteNumberData) { this.WhiteNumberData = updatedServiceRequestService.WhiteNumberData; updated = true; }
  397:             if (this.OwedRestriction != updatedServiceRequestService.OwedRestriction) { this.OwedRestriction = updatedServiceRequestService.OwedRestriction; updated = true; }
  398:             if (this.Strategy != updatedServiceRequestService.Strategy) { this.Strategy = updatedServiceRequestService.Strategy; updated = true; }
  399:             if (this.GreenNumberData != updatedServiceRequestService.GreenNumberData) { this.GreenNumberData = updatedServiceRequestService.GreenNumberData; updated = true; }
  400:             if (this.RedNumberData != updatedServiceRequestService.RedNumberData) { this.RedNumberData = updatedServiceRequestService.RedNumberData; updated = true; }
  401:             if (this.BarringOfAllOutgoingCalls != updatedServiceRequestService.BarringOfAllOutgoingCalls) { this.BarringOfAllOutgoingCalls = updatedServiceRequestService.BarringOfAllOutgoingCalls; updated = true; }
  402:             if (this.BarringOfAllOutgoingInternationalCalls != updatedServiceRequestService.BarringOfAllOutgoingInternationalCalls) { this.BarringOfAllOutgoingInternationalCalls = updatedServiceRequestService.BarringOfAllOutgoingInternationalCalls; updated = true; }
  403:             if (this.BarringOfOutgoingInternationalCallsExceptThoseDirectedToTheHomePlmnCountry != updatedServiceRequestService.BarringOfOutgoingInternationalCallsExceptThoseDirectedToTheHomePlmnCountry) { this.BarringOfOutgoingInternationalCallsExceptThoseDirectedToTheHomePlmnCountry = updatedServiceRequestService.BarringOfOutgoingInternationalCallsExceptThoseDirectedToTheHomePlmnCountry; updated = true; }
  404:             if (this.BarringOfAllIncomingCalls != updatedServiceRequestService.BarringOfAllIncomingCalls) { this.BarringOfAllIncomingCalls = updatedServiceRequestService.BarringOfAllIncomingCalls; updated = true; }
  405:             if (this.BarringOfIncomingCallsWhenRoamingOutsideTheHomePlmnCountry != updatedServiceRequestService.BarringOfIncomingCallsWhenRoamingOutsideTheHomePlmnCountry) { this.BarringOfIncomingCallsWhenRoamingOutsideTheHomePlmnCountry = updatedServiceRequestService.BarringOfIncomingCallsWhenRoamingOutsideTheHomePlmnCountry; updated = true; }
  406:             if (this.SpeedDial != updatedServiceRequestService.SpeedDial) { this.SpeedDial = updatedServiceRequestService.SpeedDial; updated = true; }
  407:             if (this.GreenCall != updatedServiceRequestService.GreenCall) { this.GreenCall = updatedServiceRequestService.GreenCall; updated = true; }
  408:             if (this.SetDataUpgrade != updatedServiceRequestService.SetDataUpgrade) { this.SetDataUpgrade = updatedServiceRequestService.SetDataUpgrade; updated = true; }
  409:             if (this.AutoConsole != updatedServiceRequestService.AutoConsole) { this.AutoConsole = updatedServiceRequestService.AutoConsole; updated = true; }
  410:             if (this.NightService != updatedServiceRequestService.NightService) { this.NightService = updatedServiceRequestService.NightService; updated = true; }
  411:             if (this.BackupNumber != updatedServiceRequestService.BackupNumber) { this.BackupNumber = updatedServiceRequestService.BackupNumber; updated = true; }
  412:             if (this.Absence != updatedServiceRequestService.Absence) { this.Absence = updatedServiceRequestService.Absence; updated = true; }
  413:             if (this.AuthorizedCodeForStdIdd != updatedServiceRequestService.AuthorizedCodeForStdIdd) { this.AuthorizedCodeForStdIdd = updatedServiceRequestService.AuthorizedCodeForStdIdd; updated = true; }
  414:             if (this.Hotline != updatedServiceRequestService.Hotline) { this.Hotline = updatedServiceRequestService.Hotline; updated = true; }
  415:             if (this.CetMaliciousCommunicationIdentification != updatedServiceRequestService.CetMaliciousCommunicationIdentification) { this.CetMaliciousCommunicationIdentification = updatedServiceRequestService.CetMaliciousCommunicationIdentification; updated = true; }
  416:             if (this.MissCallNotify != updatedServiceRequestService.MissCallNotify) { this.MissCallNotify = updatedServiceRequestService.MissCallNotify; updated = true; }
  417:             if (this.SubscriptionStatus != updatedServiceRequestService.SubscriptionStatus) { this.SubscriptionStatus = updatedServiceRequestService.SubscriptionStatus; updated = true; }
  418:             if (this.UsbDongleOneKeyService != updatedServiceRequestService.UsbDongleOneKeyService) { this.UsbDongleOneKeyService = updatedServiceRequestService.UsbDongleOneKeyService; updated = true; }
  419:             if (this.IRoamingInboundSingleImsiMultiMsisdn != updatedServiceRequestService.IRoamingInboundSingleImsiMultiMsisdn) { this.IRoamingInboundSingleImsiMultiMsisdn = updatedServiceRequestService.IRoamingInboundSingleImsiMultiMsisdn; updated = true; }
  420:             if (this.IRoamingOutboundSingleImsiMultiMsisdn != updatedServiceRequestService.IRoamingOutboundSingleImsiMultiMsisdn) { this.IRoamingOutboundSingleImsiMultiMsisdn = updatedServiceRequestService.IRoamingOutboundSingleImsiMultiMsisdn; updated = true; }
  421:             if (this.NpaSplit != updatedServiceRequestService.NpaSplit) { this.NpaSplit = updatedServiceRequestService.NpaSplit; updated = true; }
  422:             if (this.AllCallForwardingGroup != updatedServiceRequestService.AllCallForwardingGroup) { this.AllCallForwardingGroup = updatedServiceRequestService.AllCallForwardingGroup; updated = true; }
  423:             if (this.ConditionalCallForwardingGroup != updatedServiceRequestService.ConditionalCallForwardingGroup) { this.ConditionalCallForwardingGroup = updatedServiceRequestService.ConditionalCallForwardingGroup; updated = true; }
  424:             if (this.GeneralOrigIdentificationRestriction != updatedServiceRequestService.GeneralOrigIdentificationRestriction) { this.GeneralOrigIdentificationRestriction = updatedServiceRequestService.GeneralOrigIdentificationRestriction; updated = true; }
  425:             if (this.MultimediaOfOrigIdRestriction != updatedServiceRequestService.MultimediaOfOrigIdRestriction) { this.MultimediaOfOrigIdRestriction = updatedServiceRequestService.MultimediaOfOrigIdRestriction; updated = true; }
  426:             if (this.TerminatingIdentityRestriction != updatedServiceRequestService.TerminatingIdentityRestriction) { this.TerminatingIdentityRestriction = updatedServiceRequestService.TerminatingIdentityRestriction; updated = true; }
  427:             if (this.DistinctiveRing != updatedServiceRequestService.DistinctiveRing) { this.DistinctiveRing = updatedServiceRequestService.DistinctiveRing; updated = true; }
  428:             if (this.VisitedNetworkImpu != updatedServiceRequestService.VisitedNetworkImpu) { this.VisitedNetworkImpu = updatedServiceRequestService.VisitedNetworkImpu; updated = true; }
  429:             if (this.SeasonalSuspend != updatedServiceRequestService.SeasonalSuspend) { this.SeasonalSuspend = updatedServiceRequestService.SeasonalSuspend; updated = true; }
  430:             if (this.NumberInvalidation != updatedServiceRequestService.NumberInvalidation) { this.NumberInvalidation = updatedServiceRequestService.NumberInvalidation; updated = true; }
  431:             if (this.IroamingServiceProvision != updatedServiceRequestService.IroamingServiceProvision) { this.IroamingServiceProvision = updatedServiceRequestService.IroamingServiceProvision; updated = true; }
  432:             if (this.IptvCallerId != updatedServiceRequestService.IptvCallerId) { this.IptvCallerId = updatedServiceRequestService.IptvCallerId; updated = true; }
  433:             if (this.IptvVideoCall != updatedServiceRequestService.IptvVideoCall) { this.IptvVideoCall = updatedServiceRequestService.IptvVideoCall; updated = true; }
  434:             if (this.NumberPortability != updatedServiceRequestService.NumberPortability) { this.NumberPortability = updatedServiceRequestService.NumberPortability; updated = true; }
  435:             if (this.SecretaryService != updatedServiceRequestService.SecretaryService) { this.SecretaryService = updatedServiceRequestService.SecretaryService; updated = true; }
  436:             if (this.SalesBlock != updatedServiceRequestService.SalesBlock) { this.SalesBlock = updatedServiceRequestService.SalesBlock; updated = true; }
  437:             if (this.FilterCriteria != updatedServiceRequestService.FilterCriteria) { this.FilterCriteria = updatedServiceRequestService.FilterCriteria; updated = true; }
  438:             if (this.CallerInformation != updatedServiceRequestService.CallerInformation) { this.CallerInformation = updatedServiceRequestService.CallerInformation; updated = true; }
  439:             if (this.PresenceStatus != updatedServiceRequestService.PresenceStatus) { this.PresenceStatus = updatedServiceRequestService.PresenceStatus; updated = true; }
  440:             if (this.OneNumberService != updatedServiceRequestService.OneNumberService) { this.OneNumberService = updatedServiceRequestService.OneNumberService; updated = true; }
  441:             if (this.AssociationList != updatedServiceRequestService.AssociationList) { this.AssociationList = updatedServiceRequestService.AssociationList; updated = true; }
  442:             if (this.Pin != updatedServiceRequestService.Pin) { this.Pin = updatedServiceRequestService.Pin; updated = true; }
  443:  
  444:             // below: ServiceSuspension is updated individually
  445:             // if (this.ServiceSuspension != updatedServiceRequestService.ServiceSuspension) { this.ServiceSuspension = updatedServiceRequestService.ServiceSuspension; updated = true; }
  446:  
  447:             // important: ServiceInitialState.Update() will only update stored.Access if it is null, or (stored.userId == Guid.Empty && update.Id > stored.Id)
  448:             // this is important to enable manual staff update.
  449:             if (this.Access == null && updatedServiceRequestService.Access != null) { this.Access = updatedServiceRequestService.Access; updated = true; }
  450:             else if (this.Access != null && updatedServiceRequestService.Access != null && this.Access != updatedServiceRequestService.Access && this.UserId == Guid.Empty /*&& long.Parse(updatedServiceRequestService.Id) > long.Parse(this.Id)*/) { this.Access = updatedServiceRequestService.Access; updated = true; }
  451:  
  452:             // important: I will not update this.UserId if update.UserId is Guid.Empty so that I don't override staff this.UserId. I need this to be valid for this.Access test above
  453:             if (this.UserId != updatedServiceRequestService.UserId && updatedServiceRequestService.UserId != Guid.Empty) { this.UserId = updatedServiceRequestService.UserId; updated = true; }
  454:  
  455:             //if (this.ServiceRequests != updatedServiceRequestService.ServiceRequests) { this.ServiceRequests = updatedServiceRequestService.ServiceRequests; updated = true; }
  456:  
  457:             if (updated) this.Updated = DateTime.UtcNow.AddHours(3);
  458:  
  459:             return updated;
  460:         }
  461:  
  462:         ////////////////////////////////////////////////////////////////////////////
  463:         ////////////////////////////////////////////////////////////////////////////
  464:     }
  465:  
  466:     ////////////////////////////////////////////////////////////////////////////
  467:     ////////////////////////////////////////////////////////////////////////////
  468: }