Ejemplo n.º 1
0
        private void toolStripButton_Confirmar_Click(object sender, EventArgs e)
        {
            EntregaVeiculoService entregaService = new EntregaVeiculoService();

            if (entregaService.verificaChecklist(textBox_CheckList.Text))
            {
                Reserva reserva = entregaService.buscarReserva(CodigoReserva);
                entregaService.devolucao(reserva);
            }
            else
            {
                MessageBox.Show("Favor Realizar o checklist do veículo");
            }
        }
Ejemplo n.º 2
0
        private void toolStripButton_Confirmar_Click(object sender, EventArgs e)
        {
            EntregaVeiculoService entregaService = new EntregaVeiculoService();
            VeiculoService        veiculoService = new VeiculoService();

            if (entregaService.verificaChecklist(textBox_CheckList.Text))
            {
                Reserva reserva = entregaService.buscarReserva(CodigoReserva);
                Veiculo veiculo = veiculoService.BuscarVeiculo(reserva.CodigoVeiculo);
                if (entregaService.devolucao(reserva, veiculo, dateTimePicker_DataEntrega.Value) == true)
                {
                    MessageBox.Show("Devolução Realizada com sucesso!");
                    ExibirPedido exibePedido = new ExibirPedido();
                    exibirPedido.Close();
                    Close();
                }
            }
            else
            {
                MessageBox.Show("Favor Realizar o checklist do veículo");
            }
        }