Beispiel #1
0
        private void cadastroLocacao_Load(object sender, EventArgs e)
        {
            Locacao dados = new Locacao();

            dados.preencherComboBoxCodigoCliente(cmbClienteLocacao);
            dados.preencherComboBoxCodigoVeiculo(cmbCarroLocacao);
            dados.atualizarGridLocacao(gridTabelaLocacao);
        }
Beispiel #2
0
        private void btn_excluir_locacao_Click(object sender, EventArgs e)
        {
            Locacao dados = new Locacao();

            dados.excluirLocacao(txtCodigoLocacao.Text.ToUpper(), gridTabelaLocacao);
            txtCodigoLocacao.Text           = "";
            txtRetiradaLocacao.Text         = "";
            txtDevolucaoLocacao.Text        = "";
            txtValorLocacao.Text            = "";
            txtObsLocacao.Text              = "";
            cmbCarroLocacao.SelectedIndex   = -1;
            txtModeloLocacao.Text           = "";
            txtAnoLocacao.Text              = "";
            txtObsCarroLocacao.Text         = "";
            cmbClienteLocacao.SelectedIndex = -1;
            txtNomeLocacao.Text             = "";
        }
Beispiel #3
0
        private void btn_modificar_locacao_Click(object sender, EventArgs e)
        {
            Locacao dados = new Locacao();

            dados.atualizarLocacao(txtCodigoLocacao.Text, txtRetiradaLocacao.Text, txtDevolucaoLocacao.Text, txtValorLocacao.Text, txtObsLocacao.Text, cmbCarroLocacao.Text, txtModeloLocacao.Text, txtAnoLocacao.Text, txtObsCarroLocacao.Text, cmbClienteLocacao.Text, txtNomeLocacao.Text, gridTabelaLocacao);
            txtCodigoLocacao.Text           = "";
            txtRetiradaLocacao.Text         = "";
            txtDevolucaoLocacao.Text        = "";
            txtValorLocacao.Text            = "";
            txtObsLocacao.Text              = "";
            cmbCarroLocacao.SelectedIndex   = -1;
            txtModeloLocacao.Text           = "";
            txtAnoLocacao.Text              = "";
            txtObsCarroLocacao.Text         = "";
            cmbClienteLocacao.SelectedIndex = -1;
            txtNomeLocacao.Text             = "";
        }
Beispiel #4
0
        private void cmbClienteLocacao_SelectedIndexChanged(object sender, EventArgs e)
        {
            Locacao dados = new Locacao();

            dados.preencherTxtCliente(cmbClienteLocacao.Text, txtNomeLocacao);
        }
Beispiel #5
0
        private void cmbCarroLocacao_SelectedIndexChanged(object sender, EventArgs e)
        {
            Locacao dados = new Locacao();

            dados.preencherTxtCarro(cmbCarroLocacao.Text, txtModeloLocacao, txtAnoLocacao, txtObsCarroLocacao);
        }