Subo cambios
This commit is contained in:
@@ -67,7 +67,7 @@ namespace compabetov2.Empleados
|
|||||||
{
|
{
|
||||||
imagenPath = openFileDialog1.FileName;
|
imagenPath = openFileDialog1.FileName;
|
||||||
lbImg.Text = $"Imagen: {Path.GetFileName(imagenPath)}";
|
lbImg.Text = $"Imagen: {Path.GetFileName(imagenPath)}";
|
||||||
string destinationFolder = Path.Combine(Application.StartupPath, "Resources", "usuarios");
|
//string destinationFolder = Path.Combine(Application.StartupPath, "Resources", "usuarios");
|
||||||
//string destinationFile = Path.Combine(destinationFolder, Path.GetFileName(sourceFile));
|
//string destinationFile = Path.Combine(destinationFolder, Path.GetFileName(sourceFile));
|
||||||
//File.Copy(sourceFile, destinationFile, true);
|
//File.Copy(sourceFile, destinationFile, true);
|
||||||
}
|
}
|
||||||
|
|||||||
Generated
+1
@@ -143,6 +143,7 @@
|
|||||||
this.button3.TabIndex = 10;
|
this.button3.TabIndex = 10;
|
||||||
this.button3.Text = "Productos";
|
this.button3.Text = "Productos";
|
||||||
this.button3.UseVisualStyleBackColor = false;
|
this.button3.UseVisualStyleBackColor = false;
|
||||||
|
this.button3.Click += new System.EventHandler(this.button3_Click);
|
||||||
//
|
//
|
||||||
// button5
|
// button5
|
||||||
//
|
//
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ using System.Reflection;
|
|||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
|
using compabetov2.admin;
|
||||||
|
|
||||||
namespace compabetov2
|
namespace compabetov2
|
||||||
{
|
{
|
||||||
@@ -447,5 +448,20 @@ namespace compabetov2
|
|||||||
MessageBox.Show("Por favor, ingrese solo números en el teléfono.", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
MessageBox.Show("Por favor, ingrese solo números en el teléfono.", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void button3_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
if (loginPrincipal.tipo.Equals("empleado"))
|
||||||
|
{
|
||||||
|
MessageBox.Show("Usted no tiene permisos de acceder a este apartado");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
crud crud = new crud();
|
||||||
|
crud.Owner = this;
|
||||||
|
crud.Show();
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Generated
+2
@@ -356,6 +356,7 @@
|
|||||||
//
|
//
|
||||||
// btnVentasDia
|
// btnVentasDia
|
||||||
//
|
//
|
||||||
|
this.btnVentasDia.Enabled = false;
|
||||||
this.btnVentasDia.Location = new System.Drawing.Point(660, 313);
|
this.btnVentasDia.Location = new System.Drawing.Point(660, 313);
|
||||||
this.btnVentasDia.Name = "btnVentasDia";
|
this.btnVentasDia.Name = "btnVentasDia";
|
||||||
this.btnVentasDia.Size = new System.Drawing.Size(110, 23);
|
this.btnVentasDia.Size = new System.Drawing.Size(110, 23);
|
||||||
@@ -366,6 +367,7 @@
|
|||||||
//
|
//
|
||||||
// btnVentasMes
|
// btnVentasMes
|
||||||
//
|
//
|
||||||
|
this.btnVentasMes.Enabled = false;
|
||||||
this.btnVentasMes.Location = new System.Drawing.Point(666, 611);
|
this.btnVentasMes.Location = new System.Drawing.Point(666, 611);
|
||||||
this.btnVentasMes.Name = "btnVentasMes";
|
this.btnVentasMes.Name = "btnVentasMes";
|
||||||
this.btnVentasMes.Size = new System.Drawing.Size(110, 23);
|
this.btnVentasMes.Size = new System.Drawing.Size(110, 23);
|
||||||
|
|||||||
@@ -72,6 +72,8 @@ namespace compabetov2
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
mostrarDatos(estadisticas);
|
mostrarDatos(estadisticas);
|
||||||
|
btnVentasDia.Enabled = true;
|
||||||
|
btnVentasMes.Enabled = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -135,6 +135,42 @@
|
|||||||
<metadata name="totalNeto.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
<metadata name="totalNeto.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||||
<value>True</value>
|
<value>True</value>
|
||||||
</metadata>
|
</metadata>
|
||||||
|
<metadata name="Producto.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||||
|
<value>True</value>
|
||||||
|
</metadata>
|
||||||
|
<metadata name="Precio.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||||
|
<value>True</value>
|
||||||
|
</metadata>
|
||||||
|
<metadata name="precioCompra.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||||
|
<value>True</value>
|
||||||
|
</metadata>
|
||||||
|
<metadata name="Cantidad.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||||
|
<value>True</value>
|
||||||
|
</metadata>
|
||||||
|
<metadata name="Total.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||||
|
<value>True</value>
|
||||||
|
</metadata>
|
||||||
|
<metadata name="totalNeto.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||||
|
<value>True</value>
|
||||||
|
</metadata>
|
||||||
|
<metadata name="dataGridViewTextBoxColumn1.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||||
|
<value>True</value>
|
||||||
|
</metadata>
|
||||||
|
<metadata name="dataGridViewTextBoxColumn2.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||||
|
<value>True</value>
|
||||||
|
</metadata>
|
||||||
|
<metadata name="PrecioCompraMes.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||||
|
<value>True</value>
|
||||||
|
</metadata>
|
||||||
|
<metadata name="dataGridViewTextBoxColumn3.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||||
|
<value>True</value>
|
||||||
|
</metadata>
|
||||||
|
<metadata name="dataGridViewTextBoxColumn4.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||||
|
<value>True</value>
|
||||||
|
</metadata>
|
||||||
|
<metadata name="totalNetoMes.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||||
|
<value>True</value>
|
||||||
|
</metadata>
|
||||||
<metadata name="dataGridViewTextBoxColumn1.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
<metadata name="dataGridViewTextBoxColumn1.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||||
<value>True</value>
|
<value>True</value>
|
||||||
</metadata>
|
</metadata>
|
||||||
|
|||||||
Generated
+2
@@ -136,6 +136,7 @@
|
|||||||
this.button3.TabIndex = 10;
|
this.button3.TabIndex = 10;
|
||||||
this.button3.Text = "Productos";
|
this.button3.Text = "Productos";
|
||||||
this.button3.UseVisualStyleBackColor = false;
|
this.button3.UseVisualStyleBackColor = false;
|
||||||
|
this.button3.Click += new System.EventHandler(this.button3_Click);
|
||||||
//
|
//
|
||||||
// button5
|
// button5
|
||||||
//
|
//
|
||||||
@@ -154,6 +155,7 @@
|
|||||||
this.button5.TabIndex = 12;
|
this.button5.TabIndex = 12;
|
||||||
this.button5.Text = "Salir";
|
this.button5.Text = "Salir";
|
||||||
this.button5.UseVisualStyleBackColor = false;
|
this.button5.UseVisualStyleBackColor = false;
|
||||||
|
this.button5.Click += new System.EventHandler(this.button5_Click);
|
||||||
//
|
//
|
||||||
// lblfecha
|
// lblfecha
|
||||||
//
|
//
|
||||||
|
|||||||
+31
-2
@@ -11,6 +11,7 @@ using System.Reflection;
|
|||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
|
using compabetov2.admin;
|
||||||
|
|
||||||
namespace compabetov2
|
namespace compabetov2
|
||||||
{
|
{
|
||||||
@@ -225,8 +226,36 @@ namespace compabetov2
|
|||||||
|
|
||||||
private void button2_Click(object sender, EventArgs e)
|
private void button2_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
Estadiscticas verstats = new Estadiscticas();
|
if (loginPrincipal.tipo.Equals("empleado"))
|
||||||
verstats.Show();
|
{
|
||||||
|
MessageBox.Show("Usted no tiene permisos de acceder a este apartado");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Estadiscticas estadiscticas = new Estadiscticas();
|
||||||
|
estadiscticas.Owner = this;
|
||||||
|
estadiscticas.Show();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void button5_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
Close();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void button3_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
if (loginPrincipal.tipo.Equals("empleado"))
|
||||||
|
{
|
||||||
|
MessageBox.Show("Usted no tiene permisos de acceder a este apartado");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
crud crud = new crud();
|
||||||
|
crud.Owner = this;
|
||||||
|
crud.Show();
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Generated
+24
-9
@@ -32,13 +32,15 @@
|
|||||||
this.lbContador = new System.Windows.Forms.Label();
|
this.lbContador = new System.Windows.Forms.Label();
|
||||||
this.btnMenos = new System.Windows.Forms.Button();
|
this.btnMenos = new System.Windows.Forms.Button();
|
||||||
this.btnMas = new System.Windows.Forms.Button();
|
this.btnMas = new System.Windows.Forms.Button();
|
||||||
|
this.button1 = new System.Windows.Forms.Button();
|
||||||
this.SuspendLayout();
|
this.SuspendLayout();
|
||||||
//
|
//
|
||||||
// panelVentas
|
// panelVentas
|
||||||
//
|
//
|
||||||
this.panelVentas.AutoScroll = true;
|
this.panelVentas.AutoScroll = true;
|
||||||
this.panelVentas.Location = new System.Drawing.Point(304, 321);
|
this.panelVentas.BackColor = System.Drawing.Color.Transparent;
|
||||||
this.panelVentas.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
|
this.panelVentas.Location = new System.Drawing.Point(382, 308);
|
||||||
|
this.panelVentas.Margin = new System.Windows.Forms.Padding(4);
|
||||||
this.panelVentas.Name = "panelVentas";
|
this.panelVentas.Name = "panelVentas";
|
||||||
this.panelVentas.Size = new System.Drawing.Size(563, 673);
|
this.panelVentas.Size = new System.Drawing.Size(563, 673);
|
||||||
this.panelVentas.TabIndex = 0;
|
this.panelVentas.TabIndex = 0;
|
||||||
@@ -47,7 +49,7 @@
|
|||||||
//
|
//
|
||||||
this.lbContador.AutoSize = true;
|
this.lbContador.AutoSize = true;
|
||||||
this.lbContador.Font = new System.Drawing.Font("Microsoft Sans Serif", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
this.lbContador.Font = new System.Drawing.Font("Microsoft Sans Serif", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||||
this.lbContador.Location = new System.Drawing.Point(519, 232);
|
this.lbContador.Location = new System.Drawing.Point(597, 219);
|
||||||
this.lbContador.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
|
this.lbContador.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
|
||||||
this.lbContador.Name = "lbContador";
|
this.lbContador.Name = "lbContador";
|
||||||
this.lbContador.Size = new System.Drawing.Size(125, 29);
|
this.lbContador.Size = new System.Drawing.Size(125, 29);
|
||||||
@@ -57,8 +59,8 @@
|
|||||||
// btnMenos
|
// btnMenos
|
||||||
//
|
//
|
||||||
this.btnMenos.Font = new System.Drawing.Font("Microsoft Sans Serif", 18F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
this.btnMenos.Font = new System.Drawing.Font("Microsoft Sans Serif", 18F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||||
this.btnMenos.Location = new System.Drawing.Point(394, 231);
|
this.btnMenos.Location = new System.Drawing.Point(472, 218);
|
||||||
this.btnMenos.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
|
this.btnMenos.Margin = new System.Windows.Forms.Padding(4);
|
||||||
this.btnMenos.Name = "btnMenos";
|
this.btnMenos.Name = "btnMenos";
|
||||||
this.btnMenos.Size = new System.Drawing.Size(100, 37);
|
this.btnMenos.Size = new System.Drawing.Size(100, 37);
|
||||||
this.btnMenos.TabIndex = 1;
|
this.btnMenos.TabIndex = 1;
|
||||||
@@ -69,8 +71,8 @@
|
|||||||
// btnMas
|
// btnMas
|
||||||
//
|
//
|
||||||
this.btnMas.Font = new System.Drawing.Font("Microsoft Sans Serif", 18F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
this.btnMas.Font = new System.Drawing.Font("Microsoft Sans Serif", 18F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||||
this.btnMas.Location = new System.Drawing.Point(680, 232);
|
this.btnMas.Location = new System.Drawing.Point(758, 219);
|
||||||
this.btnMas.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
|
this.btnMas.Margin = new System.Windows.Forms.Padding(4);
|
||||||
this.btnMas.Name = "btnMas";
|
this.btnMas.Name = "btnMas";
|
||||||
this.btnMas.Size = new System.Drawing.Size(100, 37);
|
this.btnMas.Size = new System.Drawing.Size(100, 37);
|
||||||
this.btnMas.TabIndex = 2;
|
this.btnMas.TabIndex = 2;
|
||||||
@@ -78,6 +80,17 @@
|
|||||||
this.btnMas.UseVisualStyleBackColor = true;
|
this.btnMas.UseVisualStyleBackColor = true;
|
||||||
this.btnMas.Click += new System.EventHandler(this.btnMas_Click);
|
this.btnMas.Click += new System.EventHandler(this.btnMas_Click);
|
||||||
//
|
//
|
||||||
|
// button1
|
||||||
|
//
|
||||||
|
this.button1.Font = new System.Drawing.Font("Microsoft Sans Serif", 13.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||||
|
this.button1.Location = new System.Drawing.Point(590, 998);
|
||||||
|
this.button1.Name = "button1";
|
||||||
|
this.button1.Size = new System.Drawing.Size(147, 55);
|
||||||
|
this.button1.TabIndex = 3;
|
||||||
|
this.button1.Text = "Salir";
|
||||||
|
this.button1.UseVisualStyleBackColor = true;
|
||||||
|
this.button1.Click += new System.EventHandler(this.button1_Click);
|
||||||
|
//
|
||||||
// RegistroVentas
|
// RegistroVentas
|
||||||
//
|
//
|
||||||
this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F);
|
this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F);
|
||||||
@@ -85,15 +98,16 @@
|
|||||||
this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(27)))), ((int)(((byte)(104)))), ((int)(((byte)(255)))));
|
this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(27)))), ((int)(((byte)(104)))), ((int)(((byte)(255)))));
|
||||||
this.BackgroundImage = global::compabetov2.Properties.Resources.Form;
|
this.BackgroundImage = global::compabetov2.Properties.Resources.Form;
|
||||||
this.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
|
this.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
|
||||||
this.ClientSize = new System.Drawing.Size(1153, 1047);
|
this.ClientSize = new System.Drawing.Size(1294, 1077);
|
||||||
this.ControlBox = false;
|
this.ControlBox = false;
|
||||||
|
this.Controls.Add(this.button1);
|
||||||
this.Controls.Add(this.btnMas);
|
this.Controls.Add(this.btnMas);
|
||||||
this.Controls.Add(this.btnMenos);
|
this.Controls.Add(this.btnMenos);
|
||||||
this.Controls.Add(this.lbContador);
|
this.Controls.Add(this.lbContador);
|
||||||
this.Controls.Add(this.panelVentas);
|
this.Controls.Add(this.panelVentas);
|
||||||
this.DoubleBuffered = true;
|
this.DoubleBuffered = true;
|
||||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
|
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
|
||||||
this.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
|
this.Margin = new System.Windows.Forms.Padding(4);
|
||||||
this.Name = "RegistroVentas";
|
this.Name = "RegistroVentas";
|
||||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
|
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
|
||||||
this.Load += new System.EventHandler(this.RegistroVentas_Load);
|
this.Load += new System.EventHandler(this.RegistroVentas_Load);
|
||||||
@@ -108,5 +122,6 @@
|
|||||||
private System.Windows.Forms.Label lbContador;
|
private System.Windows.Forms.Label lbContador;
|
||||||
private System.Windows.Forms.Button btnMenos;
|
private System.Windows.Forms.Button btnMenos;
|
||||||
private System.Windows.Forms.Button btnMas;
|
private System.Windows.Forms.Button btnMas;
|
||||||
|
private System.Windows.Forms.Button button1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -158,5 +158,10 @@ namespace compabetov2
|
|||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void button1_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
Close();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Generated
+1
@@ -257,6 +257,7 @@
|
|||||||
this.button5.TabIndex = 12;
|
this.button5.TabIndex = 12;
|
||||||
this.button5.Text = "Salir";
|
this.button5.Text = "Salir";
|
||||||
this.button5.UseVisualStyleBackColor = false;
|
this.button5.UseVisualStyleBackColor = false;
|
||||||
|
this.button5.Click += new System.EventHandler(this.button5_Click);
|
||||||
//
|
//
|
||||||
// flowLayoutPanel3
|
// flowLayoutPanel3
|
||||||
//
|
//
|
||||||
|
|||||||
+19
-2
@@ -16,6 +16,7 @@ using System.Threading.Tasks;
|
|||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
using System.Windows.Forms.VisualStyles;
|
using System.Windows.Forms.VisualStyles;
|
||||||
using static System.Windows.Forms.VisualStyles.VisualStyleElement.TextBox;
|
using static System.Windows.Forms.VisualStyles.VisualStyleElement.TextBox;
|
||||||
|
using compabetov2.admin;
|
||||||
|
|
||||||
namespace compabetov2
|
namespace compabetov2
|
||||||
{
|
{
|
||||||
@@ -891,8 +892,24 @@ namespace compabetov2
|
|||||||
private void button3_Click(object sender, EventArgs e)
|
private void button3_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
if (loginPrincipal.tipo.Equals("empleado"))
|
||||||
|
{
|
||||||
|
MessageBox.Show("Usted no tiene permisos de acceder a este apartado");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
crud crud = new crud();
|
||||||
|
crud.Owner = this;
|
||||||
|
crud.Show();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
private void button5_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
Close();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ namespace compabetov2.admin
|
|||||||
txtNombre.Text,
|
txtNombre.Text,
|
||||||
Decimal.Parse(txtPrecio.Text),
|
Decimal.Parse(txtPrecio.Text),
|
||||||
int.Parse(txtCantidad.Text),
|
int.Parse(txtCantidad.Text),
|
||||||
imagePath,
|
Path.GetFileName(imagePath),
|
||||||
producto.idProducto,
|
producto.idProducto,
|
||||||
Decimal.Parse(txtPrecioCompra.Text)
|
Decimal.Parse(txtPrecioCompra.Text)
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -25,13 +25,11 @@ namespace compabetov2.admin
|
|||||||
|
|
||||||
private void pictureBox2_Click(object sender, EventArgs e)
|
private void pictureBox2_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
try
|
|
||||||
{
|
|
||||||
string nombre = txtNombre.Text;
|
string nombre = txtNombre.Text;
|
||||||
decimal precio = 0;
|
decimal precio = 0;
|
||||||
//valida que se haya colocado alguna imagen
|
//valida que se haya colocado alguna imagen
|
||||||
if (!imagePath.Equals("")) {
|
if (!imagePath.Equals("")) {
|
||||||
Producto producto = new Producto(-1, nombre, "", precio, imagePath, 0);
|
Producto producto = new Producto(-1, nombre, "", precio, Path.GetFileName(imagePath), 0);
|
||||||
if (service.insertarProducto(producto))
|
if (service.insertarProducto(producto))
|
||||||
{
|
{
|
||||||
string destinationFolder = Path.Combine(Application.StartupPath, "Resources");
|
string destinationFolder = Path.Combine(Application.StartupPath, "Resources");
|
||||||
@@ -40,6 +38,7 @@ namespace compabetov2.admin
|
|||||||
|
|
||||||
Close();
|
Close();
|
||||||
ventanaPadre.llenarLayout();
|
ventanaPadre.llenarLayout();
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -47,10 +46,7 @@ namespace compabetov2.admin
|
|||||||
MessageBox.Show("Por favor seleccione alguna imagen", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
MessageBox.Show("Por favor seleccione alguna imagen", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
|
||||||
catch {
|
|
||||||
MessageBox.Show("Por favor introduzca un precio valido", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void button1_Click(object sender, EventArgs e)
|
private void button1_Click(object sender, EventArgs e)
|
||||||
|
|||||||
Binary file not shown.
|
After Width: | Height: | Size: 617 KiB |
|
Before Width: | Height: | Size: 211 KiB After Width: | Height: | Size: 211 KiB |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
Before Width: | Height: | Size: 27 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 506 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 2.1 MiB |
BIN
Binary file not shown.
@@ -466,10 +466,6 @@ namespace compabetov2.database
|
|||||||
string sql = "INSERT INTO Producto (nombre, descripcion, precio,img, stock, fk_idcategoria) " +
|
string sql = "INSERT INTO Producto (nombre, descripcion, precio,img, stock, fk_idcategoria) " +
|
||||||
"VALUES (@nombre, @descripcion, @precio,@img , @stock, @idcategoria)";
|
"VALUES (@nombre, @descripcion, @precio,@img , @stock, @idcategoria)";
|
||||||
|
|
||||||
if (!producto.img.Equals(""))
|
|
||||||
{
|
|
||||||
producto.img = guardarImg(producto.img);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
using (SQLiteCommand command = new SQLiteCommand(sql, conexion))
|
using (SQLiteCommand command = new SQLiteCommand(sql, conexion))
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user