public RedirectToActionResult Delete(SystemRegistration sr) { if (ModelState.IsValid) { mod_reg_repository.DeleteModuleRegistration(sr.Syr_Cst_Code, sr.Syr_Sys_Code, sr.Syr_Ver_Code, string.Empty); sys_reg_repository.DeleteSystemRegistration(sr.Syr_Cst_Code, sr.Syr_Sys_Code, sr.Syr_Ver_Code); } return(RedirectToAction(nameof(ModuleController.Index))); }
public IActionResult ModuleSelection(ModuleSelectionList msl) { for (int i = 0; i < msl.module_list.Count(); i++) { if (msl.selection_list[i] == true) { mod_reg_repository.AddModuleRegistration( new ModuleRegistration { Mor_Cst_Code = msl.srk.Cst_Code, Mor_Sys_Code = msl.srk.Sys_Code, Mor_Ver_Code = msl.srk.Ver_Code, Mor_Mod_Code = msl.module_list[i].Mod_Code }); } else { mod_reg_repository.DeleteModuleRegistration(msl.srk.Cst_Code, msl.srk.Sys_Code, msl.srk.Ver_Code, msl.module_list[i].Mod_Code); } } return(View(nameof(Index), sys_reg_repository.SystemRegistrations.FirstOrDefault(r => r.Syr_Cst_Code == msl.srk.Cst_Code && r.Syr_Sys_Code == msl.srk.Sys_Code && r.Syr_Ver_Code == msl.srk.Ver_Code))); }