public ActionResult Index() { var teamcoverageUpdate = new UpdateCoverage(2, 15); teamcoverageUpdate.AddAllCoverageFromSpecialistToTeam(); teamcoverageUpdate.RemoveAllCoverageFromSpecialistToTeam(); //teamcoverageUpdate. //RemovingCoverage(); // AddingCoverage(); return View(); }
public ActionResult RemoveMember(MaintenanceTeam team) { if (Request.Params["stid"] == null || Request.Params["pid"] == null) { return RedirectToAction("AddTeamMember"); } int pid = Convert.ToInt32(Request.Params["pid"]); int sid = Convert.ToInt32(Request.Params["stid"]); var provider = UserHelper.ProviderPrivateProfileHelper.GetProvider(); var currentspecialist = UnitofWork.MaintenanceTeamAssociationRepository.FirstOrDefault( x => x.MaintenanceProviderId == provider.MaintenanceProviderId && x.SpecialistId == pid && x.TeamId == sid); if (currentspecialist != null) { UnitofWork.MaintenanceTeamAssociationRepository.Delete(currentspecialist); UnitofWork.Save(); } RemoveSpecialistZoneFromProviderTeamZone(Convert.ToInt32(Request.Params["pid"]), Convert.ToInt32(Request.Params["stid"])); var teamcoverageUpdate = new UpdateCoverage(Convert.ToInt32(Request.Params["pid"]), Convert.ToInt32(Request.Params["stid"])); teamcoverageUpdate.RemoveAllCoverageFromSpecialistToTeam(); RemoveSpecialist(Convert.ToInt32(Request.Params["stid"]), Convert.ToInt32(Request.Params["pid"])); JNotify("Your request has been completed.", "/Provider/#team"); return View(); }