miércoles, 21 de septiembre de 2011

Este programa muestra el decempeño de empleados que venden x preducto

class
{
T[,] mat;

{
mat =
}

{


}

{

}

{

}
}


{
T[] vec;

{
vec =
}

{


}

{

}
}

public partial class Form1 : Form{



{
InitializeComponent();
}

{
dataGridView1.RowCount =

dataGridView1[0, i].Value =
dataGridView1[0,
}

{
button1.Enabled = button2.Enabled = button3.Enabled = button4.Enabled =
dataGridView2.RowCount = 2;
dataGridView1.AllowUserToAddRows = dataGridView2.AllowUserToAddRows =
}

{
button1.Enabled =



{
dataGridView1[j, i].Value = CAA.Next(0, 20).ToString();
}
}

{
button1.Enabled =


{
dataGridView1[j, i].Value =
}
}

{
button1.Enabled =

{

{0,2,2,2,2,2},
{0,2,2,2,2,2},
{0,1,1,1,1,1},
{0,1,1,1,1,1}};


{
dataGridView1[j, i].Value = CA[i,j].ToString();
}
}
Matriz<int> matA;Vector<double> vecP;public Form1()private void numericUpDown1_ValueChanged(object sender, EventArgs e)Convert.ToInt32(numericUpDown1.Value) + 1;for (int i = 0; i < Convert.ToInt32(numericUpDown1.Value); i++)"Emp - RM-" + (i + 1).ToString();Convert.ToInt32(numericUpDown1.Value)].Value = "Cant. Product.";private void Form1_Load(object sender, EventArgs e)false;false;private void radioButton2_CheckedChanged(object sender, EventArgs e)true;Random CAA = new Random();for(int i = 0; i < Convert.ToInt32(numericUpDown1.Value); i++)for (int j = 1; j < 6; j++)private void radioButton1_CheckedChanged(object sender, EventArgs e)true;for (int i = 0; i < Convert.ToInt32(numericUpDown1.Value); i++)for (int j = 1; j < 6; j++)"";private void radioButton3_CheckedChanged(object sender, EventArgs e)true;if (Convert.ToInt32(numericUpDown1.Value) <= 5)int[,] CA = {{1,2,2,2,2,2},for (int i = 0; i < Convert.ToInt32(numericUpDown1.Value); i++)for (int j = 1; j < 6; j++)else{

numericUpDown1.Focus();
radioButton1.Focus();
}
}

{
button2.Enabled =
matA =



{
matA[i, j] =
}
vecP =

vecP[j] =
}

{
button3.Enabled =



{
tV = 0;

{
tV += matA[i, j] * vecP[j-1];
}
dataGridView1[6, i].Value = tV.ToString();
}

{
tP = 0;

{
tP += matA[i, j];
dataGridView1[j,
}
}
}

{
button4.Enabled =
button2.Enabled = button3.Enabled =


dataGridView1[6, i].Value =
}

{
button4.Enabled =


dataGridView1[6, i].Value =
}

{


{

{
meV =
label5.Text =
}
}


{

{
maV =
label6.Text =
}
}


{

{
aCMen =
label7.Text =
}
}


{

{
aCMas =
label8.Text =
}
}

}

{
button1.Enabled =


{
dataGridView1[j, i].Value =
}
textBox1.Text = textBox2.Text =

dataGridView2[j, 0].Value =
dataGridView1.RowCount = 0;
numericUpDown1.Value = 0;
}
}
MessageBox.Show("Error! Esta funcion esta disponible solo para 5 Empleados o Menos");private void button1_Click(object sender, EventArgs e)true;new Matriz<int>(Convert.ToInt32(numericUpDown1.Value), 7);for(int i = 0; i < Convert.ToInt32(numericUpDown1.Value); i++)for (int j = 1; j < 6; j++)Convert.ToInt32(dataGridView1[j, i].Value);new Vector<double>(5);for (int j = 0; j < 5; j++)Convert.ToDouble(dataGridView2[j,0].Value);private void button2_Click(object sender, EventArgs e)true;double tV;int tP;for (int i = 0; i < Convert.ToInt32(numericUpDown1.Value); i++)for (int j = 1; j < 6; j++)for (int j = 1; j < 6; j++)for (int i = 0; i < Convert.ToInt32(numericUpDown1.Value); i++)Convert.ToInt32(numericUpDown1.Value)].Value = tP.ToString();private void button3_Click(object sender, EventArgs e)true;false;double tVyT = Convert.ToDouble(textBox1.Text);for (int i = 0; i < Convert.ToInt32(numericUpDown1.Value); i++)Convert.ToDouble(dataGridView1[6, i].Value) + tVyT;private void button4_Click(object sender, EventArgs e)false;double IVA = Convert.ToDouble(textBox2.Text);for (int i = 0; i < Convert.ToInt32(numericUpDown1.Value); i++)Convert.ToDouble(dataGridView1[6, i].Value) * (1 + (IVA/100));private void button5_Click(object sender, EventArgs e)double meV = 1000000;for (int i = 0; i < Convert.ToInt32(numericUpDown1.Value); i++)if (Convert.ToDouble(dataGridView1[6, i].Value) < meV)Convert.ToDouble(dataGridView1[6, i].Value);"Empleado que Vendio Menos: Emp - RM-" + (i + 1).ToString();double maV = 0;for (int i = 0; i < Convert.ToInt32(numericUpDown1.Value); i++)if (Convert.ToDouble(dataGridView1[6, i].Value) > maV)Convert.ToDouble(dataGridView1[6, i].Value);"Empleado que Vendio Más: Emp - RM-" + (i + 1).ToString();int aCMen = 1000000;for (int j = 1; j < 6; j++)if (Convert.ToDouble(dataGridView1[j, Convert.ToInt32(numericUpDown1.Value)].Value) < aCMen)Convert.ToInt32(dataGridView1[j, Convert.ToInt32(numericUpDown1.Value)].Value);"Artículo Menos Solicitado: #" + j.ToString();int aCMas = 0;for (int j = 1; j < 6; j++)if (Convert.ToDouble(dataGridView1[j, Convert.ToInt32(numericUpDown1.Value)].Value) > aCMas)Convert.ToInt32(dataGridView1[j, Convert.ToInt32(numericUpDown1.Value)].Value);"Artículo Más Solicitado: #" + j.ToString();private void button6_Click(object sender, EventArgs e)true;for (int i = 0; i <= Convert.ToInt32(numericUpDown1.Value); i++)for (int j = 1; j < 7; j++)"";"";for (int j = 0; j < 5; j++)"";
class Vector<T>public Vector(int nC)new T[nC];public T this[int c]get { return vec[c]; }set { vec[c] = value; }public int COLget { return vec.GetLength(1); }
Matriz<T>public Matriz(int nR, int nC)new T[nR, nC];public T this[int r, int c]get { return mat[r, c]; }set { mat[r, c] = value; }public int RENget { return mat.GetLength(0); }public int COLget { return mat.GetLength(1); }

No hay comentarios:

Publicar un comentario