public void GoTo(ViewPages viewPages, NameValueCollection parameters) { HttpContext currentContext = HttpContext.Current; string redirectUrl = string.Empty; switch (viewPages) { case ViewPages.Eventos: redirectUrl = "~/ListaEventos.aspx"; break; case ViewPages.EventoDetalles: redirectUrl = "~/Evento.aspx"; break; case ViewPages.Confirmacion: redirectUrl = "~/Confirmacion.aspx"; break; case ViewPages.Error: redirectUrl = "~/Erroaspx"; break; default: throw new ArgumentOutOfRangeException("viewPages"); } currentContext.Response.Redirect(redirectUrl, true); }
/// <summary> /// Set the active view /// </summary> /// <param name="view"></param> public void SetView(ViewPages view) { var currentView = (int)View; _views[(ViewPages)currentView].Deactivate(); View = view; }
public ViewManager(ViewContext viewContext, ViewPages defaultView) { _viewContext = viewContext; View = defaultView; // this does not define the order, ViewPages does _views.Add(ViewPages.ActiveTests, new ActiveTestsView()); _views.Add(ViewPages.Errors, new ErrorsView()); _views.Add(ViewPages.RunStatus, new RunStatusView()); _views.Add(ViewPages.ReportPreview, new ReportPreviewView()); }
public void GoTo(ViewPages viewPages) { GoTo(viewPages, null); }
public void SetView(ViewPages view) { _viewManager?.SetView(view); }