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