public MenuTecnico(Tecnico tecnico) : base(new FormMenuTecnico()) { this.tecnico = tecnico; Vista.AlterarNome(tecnico.Utilizador.username); Vista.Notificavel = this; Vista.ShowDialog(); }
public RealizarPagamento(Projeto projeto) : base(new FormRealizarPagamento()) { this.projeto = projeto; servicoProjetos = CRUDProjetos.ObterInstancia(); servicoDespacho = CRUDDespacho.ObterInstancia(); servicoPagamento = CRUDPagamento.ObterInstancia(); servicoObterEstados = ObterEstados.ObterInstancia(); despacho = servicoDespacho.LerUltimoDespacho(projeto); despachoMaisRecente = despacho.DespachoIncentivo; bool expirou = ConfirmarData(); totalAPagar(); Vista.AlterarDados(Convert.ToString(aPagar)); Vista.Notificavel = this; if (expirou) { Erro erro = new Erro("A data de pagamento do projeto expirou."); Vista.Hide(); Vista.Close(); } else { Vista.ShowDialog(); } }
/// <inheritdoc /> public PointOfInterest Convert(PointOfInterestDTO value, object state) { var entity = new Vista(); this.Merge(entity, value, state); return(entity); }
private void Gaming_Click(object sender, RoutedEventArgs e) { Uri gaming = new Uri("https://www.pccomponentes.com/consolas-gaming"); Vista.Navigate(gaming); MenuCategorias.IsPaneOpen = false; }
private void Hogar_Click(object sender, RoutedEventArgs e) { Uri hogar = new Uri("https://www.pccomponentes.com/electro-hogar"); Vista.Navigate(hogar); MenuCategorias.IsPaneOpen = false; }
private void Ordenadores_Click(object sender, RoutedEventArgs e) { Uri ordenadores = new Uri("https://www.pccomponentes.com/ordenadores"); Vista.Navigate(ordenadores); MenuCategorias.IsPaneOpen = false; }
private void Smartphones_Click(object sender, RoutedEventArgs e) { Uri smartphones = new Uri("https://www.pccomponentes.com/smartphones-gps"); Vista.Navigate(smartphones); MenuCategorias.IsPaneOpen = false; }
public void AddViewToRol(Role rol) { try { if (rol.Vistas.Any()) { var vistaManager = new VistaManager(); foreach (var v in rol.Vistas) { var vista = new Vista { VistaId = v.VistaId, RoleId = rol.RoleId }; var vistaPorRol = vistaManager.RetrieveByRoleAndView(vista); if (vistaPorRol != null) { throw new BusinessException(403); } else { _crudVista.Create(vista); } } } } catch (Exception ex) { ExceptionManager.GetInstance().Process(ex); } }
/// Botón adelante private void AppBarButton_Click_1(object sender, RoutedEventArgs e) { if (Vista.CanGoForward) { Vista.GoForward(); } }
public Erro(String mensagemErro) : base(new FormDeErro()) { this.mensagemErro = mensagemErro; Vista.AlterarMensagemDeErro(mensagemErro); Vista.Notificavel = this; Vista.ShowDialog(); }
private void cargarProlog() { controlador.PrologClass = new ClassLibraryProlog.PrologMain(); controlador.PrologClass.crearLaberinto(ControladorNuevoJuego.controlador.DimX, ControladorNuevoJuego.controlador.DimY, ControladorNuevoJuego.controlador.Dificultad); Vista.cargar(controlador.PrologClass.Laberinto); setVisible(true); }
private void CuadroBusqueda_QuerySubmitted(AutoSuggestBox sender, AutoSuggestBoxQuerySubmittedEventArgs args) { Uri busqueda = new Uri("https://www.pccomponentes.com/buscar/?query=" + sender.Text); Vista.Navigate(busqueda); CerrarInterfazBusqueda(); }
private void Ocio_Click(object sender, RoutedEventArgs e) { Uri ocio = new Uri("https://www.pccomponentes.com/ocio-y-tiempo-libre"); Vista.Navigate(ocio); MenuCategorias.IsPaneOpen = false; }
//-------------COMO LLEGAR------------- public Vista obtenerComoLlegar() { Vista vista = new Vista(); string connectionString = Configuration["ConnectionStrings:DefaultConnection"]; using (var connection = new SqlConnection(connectionString)) { connection.Open(); string sql = $"EXEC [dbo].[sp_obtenerComoLlegar]"; using (var command = new SqlCommand(sql, connection)) { using (var dataReader = command.ExecuteReader()) { while (dataReader.Read()) { vista.titulo = Convert.ToString(dataReader["titulo"]); vista.descripcion = Convert.ToString(dataReader["descripcion"]); } } } connection.Close(); } return(vista); }
public Vista obtenerHome() { Vista vista = new Vista(); string connectionString = Configuration["ConnectionStrings:DefaultConnection"]; using (var connection = new SqlConnection(connectionString)) { connection.Open(); string sql = $"EXEC [dbo].[sp_obtenerHome]"; using (var command = new SqlCommand(sql, connection)) { using (var dataReader = command.ExecuteReader()) { while (dataReader.Read()) { vista.texto1 = Convert.ToString(dataReader["texto1"]); vista.texto2 = Convert.ToString(dataReader["texto2"]); vista.texto3 = Convert.ToString(dataReader["texto3"]); vista.imagen1 = Convert.ToString(dataReader["imagen1"]); vista.imagen2 = Convert.ToString(dataReader["imagen2"]); vista.imagen3 = Convert.ToString(dataReader["imagen3"]); vista.descripcion1 = Convert.ToString(dataReader["descripcion1"]); vista.descripcion2 = Convert.ToString(dataReader["descripcion2"]); } } } connection.Close(); } return(vista); }
//-------------SOBRE NOSOTROS------------- public Vista obtenerSobreNosotros() { Vista vista = new Vista(); string connectionString = Configuration["ConnectionStrings:DefaultConnection"]; using (var connection = new SqlConnection(connectionString)) { connection.Open(); string sql = $"EXEC [dbo].[sp_obtenerSobreNosotros]"; using (var command = new SqlCommand(sql, connection)) { using (var dataReader = command.ExecuteReader()) { while (dataReader.Read()) { vista.titulo = Convert.ToString(dataReader["titulo"]); vista.descripcion = Convert.ToString(dataReader["descripcion"]); vista.reconocimientos = Convert.ToString(dataReader["reconocimientos"]); vista.alianzas = Convert.ToString(dataReader["alianzas"]); vista.experiencias = Convert.ToString(dataReader["experiencias"]); vista.seguridad = Convert.ToString(dataReader["seguridad"]); } } } connection.Close(); } return(vista); }
//-------------FACILIDADES------------- public Vista obtenerFacilidades() { Vista vista = new Vista(); string connectionString = Configuration["ConnectionStrings:DefaultConnection"]; using (var connection = new SqlConnection(connectionString)) { connection.Open(); string sql = $"EXEC [dbo].[sp_obtenerFacilidades]"; using (var command = new SqlCommand(sql, connection)) { using (var dataReader = command.ExecuteReader()) { while (dataReader.Read()) { vista.equipo = Convert.ToString(dataReader["equipo"]); vista.precios = Convert.ToString(dataReader["precios"]); vista.internet = Convert.ToString(dataReader["internet"]); vista.mirador = Convert.ToString(dataReader["mirador"]); vista.seguridad = Convert.ToString(dataReader["seguridad"]); vista.calendarios = Convert.ToString(dataReader["calendarios"]); } } } connection.Close(); } return(vista); }
public RealizarDespachoListarProjetos() { Vista.Notificavel = this; projetos = servicoProjetos.ProjetosEstado(Enum.GetName(typeof(EstadosProjeto), estado)); listar(); Vista.ShowDialog(); }
// MENUS Y CAPTURA DE TECLAS //---------------------------------------------- public static void Menu(ListaDE lista) { ConsoleKeyInfo tecla; do { Vista.MenuInsertar(lista); tecla = Console.ReadKey(true); switch (tecla.Key.ToString()) { case "D1": MI_T1_ORDENADO(lista); break; case "D2": MI_T2_FRENTE(lista); break; case "D3": MI_T3_ATRAS(lista); break; } } while (tecla.Key != ConsoleKey.Escape); }
public MenuGestor(GestorDeFinanciamento gestor) : base(new FormMenuGestor()) { this.gestor = gestor; Vista.AlterarNome(gestor.Utilizador.username); Vista.Notificavel = this; Vista.ShowDialog(); }
/// Botón atrás private void AppBarButton_Click(object sender, RoutedEventArgs e) { if (Vista.CanGoBack) { Vista.GoBack(); } }
public AlterarDados(Projeto projetoSelecionado) : base(new FormAlterarDados()) { servicoResponsavel = CRUDResponsavel.ObterInstancia(); projeto = projetoSelecionado; Vista.Notificavel = this; Vista.ShowDialog(); }
private void Perifericos_Click(object sender, RoutedEventArgs e) { Uri perifericos = new Uri("https://www.pccomponentes.com/perifericos"); Vista.Navigate(perifericos); MenuCategorias.IsPaneOpen = false; }
public override void Notificar(RealizarDespachoArgs args) { if (verificarArgumentos(args)) { new Erro("Por favor preencha todos os campos necessários"); return; } Despacho despachoRejeitar = new Despacho() { id_projeto = projeto.id, resultado = resultado.ToLower(), data_despacho = DateTime.Now }; int idDespacho = servicoDespacho.CriarDespacho(despachoRejeitar); DespachoIncentivo despachoIncentivo = new DespachoIncentivo() { id_despacho = idDespacho, montante = Convert.ToDouble(args.val1), custo_elegivel = Convert.ToDouble(args.val2), prazo_execucao = Convert.ToDateTime(args.data) }; servicoDespacho.CriarDespachoIncentivo(despachoIncentivo); string estado = servicoObterEstados.ObterEstado(projeto.estado).estado1; string estadoNovo = Utils.EstadoParaString(MaquinaDeEstados.processar(Utils.StringParaEstado(estado), EventosProjeto.despacho_aprovado)); projeto.estado = servicoObterEstados.ObterIdEstado(estadoNovo); servicoProjetos.AtualizarProjeto(projeto); Vista.Hide(); Vista.Close(); }
private void Multimedia_Click(object sender, RoutedEventArgs e) { Uri multimedia = new Uri("https://www.pccomponentes.com/audio-foto-video"); Vista.Navigate(multimedia); MenuCategorias.IsPaneOpen = false; }
private void glControl_KeyPress(object sender, KeyPressEventArgs e) { switch (e.KeyChar) { case (char)27: Application.Exit(); break; case 'g': view_grid = !view_grid; glControl.Refresh(); break; case 'a': view_axis = !view_axis; glControl.Refresh(); break; case 'r': escena = new Escena(); vista = new Vista(); this.CrearEscenaInicial(); glControl.Refresh(); break; default: break; } }
private void Tablets_Click(object sender, RoutedEventArgs e) { Uri tablets = new Uri("https://www.pccomponentes.com/tablets-pc-ebook"); Vista.Navigate(tablets); MenuCategorias.IsPaneOpen = false; }
public MenuComissao(ComissaoDeFinanciamento comissao) : base(new FormMenuComissao()) { this.comissao = comissao; Vista.Notificavel = this; Vista.AlterarNome(comissao.Utilizador.username); Vista.ShowDialog(); }
private void Consumibles_Click(object sender, RoutedEventArgs e) { Uri consumibles = new Uri("https://www.pccomponentes.com/consumibles"); Vista.Navigate(consumibles); MenuCategorias.IsPaneOpen = false; }
public override void Notificar(StringArgs args) { switch (args.texto) { case "apresentarCandidatura": new ApresentarCandidatura(tecnico); break; case "reenquadrarProjeto": new ReenquadrarProjeto(tecnico); break; case "consulta": new ConsultarListarProjetos(tecnico.Utilizador); break; case "logout": Vista.Hide(); Vista.Close(); new Login(); break; default: Console.WriteLine("Algo Correu Mal... Nome de botao errado."); break; } }
private void dibujar() { Color colorPluma; if (rbRectangulo.Checked) { colorPluma = Color.DarkBlue; } else { colorPluma = Color.DarkRed; v = new Vista(panel1, colorPluma); if (rbRectangulo.Checked) v.mostrar_Rectangulo(r); else if (rbCirculo.Checked) v.mostrar_Rectangulo(c); } }
// Update is called once per frame private void Update() { if (Input.GetMouseButtonDown(0)) { if (Physics.Raycast(Camera.main.ScreenPointToRay(Input.mousePosition), out hit) && !EventSystem.current.IsPointerOverGameObject()) { attuale = hit.collider; DatiPersonaggio tmpDati = hit.collider.GetComponent<DatiPersonaggio>(); if (tmpDati != null) { classeEssereSelezionato = hit.collider.GetComponent<DatiPersonaggio>().miaClasse.ToString(); vistaGoblin = hit.collider.GetComponent<Vista>(); } if (precedente != attuale) { if (precedente != null && precedente.transform.FindChild("quadDiSelezione") && precedente.transform.FindChild("quadDiSelezione").gameObject.activeInHierarchy) precedente.transform.FindChild("quadDiSelezione").gameObject.SetActive(false); precedente = attuale; } if (attuale.transform.FindChild("quadDiSelezione")) attuale.transform.FindChild("quadDiSelezione").gameObject.SetActive(true); } } }
private void CambiarVista(Vista vista) { if (vista == Vista.LISTA) { splitContainer1.Panel1Collapsed = false; splitContainer1.Panel2Collapsed = true; this.idUsuario = 0; } else if (vista == Vista.NUEVO) { splitContainer1.Panel1Collapsed = true; splitContainer1.Panel2Collapsed = false; } }
private void CambiarVista(Vista vista) { if (vista == Vista.LISTA) { splitContainer1.Panel1Collapsed = false; splitContainer1.Panel2Collapsed = true; this.idCamion = 0; this.panelCargueMasivo.Visible = false; } else if(vista == Vista.NUEVO) { splitContainer1.Panel1Collapsed = true; splitContainer1.Panel2Collapsed = false; this.panelCargueMasivo.Visible = false; this.ConectarLectora(); } else if (vista == Vista.CARGUE) { this.panelCargueMasivo.Visible = true; this.panelCargueMasivo.Height = 476; } }