diff --git a/.vs/compabetov2.csproj.dtbcache.json b/.vs/compabetov2.csproj.dtbcache.json index c3c8256..3d3d774 100644 --- a/.vs/compabetov2.csproj.dtbcache.json +++ b/.vs/compabetov2.csproj.dtbcache.json @@ -1 +1 @@ -{"RootPath":"C:\\Users\\carsu\\source\\repos\\compabetoOG","ProjectFileName":"compabetov2.csproj","Configuration":"Debug|AnyCPU","FrameworkPath":"","Sources":[{"SourceFile":"AgregarEmpleado.cs"},{"SourceFile":"AgregarEmpleado.Designer.cs"},{"SourceFile":"AgregarLogin.cs"},{"SourceFile":"AgregarLogin.Designer.cs"},{"SourceFile":"cuentas.cs"},{"SourceFile":"cuentas.Designer.cs"},{"SourceFile":"database\\conexion.cs"},{"SourceFile":"database\\DAO.cs"},{"SourceFile":"database\\modelos\\Categoria.cs"},{"SourceFile":"database\\modelos\\Cliente.cs"},{"SourceFile":"database\\modelos\\Empleado.cs"},{"SourceFile":"database\\modelos\\Producto.cs"},{"SourceFile":"database\\modelos\\usuario.cs"},{"SourceFile":"database\\service.cs"},{"SourceFile":"EditarEmpleado.cs"},{"SourceFile":"EditarEmpleado.Designer.cs"},{"SourceFile":"envios.cs"},{"SourceFile":"envios.Designer.cs"},{"SourceFile":"inventario.cs"},{"SourceFile":"inventario.Designer.cs"},{"SourceFile":"login.cs"},{"SourceFile":"login.Designer.cs"},{"SourceFile":"MenuPrincipal.cs"},{"SourceFile":"MenuPrincipal.Designer.cs"},{"SourceFile":"mermas.cs"},{"SourceFile":"mermas.Designer.cs"},{"SourceFile":"personal.cs"},{"SourceFile":"personal.Designer.cs"},{"SourceFile":"preguntaLogin.cs"},{"SourceFile":"preguntaLogin.Designer.cs"},{"SourceFile":"Program.cs"},{"SourceFile":"Properties\\AssemblyInfo.cs"},{"SourceFile":"vender.cs"},{"SourceFile":"vender.Designer.cs"},{"SourceFile":"Properties\\Resources.Designer.cs"},{"SourceFile":"Properties\\Settings.Designer.cs"},{"SourceFile":"obj\\Debug\\.NETFramework,Version=v4.7.2.AssemblyAttributes.cs"}],"References":[{"Reference":"C:\\Users\\carsu\\source\\repos\\compabetoOG\\packages\\EntityFramework.6.4.4\\lib\\net45\\EntityFramework.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Users\\carsu\\source\\repos\\compabetoOG\\packages\\EntityFramework.6.4.4\\lib\\net45\\EntityFramework.SqlServer.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.7.2\\Microsoft.CSharp.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.7.2\\mscorlib.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.7.2\\System.ComponentModel.DataAnnotations.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.7.2\\System.Core.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.7.2\\System.Data.DataSetExtensions.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.7.2\\System.Data.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Users\\carsu\\source\\repos\\compabetoOG\\packages\\Stub.System.Data.SQLite.Core.NetFramework.1.0.118.0\\lib\\net46\\System.Data.SQLite.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Users\\carsu\\source\\repos\\compabetoOG\\packages\\System.Data.SQLite.EF6.1.0.118.0\\lib\\net46\\System.Data.SQLite.EF6.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Users\\carsu\\source\\repos\\compabetoOG\\packages\\System.Data.SQLite.Linq.1.0.118.0\\lib\\net46\\System.Data.SQLite.Linq.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.7.2\\System.Deployment.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.7.2\\System.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.7.2\\System.Drawing.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.7.2\\System.Net.Http.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.7.2\\System.Windows.Forms.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.7.2\\System.Xml.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.7.2\\System.Xml.Linq.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""}],"Analyzers":[],"Outputs":[{"OutputItemFullPath":"C:\\Users\\carsu\\source\\repos\\compabetoOG\\bin\\Debug\\compabetov2.exe","OutputItemRelativePath":"compabetov2.exe"},{"OutputItemFullPath":"C:\\Users\\carsu\\source\\repos\\compabetoOG\\bin\\Debug\\compabetov2.pdb","OutputItemRelativePath":"compabetov2.pdb"}],"CopyToOutputEntries":[]} \ No newline at end of file +{"RootPath":"C:\\Users\\Googl\\Documents\\compabetoOG","ProjectFileName":"compabetov2.csproj","Configuration":"Debug|AnyCPU","FrameworkPath":"","Sources":[{"SourceFile":"AgregarEmpleado.cs"},{"SourceFile":"AgregarEmpleado.Designer.cs"},{"SourceFile":"AgregarLogin.cs"},{"SourceFile":"AgregarLogin.Designer.cs"},{"SourceFile":"cuentas.cs"},{"SourceFile":"cuentas.Designer.cs"},{"SourceFile":"database\\conexion.cs"},{"SourceFile":"database\\DAO.cs"},{"SourceFile":"database\\modelos\\Categoria.cs"},{"SourceFile":"database\\modelos\\Cliente.cs"},{"SourceFile":"database\\modelos\\Empleado.cs"},{"SourceFile":"database\\modelos\\Producto.cs"},{"SourceFile":"database\\modelos\\usuario.cs"},{"SourceFile":"database\\service.cs"},{"SourceFile":"EditarEmpleado.cs"},{"SourceFile":"EditarEmpleado.Designer.cs"},{"SourceFile":"envios.cs"},{"SourceFile":"envios.Designer.cs"},{"SourceFile":"inventario.cs"},{"SourceFile":"inventario.Designer.cs"},{"SourceFile":"login.cs"},{"SourceFile":"login.Designer.cs"},{"SourceFile":"MenuPrincipal.cs"},{"SourceFile":"MenuPrincipal.Designer.cs"},{"SourceFile":"mermas.cs"},{"SourceFile":"mermas.Designer.cs"},{"SourceFile":"personal.cs"},{"SourceFile":"personal.Designer.cs"},{"SourceFile":"preguntaLogin.cs"},{"SourceFile":"preguntaLogin.Designer.cs"},{"SourceFile":"Program.cs"},{"SourceFile":"Properties\\AssemblyInfo.cs"},{"SourceFile":"vender.cs"},{"SourceFile":"vender.Designer.cs"},{"SourceFile":"Properties\\Resources.Designer.cs"},{"SourceFile":"Properties\\Settings.Designer.cs"},{"SourceFile":"obj\\Debug\\.NETFramework,Version=v4.7.2.AssemblyAttributes.cs"}],"References":[{"Reference":"C:\\Users\\Googl\\Documents\\compabetoOG\\packages\\EntityFramework.6.4.4\\lib\\net45\\EntityFramework.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Users\\Googl\\Documents\\compabetoOG\\packages\\EntityFramework.6.4.4\\lib\\net45\\EntityFramework.SqlServer.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.7.2\\Microsoft.CSharp.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.7.2\\mscorlib.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.7.2\\System.ComponentModel.DataAnnotations.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.7.2\\System.Core.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.7.2\\System.Data.DataSetExtensions.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.7.2\\System.Data.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Users\\Googl\\Documents\\compabetoOG\\packages\\Stub.System.Data.SQLite.Core.NetFramework.1.0.118.0\\lib\\net46\\System.Data.SQLite.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Users\\Googl\\Documents\\compabetoOG\\packages\\System.Data.SQLite.EF6.1.0.118.0\\lib\\net46\\System.Data.SQLite.EF6.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Users\\Googl\\Documents\\compabetoOG\\packages\\System.Data.SQLite.Linq.1.0.118.0\\lib\\net46\\System.Data.SQLite.Linq.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.7.2\\System.Deployment.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.7.2\\System.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.7.2\\System.Drawing.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.7.2\\System.Net.Http.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.7.2\\System.Windows.Forms.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.7.2\\System.Xml.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.7.2\\System.Xml.Linq.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""}],"Analyzers":[],"Outputs":[{"OutputItemFullPath":"C:\\Users\\Googl\\Documents\\compabetoOG\\bin\\Debug\\compabetov2.exe","OutputItemRelativePath":"compabetov2.exe"},{"OutputItemFullPath":"C:\\Users\\Googl\\Documents\\compabetoOG\\bin\\Debug\\compabetov2.pdb","OutputItemRelativePath":"compabetov2.pdb"}],"CopyToOutputEntries":[]} \ No newline at end of file diff --git a/bin/Debug/compabetov2.exe b/bin/Debug/compabetov2.exe index fdd7130..8240f03 100644 Binary files a/bin/Debug/compabetov2.exe and b/bin/Debug/compabetov2.exe differ diff --git a/bin/Debug/compabetov2.pdb b/bin/Debug/compabetov2.pdb index 61f7be7..d1b1c3c 100644 Binary files a/bin/Debug/compabetov2.pdb and b/bin/Debug/compabetov2.pdb differ diff --git a/obj/Debug/DesignTimeResolveAssemblyReferences.cache b/obj/Debug/DesignTimeResolveAssemblyReferences.cache index 10a1a65..7c9a078 100644 Binary files a/obj/Debug/DesignTimeResolveAssemblyReferences.cache and b/obj/Debug/DesignTimeResolveAssemblyReferences.cache differ diff --git a/obj/Debug/compabetov2.csproj.GenerateResource.cache b/obj/Debug/compabetov2.csproj.GenerateResource.cache index cf54eb6..efba121 100644 Binary files a/obj/Debug/compabetov2.csproj.GenerateResource.cache and b/obj/Debug/compabetov2.csproj.GenerateResource.cache differ diff --git a/obj/Debug/compabetov2.exe b/obj/Debug/compabetov2.exe index fdd7130..8240f03 100644 Binary files a/obj/Debug/compabetov2.exe and b/obj/Debug/compabetov2.exe differ diff --git a/obj/Debug/compabetov2.pdb b/obj/Debug/compabetov2.pdb index 61f7be7..d1b1c3c 100644 Binary files a/obj/Debug/compabetov2.pdb and b/obj/Debug/compabetov2.pdb differ diff --git a/personal.Designer.cs b/personal.Designer.cs index 537706c..c73a116 100644 --- a/personal.Designer.cs +++ b/personal.Designer.cs @@ -53,8 +53,8 @@ // pictureBox7 // this.pictureBox7.Image = global::compabetov2.Properties.Resources.HomeroMenu; - this.pictureBox7.Location = new System.Drawing.Point(48, 28); - this.pictureBox7.Margin = new System.Windows.Forms.Padding(2); + this.pictureBox7.Location = new System.Drawing.Point(64, 34); + this.pictureBox7.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); this.pictureBox7.Name = "pictureBox7"; this.pictureBox7.Size = new System.Drawing.Size(190, 197); this.pictureBox7.SizeMode = System.Windows.Forms.PictureBoxSizeMode.AutoSize; @@ -65,10 +65,10 @@ // this.panel2.BackColor = System.Drawing.Color.Transparent; this.panel2.Controls.Add(this.pictureBox7); - this.panel2.Location = new System.Drawing.Point(2, 2); - this.panel2.Margin = new System.Windows.Forms.Padding(2); + this.panel2.Location = new System.Drawing.Point(3, 2); + this.panel2.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); this.panel2.Name = "panel2"; - this.panel2.Size = new System.Drawing.Size(234, 214); + this.panel2.Size = new System.Drawing.Size(312, 263); this.panel2.TabIndex = 8; // // button1 @@ -80,14 +80,15 @@ this.button1.ForeColor = System.Drawing.SystemColors.ButtonHighlight; this.button1.Image = global::compabetov2.Properties.Resources.Menui1; this.button1.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft; - this.button1.Location = new System.Drawing.Point(2, 220); - this.button1.Margin = new System.Windows.Forms.Padding(2); + this.button1.Location = new System.Drawing.Point(3, 269); + this.button1.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); this.button1.Name = "button1"; - this.button1.Padding = new System.Windows.Forms.Padding(38, 0, 0, 0); - this.button1.Size = new System.Drawing.Size(234, 93); + this.button1.Padding = new System.Windows.Forms.Padding(51, 0, 0, 0); + this.button1.Size = new System.Drawing.Size(312, 114); this.button1.TabIndex = 8; this.button1.Text = "Menú"; this.button1.UseVisualStyleBackColor = false; + this.button1.Click += new System.EventHandler(this.button1_Click); // // button2 // @@ -98,11 +99,11 @@ this.button2.ForeColor = System.Drawing.SystemColors.ButtonHighlight; this.button2.Image = global::compabetov2.Properties.Resources.estadisticasi; this.button2.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft; - this.button2.Location = new System.Drawing.Point(2, 317); - this.button2.Margin = new System.Windows.Forms.Padding(2); + this.button2.Location = new System.Drawing.Point(3, 387); + this.button2.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); this.button2.Name = "button2"; - this.button2.Padding = new System.Windows.Forms.Padding(38, 0, 0, 0); - this.button2.Size = new System.Drawing.Size(234, 93); + this.button2.Padding = new System.Windows.Forms.Padding(51, 0, 0, 0); + this.button2.Size = new System.Drawing.Size(312, 114); this.button2.TabIndex = 9; this.button2.Text = "Estadisticas"; this.button2.TextAlign = System.Drawing.ContentAlignment.MiddleRight; @@ -117,11 +118,11 @@ this.button3.ForeColor = System.Drawing.SystemColors.ButtonHighlight; this.button3.Image = global::compabetov2.Properties.Resources.productoi; this.button3.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft; - this.button3.Location = new System.Drawing.Point(2, 414); - this.button3.Margin = new System.Windows.Forms.Padding(2); + this.button3.Location = new System.Drawing.Point(3, 505); + this.button3.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); this.button3.Name = "button3"; - this.button3.Padding = new System.Windows.Forms.Padding(38, 0, 0, 0); - this.button3.Size = new System.Drawing.Size(234, 93); + this.button3.Padding = new System.Windows.Forms.Padding(51, 0, 0, 0); + this.button3.Size = new System.Drawing.Size(312, 114); this.button3.TabIndex = 10; this.button3.Text = "Productos"; this.button3.UseVisualStyleBackColor = false; @@ -135,11 +136,11 @@ this.button4.ForeColor = System.Drawing.SystemColors.ButtonHighlight; this.button4.Image = global::compabetov2.Properties.Resources.reportesi; this.button4.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft; - this.button4.Location = new System.Drawing.Point(2, 511); - this.button4.Margin = new System.Windows.Forms.Padding(2); + this.button4.Location = new System.Drawing.Point(3, 623); + this.button4.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); this.button4.Name = "button4"; - this.button4.Padding = new System.Windows.Forms.Padding(38, 0, 0, 0); - this.button4.Size = new System.Drawing.Size(234, 93); + this.button4.Padding = new System.Windows.Forms.Padding(51, 0, 0, 0); + this.button4.Size = new System.Drawing.Size(312, 114); this.button4.TabIndex = 11; this.button4.Text = "Reportes"; this.button4.UseVisualStyleBackColor = false; @@ -153,11 +154,11 @@ this.button5.ForeColor = System.Drawing.SystemColors.ButtonHighlight; this.button5.Image = global::compabetov2.Properties.Resources.sesionc; this.button5.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft; - this.button5.Location = new System.Drawing.Point(2, 608); - this.button5.Margin = new System.Windows.Forms.Padding(2); + this.button5.Location = new System.Drawing.Point(3, 741); + this.button5.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); this.button5.Name = "button5"; - this.button5.Padding = new System.Windows.Forms.Padding(38, 0, 0, 0); - this.button5.Size = new System.Drawing.Size(234, 93); + this.button5.Padding = new System.Windows.Forms.Padding(51, 0, 0, 0); + this.button5.Size = new System.Drawing.Size(312, 114); this.button5.TabIndex = 12; this.button5.Text = "Salir"; this.button5.UseVisualStyleBackColor = false; @@ -172,24 +173,26 @@ this.flowLayoutPanel1.Controls.Add(this.button4); this.flowLayoutPanel1.Controls.Add(this.button5); this.flowLayoutPanel1.Controls.Add(this.flowLayoutPanel2); - this.flowLayoutPanel1.Location = new System.Drawing.Point(-2, -2); - this.flowLayoutPanel1.Margin = new System.Windows.Forms.Padding(2); + this.flowLayoutPanel1.Location = new System.Drawing.Point(-3, -2); + this.flowLayoutPanel1.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); this.flowLayoutPanel1.Name = "flowLayoutPanel1"; - this.flowLayoutPanel1.Size = new System.Drawing.Size(243, 862); + this.flowLayoutPanel1.Size = new System.Drawing.Size(324, 1061); this.flowLayoutPanel1.TabIndex = 8; // // flowLayoutPanel2 // - this.flowLayoutPanel2.Location = new System.Drawing.Point(3, 706); + this.flowLayoutPanel2.Location = new System.Drawing.Point(4, 861); + this.flowLayoutPanel2.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); this.flowLayoutPanel2.Name = "flowLayoutPanel2"; - this.flowLayoutPanel2.Size = new System.Drawing.Size(200, 100); + this.flowLayoutPanel2.Size = new System.Drawing.Size(267, 123); this.flowLayoutPanel2.TabIndex = 13; // // personalPanel // - this.personalPanel.Location = new System.Drawing.Point(345, 250); + this.personalPanel.Location = new System.Drawing.Point(460, 308); + this.personalPanel.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); this.personalPanel.Name = "personalPanel"; - this.personalPanel.Size = new System.Drawing.Size(909, 449); + this.personalPanel.Size = new System.Drawing.Size(1212, 553); this.personalPanel.TabIndex = 9; this.personalPanel.Paint += new System.Windows.Forms.PaintEventHandler(this.flowLayoutPanel3_Paint); // @@ -198,10 +201,9 @@ this.lblhora.AutoSize = true; this.lblhora.Font = new System.Drawing.Font("Microsoft Sans Serif", 60F); this.lblhora.ForeColor = System.Drawing.Color.MediumBlue; - this.lblhora.Location = new System.Drawing.Point(651, 65); - this.lblhora.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); + this.lblhora.Location = new System.Drawing.Point(868, 80); this.lblhora.Name = "lblhora"; - this.lblhora.Size = new System.Drawing.Size(352, 91); + this.lblhora.Size = new System.Drawing.Size(445, 113); this.lblhora.TabIndex = 11; this.lblhora.Text = "Personal"; this.lblhora.Click += new System.EventHandler(this.lblhora_Click); @@ -216,9 +218,10 @@ // // btnAgregar // - this.btnAgregar.Location = new System.Drawing.Point(738, 179); + this.btnAgregar.Location = new System.Drawing.Point(984, 220); + this.btnAgregar.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); this.btnAgregar.Name = "btnAgregar"; - this.btnAgregar.Size = new System.Drawing.Size(125, 35); + this.btnAgregar.Size = new System.Drawing.Size(167, 43); this.btnAgregar.TabIndex = 12; this.btnAgregar.Text = "Agregar"; this.btnAgregar.UseVisualStyleBackColor = true; @@ -226,14 +229,14 @@ // // personal // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(1370, 749); + this.ClientSize = new System.Drawing.Size(1827, 922); this.Controls.Add(this.btnAgregar); this.Controls.Add(this.lblhora); this.Controls.Add(this.personalPanel); this.Controls.Add(this.flowLayoutPanel1); - this.Margin = new System.Windows.Forms.Padding(2); + this.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); this.Name = "personal"; this.Text = "personal"; this.WindowState = System.Windows.Forms.FormWindowState.Maximized; diff --git a/personal.cs b/personal.cs index 3f85e84..e589674 100644 --- a/personal.cs +++ b/personal.cs @@ -216,5 +216,12 @@ namespace compabetov2 AgregarEmpleado agregarEmpleado = new AgregarEmpleado(this); agregarEmpleado.Show(); } + + private void button1_Click(object sender, EventArgs e) + { + MenuPrincipal menuPrincipal = new MenuPrincipal(); + menuPrincipal.Show(); + this.Dispose(true); + } } } diff --git a/vender.Designer.cs b/vender.Designer.cs index e444501..310cc08 100644 --- a/vender.Designer.cs +++ b/vender.Designer.cs @@ -51,6 +51,7 @@ this.flowLayoutPanel3 = new System.Windows.Forms.FlowLayoutPanel(); this.textBox1 = new System.Windows.Forms.TextBox(); this.textBox2 = new System.Windows.Forms.TextBox(); + this.bntImprimir = new System.Windows.Forms.Button(); this.flowLayoutPanel2.SuspendLayout(); this.panel1.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.pictureBox9)).BeginInit(); @@ -69,10 +70,9 @@ this.lblfecha.AutoSize = true; this.lblfecha.Font = new System.Drawing.Font("Microsoft Sans Serif", 30F); this.lblfecha.ForeColor = System.Drawing.Color.Navy; - this.lblfecha.Location = new System.Drawing.Point(370, 85); - this.lblfecha.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); + this.lblfecha.Location = new System.Drawing.Point(493, 105); this.lblfecha.Name = "lblfecha"; - this.lblfecha.Size = new System.Drawing.Size(126, 46); + this.lblfecha.Size = new System.Drawing.Size(159, 58); this.lblfecha.TabIndex = 13; this.lblfecha.Text = "label2"; this.lblfecha.TextAlign = System.Drawing.ContentAlignment.TopCenter; @@ -83,10 +83,9 @@ this.lblhora.AutoSize = true; this.lblhora.Font = new System.Drawing.Font("Microsoft Sans Serif", 60F); this.lblhora.ForeColor = System.Drawing.Color.MediumBlue; - this.lblhora.Location = new System.Drawing.Point(511, -11); - this.lblhora.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); + this.lblhora.Location = new System.Drawing.Point(681, -14); this.lblhora.Name = "lblhora"; - this.lblhora.Size = new System.Drawing.Size(249, 91); + this.lblhora.Size = new System.Drawing.Size(318, 113); this.lblhora.TabIndex = 12; this.lblhora.Text = "label1"; this.lblhora.Click += new System.EventHandler(this.lblhora_Click); @@ -97,10 +96,10 @@ this.flowLayoutPanel2.Controls.Add(this.panel1); this.flowLayoutPanel2.Controls.Add(this.label1); this.flowLayoutPanel2.Controls.Add(this.labeltotal); - this.flowLayoutPanel2.Location = new System.Drawing.Point(1204, -1); - this.flowLayoutPanel2.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2); + this.flowLayoutPanel2.Location = new System.Drawing.Point(1605, -1); + this.flowLayoutPanel2.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); this.flowLayoutPanel2.Name = "flowLayoutPanel2"; - this.flowLayoutPanel2.Size = new System.Drawing.Size(243, 968); + this.flowLayoutPanel2.Size = new System.Drawing.Size(324, 1191); this.flowLayoutPanel2.TabIndex = 11; this.flowLayoutPanel2.Paint += new System.Windows.Forms.PaintEventHandler(this.flowLayoutPanel2_Paint); // @@ -108,17 +107,17 @@ // this.panel1.BackColor = System.Drawing.Color.Transparent; this.panel1.Controls.Add(this.pictureBox9); - this.panel1.Location = new System.Drawing.Point(2, 2); - this.panel1.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2); + this.panel1.Location = new System.Drawing.Point(3, 2); + this.panel1.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); this.panel1.Name = "panel1"; - this.panel1.Size = new System.Drawing.Size(234, 214); + this.panel1.Size = new System.Drawing.Size(312, 263); this.panel1.TabIndex = 8; // // pictureBox9 // this.pictureBox9.Image = global::compabetov2.Properties.Resources.HomeroMenu; - this.pictureBox9.Location = new System.Drawing.Point(48, 28); - this.pictureBox9.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2); + this.pictureBox9.Location = new System.Drawing.Point(64, 34); + this.pictureBox9.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); this.pictureBox9.Name = "pictureBox9"; this.pictureBox9.Size = new System.Drawing.Size(190, 197); this.pictureBox9.SizeMode = System.Windows.Forms.PictureBoxSizeMode.AutoSize; @@ -131,10 +130,9 @@ this.label1.BackColor = System.Drawing.Color.Transparent; this.label1.Font = new System.Drawing.Font("Microsoft Sans Serif", 20F); this.label1.ForeColor = System.Drawing.Color.AliceBlue; - this.label1.Location = new System.Drawing.Point(2, 218); - this.label1.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); + this.label1.Location = new System.Drawing.Point(3, 267); this.label1.Name = "label1"; - this.label1.Size = new System.Drawing.Size(83, 31); + this.label1.Size = new System.Drawing.Size(102, 39); this.label1.TabIndex = 17; this.label1.Text = "Total:"; this.label1.Click += new System.EventHandler(this.label1_Click); @@ -145,10 +143,9 @@ this.labeltotal.BackColor = System.Drawing.Color.Transparent; this.labeltotal.Font = new System.Drawing.Font("Microsoft Sans Serif", 20F); this.labeltotal.ForeColor = System.Drawing.Color.AliceBlue; - this.labeltotal.Location = new System.Drawing.Point(89, 218); - this.labeltotal.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); + this.labeltotal.Location = new System.Drawing.Point(111, 267); this.labeltotal.Name = "labeltotal"; - this.labeltotal.Size = new System.Drawing.Size(0, 31); + this.labeltotal.Size = new System.Drawing.Size(0, 39); this.labeltotal.TabIndex = 18; // // flowLayoutPanel1 @@ -161,26 +158,26 @@ this.flowLayoutPanel1.Controls.Add(this.button4); this.flowLayoutPanel1.Controls.Add(this.button5); this.flowLayoutPanel1.Location = new System.Drawing.Point(-1, 0); - this.flowLayoutPanel1.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2); + this.flowLayoutPanel1.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); this.flowLayoutPanel1.Name = "flowLayoutPanel1"; - this.flowLayoutPanel1.Size = new System.Drawing.Size(243, 974); + this.flowLayoutPanel1.Size = new System.Drawing.Size(324, 1199); this.flowLayoutPanel1.TabIndex = 8; // // panel2 // this.panel2.BackColor = System.Drawing.Color.Transparent; this.panel2.Controls.Add(this.pictureBox7); - this.panel2.Location = new System.Drawing.Point(2, 2); - this.panel2.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2); + this.panel2.Location = new System.Drawing.Point(3, 2); + this.panel2.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); this.panel2.Name = "panel2"; - this.panel2.Size = new System.Drawing.Size(234, 214); + this.panel2.Size = new System.Drawing.Size(312, 263); this.panel2.TabIndex = 8; // // pictureBox7 // this.pictureBox7.Image = global::compabetov2.Properties.Resources.HomeroMenu; - this.pictureBox7.Location = new System.Drawing.Point(48, 28); - this.pictureBox7.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2); + this.pictureBox7.Location = new System.Drawing.Point(64, 34); + this.pictureBox7.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); this.pictureBox7.Name = "pictureBox7"; this.pictureBox7.Size = new System.Drawing.Size(190, 197); this.pictureBox7.SizeMode = System.Windows.Forms.PictureBoxSizeMode.AutoSize; @@ -196,11 +193,11 @@ this.button1.ForeColor = System.Drawing.SystemColors.ButtonHighlight; this.button1.Image = global::compabetov2.Properties.Resources.Menui1; this.button1.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft; - this.button1.Location = new System.Drawing.Point(2, 220); - this.button1.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2); + this.button1.Location = new System.Drawing.Point(3, 269); + this.button1.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); this.button1.Name = "button1"; - this.button1.Padding = new System.Windows.Forms.Padding(38, 0, 0, 0); - this.button1.Size = new System.Drawing.Size(234, 93); + this.button1.Padding = new System.Windows.Forms.Padding(51, 0, 0, 0); + this.button1.Size = new System.Drawing.Size(312, 114); this.button1.TabIndex = 8; this.button1.Text = "Menú"; this.button1.UseVisualStyleBackColor = false; @@ -215,11 +212,11 @@ this.button2.ForeColor = System.Drawing.SystemColors.ButtonHighlight; this.button2.Image = global::compabetov2.Properties.Resources.estadisticasi; this.button2.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft; - this.button2.Location = new System.Drawing.Point(2, 317); - this.button2.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2); + this.button2.Location = new System.Drawing.Point(3, 387); + this.button2.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); this.button2.Name = "button2"; - this.button2.Padding = new System.Windows.Forms.Padding(38, 0, 0, 0); - this.button2.Size = new System.Drawing.Size(234, 93); + this.button2.Padding = new System.Windows.Forms.Padding(51, 0, 0, 0); + this.button2.Size = new System.Drawing.Size(312, 114); this.button2.TabIndex = 9; this.button2.Text = "Estadisticas"; this.button2.TextAlign = System.Drawing.ContentAlignment.MiddleRight; @@ -234,11 +231,11 @@ this.button3.ForeColor = System.Drawing.SystemColors.ButtonHighlight; this.button3.Image = global::compabetov2.Properties.Resources.productoi; this.button3.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft; - this.button3.Location = new System.Drawing.Point(2, 414); - this.button3.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2); + this.button3.Location = new System.Drawing.Point(3, 505); + this.button3.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); this.button3.Name = "button3"; - this.button3.Padding = new System.Windows.Forms.Padding(38, 0, 0, 0); - this.button3.Size = new System.Drawing.Size(234, 93); + this.button3.Padding = new System.Windows.Forms.Padding(51, 0, 0, 0); + this.button3.Size = new System.Drawing.Size(312, 114); this.button3.TabIndex = 10; this.button3.Text = "Productos"; this.button3.UseVisualStyleBackColor = false; @@ -252,11 +249,11 @@ this.button4.ForeColor = System.Drawing.SystemColors.ButtonHighlight; this.button4.Image = global::compabetov2.Properties.Resources.reportesi; this.button4.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft; - this.button4.Location = new System.Drawing.Point(2, 511); - this.button4.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2); + this.button4.Location = new System.Drawing.Point(3, 623); + this.button4.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); this.button4.Name = "button4"; - this.button4.Padding = new System.Windows.Forms.Padding(38, 0, 0, 0); - this.button4.Size = new System.Drawing.Size(234, 93); + this.button4.Padding = new System.Windows.Forms.Padding(51, 0, 0, 0); + this.button4.Size = new System.Drawing.Size(312, 114); this.button4.TabIndex = 11; this.button4.Text = "Reportes"; this.button4.UseVisualStyleBackColor = false; @@ -270,48 +267,59 @@ this.button5.ForeColor = System.Drawing.SystemColors.ButtonHighlight; this.button5.Image = global::compabetov2.Properties.Resources.sesionc; this.button5.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft; - this.button5.Location = new System.Drawing.Point(2, 608); - this.button5.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2); + this.button5.Location = new System.Drawing.Point(3, 741); + this.button5.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); this.button5.Name = "button5"; - this.button5.Padding = new System.Windows.Forms.Padding(38, 0, 0, 0); - this.button5.Size = new System.Drawing.Size(234, 93); + this.button5.Padding = new System.Windows.Forms.Padding(51, 0, 0, 0); + this.button5.Size = new System.Drawing.Size(312, 114); this.button5.TabIndex = 12; this.button5.Text = "Salir"; this.button5.UseVisualStyleBackColor = false; // // flowLayoutPanel3 // - this.flowLayoutPanel3.Location = new System.Drawing.Point(244, 230); - this.flowLayoutPanel3.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2); + this.flowLayoutPanel3.Location = new System.Drawing.Point(325, 283); + this.flowLayoutPanel3.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); this.flowLayoutPanel3.Name = "flowLayoutPanel3"; - this.flowLayoutPanel3.Size = new System.Drawing.Size(955, 769); + this.flowLayoutPanel3.Size = new System.Drawing.Size(1273, 946); this.flowLayoutPanel3.TabIndex = 14; this.flowLayoutPanel3.Paint += new System.Windows.Forms.PaintEventHandler(this.flowLayoutPanel3_Paint); // // textBox1 // this.textBox1.Font = new System.Drawing.Font("Microsoft Sans Serif", 15F); - this.textBox1.Location = new System.Drawing.Point(274, 186); - this.textBox1.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2); + this.textBox1.Location = new System.Drawing.Point(365, 229); + this.textBox1.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); this.textBox1.Name = "textBox1"; - this.textBox1.Size = new System.Drawing.Size(300, 30); + this.textBox1.Size = new System.Drawing.Size(399, 36); this.textBox1.TabIndex = 15; // // textBox2 // this.textBox2.Font = new System.Drawing.Font("Microsoft Sans Serif", 15F); - this.textBox2.Location = new System.Drawing.Point(594, 186); - this.textBox2.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2); + this.textBox2.Location = new System.Drawing.Point(792, 229); + this.textBox2.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); this.textBox2.Name = "textBox2"; - this.textBox2.Size = new System.Drawing.Size(300, 30); + this.textBox2.Size = new System.Drawing.Size(399, 36); this.textBox2.TabIndex = 16; // + // bntImprimir + // + this.bntImprimir.Location = new System.Drawing.Point(1347, 76); + this.bntImprimir.Name = "bntImprimir"; + this.bntImprimir.Size = new System.Drawing.Size(75, 23); + this.bntImprimir.TabIndex = 17; + this.bntImprimir.Text = "button6"; + this.bntImprimir.UseVisualStyleBackColor = true; + this.bntImprimir.Click += new System.EventHandler(this.bntImprimir_Click); + // // vender // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.AutoScroll = true; - this.ClientSize = new System.Drawing.Size(1370, 609); + this.ClientSize = new System.Drawing.Size(1827, 750); + this.Controls.Add(this.bntImprimir); this.Controls.Add(this.textBox2); this.Controls.Add(this.textBox1); this.Controls.Add(this.flowLayoutPanel3); @@ -319,7 +327,7 @@ this.Controls.Add(this.lblhora); this.Controls.Add(this.flowLayoutPanel2); this.Controls.Add(this.flowLayoutPanel1); - this.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2); + this.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); this.Name = "vender"; this.Text = "vender"; this.WindowState = System.Windows.Forms.FormWindowState.Maximized; @@ -362,5 +370,6 @@ private System.Windows.Forms.TextBox textBox2; private System.Windows.Forms.Label label1; private System.Windows.Forms.Label labeltotal; + private System.Windows.Forms.Button bntImprimir; } } \ No newline at end of file diff --git a/vender.cs b/vender.cs index 31bf404..22ba132 100644 --- a/vender.cs +++ b/vender.cs @@ -6,6 +6,7 @@ using System.ComponentModel; using System.Data; using System.Drawing; using System.Drawing.Drawing2D; +using System.Drawing.Printing; using System.Globalization; using System.IO; using System.Linq; @@ -53,16 +54,16 @@ namespace compabetov2 carta.Width = 220; carta.Height = 300; - PictureBox pic = new PictureBox(); - pic.Dock = DockStyle.Fill; - pic.SizeMode = PictureBoxSizeMode.Zoom; - string rutaImg = Path.Combine(Application.StartupPath, "Resources", producto.img); - pic.Image = Image.FromFile(rutaImg);//hay error aquí - pic.BackgroundImageLayout = ImageLayout.Stretch; - pic.Tag = producto.idProducto; + PictureBox pic = new PictureBox(); + pic.Dock = DockStyle.Fill; + pic.SizeMode = PictureBoxSizeMode.Zoom; + string rutaImg = Path.Combine(Application.StartupPath, "Resources", producto.img); + pic.Image = Image.FromFile(rutaImg);//hay error aquí + pic.BackgroundImageLayout = ImageLayout.Stretch; + pic.Tag = producto.idProducto; + - @@ -111,7 +112,7 @@ namespace compabetov2 btnMenos.BackColor = Color.FromArgb(33, 90, 255); btnMenos.Click += new EventHandler(delegate (object sender, EventArgs e) { - + int numeroContador = int.Parse(contador.Text.ToString()); // Validar que el contador no sea 0 antes de restar @@ -187,12 +188,6 @@ namespace compabetov2 } - - - - - - } private void RestarDelTicket(int idProducto, string nombreProducto, decimal precio, int cantidad) @@ -248,9 +243,9 @@ namespace compabetov2 { bool existeProducto = false; int contador_saltar_2_vueltas = 1; - foreach(var item in flowLayoutPanel2.Controls) + foreach (var item in flowLayoutPanel2.Controls) { - if(contador_saltar_2_vueltas <= 3) + if (contador_saltar_2_vueltas <= 3) { contador_saltar_2_vueltas++; continue; @@ -261,17 +256,17 @@ namespace compabetov2 string textoLb = lbnombre.Text; string[] cadenas = textoLb.Split(':'); string cadena = cadenas[1].Remove(0, 1); - + if (cadena.Equals(nombreProducto)) { - - existeProducto=true; + + existeProducto = true; Label Lbcantidad = panelInfo.Controls[2] as Label; Label Lbtotal = panelInfo.Controls[3] as Label; string textcantidad = Lbcantidad.Text; string[] cantidadCadenas = textcantidad.Split(' '); int NuevaCantiad = int.Parse(cantidadCadenas[1]) + 1; - + int NuevoTotal = (int)(NuevaCantiad * precio); Lbcantidad.Text = $"Cantidad: {NuevaCantiad}"; @@ -392,7 +387,71 @@ namespace compabetov2 { } + + private void bntImprimir_Click(object sender, EventArgs e) + { + ImprimirTicket(); + } + + + private void ImprimirTicket() + { + using (PrintDocument documentoImpresion = new PrintDocument()) + { + documentoImpresion.PrintPage += (sender, e) => ImprimirContenido(e); + using (PrintDialog printDialog = new PrintDialog()) + { + printDialog.Document = documentoImpresion; + + if (printDialog.ShowDialog() == DialogResult.OK) + { + documentoImpresion.Print(); + } + } + } + } + + private void ImprimirContenido(PrintPageEventArgs e) + { + // Contenido que deseas imprimir + string contenido = "Mini Súper\n" + + "Compa BETO\n" + + "Saturnino Peña #44\n" + + "Lomas de la Laguna\n" + + "311 169 2829\n" + + $"Fecha: {DateTime.Now.ToString("dd/MM/yyyy")}\n" + + $"Hora: {DateTime.Now.ToString("HH:mm:ss")}\n\n" + + "Producto Precio Cantidad\n" + + "---------------------\n"; + + // Agregar detalles de productos al contenido + foreach (TableLayoutPanel carta in cartas) + { + PictureBox pic = carta.Controls[0] as PictureBox; + Label precio = pic.Controls[1] as Label; + + contenido += $"{precio.Text}\n"; + } + + contenido += $"---------------------\n" + + $"Total: ${total}\n" + + "---------------------\n" + + "Mini Súper\n" + + "Compa BETO\n" + + "¡Gracias por su compra!"; + + + // Configuración de la fuente y del área de impresión + Font fuente = new Font("Arial", 10); // Ajustar el tamaño de fuente según sea necesario + PointF posicion = new PointF(0, e.MarginBounds.Top); + + // Imprimir el contenido + e.Graphics.DrawString(contenido, fuente, Brushes.Black, posicion); + } + + + + + } } - -