Esempio n. 1
0
        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 { }
        }
Esempio n. 2
0
        private void btnDelLoca_Click(object sender, EventArgs e)
        {
            ServiçoExcluir ExcluiLoca = new ServiçoExcluir();

            CodLocacao = Convert.ToInt32(txtCodLoca.Text);

            try
            {
                ExcluiLoca.ExcluirLoca(CodLocacao);
            }
            catch { }
        }
Esempio n. 3
0
        private void btnExcluir_Click(object sender, EventArgs e)
        {
            ServiçoExcluir ExcluiCliente = new ServiçoExcluir();

            CPFouCNPJ = txtCPFouCNPJ.Text;

            try
            {
                ExcluiCliente.ExcluirCliente(CPFouCNPJ);
            }
            catch { }
        }
Esempio n. 4
0
        private void btnDelVei_Click(object sender, EventArgs e)
        {
            ServiçoExcluir ExcluiVei = new ServiçoExcluir();

            Placa = txtPlaca.Text;

            try
            {
                ExcluiVei.ExcluirVei(Placa);
            }
            catch { }
        }
Esempio n. 5
0
        private void BtnDelMoto_Click(object sender, EventArgs e)
        {
            ServiçoExcluir ExcluiMoto = new ServiçoExcluir();

            cpf = txtCPFMoto.Text;

            try
            {
                ExcluiMoto.ExcluirMoto(cpf);
            }
            catch { }
        }
Esempio n. 6
0
        private void btnDelSegMoto_Click(object sender, EventArgs e)
        {
            ServiçoExcluir ExcluiSegMoto = new ServiçoExcluir();

            NumApolice = Convert.ToInt32(txtNApolice.Text);

            try
            {
                ExcluiSegMoto.ExcluirSegMoto(NumApolice);
            }
            catch { }
        }