miércoles, 9 de diciembre de 2009

Practica 11.2 Visual

[11.2.jpg]
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace Vendedores_W
{
public partial class Form1 : Form
{
double[,] sueldos = new double[10, 20];
double[] Precio = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20 };
int NV, ART, N;

public Form1()
{
InitializeComponent();
listBox1.Items.Add("Vendedor Articulo Cantidad");
listBox2.Items.Add("Vendedor Sueldo");

NV = ART = N = 0;
}

private void button1_Click(object sender, EventArgs e)
{




NV = int.Parse(VTXT.Text);
VTXT.Clear();
ART = int.Parse(A.Text);
A.Clear();
N = int.Parse(C.Text);
C.Clear();

listBox1.Items.Add(NV.ToString() + "\t\t" + ART.ToString() + "\t" + N.ToString());
sueldos[NV - 1, ART - 1] = sueldos[NV - 1, ART - 1] + N * Precio[ART - 1];







}

private void button2_Click(object sender, EventArgs e)
{
int V, P;
double SUM, salario;
for (V=0;V<10;v=v+1) sum =" 0;" p="0;P<20;P="P+1)" sum =" SUM" salario =" SUM">

No hay comentarios:

Publicar un comentario