diff --git a/.vs/VSWorkspaceState.json b/.vs/VSWorkspaceState.json index dc00168..1e9c264 100644 --- a/.vs/VSWorkspaceState.json +++ b/.vs/VSWorkspaceState.json @@ -1,8 +1,7 @@ { "ExpandedNodes": [ "", - "\\database", - "\\database\\modelos" + "\\database" ], "SelectedNode": "\\.sln", "PreviewInSolutionExplorer": false diff --git a/.vs/compabetoOG/v17/.wsuo b/.vs/compabetoOG/v17/.wsuo index fdf919f..af1fcc3 100644 Binary files a/.vs/compabetoOG/v17/.wsuo and b/.vs/compabetoOG/v17/.wsuo differ diff --git a/.vs/compabetov2.csproj.dtbcache.json b/.vs/compabetov2.csproj.dtbcache.json index ead3680..8efc107 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":"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":"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":"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\\carsu\\source\\repos\\compabetoOG","ProjectFileName":"compabetov2.csproj","Configuration":"Debug|AnyCPU","FrameworkPath":"","Sources":[{"SourceFile":"AgregarEmpleado.cs"},{"SourceFile":"AgregarEmpleado.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":"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 diff --git a/AgregarLogin.Designer.cs b/AgregarLogin.Designer.cs new file mode 100644 index 0000000..d3b063d --- /dev/null +++ b/AgregarLogin.Designer.cs @@ -0,0 +1,199 @@ +namespace compabetov2 +{ + partial class AgregarLogin + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel(); + this.flowLayoutPanel1 = new System.Windows.Forms.FlowLayoutPanel(); + this.flowLayoutPanel2 = new System.Windows.Forms.FlowLayoutPanel(); + this.flowLayoutPanel3 = new System.Windows.Forms.FlowLayoutPanel(); + this.tableLayoutPanel2 = new System.Windows.Forms.TableLayoutPanel(); + this.label1 = new System.Windows.Forms.Label(); + this.label2 = new System.Windows.Forms.Label(); + this.label3 = new System.Windows.Forms.Label(); + this.textBox1 = new System.Windows.Forms.TextBox(); + this.textBox2 = new System.Windows.Forms.TextBox(); + this.textBox3 = new System.Windows.Forms.TextBox(); + this.tableLayoutPanel1.SuspendLayout(); + this.flowLayoutPanel1.SuspendLayout(); + this.flowLayoutPanel2.SuspendLayout(); + this.flowLayoutPanel3.SuspendLayout(); + this.SuspendLayout(); + // + // tableLayoutPanel1 + // + this.tableLayoutPanel1.ColumnCount = 1; + this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F)); + this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F)); + this.tableLayoutPanel1.Controls.Add(this.flowLayoutPanel1, 0, 0); + this.tableLayoutPanel1.Controls.Add(this.flowLayoutPanel2, 0, 1); + this.tableLayoutPanel1.Controls.Add(this.flowLayoutPanel3, 0, 2); + this.tableLayoutPanel1.Controls.Add(this.tableLayoutPanel2, 0, 3); + this.tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill; + this.tableLayoutPanel1.Location = new System.Drawing.Point(0, 0); + this.tableLayoutPanel1.Name = "tableLayoutPanel1"; + this.tableLayoutPanel1.RowCount = 4; + this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 51.07914F)); + this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 48.92086F)); + this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 84F)); + this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 72F)); + this.tableLayoutPanel1.Size = new System.Drawing.Size(584, 311); + this.tableLayoutPanel1.TabIndex = 0; + // + // flowLayoutPanel1 + // + this.flowLayoutPanel1.Controls.Add(this.label1); + this.flowLayoutPanel1.Controls.Add(this.textBox1); + this.flowLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill; + this.flowLayoutPanel1.FlowDirection = System.Windows.Forms.FlowDirection.TopDown; + this.flowLayoutPanel1.Location = new System.Drawing.Point(3, 3); + this.flowLayoutPanel1.Name = "flowLayoutPanel1"; + this.flowLayoutPanel1.Size = new System.Drawing.Size(578, 73); + this.flowLayoutPanel1.TabIndex = 0; + // + // flowLayoutPanel2 + // + this.flowLayoutPanel2.Controls.Add(this.label2); + this.flowLayoutPanel2.Controls.Add(this.textBox2); + this.flowLayoutPanel2.Dock = System.Windows.Forms.DockStyle.Fill; + this.flowLayoutPanel2.FlowDirection = System.Windows.Forms.FlowDirection.TopDown; + this.flowLayoutPanel2.Location = new System.Drawing.Point(3, 82); + this.flowLayoutPanel2.Name = "flowLayoutPanel2"; + this.flowLayoutPanel2.Size = new System.Drawing.Size(578, 69); + this.flowLayoutPanel2.TabIndex = 1; + // + // flowLayoutPanel3 + // + this.flowLayoutPanel3.Controls.Add(this.label3); + this.flowLayoutPanel3.Controls.Add(this.textBox3); + this.flowLayoutPanel3.Dock = System.Windows.Forms.DockStyle.Fill; + this.flowLayoutPanel3.FlowDirection = System.Windows.Forms.FlowDirection.TopDown; + this.flowLayoutPanel3.Location = new System.Drawing.Point(3, 157); + this.flowLayoutPanel3.Name = "flowLayoutPanel3"; + this.flowLayoutPanel3.Size = new System.Drawing.Size(578, 78); + this.flowLayoutPanel3.TabIndex = 2; + // + // tableLayoutPanel2 + // + this.tableLayoutPanel2.ColumnCount = 3; + this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 80.65844F)); + this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 19.34156F)); + this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 91F)); + this.tableLayoutPanel2.Dock = System.Windows.Forms.DockStyle.Fill; + this.tableLayoutPanel2.Location = new System.Drawing.Point(3, 241); + this.tableLayoutPanel2.Name = "tableLayoutPanel2"; + this.tableLayoutPanel2.RowCount = 1; + this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F)); + this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F)); + this.tableLayoutPanel2.Size = new System.Drawing.Size(578, 67); + this.tableLayoutPanel2.TabIndex = 3; + // + // label1 + // + this.label1.AutoSize = true; + this.label1.Font = new System.Drawing.Font("Microsoft Sans Serif", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label1.Location = new System.Drawing.Point(3, 0); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(178, 24); + this.label1.TabIndex = 0; + this.label1.Text = "Nombre de usuario:"; + // + // label2 + // + this.label2.AutoSize = true; + this.label2.Font = new System.Drawing.Font("Microsoft Sans Serif", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label2.Location = new System.Drawing.Point(3, 0); + this.label2.Name = "label2"; + this.label2.Size = new System.Drawing.Size(103, 24); + this.label2.TabIndex = 0; + this.label2.Text = "contraseña"; + // + // label3 + // + this.label3.AutoSize = true; + this.label3.Location = new System.Drawing.Point(3, 0); + this.label3.Name = "label3"; + this.label3.Size = new System.Drawing.Size(106, 13); + this.label3.TabIndex = 0; + this.label3.Text = "confirmar contraseña"; + // + // textBox1 + // + this.textBox1.Location = new System.Drawing.Point(3, 27); + this.textBox1.Name = "textBox1"; + this.textBox1.Size = new System.Drawing.Size(100, 20); + this.textBox1.TabIndex = 1; + // + // textBox2 + // + this.textBox2.Location = new System.Drawing.Point(3, 27); + this.textBox2.Name = "textBox2"; + this.textBox2.Size = new System.Drawing.Size(100, 20); + this.textBox2.TabIndex = 1; + // + // textBox3 + // + this.textBox3.Location = new System.Drawing.Point(3, 16); + this.textBox3.Name = "textBox3"; + this.textBox3.Size = new System.Drawing.Size(100, 20); + this.textBox3.TabIndex = 1; + // + // AgregarLogin + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(584, 311); + this.Controls.Add(this.tableLayoutPanel1); + this.Name = "AgregarLogin"; + this.Text = "AgregarLogin"; + this.tableLayoutPanel1.ResumeLayout(false); + this.flowLayoutPanel1.ResumeLayout(false); + this.flowLayoutPanel1.PerformLayout(); + this.flowLayoutPanel2.ResumeLayout(false); + this.flowLayoutPanel2.PerformLayout(); + this.flowLayoutPanel3.ResumeLayout(false); + this.flowLayoutPanel3.PerformLayout(); + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1; + private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel1; + private System.Windows.Forms.Label label1; + private System.Windows.Forms.TextBox textBox1; + private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel2; + private System.Windows.Forms.Label label2; + private System.Windows.Forms.TextBox textBox2; + private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel3; + private System.Windows.Forms.Label label3; + private System.Windows.Forms.TableLayoutPanel tableLayoutPanel2; + private System.Windows.Forms.TextBox textBox3; + } +} \ No newline at end of file diff --git a/AgregarLogin.cs b/AgregarLogin.cs new file mode 100644 index 0000000..a785e88 --- /dev/null +++ b/AgregarLogin.cs @@ -0,0 +1,20 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace compabetov2 +{ + public partial class AgregarLogin : Form + { + public AgregarLogin() + { + InitializeComponent(); + } + } +} diff --git a/AgregarLogin.resx b/AgregarLogin.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/AgregarLogin.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/EditarEmpleado.Designer.cs b/EditarEmpleado.Designer.cs index 29a29f5..e132c68 100644 --- a/EditarEmpleado.Designer.cs +++ b/EditarEmpleado.Designer.cs @@ -532,6 +532,7 @@ namespace compabetov2 this.button1.TabIndex = 0; this.button1.Text = "Editar"; this.button1.UseVisualStyleBackColor = true; + this.button1.Click += new System.EventHandler(this.button1_Click); // // btnCancelar // @@ -543,6 +544,7 @@ namespace compabetov2 this.btnCancelar.TabIndex = 1; this.btnCancelar.Text = "Cancelar"; this.btnCancelar.UseVisualStyleBackColor = true; + this.btnCancelar.Click += new System.EventHandler(this.btnCancelar_Click); // // EditarEmpleado // diff --git a/EditarEmpleado.cs b/EditarEmpleado.cs index 4c70530..2a7b5ea 100644 --- a/EditarEmpleado.cs +++ b/EditarEmpleado.cs @@ -1,4 +1,5 @@ -using compabetov2.database.modelos; +using compabetov2.database; +using compabetov2.database.modelos; using System; using System.Collections.Generic; using System.ComponentModel; @@ -44,9 +45,34 @@ namespace compabetov2 } - void CargarDatos(Empleado empleado) + + private void button1_Click(object sender, EventArgs e) { - this.empleado = empleado; + Empleado empleadoNuevo = new Empleado( + empleado.idempleado, + txtNombre.Text, + txtApellido.Text, + txtCalle.Text, + dtFechaCon.Text, + cbEstado.Text, + txtColonia.Text, + txtCp.Text, + txtNoExt.Text, + txtNoInt.Text, + txtReferencia.Text, + dtFechaNac.Text, + txtTelefono.Text); + if (service.actualizarEmpleado(empleadoNuevo)) + { + ventanaPadre.llenarPanel(); + } + + } + + private void btnCancelar_Click(object sender, EventArgs e) + { + this.Close(); + } } } diff --git a/bin/Debug/compabetov2.exe b/bin/Debug/compabetov2.exe index e11840d..a8e69c6 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 3962c73..05ae2cb 100644 Binary files a/bin/Debug/compabetov2.pdb and b/bin/Debug/compabetov2.pdb differ diff --git a/bin/Debug/data.db b/bin/Debug/data.db index 0fff7e6..de0f016 100644 Binary files a/bin/Debug/data.db and b/bin/Debug/data.db differ diff --git a/compabetov2.csproj b/compabetov2.csproj index 6a339ff..771ce99 100644 --- a/compabetov2.csproj +++ b/compabetov2.csproj @@ -109,6 +109,12 @@ AgregarEmpleado.cs + + Form + + + AgregarLogin.cs + Form @@ -176,6 +182,9 @@ AgregarEmpleado.cs + + AgregarLogin.cs + cuentas.cs diff --git a/database/DAO.cs b/database/DAO.cs index 1941e6d..a12f461 100644 --- a/database/DAO.cs +++ b/database/DAO.cs @@ -151,10 +151,9 @@ namespace compabetov2.database { conexion.Open(); - string sql = "UPDATE Empleado SET " + - "VALUES (@nombre, @apellidos, @calle, @fecha_contratacion, @estado, @colonia, @cp, @no_ext, @no_int, @referencia, @fecha_nac, @telefono)"; - - + string sql = "UPDATE Empleado SET nombre = @nombre, apellidos = @apellidos, calle = @calle, fecha_contratacion = @fecha_contratacion, " + + "estado = @estado, colonia = @colonia, cp = @cp, no_ext = @no_ext, no_int = @no_int, referencia = @referencia, " + + "fecha_nac = @fecha_nac, telefono = @telefono WHERE idempleado = @idempleado;"; using (SQLiteCommand command = new SQLiteCommand(sql, conexion)) { @@ -170,6 +169,7 @@ namespace compabetov2.database command.Parameters.AddWithValue("@referencia", empleado.referencia); command.Parameters.AddWithValue("@fecha_nac", empleado.fecha_nac); command.Parameters.AddWithValue("@telefono", empleado.telefono); + command.Parameters.AddWithValue("@idempleado", empleado.idempleado); int filasAfectadas = command.ExecuteNonQuery(); @@ -490,18 +490,19 @@ namespace compabetov2.database conexion.Open(); string[] consultas = new string[] { - "DROP TABLE IF EXISTS Login", "DROP TABLE IF EXISTS Empleado", + "DROP TABLE IF EXISTS Login", "DROP TABLE IF EXISTS Producto", "DROP TABLE IF EXISTS Categoria", "DROP TABLE IF EXISTS Cliente", + "CREATE TABLE Login (idlogin INTEGER PRIMARY KEY AUTOINCREMENT, tipo TEXT NOT NULL, usuario TEXT NOT NULL, "+ + "contra TEXT NOT NULL)", + "CREATE TABLE Empleado (idempleado INTEGER PRIMARY KEY AUTOINCREMENT, nombre TEXT NOT NULL, "+ "apellidos TEXT NOT NULL, calle TEXT NOT NULL, fecha_contratacion TEXT NOT NULL,estado 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)", - - "CREATE TABLE Login (idlogin INTEGER PRIMARY KEY AUTOINCREMENT, tipo TEXT NOT NULL, usuario TEXT NOT NULL, "+ - "contra TEXT NOT NULL, fk_idempleado INTEGER NOT NULL, FOREIGN KEY (fk_idempleado) REFERENCES Empleado (idempleado))", + "no_int TEXT NOT NULL, referencia TEXT NOT NULL, fecha_nac TEXT NOT NULL, telefono TEXT NOT NULL, fk_idLogin INTEGER," + + "FOREIGN KEY (fk_idLogin) REFERENCES Login(idlogin))", "CREATE TABLE Categoria (idcategoria INTEGER PRIMARY KEY AUTOINCREMENT, nombre TEXT NOT NULL, descripcion TEXT NOT NULL)", @@ -513,8 +514,9 @@ namespace compabetov2.database "calle 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, " + "telefono TEXT NOT NULL, telefono_extra TEXT NOT NULL)", - "INSERT INTO Empleado ( nombre, apellidos, calle, fecha_contratacion,estado, colonia, cp, no_ext,no_int, referencia, fecha_nac, telefono) VALUES('jefe', '', '', '', '', '', '', '', '', '', '', '');", - "INSERT INTO Login ( tipo, usuario, contra, fk_idempleado) VALUES('admin', 'admin', '12345', 1);" + "INSERT INTO Login ( tipo, usuario, contra) VALUES('admin', 'admin', '12345');", + "INSERT INTO Empleado ( nombre, apellidos, calle, fecha_contratacion,estado, colonia, cp, no_ext,no_int, referencia, fecha_nac, telefono,fk_idLogin) VALUES('jefe', '', '', '', '', '', '', '', '', '', '', '',1);", + }; foreach (string consulta in consultas) diff --git a/database/modelos/Empleado.cs b/database/modelos/Empleado.cs index 5d8327d..544f750 100644 --- a/database/modelos/Empleado.cs +++ b/database/modelos/Empleado.cs @@ -21,8 +21,9 @@ namespace compabetov2.database.modelos public string referencia; public string fecha_nac; public string telefono; + public int? fkIdLogin; - public Empleado(int idempeado = -1, string nombre ="", string apellidos = "", string calle = "", string fecha_contratacion = "", string estado = "", string colonia = "", string cp = "", string no_ext = "", string no_int = "", string referencia = "", string fecha_nac = "", string telefono ="") + public Empleado(int idempeado = -1, string nombre ="", string apellidos = "", string calle = "", string fecha_contratacion = "", string estado = "", string colonia = "", string cp = "", string no_ext = "", string no_int = "", string referencia = "", string fecha_nac = "", string telefono ="",int? fkIdLogin = null) { this.idempleado = idempeado; this.nombre = nombre; @@ -37,6 +38,25 @@ namespace compabetov2.database.modelos this.referencia = referencia; this.fecha_nac=fecha_nac; this.telefono = telefono; + this.fkIdLogin = fkIdLogin; + } + + public bool CompareEmpleado(Empleado emp2) + { + if (nombre != emp2.nombre) return false; + if (apellidos != emp2.apellidos) return false; + if (calle != emp2.calle) return false; + if (fecha_contratacion != emp2.fecha_contratacion) return false; + if (estado != emp2.estado) return false; + if (colonia != emp2.colonia) return false; + if (cp != emp2.cp) return false; + if (no_ext != emp2.no_ext) return false; + if (no_int != emp2.no_int) return false; + if (referencia != emp2.referencia) return false; + if (fecha_nac != emp2.fecha_nac) return false; + if (telefono != emp2.telefono) return false; + + return true; } } } diff --git a/database/service.cs b/database/service.cs index 05a81e9..4d3c199 100644 --- a/database/service.cs +++ b/database/service.cs @@ -105,8 +105,11 @@ namespace compabetov2.database while (reader.Read()) { + long fkIdLogin = reader.GetInt64(0); + + long id = reader.GetInt64(0); Empleado empleado = new Empleado( - int.Parse(reader["idempleado"].ToString()), + Convert.ToInt32(id), reader["nombre"].ToString(), reader["apellidos"].ToString(), reader["calle"].ToString(), @@ -118,8 +121,9 @@ namespace compabetov2.database reader["no_int"].ToString(), reader["referencia"].ToString(), reader["fecha_nac"].ToString(), - reader["telefono"].ToString() - ); + reader["telefono"].ToString(), + Convert.ToInt32(fkIdLogin) + ) ; empleados.Add(empleado); } return empleados; @@ -136,5 +140,10 @@ namespace compabetov2.database { return DAO.eliminarEmpleadoDAO(idEmpleado); } + + public static bool actualizarEmpleado(Empleado empleado) + { + return DAO.actualizarEmpleadoDAO(empleado); + } } } diff --git a/obj/Debug/DesignTimeResolveAssemblyReferences.cache b/obj/Debug/DesignTimeResolveAssemblyReferences.cache index 5d5a78c..ef3b525 100644 Binary files a/obj/Debug/DesignTimeResolveAssemblyReferences.cache and b/obj/Debug/DesignTimeResolveAssemblyReferences.cache differ diff --git a/obj/Debug/compabetov2.csproj.CoreCompileInputs.cache b/obj/Debug/compabetov2.csproj.CoreCompileInputs.cache index 766796f..42c857c 100644 --- a/obj/Debug/compabetov2.csproj.CoreCompileInputs.cache +++ b/obj/Debug/compabetov2.csproj.CoreCompileInputs.cache @@ -1 +1 @@ -0de1c424268dd16d06d975ef2c499f33dbd19721fb5a2d42d29e7a4ca4bce0d1 +5d59b1013627d47320299052a443bf2f5f938b5e44e9ca7b957196b5427dd7b6 diff --git a/obj/Debug/compabetov2.csproj.FileListAbsolute.txt b/obj/Debug/compabetov2.csproj.FileListAbsolute.txt index 2966be8..cee5f43 100644 --- a/obj/Debug/compabetov2.csproj.FileListAbsolute.txt +++ b/obj/Debug/compabetov2.csproj.FileListAbsolute.txt @@ -90,3 +90,4 @@ C:\Users\Googl\Documents\compabetoOG\obj\Debug\compabetov2.exe C:\Users\Googl\Documents\compabetoOG\obj\Debug\compabetov2.pdb C:\Users\carsu\source\repos\compabetoOG\obj\Debug\compabetov2.AgregarEmpleado.resources C:\Users\carsu\source\repos\compabetoOG\obj\Debug\compabetov2.EditarEmpleado.resources +C:\Users\carsu\source\repos\compabetoOG\obj\Debug\compabetov2.AgregarLogin.resources diff --git a/obj/Debug/compabetov2.csproj.GenerateResource.cache b/obj/Debug/compabetov2.csproj.GenerateResource.cache index 0bc11f6..2c023d8 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 e11840d..a8e69c6 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 3962c73..05ae2cb 100644 Binary files a/obj/Debug/compabetov2.pdb and b/obj/Debug/compabetov2.pdb differ diff --git a/personal.cs b/personal.cs index 0e54a25..f1c8a6f 100644 --- a/personal.cs +++ b/personal.cs @@ -35,8 +35,8 @@ namespace compabetov2 empleadoLayout.ColumnCount = 2; empleadoLayout.Height = 100; empleadoLayout.Width = 900; - empleadoLayout.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 60F)); - empleadoLayout.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 40F)); + empleadoLayout.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 50F)); + empleadoLayout.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 50F)); empleadoLayout.RowStyles.Add(new RowStyle(SizeType.Percent, 100F)); empleadoLayout.BorderStyle = BorderStyle.FixedSingle; @@ -68,11 +68,12 @@ namespace compabetov2 TableLayoutPanel panelBotones = new TableLayoutPanel(); panelBotones.RowCount = 1; - panelBotones.ColumnCount = 3; + panelBotones.ColumnCount = 4; panelBotones.Dock = DockStyle.Fill; - panelBotones.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 33F)); - panelBotones.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 33F)); - panelBotones.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 33F)); + panelBotones.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 25F)); + panelBotones.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 25F)); + panelBotones.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 25F)); + panelBotones.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 25F)); Button btnVer = new Button(); btnVer.Text = "Ver"; @@ -123,6 +124,20 @@ namespace compabetov2 } }); + Button btnLogin = new Button(); + btnLogin.Text = "Login"; + btnLogin.BackColor = Color.Red; + btnLogin.Dock = DockStyle.Fill; + btnLogin.FlatStyle = FlatStyle.Flat; + btnLogin.FlatAppearance.BorderSize = 0; + btnLogin.Font = new Font(btnVer.Font.FontFamily, 16); + btnLogin.ForeColor = Color.White; + btnLogin.Click += new EventHandler(delegate (object sender, EventArgs e) + { + + }); + + infoEmpleado.Controls.Add(imgEmpleado,0,0); infoEmpleado.Controls.Add(nombreEmpleado,1,0); @@ -130,6 +145,7 @@ namespace compabetov2 panelBotones.Controls.Add(btnVer,0,0); panelBotones.Controls.Add(btnEditar,1,0); panelBotones.Controls.Add(btnEliminar,2,0); + panelBotones.Controls.Add(btnLogin,3,0); empleadoLayout.Controls.Add(infoEmpleado,0,0); empleadoLayout.Controls.Add(panelBotones,1,0);