Good afternoon, I'm developing an ECOMMERCE, and I have the following problem: I have DOUBLE values of height, width, length, value, at the time I'm going to save in the database it tries to SAVE with comma and error! I would like to add a textbox to it, but I do not know how to do it, but I do not know how to do it. >
thesavebutton:
nProdutop=newnProduto();p.altura=Convert.ToDouble(txt_altura.Text);p.descricao=txt_descrição.Text;p.largura=Convert.ToDouble(txt_largura.Text);p.material=txt_material.Text;p.nome=txt_nome.Text;p.peso=Convert.ToDouble(txt_peso.Text);if(cb_promocao.Checked){p.promo="y";
}
else
{
p.promo = "n";
}
if (cb_prontaentrega.Checked)
{
p.prontaentrega = "y";
}
else
{
p.prontaentrega = "n";
}
p.valorunit = Convert.ToDouble(txt_valorunit.Text);
int id = p.salvar();
The save function CODE:
string query = "INSERT INTO produto(nome, descrição, material, valorunit, altura," +
" largura, peso, prontaentrega, quantidade, promo) Values(";
query = query + "'" + nome + "', '" + descricao + "', '" + material + "', " + valorunit + ", "
+ altura + ", " + largura + ", " + peso + ", '" + prontaentrega + "', '" + quantidade +
"', '" + promo + "')";
NOTE: ASP.NET + BOOSTRAP + MYSQL EDIT: I already moved the decimal (both width / height / length and unit value) and I still have the same problem.