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

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

Service Request Service Entity Framework class for Fixed Telecommunications Network (FTN) entity model.

    1: using System;
    2: using System.Collections.Generic;
    3: using System.ComponentModel.DataAnnotations;
    4: using System.ComponentModel.DataAnnotations.Schema;
    5: using System.Linq;
    6: using System.Threading;
    7: using System.Threading.Tasks;
    8:  
    9: namespace Ia.Ftn.Cl.Models
   10: {
   11:     ////////////////////////////////////////////////////////////////////////////
   12:  
   13:     /// <summary publish="true">
   14:     /// Service Request Service Entity Framework class for Fixed Telecommunications Network (FTN) entity model.
   15:     /// </summary>
   16:     /// 
   17:     /// <remarks> 
   18:     /// Copyright © 2006-2021 Jasem Y. Al-Shamlan (info@ia.com.kw), Integrated Applications - Kuwait. All Rights Reserved.
   19:     /// </remarks> 
   20:     public class ServiceRequestService
   21:     {
   22:         /// <summary/>
   23:         public ServiceRequestService()
   24:         {
   25:         }
   26:  
   27:         /// <summary/>
   28:         [Key, DatabaseGenerated(DatabaseGeneratedOption.None)]
   29:         public string Id { get; set; }
   30:  
   31:         /// <summary/>
   32:         public string Service { get; set; }
   33:  
   34:         /// <summary/>
   35:         public int Serial { get; set; }
   36:  
   37:         /// <summary/>
   38:         public int ServiceType { get; set; }
   39:  
   40:         /// <summary/>
   41:         public int Type { get; set; }
   42:  
   43:         /// <summary/>
   44:         public bool Provisioned { get; set; }
   45:  
   46:         /// <summary/>
   47:         public int AreaCode { get; set; }
   48:  
   49:         /// <summary/>
   50:         public bool CallWaiting { get; set; }
   51:  
   52:         /// <summary/>
   53:         public bool CallForwarding { get; set; }
   54:  
   55:         /// <summary/>
   56:         public bool AlarmCall { get; set; }
   57:  
   58:         /// <summary/>
   59:         public bool InternationalCallingUserControlled { get; set; }
   60:  
   61:         /// <summary/>
   62:         public bool InternationalCalling { get; set; }
   63:  
   64:         /// <summary/>
   65:         public bool CallerId { get; set; }
   66:  
   67:         /// <summary/>
   68:         public bool WakeupCall { get; set; }
   69:  
   70:         /// <summary/>
   71:         public bool ConferenceCall { get; set; }
   72:  
   73:         /// <summary/>
   74:         public bool CallBarring { get; set; }
   75:  
   76:         /// <summary/>
   77:         public bool ServiceSuspension { get; set; }
   78:  
   79:         /// <summary/>
   80:         public int ServiceSuspensionTypeId { get; set; }
   81:  
   82:         /// <summary/>
   83:         public bool AbbriviatedCalling { get; set; }
   84:  
   85:         /// <summary/>
   86:         public bool CallForwardingUnconditional { get; set; }
   87:  
   88:         /// <summary/>
   89:         public bool CallingLineIdentificationRestriction { get; set; }
   90:  
   91:         /// <summary/>
   92:         public bool ConnectedLineIdentificationRestriction { get; set; }
   93:  
   94:         /// <summary/>
   95:         public bool WakeUp { get; set; }
   96:  
   97:         /// <summary/>
   98:         public bool CallForwardingByTime { get; set; }
   99:  
  100:         /// <summary/>
  101:         public bool MutlimediaInformationPresentation { get; set; }
  102:  
  103:         /// <summary/>
  104:         public bool SelectiveOutgoingCallBarring { get; set; }
  105:  
  106:         /// <summary/>
  107:         public bool DialNumberCallOutAllow { get; set; }
  108:  
  109:         /// <summary/>
  110:         public bool DoNotDisturb { get; set; }
  111:  
  112:         /// <summary/>
  113:         public bool OutgoingCallBarring { get; set; }
  114:  
  115:         /// <summary/>
  116:         public bool TemporaryLine { get; set; }
  117:  
  118:         /// <summary/>
  119:         public bool CodecControl { get; set; }
  120:  
  121:         /// <summary/>
  122:         public bool SelectiveIncomingCallBarring { get; set; }
  123:  
  124:         /// <summary/>
  125:         public bool SelectiveCallForwarding { get; set; }
  126:  
  127:         /// <summary/>
  128:         public bool DialNumberCallOutBarring { get; set; }
  129:  
  130:         /// <summary/>
  131:         public bool CallForwardingBasedonBlackList { get; set; }
  132:  
  133:         /// <summary/>
  134:         public bool CallForwardingBusy { get; set; }
  135:  
  136:         /// <summary/>
  137:         public bool CallForwardingNoReply { get; set; }
  138:  
  139:         /// <summary/>
  140:         public bool CallForwardingOffline { get; set; }
  141:  
  142:         /// <summary/>
  143:         public bool CallForwardingOnUserNotReachable { get; set; }
  144:  
  145:         /// <summary/>
  146:         public bool CallForwardingNoReplyinCallWaiting { get; set; }
  147:  
  148:         /// <summary/>
  149:         public bool MultiRinging { get; set; }
  150:  
  151:         /// <summary/>
  152:         public bool ConvergentInterPersonalService { get; set; }
  153:  
  154:         /// <summary/>
  155:         public bool CallForwardingBySequence { get; set; }
  156:  
  157:         /// <summary/>
  158:         public bool UserNumberChange { get; set; }
  159:  
  160:         /// <summary/>
  161:         public bool BlackNumberData { get; set; }
  162:  
  163:         /// <summary/>
  164:         public bool WhiteNumberData { get; set; }
  165:  
  166:         /// <summary/>
  167:         public bool OwedRestriction { get; set; }
  168:  
  169:         /// <summary/>
  170:         public bool Strategy { get; set; }
  171:  
  172:         /// <summary/>
  173:         public bool GreenNumberData { get; set; }
  174:  
  175:         /// <summary/>
  176:         public bool RedNumberData { get; set; }
  177:  
  178:         /// <summary/>
  179:         public bool BarringOfAllOutgoingCalls { get; set; }
  180:  
  181:         /// <summary/>
  182:         public bool BarringOfAllOutgoingInternationalCalls { get; set; }
  183:  
  184:         /// <summary/>
  185:         public bool BarringOfOutgoingInternationalCallsExceptThoseDirectedToTheHomePlmnCountry { get; set; }
  186:  
  187:         /// <summary/>
  188:         public bool BarringOfAllIncomingCalls { get; set; }
  189:  
  190:         /// <summary/>
  191:         public bool BarringOfIncomingCallsWhenRoamingOutsideTheHomePlmnCountry { get; set; }
  192:  
  193:         /// <summary/>
  194:         public bool SpeedDial { get; set; }
  195:  
  196:         /// <summary/>
  197:         public bool GreenCall { get; set; }
  198:  
  199:         /// <summary/>
  200:         public bool SetDataUpgrade { get; set; }
  201:  
  202:         /// <summary/>
  203:         public bool AutoConsole { get; set; }
  204:  
  205:         /// <summary/>
  206:         public bool NightService { get; set; }
  207:  
  208:         /// <summary/>
  209:         public bool BackupNumber { get; set; }
  210:  
  211:         /// <summary/>
  212:         public bool Absence { get; set; }
  213:  
  214:         /// <summary/>
  215:         public bool AuthorizedCodeForStdIdd { get; set; }
  216:  
  217:         /// <summary/>
  218:         public bool Hotline { get; set; }
  219:  
  220:         /// <summary/>
  221:         public bool CetMaliciousCommunicationIdentification { get; set; }
  222:  
  223:         /// <summary/>
  224:         public bool MissCallNotify { get; set; }
  225:  
  226:         /// <summary/>
  227:         public bool SubscriptionStatus { get; set; }
  228:  
  229:         /// <summary/>
  230:         public bool UsbDongleOneKeyService { get; set; }
  231:  
  232:         /// <summary/>
  233:         public bool IRoamingInboundSingleImsiMultiMsisdn { get; set; }
  234:  
  235:         /// <summary/>
  236:         public bool IRoamingOutboundSingleImsiMultiMsisdn { get; set; }
  237:  
  238:         /// <summary/>
  239:         public bool NpaSplit { get; set; }
  240:  
  241:         /// <summary/>
  242:         public bool AllCallForwardingGroup { get; set; }
  243:  
  244:         /// <summary/>
  245:         public bool ConditionalCallForwardingGroup { get; set; }
  246:  
  247:         /// <summary/>
  248:         public bool GeneralOrigIdentificationRestriction { get; set; }
  249:  
  250:         /// <summary/>
  251:         public bool MultimediaOfOrigIdRestriction { get; set; }
  252:  
  253:         /// <summary/>
  254:         public bool TerminatingIdentityRestriction { get; set; }
  255:  
  256:         /// <summary/>
  257:         public bool DistinctiveRing { get; set; }
  258:  
  259:         /// <summary/>
  260:         public bool VisitedNetworkImpu { get; set; }
  261:  
  262:         /// <summary/>
  263:         public bool SeasonalSuspend { get; set; }
  264:  
  265:         /// <summary/>
  266:         public bool NumberInvalidation { get; set; }
  267:  
  268:         /// <summary/>
  269:         public bool IroamingServiceProvision { get; set; }
  270:  
  271:         /// <summary/>
  272:         public bool IptvCallerId { get; set; }
  273:  
  274:         /// <summary/>
  275:         public bool IptvVideoCall { get; set; }
  276:  
  277:         /// <summary/>
  278:         public bool NumberPortability { get; set; }
  279:  
  280:         /// <summary/>
  281:         public bool SecretaryService { get; set; }
  282:  
  283:         /// <summary/>
  284:         public bool SalesBlock { get; set; }
  285:  
  286:         /// <summary/>
  287:         public bool FilterCriteria { get; set; }
  288:  
  289:         /// <summary/>
  290:         public bool CallerInformation { get; set; }
  291:  
  292:         /// <summary/>
  293:         public bool PresenceStatus { get; set; }
  294:  
  295:         /// <summary/>
  296:         public bool OneNumberService { get; set; }
  297:  
  298:         /// <summary/>
  299:         public bool AssociationList { get; set; }
  300:  
  301:         /// <summary/>
  302:         public int Pin { get; set; }
  303:  
  304:         /// <summary/>
  305:         [ForeignKey("Access_Id")]
  306:         public virtual Access Access { get; set; }
  307:  
  308:         /// <summary/>
  309:         public virtual ICollection<ServiceRequest> ServiceRequests { get; set; }
  310:  
  311:         /// <summary/>
  312:         public DateTime LastRequestDateTime { get; set; }
  313:  
  314:         /// <summary/>
  315:         public DateTime Created { get; set; }
  316:  
  317:         /// <summary/>
  318:         public DateTime Updated { get; set; }
  319:  
  320:         /// <summary/>
  321:         [ForeignKey("StaffIdentityUser_Id")]
  322:         public virtual StaffIdentityUser StaffIdentityUser { get; set; }
  323:  
  324:         ////////////////////////////////////////////////////////////////////////////
  325:  
  326:         /// <summary>
  327:         /// 
  328:         /// </summary>
  329:         public static bool operator ==(ServiceRequestService obj1, ServiceRequestService obj2)
  330:         {
  331:             if (ReferenceEquals(obj1, obj2))
  332:             {
  333:                 return true;
  334:             }
  335:  
  336:             if (obj1 is null)
  337:             {
  338:                 return false;
  339:             }
  340:             if (obj2 is null)
  341:             {
  342:                 return false;
  343:             }
  344:  
  345:             return (obj1.Id == obj2.Id &&
  346:             obj1.Service == obj2.Service &&
  347:             obj1.Serial == obj2.Serial &&
  348:             obj1.Provisioned == obj2.Provisioned &&
  349:             obj1.CallWaiting == obj2.CallWaiting &&
  350:             obj1.InternationalCallingUserControlled == obj2.InternationalCallingUserControlled &&
  351:             obj1.CallerId == obj2.CallerId &&
  352:             obj1.CallForwarding == obj2.CallForwarding &&
  353:             obj1.CallBarring == obj2.CallBarring &&
  354:             obj1.ConferenceCall == obj2.ConferenceCall &&
  355:             obj1.AbbriviatedCalling == obj2.AbbriviatedCalling &&
  356:             obj1.InternationalCalling == obj2.InternationalCalling &&
  357:             obj1.AlarmCall == obj2.AlarmCall &&
  358:             obj1.WakeupCall == obj2.WakeupCall &&
  359:             obj1.BarringOfAllOutgoingCalls == obj2.BarringOfAllOutgoingCalls &&
  360:             obj1.BarringOfAllIncomingCalls == obj2.BarringOfAllIncomingCalls);
  361:         }
  362:  
  363:         ////////////////////////////////////////////////////////////////////////////
  364:  
  365:         /// <summary>
  366:         /// 
  367:         /// </summary>
  368:         public static bool operator !=(ServiceRequestService obj1, ServiceRequestService obj2)
  369:         {
  370:             return !(obj1 == obj2);
  371:         }
  372:  
  373:         ////////////////////////////////////////////////////////////////////////////
  374:  
  375:         /// <summary>
  376:         /// 
  377:         /// </summary>
  378:         public bool Equals(ServiceRequestService obj1)
  379:         {
  380:             if (obj1 is null)
  381:             {
  382:                 return false;
  383:             }
  384:             if (ReferenceEquals(this, obj1))
  385:             {
  386:                 return true;
  387:             }
  388:  
  389:             return (obj1.Id == Id &&
  390:             obj1.Service == Service &&
  391:             obj1.Serial == Serial &&
  392:             obj1.Provisioned == Provisioned &&
  393:             obj1.CallWaiting == CallWaiting &&
  394:             obj1.InternationalCallingUserControlled == InternationalCallingUserControlled &&
  395:             obj1.CallerId == CallerId &&
  396:             obj1.CallForwarding == CallForwarding &&
  397:             obj1.CallBarring == CallBarring &&
  398:             obj1.ConferenceCall == ConferenceCall &&
  399:             obj1.AbbriviatedCalling == AbbriviatedCalling &&
  400:             obj1.InternationalCalling == InternationalCalling &&
  401:             obj1.AlarmCall == AlarmCall &&
  402:             obj1.WakeupCall == WakeupCall &&
  403:             obj1.BarringOfAllOutgoingCalls == BarringOfAllOutgoingCalls &&
  404:             obj1.BarringOfAllIncomingCalls == BarringOfAllIncomingCalls);
  405:         }
  406:  
  407:         ////////////////////////////////////////////////////////////////////////////
  408:  
  409:         /// <summary>
  410:         /// 
  411:         /// </summary>
  412:         public override bool Equals(object obj)
  413:         {
  414:             if (obj is null)
  415:             {
  416:                 return false;
  417:             }
  418:             if (ReferenceEquals(this, obj))
  419:             {
  420:                 return true;
  421:             }
  422:  
  423:             return obj.GetType() == GetType() && Equals((ServiceRequestService)obj);
  424:         }
  425:  
  426:         ////////////////////////////////////////////////////////////////////////////
  427:  
  428:         /// <summary>
  429:         /// 
  430:         /// </summary>
  431:         public override int GetHashCode()
  432:         {
  433:             unchecked
  434:             {
  435:                 int hashCode = Id.GetHashCode();
  436:                 hashCode = (hashCode * 397) ^ Service.GetHashCode();
  437:                 hashCode = (hashCode * 397) ^ Serial.GetHashCode();
  438:                 hashCode = (hashCode * 397) ^ Provisioned.GetHashCode();
  439:                 hashCode = (hashCode * 397) ^ CallWaiting.GetHashCode();
  440:                 hashCode = (hashCode * 397) ^ InternationalCallingUserControlled.GetHashCode();
  441:                 hashCode = (hashCode * 397) ^ CallerId.GetHashCode();
  442:                 hashCode = (hashCode * 397) ^ CallForwarding.GetHashCode();
  443:                 hashCode = (hashCode * 397) ^ CallBarring.GetHashCode();
  444:                 hashCode = (hashCode * 397) ^ ConferenceCall.GetHashCode();
  445:                 hashCode = (hashCode * 397) ^ AbbriviatedCalling.GetHashCode();
  446:                 hashCode = (hashCode * 397) ^ InternationalCalling.GetHashCode();
  447:                 hashCode = (hashCode * 397) ^ AlarmCall.GetHashCode();
  448:                 hashCode = (hashCode * 397) ^ WakeupCall.GetHashCode();
  449:                 hashCode = (hashCode * 397) ^ BarringOfAllOutgoingCalls.GetHashCode();
  450:                 hashCode = (hashCode * 397) ^ BarringOfAllIncomingCalls.GetHashCode();
  451:                 return hashCode;
  452:             }
  453:         }
  454:  
  455:         ////////////////////////////////////////////////////////////////////////////
  456:  
  457:         /// <summary>
  458:         ///
  459:         /// </summary>
  460:         public bool Update(ServiceRequestService updatedServiceRequestService)
  461:         {
  462:             // below: this will not update Id, Created
  463:             bool updated;
  464:  
  465:             updated = false;
  466:  
  467:             if (this.Service != updatedServiceRequestService.Service) { this.Service = updatedServiceRequestService.Service; updated = true; }
  468:             if (this.Serial != updatedServiceRequestService.Serial) { this.Serial = updatedServiceRequestService.Serial; updated = true; }
  469:             if (this.ServiceType != updatedServiceRequestService.ServiceType) { this.ServiceType = updatedServiceRequestService.ServiceType; updated = true; }
  470:             if (this.Type != updatedServiceRequestService.Type) { this.Type = updatedServiceRequestService.Type; updated = true; }
  471:             if (this.Provisioned != updatedServiceRequestService.Provisioned) { this.Provisioned = updatedServiceRequestService.Provisioned; updated = true; }
  472:             if (this.AreaCode != updatedServiceRequestService.AreaCode) { this.AreaCode = updatedServiceRequestService.AreaCode; updated = true; }
  473:             if (this.CallWaiting != updatedServiceRequestService.CallWaiting) { this.CallWaiting = updatedServiceRequestService.CallWaiting; updated = true; }
  474:             if (this.CallForwarding != updatedServiceRequestService.CallForwarding) { this.CallForwarding = updatedServiceRequestService.CallForwarding; updated = true; }
  475:  
  476:             if (this.AlarmCall != updatedServiceRequestService.AlarmCall) { this.AlarmCall = updatedServiceRequestService.AlarmCall; updated = true; }
  477:             if (this.WakeupCall != updatedServiceRequestService.WakeupCall) { this.WakeupCall = updatedServiceRequestService.WakeupCall; updated = true; }
  478:  
  479:             if (this.CallBarring != updatedServiceRequestService.CallBarring) { this.CallBarring = updatedServiceRequestService.CallBarring; updated = true; }
  480:             if (this.InternationalCallingUserControlled != updatedServiceRequestService.InternationalCallingUserControlled) { this.InternationalCallingUserControlled = updatedServiceRequestService.InternationalCallingUserControlled; updated = true; }
  481:             if (this.InternationalCalling != updatedServiceRequestService.InternationalCalling) { this.InternationalCalling = updatedServiceRequestService.InternationalCalling; updated = true; }
  482:             if (this.CallerId != updatedServiceRequestService.CallerId) { this.CallerId = updatedServiceRequestService.CallerId; updated = true; }
  483:             if (this.ConferenceCall != updatedServiceRequestService.ConferenceCall) { this.ConferenceCall = updatedServiceRequestService.ConferenceCall; updated = true; }
  484:             if (this.ServiceSuspensionTypeId != updatedServiceRequestService.ServiceSuspensionTypeId) { this.ServiceSuspensionTypeId = updatedServiceRequestService.ServiceSuspensionTypeId; updated = true; }
  485:             if (this.AbbriviatedCalling != updatedServiceRequestService.AbbriviatedCalling) { this.AbbriviatedCalling = updatedServiceRequestService.AbbriviatedCalling; updated = true; }
  486:             if (this.CallForwardingUnconditional != updatedServiceRequestService.CallForwardingUnconditional) { this.CallForwardingUnconditional = updatedServiceRequestService.CallForwardingUnconditional; updated = true; }
  487:             if (this.CallingLineIdentificationRestriction != updatedServiceRequestService.CallingLineIdentificationRestriction) { this.CallingLineIdentificationRestriction = updatedServiceRequestService.CallingLineIdentificationRestriction; updated = true; }
  488:             if (this.ConnectedLineIdentificationRestriction != updatedServiceRequestService.ConnectedLineIdentificationRestriction) { this.ConnectedLineIdentificationRestriction = updatedServiceRequestService.ConnectedLineIdentificationRestriction; updated = true; }
  489:             if (this.WakeUp != updatedServiceRequestService.WakeUp) { this.WakeUp = updatedServiceRequestService.WakeUp; updated = true; }
  490:             if (this.CallForwardingByTime != updatedServiceRequestService.CallForwardingByTime) { this.CallForwardingByTime = updatedServiceRequestService.CallForwardingByTime; updated = true; }
  491:             if (this.MutlimediaInformationPresentation != updatedServiceRequestService.MutlimediaInformationPresentation) { this.MutlimediaInformationPresentation = updatedServiceRequestService.MutlimediaInformationPresentation; updated = true; }
  492:             if (this.SelectiveOutgoingCallBarring != updatedServiceRequestService.SelectiveOutgoingCallBarring) { this.SelectiveOutgoingCallBarring = updatedServiceRequestService.SelectiveOutgoingCallBarring; updated = true; }
  493:             if (this.DialNumberCallOutAllow != updatedServiceRequestService.DialNumberCallOutAllow) { this.DialNumberCallOutAllow = updatedServiceRequestService.DialNumberCallOutAllow; updated = true; }
  494:             if (this.DoNotDisturb != updatedServiceRequestService.DoNotDisturb) { this.DoNotDisturb = updatedServiceRequestService.DoNotDisturb; updated = true; }
  495:             if (this.OutgoingCallBarring != updatedServiceRequestService.OutgoingCallBarring) { this.OutgoingCallBarring = updatedServiceRequestService.OutgoingCallBarring; updated = true; }
  496:             if (this.TemporaryLine != updatedServiceRequestService.TemporaryLine) { this.TemporaryLine = updatedServiceRequestService.TemporaryLine; updated = true; }
  497:             if (this.CodecControl != updatedServiceRequestService.CodecControl) { this.CodecControl = updatedServiceRequestService.CodecControl; updated = true; }
  498:             if (this.SelectiveIncomingCallBarring != updatedServiceRequestService.SelectiveIncomingCallBarring) { this.SelectiveIncomingCallBarring = updatedServiceRequestService.SelectiveIncomingCallBarring; updated = true; }
  499:             if (this.SelectiveCallForwarding != updatedServiceRequestService.SelectiveCallForwarding) { this.SelectiveCallForwarding = updatedServiceRequestService.SelectiveCallForwarding; updated = true; }
  500:             if (this.DialNumberCallOutBarring != updatedServiceRequestService.DialNumberCallOutBarring) { this.DialNumberCallOutBarring = updatedServiceRequestService.DialNumberCallOutBarring; updated = true; }
  501:             if (this.CallForwardingBasedonBlackList != updatedServiceRequestService.CallForwardingBasedonBlackList) { this.CallForwardingBasedonBlackList = updatedServiceRequestService.CallForwardingBasedonBlackList; updated = true; }
  502:             if (this.CallForwardingBusy != updatedServiceRequestService.CallForwardingBusy) { this.CallForwardingBusy = updatedServiceRequestService.CallForwardingBusy; updated = true; }
  503:             if (this.CallForwardingNoReply != updatedServiceRequestService.CallForwardingNoReply) { this.CallForwardingNoReply = updatedServiceRequestService.CallForwardingNoReply; updated = true; }
  504:             if (this.CallForwardingOffline != updatedServiceRequestService.CallForwardingOffline) { this.CallForwardingOffline = updatedServiceRequestService.CallForwardingOffline; updated = true; }
  505:             if (this.CallForwardingOnUserNotReachable != updatedServiceRequestService.CallForwardingOnUserNotReachable) { this.CallForwardingOnUserNotReachable = updatedServiceRequestService.CallForwardingOnUserNotReachable; updated = true; }
  506:             if (this.CallForwardingNoReplyinCallWaiting != updatedServiceRequestService.CallForwardingNoReplyinCallWaiting) { this.CallForwardingNoReplyinCallWaiting = updatedServiceRequestService.CallForwardingNoReplyinCallWaiting; updated = true; }
  507:             if (this.MultiRinging != updatedServiceRequestService.MultiRinging) { this.MultiRinging = updatedServiceRequestService.MultiRinging; updated = true; }
  508:             if (this.ConvergentInterPersonalService != updatedServiceRequestService.ConvergentInterPersonalService) { this.ConvergentInterPersonalService = updatedServiceRequestService.ConvergentInterPersonalService; updated = true; }
  509:             if (this.CallForwardingBySequence != updatedServiceRequestService.CallForwardingBySequence) { this.CallForwardingBySequence = updatedServiceRequestService.CallForwardingBySequence; updated = true; }
  510:             if (this.UserNumberChange != updatedServiceRequestService.UserNumberChange) { this.UserNumberChange = updatedServiceRequestService.UserNumberChange; updated = true; }
  511:             if (this.BlackNumberData != updatedServiceRequestService.BlackNumberData) { this.BlackNumberData = updatedServiceRequestService.BlackNumberData; updated = true; }
  512:             if (this.WhiteNumberData != updatedServiceRequestService.WhiteNumberData) { this.WhiteNumberData = updatedServiceRequestService.WhiteNumberData; updated = true; }
  513:             if (this.OwedRestriction != updatedServiceRequestService.OwedRestriction) { this.OwedRestriction = updatedServiceRequestService.OwedRestriction; updated = true; }
  514:             if (this.Strategy != updatedServiceRequestService.Strategy) { this.Strategy = updatedServiceRequestService.Strategy; updated = true; }
  515:             if (this.GreenNumberData != updatedServiceRequestService.GreenNumberData) { this.GreenNumberData = updatedServiceRequestService.GreenNumberData; updated = true; }
  516:             if (this.RedNumberData != updatedServiceRequestService.RedNumberData) { this.RedNumberData = updatedServiceRequestService.RedNumberData; updated = true; }
  517:             if (this.BarringOfAllOutgoingCalls != updatedServiceRequestService.BarringOfAllOutgoingCalls) { this.BarringOfAllOutgoingCalls = updatedServiceRequestService.BarringOfAllOutgoingCalls; updated = true; }
  518:             if (this.BarringOfAllOutgoingInternationalCalls != updatedServiceRequestService.BarringOfAllOutgoingInternationalCalls) { this.BarringOfAllOutgoingInternationalCalls = updatedServiceRequestService.BarringOfAllOutgoingInternationalCalls; updated = true; }
  519:             if (this.BarringOfOutgoingInternationalCallsExceptThoseDirectedToTheHomePlmnCountry != updatedServiceRequestService.BarringOfOutgoingInternationalCallsExceptThoseDirectedToTheHomePlmnCountry) { this.BarringOfOutgoingInternationalCallsExceptThoseDirectedToTheHomePlmnCountry = updatedServiceRequestService.BarringOfOutgoingInternationalCallsExceptThoseDirectedToTheHomePlmnCountry; updated = true; }
  520:             if (this.BarringOfAllIncomingCalls != updatedServiceRequestService.BarringOfAllIncomingCalls) { this.BarringOfAllIncomingCalls = updatedServiceRequestService.BarringOfAllIncomingCalls; updated = true; }
  521:             if (this.BarringOfIncomingCallsWhenRoamingOutsideTheHomePlmnCountry != updatedServiceRequestService.BarringOfIncomingCallsWhenRoamingOutsideTheHomePlmnCountry) { this.BarringOfIncomingCallsWhenRoamingOutsideTheHomePlmnCountry = updatedServiceRequestService.BarringOfIncomingCallsWhenRoamingOutsideTheHomePlmnCountry; updated = true; }
  522:             if (this.SpeedDial != updatedServiceRequestService.SpeedDial) { this.SpeedDial = updatedServiceRequestService.SpeedDial; updated = true; }
  523:             if (this.GreenCall != updatedServiceRequestService.GreenCall) { this.GreenCall = updatedServiceRequestService.GreenCall; updated = true; }
  524:             if (this.SetDataUpgrade != updatedServiceRequestService.SetDataUpgrade) { this.SetDataUpgrade = updatedServiceRequestService.SetDataUpgrade; updated = true; }
  525:             if (this.AutoConsole != updatedServiceRequestService.AutoConsole) { this.AutoConsole = updatedServiceRequestService.AutoConsole; updated = true; }
  526:             if (this.NightService != updatedServiceRequestService.NightService) { this.NightService = updatedServiceRequestService.NightService; updated = true; }
  527:             if (this.BackupNumber != updatedServiceRequestService.BackupNumber) { this.BackupNumber = updatedServiceRequestService.BackupNumber; updated = true; }
  528:             if (this.Absence != updatedServiceRequestService.Absence) { this.Absence = updatedServiceRequestService.Absence; updated = true; }
  529:             if (this.AuthorizedCodeForStdIdd != updatedServiceRequestService.AuthorizedCodeForStdIdd) { this.AuthorizedCodeForStdIdd = updatedServiceRequestService.AuthorizedCodeForStdIdd; updated = true; }
  530:             if (this.Hotline != updatedServiceRequestService.Hotline) { this.Hotline = updatedServiceRequestService.Hotline; updated = true; }
  531:             if (this.CetMaliciousCommunicationIdentification != updatedServiceRequestService.CetMaliciousCommunicationIdentification) { this.CetMaliciousCommunicationIdentification = updatedServiceRequestService.CetMaliciousCommunicationIdentification; updated = true; }
  532:             if (this.MissCallNotify != updatedServiceRequestService.MissCallNotify) { this.MissCallNotify = updatedServiceRequestService.MissCallNotify; updated = true; }
  533:             if (this.SubscriptionStatus != updatedServiceRequestService.SubscriptionStatus) { this.SubscriptionStatus = updatedServiceRequestService.SubscriptionStatus; updated = true; }
  534:             if (this.UsbDongleOneKeyService != updatedServiceRequestService.UsbDongleOneKeyService) { this.UsbDongleOneKeyService = updatedServiceRequestService.UsbDongleOneKeyService; updated = true; }
  535:             if (this.IRoamingInboundSingleImsiMultiMsisdn != updatedServiceRequestService.IRoamingInboundSingleImsiMultiMsisdn) { this.IRoamingInboundSingleImsiMultiMsisdn = updatedServiceRequestService.IRoamingInboundSingleImsiMultiMsisdn; updated = true; }
  536:             if (this.IRoamingOutboundSingleImsiMultiMsisdn != updatedServiceRequestService.IRoamingOutboundSingleImsiMultiMsisdn) { this.IRoamingOutboundSingleImsiMultiMsisdn = updatedServiceRequestService.IRoamingOutboundSingleImsiMultiMsisdn; updated = true; }
  537:             if (this.NpaSplit != updatedServiceRequestService.NpaSplit) { this.NpaSplit = updatedServiceRequestService.NpaSplit; updated = true; }
  538:             if (this.AllCallForwardingGroup != updatedServiceRequestService.AllCallForwardingGroup) { this.AllCallForwardingGroup = updatedServiceRequestService.AllCallForwardingGroup; updated = true; }
  539:             if (this.ConditionalCallForwardingGroup != updatedServiceRequestService.ConditionalCallForwardingGroup) { this.ConditionalCallForwardingGroup = updatedServiceRequestService.ConditionalCallForwardingGroup; updated = true; }
  540:             if (this.GeneralOrigIdentificationRestriction != updatedServiceRequestService.GeneralOrigIdentificationRestriction) { this.GeneralOrigIdentificationRestriction = updatedServiceRequestService.GeneralOrigIdentificationRestriction; updated = true; }
  541:             if (this.MultimediaOfOrigIdRestriction != updatedServiceRequestService.MultimediaOfOrigIdRestriction) { this.MultimediaOfOrigIdRestriction = updatedServiceRequestService.MultimediaOfOrigIdRestriction; updated = true; }
  542:             if (this.TerminatingIdentityRestriction != updatedServiceRequestService.TerminatingIdentityRestriction) { this.TerminatingIdentityRestriction = updatedServiceRequestService.TerminatingIdentityRestriction; updated = true; }
  543:             if (this.DistinctiveRing != updatedServiceRequestService.DistinctiveRing) { this.DistinctiveRing = updatedServiceRequestService.DistinctiveRing; updated = true; }
  544:             if (this.VisitedNetworkImpu != updatedServiceRequestService.VisitedNetworkImpu) { this.VisitedNetworkImpu = updatedServiceRequestService.VisitedNetworkImpu; updated = true; }
  545:             if (this.SeasonalSuspend != updatedServiceRequestService.SeasonalSuspend) { this.SeasonalSuspend = updatedServiceRequestService.SeasonalSuspend; updated = true; }
  546:             if (this.NumberInvalidation != updatedServiceRequestService.NumberInvalidation) { this.NumberInvalidation = updatedServiceRequestService.NumberInvalidation; updated = true; }
  547:             if (this.IroamingServiceProvision != updatedServiceRequestService.IroamingServiceProvision) { this.IroamingServiceProvision = updatedServiceRequestService.IroamingServiceProvision; updated = true; }
  548:             if (this.IptvCallerId != updatedServiceRequestService.IptvCallerId) { this.IptvCallerId = updatedServiceRequestService.IptvCallerId; updated = true; }
  549:             if (this.IptvVideoCall != updatedServiceRequestService.IptvVideoCall) { this.IptvVideoCall = updatedServiceRequestService.IptvVideoCall; updated = true; }
  550:             if (this.NumberPortability != updatedServiceRequestService.NumberPortability) { this.NumberPortability = updatedServiceRequestService.NumberPortability; updated = true; }
  551:             if (this.SecretaryService != updatedServiceRequestService.SecretaryService) { this.SecretaryService = updatedServiceRequestService.SecretaryService; updated = true; }
  552:             if (this.SalesBlock != updatedServiceRequestService.SalesBlock) { this.SalesBlock = updatedServiceRequestService.SalesBlock; updated = true; }
  553:             if (this.FilterCriteria != updatedServiceRequestService.FilterCriteria) { this.FilterCriteria = updatedServiceRequestService.FilterCriteria; updated = true; }
  554:             if (this.CallerInformation != updatedServiceRequestService.CallerInformation) { this.CallerInformation = updatedServiceRequestService.CallerInformation; updated = true; }
  555:             if (this.PresenceStatus != updatedServiceRequestService.PresenceStatus) { this.PresenceStatus = updatedServiceRequestService.PresenceStatus; updated = true; }
  556:             if (this.OneNumberService != updatedServiceRequestService.OneNumberService) { this.OneNumberService = updatedServiceRequestService.OneNumberService; updated = true; }
  557:             if (this.AssociationList != updatedServiceRequestService.AssociationList) { this.AssociationList = updatedServiceRequestService.AssociationList; updated = true; }
  558:             if (this.Pin != updatedServiceRequestService.Pin) { this.Pin = updatedServiceRequestService.Pin; updated = true; }
  559:  
  560:             // below: ServiceSuspension is updated individually
  561:             // if (this.ServiceSuspension != updatedServiceRequestService.ServiceSuspension) { this.ServiceSuspension = updatedServiceRequestService.ServiceSuspension; updated = true; }
  562:  
  563:             // important: ServiceRequestService.Update() will only update stored.Access if it is null, or (stored.userId == Guid.Empty && update.Id > stored.Id)
  564:             // this is important to enable manual staff update.
  565:             if (this.Access == null && updatedServiceRequestService.Access != null) { this.Access = updatedServiceRequestService.Access; updated = true; }
  566:             else if (this.Access != null && updatedServiceRequestService.Access != null && this.Access.Id != updatedServiceRequestService.Access.Id && string.IsNullOrEmpty(this.StaffIdentityUser.Id) /*&& long.Parse(updatedServiceRequestService.Id) > long.Parse(this.Id)*/) { this.Access = updatedServiceRequestService.Access; updated = true; }
  567:  
  568:             // important: I will not update this.StaffIdentityUser.Id if update.StaffIdentityUser.Id is Guid.Empty so that I don't override staff this.StaffIdentityUser.Id. I need this to be valid for this.Access test above
  569:             if (this.StaffIdentityUser.Id != updatedServiceRequestService.StaffIdentityUser.Id && !string.IsNullOrEmpty(updatedServiceRequestService.StaffIdentityUser.Id)) { this.StaffIdentityUser.Id = updatedServiceRequestService.StaffIdentityUser.Id; updated = true; }
  570:  
  571:             //if (this.ServiceRequests != updatedServiceRequestService.ServiceRequests) { this.ServiceRequests = updatedServiceRequestService.ServiceRequests; updated = true; }
  572:  
  573:             if (this.LastRequestDateTime != updatedServiceRequestService.LastRequestDateTime) { this.LastRequestDateTime = updatedServiceRequestService.LastRequestDateTime; updated = true; }
  574:  
  575:             if (updated) this.Updated = DateTime.UtcNow.AddHours(3);
  576:  
  577:             return updated;
  578:         }
  579:  
  580:         ////////////////////////////////////////////////////////////////////////////
  581:  
  582:         /// <summary>
  583:         /// Copy value from another ServiceRequestService
  584:         /// </summary>
  585:         public void Copy(ServiceRequestService sourceServiceRequestService)
  586:         {
  587:             // below: this will not ...
  588:  
  589:             this.Id = sourceServiceRequestService.Id;
  590:             this.Service = sourceServiceRequestService.Service;
  591:             this.Serial = sourceServiceRequestService.Serial;
  592:             this.ServiceType = sourceServiceRequestService.ServiceType;
  593:             this.Type = sourceServiceRequestService.Type;
  594:             this.Provisioned = sourceServiceRequestService.Provisioned;
  595:             this.AreaCode = sourceServiceRequestService.AreaCode;
  596:  
  597:             this.CallWaiting = sourceServiceRequestService.CallWaiting;
  598:             this.CallForwarding = sourceServiceRequestService.CallForwarding;
  599:  
  600:             this.AlarmCall = sourceServiceRequestService.AlarmCall;
  601:             this.WakeupCall = sourceServiceRequestService.WakeupCall;
  602:  
  603:             this.CallBarring = sourceServiceRequestService.CallBarring;
  604:             this.InternationalCallingUserControlled = sourceServiceRequestService.InternationalCallingUserControlled;
  605:             this.InternationalCalling = sourceServiceRequestService.InternationalCalling;
  606:             this.CallerId = sourceServiceRequestService.CallerId;
  607:             this.ConferenceCall = sourceServiceRequestService.ConferenceCall;
  608:             this.ServiceSuspensionTypeId = sourceServiceRequestService.ServiceSuspensionTypeId;
  609:             this.AbbriviatedCalling = sourceServiceRequestService.AbbriviatedCalling;
  610:             this.CallForwardingUnconditional = sourceServiceRequestService.CallForwardingUnconditional;
  611:             this.CallingLineIdentificationRestriction = sourceServiceRequestService.CallingLineIdentificationRestriction;
  612:             this.ConnectedLineIdentificationRestriction = sourceServiceRequestService.ConnectedLineIdentificationRestriction;
  613:             this.WakeUp = sourceServiceRequestService.WakeUp;
  614:             this.CallForwardingByTime = sourceServiceRequestService.CallForwardingByTime;
  615:             this.MutlimediaInformationPresentation = sourceServiceRequestService.MutlimediaInformationPresentation;
  616:             this.SelectiveOutgoingCallBarring = sourceServiceRequestService.SelectiveOutgoingCallBarring;
  617:             this.DialNumberCallOutAllow = sourceServiceRequestService.DialNumberCallOutAllow;
  618:             this.DoNotDisturb = sourceServiceRequestService.DoNotDisturb;
  619:             this.OutgoingCallBarring = sourceServiceRequestService.OutgoingCallBarring;
  620:             this.TemporaryLine = sourceServiceRequestService.TemporaryLine;
  621:             this.CodecControl = sourceServiceRequestService.CodecControl;
  622:             this.SelectiveIncomingCallBarring = sourceServiceRequestService.SelectiveIncomingCallBarring;
  623:             this.SelectiveCallForwarding = sourceServiceRequestService.SelectiveCallForwarding;
  624:             this.DialNumberCallOutBarring = sourceServiceRequestService.DialNumberCallOutBarring;
  625:             this.CallForwardingBasedonBlackList = sourceServiceRequestService.CallForwardingBasedonBlackList;
  626:             this.CallForwardingBusy = sourceServiceRequestService.CallForwardingBusy;
  627:             this.CallForwardingNoReply = sourceServiceRequestService.CallForwardingNoReply;
  628:             this.CallForwardingOffline = sourceServiceRequestService.CallForwardingOffline;
  629:             this.CallForwardingOnUserNotReachable = sourceServiceRequestService.CallForwardingOnUserNotReachable;
  630:             this.CallForwardingNoReplyinCallWaiting = sourceServiceRequestService.CallForwardingNoReplyinCallWaiting;
  631:             this.MultiRinging = sourceServiceRequestService.MultiRinging;
  632:             this.ConvergentInterPersonalService = sourceServiceRequestService.ConvergentInterPersonalService;
  633:             this.CallForwardingBySequence = sourceServiceRequestService.CallForwardingBySequence;
  634:             this.UserNumberChange = sourceServiceRequestService.UserNumberChange;
  635:             this.BlackNumberData = sourceServiceRequestService.BlackNumberData;
  636:             this.WhiteNumberData = sourceServiceRequestService.WhiteNumberData;
  637:             this.OwedRestriction = sourceServiceRequestService.OwedRestriction;
  638:             this.Strategy = sourceServiceRequestService.Strategy;
  639:             this.GreenNumberData = sourceServiceRequestService.GreenNumberData;
  640:             this.RedNumberData = sourceServiceRequestService.RedNumberData;
  641:             this.BarringOfAllOutgoingCalls = sourceServiceRequestService.BarringOfAllOutgoingCalls;
  642:             this.BarringOfAllOutgoingInternationalCalls = sourceServiceRequestService.BarringOfAllOutgoingInternationalCalls;
  643:             this.BarringOfOutgoingInternationalCallsExceptThoseDirectedToTheHomePlmnCountry = sourceServiceRequestService.BarringOfOutgoingInternationalCallsExceptThoseDirectedToTheHomePlmnCountry;
  644:             this.BarringOfAllIncomingCalls = sourceServiceRequestService.BarringOfAllIncomingCalls;
  645:             this.BarringOfIncomingCallsWhenRoamingOutsideTheHomePlmnCountry = sourceServiceRequestService.BarringOfIncomingCallsWhenRoamingOutsideTheHomePlmnCountry;
  646:             this.SpeedDial = sourceServiceRequestService.SpeedDial;
  647:             this.GreenCall = sourceServiceRequestService.GreenCall;
  648:             this.SetDataUpgrade = sourceServiceRequestService.SetDataUpgrade;
  649:             this.AutoConsole = sourceServiceRequestService.AutoConsole;
  650:             this.NightService = sourceServiceRequestService.NightService;
  651:             this.BackupNumber = sourceServiceRequestService.BackupNumber;
  652:             this.Absence = sourceServiceRequestService.Absence;
  653:             this.AuthorizedCodeForStdIdd = sourceServiceRequestService.AuthorizedCodeForStdIdd;
  654:             this.Hotline = sourceServiceRequestService.Hotline;
  655:             this.CetMaliciousCommunicationIdentification = sourceServiceRequestService.CetMaliciousCommunicationIdentification;
  656:             this.MissCallNotify = sourceServiceRequestService.MissCallNotify;
  657:             this.SubscriptionStatus = sourceServiceRequestService.SubscriptionStatus;
  658:             this.UsbDongleOneKeyService = sourceServiceRequestService.UsbDongleOneKeyService;
  659:             this.IRoamingInboundSingleImsiMultiMsisdn = sourceServiceRequestService.IRoamingInboundSingleImsiMultiMsisdn;
  660:             this.IRoamingOutboundSingleImsiMultiMsisdn = sourceServiceRequestService.IRoamingOutboundSingleImsiMultiMsisdn;
  661:             this.NpaSplit = sourceServiceRequestService.NpaSplit;
  662:             this.AllCallForwardingGroup = sourceServiceRequestService.AllCallForwardingGroup;
  663:             this.ConditionalCallForwardingGroup = sourceServiceRequestService.ConditionalCallForwardingGroup;
  664:             this.GeneralOrigIdentificationRestriction = sourceServiceRequestService.GeneralOrigIdentificationRestriction;
  665:             this.MultimediaOfOrigIdRestriction = sourceServiceRequestService.MultimediaOfOrigIdRestriction;
  666:             this.TerminatingIdentityRestriction = sourceServiceRequestService.TerminatingIdentityRestriction;
  667:             this.DistinctiveRing = sourceServiceRequestService.DistinctiveRing;
  668:             this.VisitedNetworkImpu = sourceServiceRequestService.VisitedNetworkImpu;
  669:             this.SeasonalSuspend = sourceServiceRequestService.SeasonalSuspend;
  670:             this.NumberInvalidation = sourceServiceRequestService.NumberInvalidation;
  671:             this.IroamingServiceProvision = sourceServiceRequestService.IroamingServiceProvision;
  672:             this.IptvCallerId = sourceServiceRequestService.IptvCallerId;
  673:             this.IptvVideoCall = sourceServiceRequestService.IptvVideoCall;
  674:             this.NumberPortability = sourceServiceRequestService.NumberPortability;
  675:             this.SecretaryService = sourceServiceRequestService.SecretaryService;
  676:             this.SalesBlock = sourceServiceRequestService.SalesBlock;
  677:             this.FilterCriteria = sourceServiceRequestService.FilterCriteria;
  678:             this.CallerInformation = sourceServiceRequestService.CallerInformation;
  679:             this.PresenceStatus = sourceServiceRequestService.PresenceStatus;
  680:             this.OneNumberService = sourceServiceRequestService.OneNumberService;
  681:             this.AssociationList = sourceServiceRequestService.AssociationList;
  682:             this.Pin = sourceServiceRequestService.Pin;
  683:  
  684:             this.LastRequestDateTime = sourceServiceRequestService.LastRequestDateTime;
  685:  
  686:             // ServiceSuspection is updated individually using a seperate function
  687:             // this.ServiceSuspension = srs.ServiceSuspension;
  688:  
  689:             this.StaffIdentityUser.Id = sourceServiceRequestService.StaffIdentityUser.Id;
  690:         }
  691:  
  692:         ////////////////////////////////////////////////////////////////////////////
  693:         ////////////////////////////////////////////////////////////////////////////
  694:     }
  695:  
  696:     ////////////////////////////////////////////////////////////////////////////
  697:     ////////////////////////////////////////////////////////////////////////////
  698: }