public void GetValidedBorrador() { MainWindowViewModel viewModel = null; Asunto.AsuntoView viewAsunto = null; Asunto.AsuntoNotificacionesView viewAsuntoNotificaciones = null; long idRol = 10; viewModel = this.GetViewModel(); if (idRol != viewModel.Usuario.Rol.IdRol) { viewAsuntoNotificaciones = new Asunto.AsuntoNotificacionesView(); this.GetContentPane().Content = viewAsuntoNotificaciones; viewAsuntoNotificaciones.GetAsunto(viewModel.PantallaInicio, 5); } else { viewAsunto = new Asunto.AsuntoView(); this.GetContentPane().Content = viewAsunto; viewAsunto.GetAsunto(viewModel.PantallaInicio, 5); } }
public void GetMenu(MenuModel model) { MainWindowViewModel viewModel = null; Asunto.AsuntoView viewAsunto = null; switch (model.MenuName) { case "Turnos": PantallaInicioView _PantallaInicioView = new PantallaInicioView(); this.GetContentPane().Content = _PantallaInicioView; break; case "Nuevo Asunto": viewModel = this.GetViewModel(); viewAsunto = new Asunto.AsuntoView(); this.GetContentPane().Content = viewAsunto; viewAsunto.GetAsunto(viewModel.PantallaInicio, 4); viewAsunto.Nuevo(); break; case "Borrador": this.GetValidedBorrador(); break; case "Reportes": Reportes.PantallaReportes reportes = new Reportes.PantallaReportes(); this.GetContentPane().Content = reportes; break; case "Tablero": DashBoard.Tablero2View _TableroView = new DashBoard.Tablero2View(); this.GetContentPane().Content = _TableroView; break; default: break; } }