private void btncancelardesconto_Click(object sender, EventArgs e) { CVenda venda = new CVenda(); venda.pesquisarvendaIdVenda(idvenda); decimal desconto = -1 * venda.ven_desconto; venda.aplicardesconto(idvenda, desconto); Carregar(); }
private void btndesconto_Click(object sender, EventArgs e) { FInput f = new FInput(); if (f.Mostrar("Aplicar Desconto", "Informe a porcentagem de desconto")) { try { //ttbdesconto.Text = (decimal.Parse(ttbdesconto.Text) + decimal.Parse(f.valor)).ToString("00.00"); CVenda c = new CVenda(); decimal desconto = decimal.Parse(ttbsubtotal.Text) * (decimal.Parse(f.valor) / 100); c.aplicardesconto(idvenda, desconto); Carregar(); } catch { } } }