public void OpenTestButtonClick(object sender, EventArgs e) { if (CurriculumnTreeView.SelectedNode != null) { var selectedNode = (IdendtityNode)CurriculumnTreeView.SelectedNode; if (selectedNode.Type == NodeType.Theme) { var shifter = new PageShifter(selectedNode.ID); StatisticManager.MarkNotIncludedPages(shifter.NotUsedPages); StatisticManager.MarkUsedPages(shifter.UsedPages); RedirectToController(new OpenTestController { BackUrl = string.Empty, ThemaId = selectedNode.ID, CurriculumnId = ((IdendtityNode)selectedNode.Parent.Parent).ID, StageId = ((IdendtityNode)selectedNode.Parent).ID, PageIndex = 0, PagesIds = shifter.GetRequestParameter() }); } } }