private void btnExcluir_Click(object sender, EventArgs e) { ServiçoExcluir ExcluiViagem = new ServiçoExcluir(); CodViagem = Convert.ToInt32(txtCodViagem.Text); //Agenda Excluir SqlCommand textoComando = new SqlCommand(); using (SqlConnection conexao = Conexao.Conectar()) { textoComando.CommandText = " DELETE FROM Compromissos WHERE Hora ='" + txtHora.Text + "'"; textoComando.Connection = conexao; conexao.Open(); textoComando.ExecuteNonQuery(); } MessageBox.Show("Compromisso Excluido com sucesso!", "Informação", MessageBoxButtons.OK, MessageBoxIcon.Information); LimpaTela(); try { ExcluiViagem.ExcluirViagem(CodViagem); } catch { } }
private void btnDelLoca_Click(object sender, EventArgs e) { ServiçoExcluir ExcluiLoca = new ServiçoExcluir(); CodLocacao = Convert.ToInt32(txtCodLoca.Text); try { ExcluiLoca.ExcluirLoca(CodLocacao); } catch { } }
private void btnExcluir_Click(object sender, EventArgs e) { ServiçoExcluir ExcluiCliente = new ServiçoExcluir(); CPFouCNPJ = txtCPFouCNPJ.Text; try { ExcluiCliente.ExcluirCliente(CPFouCNPJ); } catch { } }
private void btnDelVei_Click(object sender, EventArgs e) { ServiçoExcluir ExcluiVei = new ServiçoExcluir(); Placa = txtPlaca.Text; try { ExcluiVei.ExcluirVei(Placa); } catch { } }
private void BtnDelMoto_Click(object sender, EventArgs e) { ServiçoExcluir ExcluiMoto = new ServiçoExcluir(); cpf = txtCPFMoto.Text; try { ExcluiMoto.ExcluirMoto(cpf); } catch { } }
private void btnDelSegMoto_Click(object sender, EventArgs e) { ServiçoExcluir ExcluiSegMoto = new ServiçoExcluir(); NumApolice = Convert.ToInt32(txtNApolice.Text); try { ExcluiSegMoto.ExcluirSegMoto(NumApolice); } catch { } }