private void exibirOrcamentos() { DataTable dt = OrcamentoDAO.filtrarOrcamentosPorData(relatorio.dataInicial, relatorio.dataFinal); if (dt.Rows.Count != 0) { dgvRelatorioFaturamento.DataSource = dt; } }
private void exibirOrcamentos() { DataTable dt = OrcamentoDAO.obterOrcamentos(); if (dt.Rows.Count != 0) { dgvOrcamentos.DataSource = dt; } }
private void exibirPecasVinculadas() { DataTable dt = OrcamentoDAO.obterPecasVinculadas(this.idOrcamento); if (dt.Rows.Count != 0) { dgvVeiculosVinculados.DataSource = dt; } }
private void BtnVincular_Click(object sender, EventArgs e) { OrcamentoDAO.vincularMecanicoOrcamento(this.idOrcamento, this.idMecanico); MessageBox.Show("Mecânico vinculado", "Sucesso", MessageBoxButtons.OK, MessageBoxIcon.Information); Orcamentos orcamentos = new Orcamentos(); orcamentos.Show(); this.Hide(); }
private void BtnAdicionar_Click(object sender, EventArgs e) { OrcamentoDAO.vincularOrcamentoPeca(this.idOrcamento, this.idPeca); PecaDAO.debitaPeca(this.idPeca, (this.quantidadePeca - 1)); Cadastro_Orcamento cadastro_orcamento = new Cadastro_Orcamento(); cadastro_orcamento.idOrcamento = Convert.ToString(this.idOrcamento); cadastro_orcamento.definiOrcamento(this.orcamento); cadastro_orcamento.Show(); this.Hide(); }
private void TxtPesquisaOrcamento_TextChanged(object sender, EventArgs e) { if (txtPesquisaOrcamento.Text != "") { DataTable dt = OrcamentoDAO.filtrarOrcamentos(txtPesquisaOrcamento.Text); if (dt.Rows.Count != 0) { dgvRelatorioFaturamento.DataSource = dt; } } else { this.exibirOrcamentos(); } }
private void BtnCadastrar_Click(object sender, EventArgs e) { double maoObra = Convert.ToDouble(txtMaoDeObra.Text); double valorPecas = Convert.ToDouble(txtValorPecas.Text); this.orcamento._maoObraOrcamento = maoObra; this.orcamento._valorPecasOrcamento = valorPecas; this.orcamento._totalOrcamento = maoObra + valorPecas; this.orcamento._dataOrcamento = Convert.ToDateTime(mskDataCadastro.Text); this.orcamento._descricaoOrcamento = txtDescricao.Text; this.orcamento._idOrcamento = Convert.ToInt32(this.idOrcamento); OrcamentoDAO.atualizaOrcamento(orcamento); MessageBox.Show("Orçamento cadastrado", "Sucesso", MessageBoxButtons.OK, MessageBoxIcon.Information); Orcamentos orcamentos = new Orcamentos(); orcamentos.Show(); this.Hide(); }
private void BtnAdicionarPeca_Click(object sender, EventArgs e) { Adicionar_Peca adicionar_peca = new Adicionar_Peca(); if (this.idOrcamento == null) { adicionar_peca.idOrcamento = OrcamentoDAO.cadastraOrcamento(); } else { adicionar_peca.idOrcamento = Convert.ToInt32(this.idOrcamento); } adicionar_peca.orcamento._maoObraOrcamento = Convert.ToDouble(txtMaoDeObra.Text); adicionar_peca.orcamento._valorPecasOrcamento = Convert.ToDouble(txtValorPecas.Text); adicionar_peca.orcamento._dataOrcamento = Convert.ToDateTime(mskDataCadastro.Text); adicionar_peca.orcamento._descricaoOrcamento = txtDescricao.Text; adicionar_peca.Show(); this.Hide(); }