public async Task <ActionResult> Add(int credId, string dataSetIndexId, string dataSetId) { ExcludeDirectoryViewModel viewModel = new ExcludeDirectoryViewModel(); ViewBag.dataSetId = dataSetId; ViewBag.credId = credId; ViewBag.dataSetIndexId = dataSetIndexId; await viewModel.dataSetName(Session, dataSetId); viewModel.objDataSetIndexCredExcludeDirPost = new DataSetIndexCredExcludeDirPost(); return(View(viewModel)); }
public async Task <ActionResult> Edit(string id, int credId, string dataSetIndexId, string dataSetId) { ExcludeDirectoryViewModel viewModel = new ExcludeDirectoryViewModel(); ViewBag.dataSetId = dataSetId; ViewBag.credId = credId; ViewBag.dataSetIndexId = dataSetIndexId; ViewBag.id = id; await viewModel.dataSetName(Session, dataSetId); await viewModel.GetExcludeDirectory(Session, id, credId); if (viewModel.errorOccurred == true) { return(Redirect("/ExcludeDirectory/Index?credId=" + credId + "&dataSetIndexId=" + dataSetIndexId + "&dataSetId=" + dataSetId)); } return(View(viewModel)); }
public async Task <ActionResult> Index(string credId, string dataSetIndexId, string dataSetId) { ExcludeDirectoryViewModel viewModel = new ExcludeDirectoryViewModel(); ViewBag.dataSetId = dataSetId; ViewBag.dataSetIndexId = dataSetIndexId; await viewModel.dataSetName(Session, dataSetId); await viewModel.GetAllExcludeDirectory(Session, credId); if (viewModel.errorOccurred) { return(RedirectToAction("Index", "Authenticate")); } else { return(View(viewModel)); } }