Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.ComponentModel;
- using System.Data;
- using System.Drawing;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- using System.Windows.Forms;
- namespace Tarea17
- {
- public partial class frmInformaciondelproducto : Form
- {
- public frmInformaciondelproducto()
- {
- InitializeComponent();
- }
- private void cmdSalida_Click(object sender, EventArgs e)
- {
- //Salida del programa
- Close();
- }
- private void cmdCalcular_Click(object sender, EventArgs e)
- {
- //Programa que calcule la informacion del precio al contado y en abonos
- //Camacho Herrera Felipe 16212638
- //Tarea17
- //Declaracion de variables
- float Precio_producto;
- //Asignacion de valores a las variables
- Precio_producto = System.Single.Parse(txtPrecio_producto.Text);
- //Llamar procedimiento
- Pagocontado (Precio_producto);
- Abonos (Precio_producto);
- }
- float Iva (float Precio1)
- {
- //Funcion para sacar Iva
- return Precio1 * 0.16f;
- }
- void Pagocontado (float Pc)
- {
- //Declaracion de variables en los procedimientos
- float Totalc, Imp;
- //Llamada a la funcion
- Imp = Iva (Pc) ;
- //Calcular
- Totalc = Pc + Imp;
- //Salida del resultado
- txtImp.Text = Imp.ToString();
- txtTotalc.Text = Totalc.ToString();
- }
- void Abonos (float Pa)
- {
- }
- private void txtContado_TextChanged(object sender, EventArgs e)
- {
- //Declaracion de las variables
- float Pol, Impu, Total1, Mens,Pa;
- //Asignacion de valores a las variables
- Pol = System.Single.Parse(txtPol.Text);
- Impu = System.Single.Parse(txtImpu.Text);
- Total1 = System.Single.Parse(txtTotal1.Text);
- Mens = System.Single.Parse(txtMens.Text);
- Pa = System.Single.Parse(txtPa.Text);
- //Calculo
- Pol = Pa * 0.20f;
- Mens = Pol + Pa;
- Impu = Iva(Mens);
- Total1 = Mens + Impu + Pa;
- Mens = Total1 / 6;
- //Salida del resultado
- txtPol.Text = Pol.ToString();
- txtImpu.Text = Impu.ToString();
- txtTotal1.Text = Total1.ToString();
- txtPa.Text = Pa.ToString();
- txtMens.Text = Mens.ToString();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement