This commit is contained in:
Michael Robles
2023-12-22 22:36:22 -07:00
parent afef06b7aa
commit ee731cedf2
20 changed files with 187 additions and 103 deletions
View File
Binary file not shown.
+125 -87
View File
@@ -28,36 +28,42 @@
/// </summary> /// </summary>
private void InitializeComponent() private void InitializeComponent()
{ {
this.components = new System.ComponentModel.Container();
this.panel1 = new System.Windows.Forms.Panel(); this.panel1 = new System.Windows.Forms.Panel();
this.pictureBox2 = new System.Windows.Forms.PictureBox();
this.pictureBox1 = new System.Windows.Forms.PictureBox();
this.pictureBox3 = new System.Windows.Forms.PictureBox();
this.pictureBox4 = new System.Windows.Forms.PictureBox();
this.pictureBox5 = new System.Windows.Forms.PictureBox();
this.pictureBox6 = new System.Windows.Forms.PictureBox();
this.flowLayoutPanel1 = new System.Windows.Forms.FlowLayoutPanel(); this.flowLayoutPanel1 = new System.Windows.Forms.FlowLayoutPanel();
this.panel2 = new System.Windows.Forms.Panel(); this.panel2 = new System.Windows.Forms.Panel();
this.pictureBox7 = new System.Windows.Forms.PictureBox();
this.button1 = new System.Windows.Forms.Button(); this.button1 = new System.Windows.Forms.Button();
this.button2 = new System.Windows.Forms.Button(); this.button2 = new System.Windows.Forms.Button();
this.button3 = new System.Windows.Forms.Button(); this.button3 = new System.Windows.Forms.Button();
this.button4 = new System.Windows.Forms.Button(); this.button4 = new System.Windows.Forms.Button();
this.button5 = new System.Windows.Forms.Button(); this.button5 = new System.Windows.Forms.Button();
this.pictureBox7 = new System.Windows.Forms.PictureBox(); this.pictureBox4 = new System.Windows.Forms.PictureBox();
this.pictureBox5 = new System.Windows.Forms.PictureBox();
this.pictureBox6 = new System.Windows.Forms.PictureBox();
this.pictureBox3 = new System.Windows.Forms.PictureBox();
this.pictureBox2 = new System.Windows.Forms.PictureBox();
this.pictureBox1 = new System.Windows.Forms.PictureBox();
this.lblhora = new System.Windows.Forms.Label();
this.lblfecha = new System.Windows.Forms.Label();
this.horafecha = new System.Windows.Forms.Timer(this.components);
this.panel1.SuspendLayout(); this.panel1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.pictureBox2)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.pictureBox3)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.pictureBox4)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.pictureBox5)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.pictureBox6)).BeginInit();
this.flowLayoutPanel1.SuspendLayout(); this.flowLayoutPanel1.SuspendLayout();
this.panel2.SuspendLayout(); this.panel2.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.pictureBox7)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.pictureBox7)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.pictureBox4)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.pictureBox5)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.pictureBox6)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.pictureBox3)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.pictureBox2)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
this.SuspendLayout(); this.SuspendLayout();
// //
// panel1 // panel1
// //
this.panel1.BackgroundImageLayout = System.Windows.Forms.ImageLayout.None; this.panel1.BackgroundImageLayout = System.Windows.Forms.ImageLayout.None;
this.panel1.Controls.Add(this.lblfecha);
this.panel1.Controls.Add(this.lblhora);
this.panel1.Controls.Add(this.flowLayoutPanel1); this.panel1.Controls.Add(this.flowLayoutPanel1);
this.panel1.Controls.Add(this.pictureBox4); this.panel1.Controls.Add(this.pictureBox4);
this.panel1.Controls.Add(this.pictureBox5); this.panel1.Controls.Add(this.pictureBox5);
@@ -71,66 +77,6 @@
this.panel1.Size = new System.Drawing.Size(1924, 1055); this.panel1.Size = new System.Drawing.Size(1924, 1055);
this.panel1.TabIndex = 4; this.panel1.TabIndex = 4;
// //
// pictureBox2
//
this.pictureBox2.Image = global::compabetov2.Properties.Resources.Vender;
this.pictureBox2.Location = new System.Drawing.Point(482, 103);
this.pictureBox2.Name = "pictureBox2";
this.pictureBox2.Size = new System.Drawing.Size(293, 282);
this.pictureBox2.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
this.pictureBox2.TabIndex = 2;
this.pictureBox2.TabStop = false;
//
// pictureBox1
//
this.pictureBox1.Image = global::compabetov2.Properties.Resources.Personal;
this.pictureBox1.Location = new System.Drawing.Point(912, 103);
this.pictureBox1.Name = "pictureBox1";
this.pictureBox1.Size = new System.Drawing.Size(293, 282);
this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
this.pictureBox1.TabIndex = 1;
this.pictureBox1.TabStop = false;
//
// pictureBox3
//
this.pictureBox3.Image = global::compabetov2.Properties.Resources.Envios;
this.pictureBox3.Location = new System.Drawing.Point(1348, 103);
this.pictureBox3.Name = "pictureBox3";
this.pictureBox3.Size = new System.Drawing.Size(293, 282);
this.pictureBox3.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
this.pictureBox3.TabIndex = 3;
this.pictureBox3.TabStop = false;
//
// pictureBox4
//
this.pictureBox4.Image = global::compabetov2.Properties.Resources.inventario;
this.pictureBox4.Location = new System.Drawing.Point(1348, 560);
this.pictureBox4.Name = "pictureBox4";
this.pictureBox4.Size = new System.Drawing.Size(293, 282);
this.pictureBox4.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
this.pictureBox4.TabIndex = 6;
this.pictureBox4.TabStop = false;
//
// pictureBox5
//
this.pictureBox5.Image = global::compabetov2.Properties.Resources.Cuentas;
this.pictureBox5.Location = new System.Drawing.Point(482, 560);
this.pictureBox5.Name = "pictureBox5";
this.pictureBox5.Size = new System.Drawing.Size(293, 282);
this.pictureBox5.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
this.pictureBox5.TabIndex = 5;
this.pictureBox5.TabStop = false;
//
// pictureBox6
//
this.pictureBox6.Image = global::compabetov2.Properties.Resources.mermas;
this.pictureBox6.Location = new System.Drawing.Point(912, 560);
this.pictureBox6.Name = "pictureBox6";
this.pictureBox6.Size = new System.Drawing.Size(293, 282);
this.pictureBox6.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
this.pictureBox6.TabIndex = 4;
this.pictureBox6.TabStop = false;
//
// flowLayoutPanel1 // flowLayoutPanel1
// //
this.flowLayoutPanel1.BackgroundImage = global::compabetov2.Properties.Resources.rec; this.flowLayoutPanel1.BackgroundImage = global::compabetov2.Properties.Resources.rec;
@@ -154,6 +100,16 @@
this.panel2.Size = new System.Drawing.Size(312, 263); this.panel2.Size = new System.Drawing.Size(312, 263);
this.panel2.TabIndex = 8; this.panel2.TabIndex = 8;
// //
// pictureBox7
//
this.pictureBox7.Image = global::compabetov2.Properties.Resources.HomeroMenu;
this.pictureBox7.Location = new System.Drawing.Point(64, 35);
this.pictureBox7.Name = "pictureBox7";
this.pictureBox7.Size = new System.Drawing.Size(190, 197);
this.pictureBox7.SizeMode = System.Windows.Forms.PictureBoxSizeMode.AutoSize;
this.pictureBox7.TabIndex = 8;
this.pictureBox7.TabStop = false;
//
// button1 // button1
// //
this.button1.BackColor = System.Drawing.Color.Transparent; this.button1.BackColor = System.Drawing.Color.Transparent;
@@ -240,15 +196,93 @@
this.button5.Text = "Salir"; this.button5.Text = "Salir";
this.button5.UseVisualStyleBackColor = false; this.button5.UseVisualStyleBackColor = false;
// //
// pictureBox7 // pictureBox4
// //
this.pictureBox7.Image = global::compabetov2.Properties.Resources.HomeroMenu; this.pictureBox4.Image = global::compabetov2.Properties.Resources.inventario;
this.pictureBox7.Location = new System.Drawing.Point(64, 35); this.pictureBox4.Location = new System.Drawing.Point(1450, 666);
this.pictureBox7.Name = "pictureBox7"; this.pictureBox4.Name = "pictureBox4";
this.pictureBox7.Size = new System.Drawing.Size(190, 197); this.pictureBox4.Size = new System.Drawing.Size(293, 282);
this.pictureBox7.SizeMode = System.Windows.Forms.PictureBoxSizeMode.AutoSize; this.pictureBox4.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
this.pictureBox7.TabIndex = 8; this.pictureBox4.TabIndex = 6;
this.pictureBox7.TabStop = false; this.pictureBox4.TabStop = false;
//
// pictureBox5
//
this.pictureBox5.Image = global::compabetov2.Properties.Resources.Cuentas;
this.pictureBox5.Location = new System.Drawing.Point(584, 666);
this.pictureBox5.Name = "pictureBox5";
this.pictureBox5.Size = new System.Drawing.Size(293, 282);
this.pictureBox5.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
this.pictureBox5.TabIndex = 5;
this.pictureBox5.TabStop = false;
//
// pictureBox6
//
this.pictureBox6.Image = global::compabetov2.Properties.Resources.mermas;
this.pictureBox6.Location = new System.Drawing.Point(1014, 666);
this.pictureBox6.Name = "pictureBox6";
this.pictureBox6.Size = new System.Drawing.Size(293, 282);
this.pictureBox6.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
this.pictureBox6.TabIndex = 4;
this.pictureBox6.TabStop = false;
//
// pictureBox3
//
this.pictureBox3.Image = global::compabetov2.Properties.Resources.Envios;
this.pictureBox3.Location = new System.Drawing.Point(1450, 209);
this.pictureBox3.Name = "pictureBox3";
this.pictureBox3.Size = new System.Drawing.Size(293, 282);
this.pictureBox3.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
this.pictureBox3.TabIndex = 3;
this.pictureBox3.TabStop = false;
//
// pictureBox2
//
this.pictureBox2.Image = global::compabetov2.Properties.Resources.Vender;
this.pictureBox2.Location = new System.Drawing.Point(584, 209);
this.pictureBox2.Name = "pictureBox2";
this.pictureBox2.Size = new System.Drawing.Size(293, 282);
this.pictureBox2.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
this.pictureBox2.TabIndex = 2;
this.pictureBox2.TabStop = false;
//
// pictureBox1
//
this.pictureBox1.Image = global::compabetov2.Properties.Resources.Personal;
this.pictureBox1.Location = new System.Drawing.Point(1014, 209);
this.pictureBox1.Name = "pictureBox1";
this.pictureBox1.Size = new System.Drawing.Size(293, 282);
this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
this.pictureBox1.TabIndex = 1;
this.pictureBox1.TabStop = false;
//
// lblhora
//
this.lblhora.AutoSize = true;
this.lblhora.Font = new System.Drawing.Font("Poppins SemiBold", 60F);
this.lblhora.ForeColor = System.Drawing.Color.MediumBlue;
this.lblhora.Location = new System.Drawing.Point(975, -6);
this.lblhora.Name = "lblhora";
this.lblhora.Size = new System.Drawing.Size(365, 177);
this.lblhora.TabIndex = 8;
this.lblhora.Text = "label1";
//
// lblfecha
//
this.lblfecha.AutoSize = true;
this.lblfecha.Font = new System.Drawing.Font("Poppins SemiBold", 30F);
this.lblfecha.ForeColor = System.Drawing.Color.Navy;
this.lblfecha.Location = new System.Drawing.Point(776, 112);
this.lblfecha.Name = "lblfecha";
this.lblfecha.Size = new System.Drawing.Size(193, 88);
this.lblfecha.TabIndex = 9;
this.lblfecha.Text = "label2";
this.lblfecha.TextAlign = System.Drawing.ContentAlignment.TopCenter;
//
// horafecha
//
this.horafecha.Enabled = true;
this.horafecha.Tick += new System.EventHandler(this.horafecha_Tick);
// //
// MenuPrincipal // MenuPrincipal
// //
@@ -263,16 +297,17 @@
this.WindowState = System.Windows.Forms.FormWindowState.Maximized; this.WindowState = System.Windows.Forms.FormWindowState.Maximized;
this.Load += new System.EventHandler(this.MenuPrincipal_Load); this.Load += new System.EventHandler(this.MenuPrincipal_Load);
this.panel1.ResumeLayout(false); this.panel1.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.pictureBox2)).EndInit(); this.panel1.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.pictureBox3)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.pictureBox4)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.pictureBox5)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.pictureBox6)).EndInit();
this.flowLayoutPanel1.ResumeLayout(false); this.flowLayoutPanel1.ResumeLayout(false);
this.panel2.ResumeLayout(false); this.panel2.ResumeLayout(false);
this.panel2.PerformLayout(); this.panel2.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.pictureBox7)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.pictureBox7)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.pictureBox4)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.pictureBox5)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.pictureBox6)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.pictureBox3)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.pictureBox2)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
this.ResumeLayout(false); this.ResumeLayout(false);
} }
@@ -292,6 +327,9 @@
private System.Windows.Forms.Button button4; private System.Windows.Forms.Button button4;
private System.Windows.Forms.Button button5; private System.Windows.Forms.Button button5;
private System.Windows.Forms.PictureBox pictureBox7; private System.Windows.Forms.PictureBox pictureBox7;
private System.Windows.Forms.Label lblfecha;
private System.Windows.Forms.Label lblhora;
private System.Windows.Forms.Timer horafecha;
} }
} }
+7
View File
@@ -42,6 +42,13 @@ namespace compabetov2
}
private void horafecha_Tick(object sender, EventArgs e)
{
lblhora.Text = DateTime.Now.ToString("h:mm:ss");
lblfecha.Text = DateTime.Now.ToLongDateString();
} }
} }
} }
+3
View File
@@ -117,6 +117,9 @@
<resheader name="writer"> <resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader> </resheader>
<metadata name="horafecha.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
<metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> <metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>51</value> <value>51</value>
</metadata> </metadata>
Binary file not shown.
Binary file not shown.
+2
View File
@@ -67,6 +67,8 @@
<ItemGroup> <ItemGroup>
<Compile Include="database\conexion.cs" /> <Compile Include="database\conexion.cs" />
<Compile Include="database\DAO.cs" /> <Compile Include="database\DAO.cs" />
<Compile Include="database\modelos\Categoria.cs" />
<Compile Include="database\modelos\Producto.cs" />
<Compile Include="database\modelos\usuario.cs" /> <Compile Include="database\modelos\usuario.cs" />
<Compile Include="database\service.cs" /> <Compile Include="database\service.cs" />
<Compile Include="login.cs"> <Compile Include="login.cs">
+33 -3
View File
@@ -129,6 +129,35 @@ namespace compabetov2.database
} }
} }
public static bool insertarCategoriaDAO(Categoria categoria)
{
var db_conexion = new Conexion();
try
{
using (SQLiteConnection conexion = db_conexion.get_connection())
{
conexion.Open();
string sql = "INSERT INTO Categoria (nombre, descripcion) " +
"VALUES (@nombre, @descripcion)";
using (SQLiteCommand command = new SQLiteCommand(sql, conexion))
{
command.Parameters.AddWithValue("@nombre", categoria.nombre);
command.Parameters.AddWithValue("@descripcion", categoria.descripcion);
int filasAfectadas = command.ExecuteNonQuery();
if (filasAfectadas > 0) { return true; }
else { return false; }
}
}
}
catch (SQLiteException ex)
{
MessageBox.Show(ex.Message);
return false;
}
}
private static void crearDB() private static void crearDB()
{ {
var db_conexion = new Conexion(); var db_conexion = new Conexion();
@@ -144,7 +173,7 @@ namespace compabetov2.database
"DROP TABLE IF EXISTS Categoria", "DROP TABLE IF EXISTS Categoria",
"CREATE TABLE Empleado (idempleado INTEGER PRIMARY KEY AUTOINCREMENT, nombre TEXT NOT NULL, "+ "CREATE TABLE Empleado (idempleado INTEGER PRIMARY KEY AUTOINCREMENT, nombre TEXT NOT NULL, "+
"apellido TEXT NOT NULL, calle TEXT NOT NULL, fecha_contratacion TEXT NOT NULL, colonia TEXT NOT NULL, cp TEXT NOT NULL, no_ext TEXT NOT NULL" + "apellido TEXT NOT NULL, calle TEXT NOT NULL, fecha_contratacion TEXT NOT NULL, colonia TEXT NOT NULL, cp TEXT NOT NULL, no_ext TEXT NOT NULL," +
"no_int TEXT NOT NULL, referencia TEXT NOT NULL, fecha_nac TEXT NOT NULL, telefono TEXT NOT NULL, activo INTEGER NOT NULL)", "no_int TEXT NOT NULL, referencia TEXT NOT NULL, fecha_nac TEXT NOT NULL, telefono TEXT NOT NULL, activo INTEGER NOT NULL)",
"CREATE TABLE Login (idlogin INTEGER PRIMARY KEY AUTOINCREMENT, tipo TEXT NOT NULL, usuario TEXT NOT NULL, "+ "CREATE TABLE Login (idlogin INTEGER PRIMARY KEY AUTOINCREMENT, tipo TEXT NOT NULL, usuario TEXT NOT NULL, "+
@@ -153,9 +182,10 @@ namespace compabetov2.database
"CREATE TABLE Categoria (idcategoria INTEGER PRIMARY KEY AUTOINCREMENT, nombre TEXT NOT NULL, descripcion TEXT NOT NULL)", "CREATE TABLE Categoria (idcategoria INTEGER PRIMARY KEY AUTOINCREMENT, nombre TEXT NOT NULL, descripcion TEXT NOT NULL)",
"CREATE TABLE Producto (idproducto INTEGER PRIMARY KEY AUTOINCREMENT, nombre TEXT NOT NULL, descripcion TEXT NOT NULL, "+ "CREATE TABLE Producto (idproducto INTEGER PRIMARY KEY AUTOINCREMENT, nombre TEXT NOT NULL, descripcion TEXT NOT NULL, "+
"precio DECIMAL(10, 2) NOT NULL, stock INTEGER NOT NULL, fk_idcategoria INTEGER NOT NULL, FOREIGN KEY (fk_idcategoria) REFERENCES Categoria (idcategoria))", "precio DECIMAL(10, 2) NOT NULL, stock INTEGER NOT NULL, img TEXT NOT NULL, " +
"fk_idcategoria INTEGER NOT NULL, FOREIGN KEY (fk_idcategoria) REFERENCES Categoria (idcategoria))",
"INSERT INTO Empleado ( nombre, apellido, calle, fecha_contratacion, colonia, cp, no_ext, referencia, fecha_nac, telefono, activo) VALUES('jefe', '', '', '', '', '', '', '', '', '', 0);", "INSERT INTO Empleado ( nombre, apellido, calle, fecha_contratacion, colonia, cp, no_ext,no_int, referencia, fecha_nac, telefono, activo) VALUES('jefe', '', '', '', '', '', '', '', '', '', '', 0);",
"INSERT INTO Login ( tipo, usuario, contra, fk_idempleado) VALUES('admin', 'admin', '12345', 1);" "INSERT INTO Login ( tipo, usuario, contra, fk_idempleado) VALUES('admin', 'admin', '12345', 1);"
}; };
+3 -3
View File
@@ -10,13 +10,13 @@ namespace compabetov2.database.modelos
{ {
public int idCategoria; public int idCategoria;
public string nombre; public string nombre;
public string descricion; public string descripcion;
public Categoria(int idCategoria, string nombre = "", string descricion = "") public Categoria(int idCategoria, string nombre = "", string descripcion = "")
{ {
this.idCategoria = idCategoria; this.idCategoria = idCategoria;
this.nombre = nombre; this.nombre = nombre;
this.descricion = descricion; this.descripcion = descripcion;
} }
} }
} }
+3 -1
View File
@@ -12,15 +12,17 @@ namespace compabetov2.database.modelos
public string nombre; public string nombre;
public string descripcion; public string descripcion;
public decimal precion; public decimal precion;
public string img;
public int stock; public int stock;
public Categoria categoria; public Categoria categoria;
public Producto( string nombre, string descripcion, decimal precion, Categoria categoria, int stock = 0, int idProducto = 0) public Producto(int idProducto = 0, string nombre = "", string descripcion = "", decimal precion = 0.0M, string img = "", int stock = 0, Categoria categoria = null)
{ {
this.idProducto = idProducto; this.idProducto = idProducto;
this.nombre = nombre; this.nombre = nombre;
this.descripcion = descripcion; this.descripcion = descripcion;
this.precion = precion; this.precion = precion;
this.img = img;
this.stock = stock; this.stock = stock;
this.categoria = categoria; this.categoria = categoria;
} }
+10 -4
View File
@@ -30,12 +30,13 @@ namespace compabetov2.database
reader["descripcion"].ToString()); reader["descripcion"].ToString());
Producto producto = new Producto( Producto producto = new Producto(
(int)reader["idproducto"],
reader["nombre"].ToString(), reader["nombre"].ToString(),
reader["descripcion"].ToString(), reader["descripcion"].ToString(),
(decimal)reader["precio"], (decimal)reader["precio"],
categoria, reader["img"].ToString(),
(int)reader["stock"], (int)reader["stock"],
(int)reader["idproducto"]); categoria);
productos.Add(producto); productos.Add(producto);
} }
@@ -47,5 +48,10 @@ namespace compabetov2.database
{ {
return DAO.insertarProductoDAO(producto); return DAO.insertarProductoDAO(producto);
} }
public static bool insertarCategoriaDAO(Categoria categoria)
{
return DAO.insertarCategoriaDAO(categoria);
}
} }
} }
Binary file not shown.
Binary file not shown.
@@ -1,5 +1 @@
<<<<<<< HEAD 245f61b4e520a1fb9e0e2f4a53e49df7efd978ab
05819d235d91141814c11abb2c220a18419f2908
=======
0fb7daba789e834843a2b65248efd03b07d0f0ede738d9263d10b691f02055b9
>>>>>>> d003e4c42794673ebd38c404faa45e958bf8ef42
Binary file not shown.
Binary file not shown.
Binary file not shown.