void CalculaValores() { cOrcamentos orcamentos = new cOrcamentos(); float valor = orcamentos.RecalculaTotal(edtFornecedor.Text, dtpData.Value, Globais.StrToShort(edtCodigo.Text), cbxCaracteristicas.Text.Trim(), ""); edtValor.Text = valor.ToString("#,###,##0.00"); float total; total = Globais.StrToFloat(edtValor.Text) - Globais.StrToFloat(edtDesconto.Text); // - Globais.StrToFloat(edtVlrConsultor.Text); edtTotal.Text = total.ToString("#,###,##0.00"); }
void CbxTabelasSelectedIndexChanged(object sender, EventArgs e) { if (carregando) { return; } cOrcamentos orcamentos = new cOrcamentos(); if (cbxCaracteristicas.Text.Trim().Length == 0) { return; } float valor = orcamentos.RecalculaTotal(edtFornecedor.Text, dtpData.Value, Globais.StrToShort(edtCodigo.Text), cbxCaracteristicas.Text.Trim(), cbxTabelas.Text.Trim()); edtValor.Text = valor.ToString("#,###,##0.00"); float total; total = Globais.StrToFloat(edtValor.Text) - Globais.StrToFloat(edtDesconto.Text); // - Globais.StrToFloat(edtVlrConsultor.Text); edtTotal.Text = total.ToString("#,###,##0.00"); }