Cada vez más cercas del faa

This commit is contained in:
Michael Robles
2024-01-10 14:51:53 -07:00
8 changed files with 7 additions and 7 deletions
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
+4 -2
View File
@@ -79,7 +79,7 @@ namespace compabetov2
private void personal_Load(object sender, EventArgs e) private void personal_Load(object sender, EventArgs e)
{ {
} }
private void button7_Click(object sender, EventArgs e) private void button7_Click(object sender, EventArgs e)
@@ -92,7 +92,9 @@ namespace compabetov2
private void button8_Click(object sender, EventArgs e) private void button8_Click(object sender, EventArgs e)
{ {
int fila = dataGridView1.CurrentCell.RowIndex;
int idEmpleado = int.Parse(dataGridView1.Rows[fila].Cells[0].Value.ToString());
Empleado empleado = new Empleado();
} }
private void dataGridView1_RowEnter(object sender, DataGridViewCellEventArgs e) private void dataGridView1_RowEnter(object sender, DataGridViewCellEventArgs e)
+3 -5
View File
@@ -27,9 +27,7 @@ namespace compabetov2
private bool menosBtnPresionado = false; private bool menosBtnPresionado = false;
private List<Producto> productos; private List<Producto> productos;
private List<TableLayoutPanel> cartas = new List<TableLayoutPanel>(); private List<TableLayoutPanel> cartas = new List<TableLayoutPanel>();
// private List<Producto>
private decimal total = 0; private decimal total = 0;
private Label ticketLabel;
@@ -113,6 +111,7 @@ namespace compabetov2
btnMenos.BackColor = Color.FromArgb(33, 90, 255); btnMenos.BackColor = Color.FromArgb(33, 90, 255);
btnMenos.Click += new EventHandler(delegate (object sender, EventArgs e) btnMenos.Click += new EventHandler(delegate (object sender, EventArgs e)
{ {
int numeroContador = int.Parse(contador.Text.ToString()); int numeroContador = int.Parse(contador.Text.ToString());
// Validar que el contador no sea 0 antes de restar // Validar que el contador no sea 0 antes de restar
@@ -120,6 +119,7 @@ namespace compabetov2
{ {
contador.Text = (numeroContador - 1).ToString(); contador.Text = (numeroContador - 1).ToString();
total -= producto.precion; total -= producto.precion;
label1.Text = $"Total: ${total}";
// Obtener información del Label id y precio // Obtener información del Label id y precio
int idProducto = int.Parse(id.Text); int idProducto = int.Parse(id.Text);
@@ -153,9 +153,7 @@ namespace compabetov2
int numeroContador = int.Parse(contador.Text.ToString()); int numeroContador = int.Parse(contador.Text.ToString());
contador.Text = (numeroContador + 1).ToString(); contador.Text = (numeroContador + 1).ToString();
total += producto.precion; total += producto.precion;
label1.Text = $"Total: ${total}";
// Obtener información del Label id y precio // Obtener información del Label id y precio
int idProducto = int.Parse(id.Text); int idProducto = int.Parse(id.Text);