cambios a la base de datos, agregar precios
This commit is contained in:
@@ -7,6 +7,7 @@ using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Drawing.Drawing2D;
|
||||
using System.Globalization;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
@@ -54,7 +55,8 @@ namespace compabetov2
|
||||
PictureBox pic = new PictureBox();
|
||||
pic.Dock = DockStyle.Fill;
|
||||
pic.SizeMode = PictureBoxSizeMode.Zoom;
|
||||
pic.Image = Properties.Resources.Modelo;
|
||||
string rutaImg = Path.Combine(Application.StartupPath, "Resources", producto.img);
|
||||
pic.Image = Image.FromFile(rutaImg);
|
||||
pic.BackgroundImageLayout = ImageLayout.Stretch;
|
||||
pic.Tag = producto.idProducto;
|
||||
|
||||
@@ -140,7 +142,7 @@ namespace compabetov2
|
||||
|
||||
// Obtener información del Label id y precio
|
||||
int idProducto = int.Parse(id.Text);
|
||||
decimal precioProducto;
|
||||
decimal precioProducto = producto.precion;
|
||||
if (decimal.TryParse(precio.Text, NumberStyles.Currency, CultureInfo.CurrentCulture, out precioProducto))
|
||||
{
|
||||
// Generar ticket y agregarlo al flowLayoutPanel2
|
||||
@@ -149,7 +151,7 @@ namespace compabetov2
|
||||
else
|
||||
{
|
||||
// Manejar el caso en el que la conversión no sea exitosa
|
||||
MessageBox.Show("Formato de precio no válido.", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||
//MessageBox.Show("Formato de precio no válido.", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||
}
|
||||
|
||||
// Generar ticket y agregarlo al flowLayoutPanel2
|
||||
|
||||
Reference in New Issue
Block a user