using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
namespace WindowsApplication1
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void label1_Click(object sender, EventArgs e)
{
}
private void button1_Click(object sender, EventArgs e)
{
double PHS, PV, PA;
int CHS, CV, CA;
double Total, Desc1, Desc2;
PHS = PV = PA = 0.0;
CHS = CV = CA = 0;
Total = Desc1 = Desc2 = 0.0;
CHS = int.Parse(textBox1.Text);
PHS = double.Parse(textBox2.Text);
CV = int.Parse(textBox3.Text);
PV = double.Parse(textBox4.Text);
CA = int.Parse(textBox5.Text);
PA = double.Parse(textBox6.Text);
Desc1 = PHS * 0.20;
Desc2 = PV * 0.15;
Total = CHS * (PHS - Desc1) + CV * (PV - Desc2) + CA * PA;
textBox7.Text = Total.ToString();
}
private void button2_Click(object sender, EventArgs e)
{
double PHS, PV, PA;
int CHS, CV, CA;
double Total, Desc1, Desc2;
PHS = PV = PA = 0.0;
CHS = CV = CA = 0;
Total = Desc1 = Desc2 = 0.0;
CHS = int.Parse(textBox1.Text);
PHS = double.Parse(textBox2.Text);
CV = int.Parse(textBox3.Text);
PV = double.Parse(textBox4.Text);
CA = int.Parse(textBox5.Text);
PA = double.Parse(textBox6.Text);
Desc1 = PHS * 0.20;
Desc2 = PV * 0.15;
Total = CHS * (PHS - Desc1) + CV * (PV - Desc2) + CA * PA;
Total = Total - Total * 0.07;
textBox7.Text = Total.ToString();
}
private void textBox1_TextChanged(object sender, EventArgs e)
{
}
}
}

No hay comentarios:
Publicar un comentario