public ActionResult Index(MachineAddPage currentPage) { var machinePage = new MachineAddPageViewModel(currentPage) { CategoryList = _groMachineService.GetCategoryListFromXml(), BrandList = _groMachineService.GetBrandListFromXml(), UrlMaskinStarPage = _groMachineService.GetMachineListUrl(HttpContext) }; return(View("~/Views/Machine/MachineAdd/Index.cshtml", machinePage)); }
public async Task <ActionResult> RemoveMachineById(MachineDetailPage currentPage, string machineId) { var result = await _machineRepository.RemoveMachine(machineId); if (result) { var machineListUrl = _groMachineService.GetMachineListUrl(HttpContext); if (!string.IsNullOrEmpty(machineListUrl)) { return(Redirect(machineListUrl)); } return(RedirectToAction("Index", new { node = ContentReference.StartPage })); } TempData["DeleteFailed"] = "True"; return(RedirectToAction("Index", new { node = currentPage.ContentLink, maid = machineId })); }