public ActionResult RemoveModule(string id) { var nId = long.Parse(id); _moduleService.DeletePermanently(nId); TempData["ModuleSuccessMessage"] = "Operation Successful. Restart Site"; return(RedirectToAction("Index")); }
public ActionResult UninstallModule(string id) { var entity = UpdateModuleStatus(id, NccModule.NccModuleStatus.UnInstalled); var module = GlobalContext.Modules.Where(x => x.ModuleId == entity.ModuleId).FirstOrDefault(); if (module != null) { module.Uninstall(_settingsService, ExecuteQuery); module.ModuleStatus = (int)NccModule.NccModuleStatus.UnInstalled; } if (entity != null) { _moduleService.DeletePermanently(entity.Id); FireEvent(ModuleActivity.Type.Uninstalled, module); TempData["ModuleSuccessMessage"] = "Operation Successful. Restart Site"; } else { TempData["ErrorMessage"] = "Error. Module is not found."; } return(RedirectToAction("Index")); }