private void pbRemover_Click(object sender, EventArgs e)
 {
     if (MessageBox.Show("Tem certeza que deseja excluir registro?", "Confirmação", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
     {
         DBBase db    = new DBBase();
         string Query = "DELETE TENANTS WHERE ID =" + tbIdClientes.Text;
         db.ExecutarInstrucaoNaBase(Query);
         this.Close();
     }
 }
Example #2
0
        private void pbSalvar_Click(object sender, EventArgs e)
        {
            DBBase db    = new DBBase();
            string Query = "INSERT INTO USERS( NAME, BIRTH,CPF,RG,SEXO,EMAIL, PASSWORD, NAME_COMPANY, ID_REGISTRATION_STATUS)VALUES("
                           + "'" + tbNome.Text + "'" + ",'" + mtbNascimento.Text + "'" +
                           ",'" + tbCPF.Text + "'" + ",'" + tbRG.Text + "'" + ",'" + tbSexo.Text + "'" +
                           ",'" + tbEmail.Text + "'" + ",'" + tbSenha.Text + "'" +
                           ",'" + tbNomeEmpresa.Text + "'," + tbID.Text + ")";

            db.ExecutarInstrucaoNaBase(Query);
            this.Close();
        }
Example #3
0
        private void pbSalvar_Click(object sender, EventArgs e)
        {
            DBBase db    = new DBBase();
            string Query = "UPDATE USERS SET NAME =" + "'" + tbNome.Text + "'" + ",BIRTH =" + "'" + mtbNascimento.Text + "'" +
                           ",CPF =" + "'" + tbCPF.Text + "'" + ",RG =" + "'" + tbRG.Text + "'" + ",SEXO =" + "'" + tbSexo.Text + "'" +
                           ",EMAIL =" + "'" + tbEmail.Text + "'" + ",PASSWORD ="******"'" + tbSenha.Text + "'" +
                           ",NAME_COMPANY =" + "'" + tbNomeEmpresa.Text + "'" + ",ID_REGISTRATION_STATUS =" + tbID.Text + "where ID =" + tbIDCliente.Text;

            db.ExecutarInstrucaoNaBase(Query);

            this.Close();
        }