public bool AlteraBrinquedosBanco() { bool retorno = true; BDLP banco = new BDLP(); if (banco.Conecta()) { string sql = "UPDATE tab_brinquedo SET nome_brinquedo = '" + Nome_Brinquedo + "', categoria = '" + Categoria + "', faixa_etaria = '" + FaixaEtaria + "', marca = '" + Marca + "', data_ultimareposicao = '" + Data_Aquisicao.ToString("yyyy-MM-dd") + "', quantidade_em_estoque = " + Qtd_Estoque + " where cod_brinquedo = " + Cod_Brinquedo; if (banco.Altera(sql)) { retorno = true; } else { retorno = false; } } else { retorno = false; return(retorno); } return(retorno); }
public bool AlteraClientesBanco() { bool retorno = true; BDLP banco = new BDLP(); if (banco.Conecta()) { string sql = "UPDATE tab_cliente SET nome = '" + Nome + "', datanasc = '" + DataNascimento.ToString("yyyy-MM-dd") + "', email = '" + Email + "', tel_celular = '" + TelCelular + "' where cpf = '" + CPF + "';"; if (banco.Altera(sql)) { retorno = true; } else { retorno = false; } } else { retorno = false; return(retorno); } return(retorno); }