private void button1_Click(object sender, EventArgs e) { if (TxtVenta.Text.Trim().Length == 0) { MessageBox.Show("FAVOR LLENAR LA INFORMACION"); TxtVenta.Focus(); return; } double venta, precio; venta = Convert.ToDouble(TxtVenta.Text.Trim()); precio = 0.35; TxtCuotaM.Text = la.Couta(venta, precio).ToString(); }
private void BtnCalcular_Click(object sender, EventArgs e) { if (TxtCosto.Text.Trim().Length == 0) { POO.MsgWarning("El Precio de Costo es Requerido."); TxtCosto.Focus(); } if (TxtVenta.Text.Trim().Length == 0) { POO.MsgWarning("El Precio de Venta es Requerido."); TxtVenta.Focus(); } double prec, prev; prec = Convert.ToDouble(TxtCosto.Text); prev = Convert.ToDouble(TxtVenta.Text); TxtPorcentaje.Text = POO.PorcGanan(prec, prev).ToString() + "%"; }
private void button2_Click(object sender, EventArgs e) { TxtVenta.Clear(); TxtCuotaM.Clear(); TxtVenta.Focus(); }