public void AcceptInvitation(SpecialistPendingTeamInvitation sti)
 {
     var invitation =
         UnitofWork.SpecialistPendingTeamInvitationRepository.FirstOrDefault(
             x => x.PendingTeamInvitationID == sti.PendingTeamInvitationID);
     var mti = new MaintenanceTeamAssociation
     {
         TeamId = sti.TeamId,
         TeamName = sti.TeamName,
         MaintenanceProviderId = sti.MaintenanceProviderId,
         SpecialistId = sti.SpecialistID
     };
     UnitofWork.MaintenanceTeamAssociationRepository.Add(mti);
     UnitofWork.SpecialistPendingTeamInvitationRepository.Delete(invitation);
     AddSpecialistZoneToProviderTeamZone(sti.MaintenanceProviderId, sti.SpecialistID);
     UnitofWork.Save();
     var teamcoverageUpdate = new UpdateCoverage(sti.MaintenanceProviderId, sti.SpecialistID);
     teamcoverageUpdate.AddAllCoverageFromSpecialistToTeam();
     new JNotfiyScriptQueryHelper().JNotifyConfirmationMessage("Your request has been completed.", "/Specialist/CurrentProvider");
 }
        public ActionResult Index()
        {
            var teamcoverageUpdate = new UpdateCoverage(2, 15);

            teamcoverageUpdate.AddAllCoverageFromSpecialistToTeam();

            teamcoverageUpdate.RemoveAllCoverageFromSpecialistToTeam();

            //teamcoverageUpdate.
            //RemovingCoverage();
               // AddingCoverage();
            return View();
        }
 public void UpdateProviderCoverageMaintenance(int maintenanceProviderId, int specialistId)
 {
     AddSpecialistZoneToProviderTeamZone(maintenanceProviderId, specialistId);
     //Db.SaveChanges();
     var teamcoverageUpdate = new UpdateCoverage(maintenanceProviderId, specialistId);
     teamcoverageUpdate.AddAllCoverageFromSpecialistToTeam();
 }