diff --git a/cuentas.Designer.cs b/Cuentas/cuentas.Designer.cs similarity index 100% rename from cuentas.Designer.cs rename to Cuentas/cuentas.Designer.cs diff --git a/cuentas.cs b/Cuentas/cuentas.cs similarity index 100% rename from cuentas.cs rename to Cuentas/cuentas.cs diff --git a/cuentas.resx b/Cuentas/cuentas.resx similarity index 100% rename from cuentas.resx rename to Cuentas/cuentas.resx diff --git a/AgregarEmpleado.Designer.cs b/Empleados/AgregarEmpleado.Designer.cs similarity index 100% rename from AgregarEmpleado.Designer.cs rename to Empleados/AgregarEmpleado.Designer.cs diff --git a/AgregarEmpleado.cs b/Empleados/AgregarEmpleado.cs similarity index 100% rename from AgregarEmpleado.cs rename to Empleados/AgregarEmpleado.cs diff --git a/AgregarEmpleado.resx b/Empleados/AgregarEmpleado.resx similarity index 100% rename from AgregarEmpleado.resx rename to Empleados/AgregarEmpleado.resx diff --git a/AgregarLogin.Designer.cs b/Empleados/AgregarLogin.Designer.cs similarity index 100% rename from AgregarLogin.Designer.cs rename to Empleados/AgregarLogin.Designer.cs diff --git a/AgregarLogin.cs b/Empleados/AgregarLogin.cs similarity index 100% rename from AgregarLogin.cs rename to Empleados/AgregarLogin.cs diff --git a/AgregarLogin.resx b/Empleados/AgregarLogin.resx similarity index 100% rename from AgregarLogin.resx rename to Empleados/AgregarLogin.resx diff --git a/EditarEmpleado.Designer.cs b/Empleados/EditarEmpleado.Designer.cs similarity index 100% rename from EditarEmpleado.Designer.cs rename to Empleados/EditarEmpleado.Designer.cs diff --git a/EditarEmpleado.cs b/Empleados/EditarEmpleado.cs similarity index 100% rename from EditarEmpleado.cs rename to Empleados/EditarEmpleado.cs diff --git a/EditarEmpleado.resx b/Empleados/EditarEmpleado.resx similarity index 100% rename from EditarEmpleado.resx rename to Empleados/EditarEmpleado.resx diff --git a/ModificarContra.Designer.cs b/Empleados/ModificarContra.Designer.cs similarity index 100% rename from ModificarContra.Designer.cs rename to Empleados/ModificarContra.Designer.cs diff --git a/ModificarContra.cs b/Empleados/ModificarContra.cs similarity index 100% rename from ModificarContra.cs rename to Empleados/ModificarContra.cs diff --git a/ModificarContra.resx b/Empleados/ModificarContra.resx similarity index 100% rename from ModificarContra.resx rename to Empleados/ModificarContra.resx diff --git a/personal.Designer.cs b/Empleados/personal.Designer.cs similarity index 100% rename from personal.Designer.cs rename to Empleados/personal.Designer.cs diff --git a/personal.cs b/Empleados/personal.cs similarity index 100% rename from personal.cs rename to Empleados/personal.cs diff --git a/personal.resx b/Empleados/personal.resx similarity index 100% rename from personal.resx rename to Empleados/personal.resx diff --git a/preguntaLogin.Designer.cs b/Empleados/preguntaLogin.Designer.cs similarity index 100% rename from preguntaLogin.Designer.cs rename to Empleados/preguntaLogin.Designer.cs diff --git a/preguntaLogin.cs b/Empleados/preguntaLogin.cs similarity index 100% rename from preguntaLogin.cs rename to Empleados/preguntaLogin.cs diff --git a/preguntaLogin.resx b/Empleados/preguntaLogin.resx similarity index 100% rename from preguntaLogin.resx rename to Empleados/preguntaLogin.resx diff --git a/envios.Designer.cs b/Envios/envios.Designer.cs similarity index 100% rename from envios.Designer.cs rename to Envios/envios.Designer.cs diff --git a/envios.cs b/Envios/envios.cs similarity index 100% rename from envios.cs rename to Envios/envios.cs diff --git a/envios.resx b/Envios/envios.resx similarity index 100% rename from envios.resx rename to Envios/envios.resx diff --git a/inventario.Designer.cs b/Inventario/inventario.Designer.cs similarity index 100% rename from inventario.Designer.cs rename to Inventario/inventario.Designer.cs diff --git a/inventario.cs b/Inventario/inventario.cs similarity index 100% rename from inventario.cs rename to Inventario/inventario.cs diff --git a/inventario.resx b/Inventario/inventario.resx similarity index 100% rename from inventario.resx rename to Inventario/inventario.resx diff --git a/ActualizarMerma.Designer.cs b/Merma/ActualizarMerma.Designer.cs similarity index 79% rename from ActualizarMerma.Designer.cs rename to Merma/ActualizarMerma.Designer.cs index 7e81d5d..ab9b868 100644 --- a/ActualizarMerma.Designer.cs +++ b/Merma/ActualizarMerma.Designer.cs @@ -28,8 +28,6 @@ /// private void InitializeComponent() { - this.btnCancelar = new System.Windows.Forms.Button(); - this.btnAgregar = new System.Windows.Forms.Button(); this.txtResponsable = new System.Windows.Forms.TextBox(); this.label3 = new System.Windows.Forms.Label(); this.dtFecha = new System.Windows.Forms.DateTimePicker(); @@ -37,31 +35,12 @@ this.label2 = new System.Windows.Forms.Label(); this.label1 = new System.Windows.Forms.Label(); this.label4 = new System.Windows.Forms.Label(); + this.pictureBox1 = new System.Windows.Forms.PictureBox(); + this.pictureBox2 = new System.Windows.Forms.PictureBox(); + ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.pictureBox2)).BeginInit(); this.SuspendLayout(); // - // btnCancelar - // - this.btnCancelar.Font = new System.Drawing.Font("Microsoft Sans Serif", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.btnCancelar.Location = new System.Drawing.Point(585, 695); - this.btnCancelar.Margin = new System.Windows.Forms.Padding(4); - this.btnCancelar.Name = "btnCancelar"; - this.btnCancelar.Size = new System.Drawing.Size(124, 55); - this.btnCancelar.TabIndex = 15; - this.btnCancelar.Text = "Cancelar"; - this.btnCancelar.UseVisualStyleBackColor = true; - // - // btnAgregar - // - this.btnAgregar.Font = new System.Drawing.Font("Microsoft Sans Serif", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.btnAgregar.Location = new System.Drawing.Point(412, 695); - this.btnAgregar.Margin = new System.Windows.Forms.Padding(4); - this.btnAgregar.Name = "btnAgregar"; - this.btnAgregar.Size = new System.Drawing.Size(124, 55); - this.btnAgregar.TabIndex = 14; - this.btnAgregar.Text = "Editar"; - this.btnAgregar.UseVisualStyleBackColor = true; - this.btnAgregar.Click += new System.EventHandler(this.btnAgregar_Click); - // // txtResponsable // this.txtResponsable.Font = new System.Drawing.Font("Microsoft Sans Serif", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); @@ -140,6 +119,30 @@ this.label4.TabIndex = 16; this.label4.Text = "Modificar Merma"; // + // pictureBox1 + // + this.pictureBox1.BackColor = System.Drawing.Color.Transparent; + this.pictureBox1.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center; + this.pictureBox1.Image = global::compabetov2.Properties.Resources.cancel1; + this.pictureBox1.Location = new System.Drawing.Point(611, 695); + this.pictureBox1.Name = "pictureBox1"; + this.pictureBox1.Size = new System.Drawing.Size(100, 69); + this.pictureBox1.TabIndex = 17; + this.pictureBox1.TabStop = false; + this.pictureBox1.Click += new System.EventHandler(this.pictureBox1_Click); + // + // pictureBox2 + // + this.pictureBox2.BackColor = System.Drawing.Color.Transparent; + this.pictureBox2.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center; + this.pictureBox2.Image = global::compabetov2.Properties.Resources.check1; + this.pictureBox2.Location = new System.Drawing.Point(471, 695); + this.pictureBox2.Name = "pictureBox2"; + this.pictureBox2.Size = new System.Drawing.Size(100, 69); + this.pictureBox2.TabIndex = 18; + this.pictureBox2.TabStop = false; + this.pictureBox2.Click += new System.EventHandler(this.pictureBox2_Click); + // // ActualizarMerma // this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F); @@ -149,9 +152,9 @@ this.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; this.ClientSize = new System.Drawing.Size(1102, 776); this.ControlBox = false; + this.Controls.Add(this.pictureBox2); + this.Controls.Add(this.pictureBox1); this.Controls.Add(this.label4); - this.Controls.Add(this.btnCancelar); - this.Controls.Add(this.btnAgregar); this.Controls.Add(this.txtResponsable); this.Controls.Add(this.label3); this.Controls.Add(this.dtFecha); @@ -162,15 +165,14 @@ this.Margin = new System.Windows.Forms.Padding(4); this.Name = "ActualizarMerma"; this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; + ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.pictureBox2)).EndInit(); this.ResumeLayout(false); this.PerformLayout(); } #endregion - - private System.Windows.Forms.Button btnCancelar; - private System.Windows.Forms.Button btnAgregar; private System.Windows.Forms.TextBox txtResponsable; private System.Windows.Forms.Label label3; private System.Windows.Forms.DateTimePicker dtFecha; @@ -178,5 +180,7 @@ private System.Windows.Forms.Label label2; private System.Windows.Forms.Label label1; private System.Windows.Forms.Label label4; + private System.Windows.Forms.PictureBox pictureBox1; + private System.Windows.Forms.PictureBox pictureBox2; } } \ No newline at end of file diff --git a/ActualizarMerma.cs b/Merma/ActualizarMerma.cs similarity index 56% rename from ActualizarMerma.cs rename to Merma/ActualizarMerma.cs index 077d9be..b2213e4 100644 --- a/ActualizarMerma.cs +++ b/Merma/ActualizarMerma.cs @@ -52,5 +52,32 @@ namespace compabetov2 { } + + private void pictureBox2_Click(object sender, EventArgs e) + { + // Mostrar mensaje de confirmación + DialogResult result = MessageBox.Show("¿En realidad quieres hacer esta modificación a esta merma?", "Confirmar Modificación", MessageBoxButtons.YesNo, MessageBoxIcon.Warning); + + // Verificar la respuesta del usuario + if (result == DialogResult.Yes) + { + // Si el usuario hace clic en "Sí", proceder con la actualización + Merma nuevaMerma = new Merma(merma.idMerma, dtFecha.Text, txtResponsable.Text, txtDescripcion.Text); + + if (service.actualizarMerma(nuevaMerma)) + { + MessageBox.Show("Merma actualizada"); + ventanaPadre.llenarPanel(); + Close(); + } + } + // Si el usuario hace clic en "No" o cierra la advertencia, no se realiza la actualización + } + + + private void pictureBox1_Click(object sender, EventArgs e) + { + this.Close(); + } } } diff --git a/ActualizarMerma.resx b/Merma/ActualizarMerma.resx similarity index 100% rename from ActualizarMerma.resx rename to Merma/ActualizarMerma.resx diff --git a/agregarmermas.Designer.cs b/Merma/agregarmermas.Designer.cs similarity index 50% rename from agregarmermas.Designer.cs rename to Merma/agregarmermas.Designer.cs index 8905ea3..7de0d43 100644 --- a/agregarmermas.Designer.cs +++ b/Merma/agregarmermas.Designer.cs @@ -34,29 +34,34 @@ this.dtFecha = new System.Windows.Forms.DateTimePicker(); this.label3 = new System.Windows.Forms.Label(); this.txtResponsable = new System.Windows.Forms.TextBox(); - this.btnAgregar = new System.Windows.Forms.Button(); - this.btnCancelar = new System.Windows.Forms.Button(); + this.pictureBox2 = new System.Windows.Forms.PictureBox(); + this.pictureBox1 = new System.Windows.Forms.PictureBox(); + this.label4 = new System.Windows.Forms.Label(); + ((System.ComponentModel.ISupportInitialize)(this.pictureBox2)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit(); this.SuspendLayout(); // // label1 // this.label1.AutoSize = true; + this.label1.BackColor = System.Drawing.Color.Transparent; 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(167, 96); - this.label1.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); + this.label1.ForeColor = System.Drawing.Color.Transparent; + this.label1.Location = new System.Drawing.Point(203, 319); this.label1.Name = "label1"; - this.label1.Size = new System.Drawing.Size(69, 24); + this.label1.Size = new System.Drawing.Size(86, 29); this.label1.TabIndex = 0; this.label1.Text = "Fecha:"; // // label2 // this.label2.AutoSize = true; + this.label2.BackColor = System.Drawing.Color.Transparent; 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(11, 92); - this.label2.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); + this.label2.ForeColor = System.Drawing.Color.Transparent; + this.label2.Location = new System.Drawing.Point(475, 381); this.label2.Name = "label2"; - this.label2.Size = new System.Drawing.Size(115, 24); + this.label2.Size = new System.Drawing.Size(147, 29); this.label2.TabIndex = 1; this.label2.Text = "Descripcion:"; this.label2.Click += new System.EventHandler(this.label2_Click); @@ -64,77 +69,103 @@ // txtDescripcion // this.txtDescripcion.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.txtDescripcion.Location = new System.Drawing.Point(11, 126); - this.txtDescripcion.Margin = new System.Windows.Forms.Padding(2); + this.txtDescripcion.Location = new System.Drawing.Point(198, 423); + this.txtDescripcion.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); this.txtDescripcion.Multiline = true; this.txtDescripcion.Name = "txtDescripcion"; - this.txtDescripcion.Size = new System.Drawing.Size(578, 195); + this.txtDescripcion.Size = new System.Drawing.Size(769, 239); this.txtDescripcion.TabIndex = 2; // // dtFecha // this.dtFecha.Font = new System.Drawing.Font("Microsoft Sans Serif", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.dtFecha.Location = new System.Drawing.Point(241, 92); + this.dtFecha.Location = new System.Drawing.Point(371, 314); + this.dtFecha.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); this.dtFecha.Name = "dtFecha"; - this.dtFecha.Size = new System.Drawing.Size(348, 29); + this.dtFecha.Size = new System.Drawing.Size(463, 34); this.dtFecha.TabIndex = 3; // // label3 // this.label3.AutoSize = true; + this.label3.BackColor = System.Drawing.Color.Transparent; this.label3.Font = new System.Drawing.Font("Microsoft Sans Serif", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.label3.Location = new System.Drawing.Point(110, 17); - this.label3.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); + this.label3.ForeColor = System.Drawing.Color.Transparent; + this.label3.Location = new System.Drawing.Point(193, 233); this.label3.Name = "label3"; - this.label3.Size = new System.Drawing.Size(126, 24); + this.label3.Size = new System.Drawing.Size(162, 29); this.label3.TabIndex = 4; this.label3.Text = "Responsable:"; // // txtResponsable // this.txtResponsable.Font = new System.Drawing.Font("Microsoft Sans Serif", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.txtResponsable.Location = new System.Drawing.Point(241, 17); + this.txtResponsable.Location = new System.Drawing.Point(371, 233); + this.txtResponsable.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); this.txtResponsable.Name = "txtResponsable"; - this.txtResponsable.Size = new System.Drawing.Size(348, 29); + this.txtResponsable.Size = new System.Drawing.Size(463, 34); this.txtResponsable.TabIndex = 5; // - // btnAgregar + // pictureBox2 // - this.btnAgregar.Font = new System.Drawing.Font("Microsoft Sans Serif", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.btnAgregar.Location = new System.Drawing.Point(375, 347); - this.btnAgregar.Name = "btnAgregar"; - this.btnAgregar.Size = new System.Drawing.Size(93, 45); - this.btnAgregar.TabIndex = 6; - this.btnAgregar.Text = "Agregar"; - this.btnAgregar.UseVisualStyleBackColor = true; - this.btnAgregar.Click += new System.EventHandler(this.btnAgregar_Click); + this.pictureBox2.BackColor = System.Drawing.Color.Transparent; + this.pictureBox2.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center; + this.pictureBox2.Image = global::compabetov2.Properties.Resources.check1; + this.pictureBox2.Location = new System.Drawing.Point(475, 684); + this.pictureBox2.Name = "pictureBox2"; + this.pictureBox2.Size = new System.Drawing.Size(100, 69); + this.pictureBox2.TabIndex = 20; + this.pictureBox2.TabStop = false; + this.pictureBox2.Click += new System.EventHandler(this.pictureBox2_Click); // - // btnCancelar + // pictureBox1 // - this.btnCancelar.Font = new System.Drawing.Font("Microsoft Sans Serif", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.btnCancelar.Location = new System.Drawing.Point(483, 347); - this.btnCancelar.Name = "btnCancelar"; - this.btnCancelar.Size = new System.Drawing.Size(93, 45); - this.btnCancelar.TabIndex = 7; - this.btnCancelar.Text = "Cancelar"; - this.btnCancelar.UseVisualStyleBackColor = true; + this.pictureBox1.BackColor = System.Drawing.Color.Transparent; + this.pictureBox1.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center; + this.pictureBox1.Image = global::compabetov2.Properties.Resources.cancel1; + this.pictureBox1.Location = new System.Drawing.Point(581, 684); + this.pictureBox1.Name = "pictureBox1"; + this.pictureBox1.Size = new System.Drawing.Size(100, 69); + this.pictureBox1.TabIndex = 19; + this.pictureBox1.TabStop = false; + this.pictureBox1.Click += new System.EventHandler(this.pictureBox1_Click); + // + // label4 + // + this.label4.AutoSize = true; + this.label4.BackColor = System.Drawing.Color.Transparent; + this.label4.Font = new System.Drawing.Font("Microsoft Sans Serif", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label4.ForeColor = System.Drawing.Color.Transparent; + this.label4.Location = new System.Drawing.Point(455, 161); + this.label4.Name = "label4"; + this.label4.RightToLeft = System.Windows.Forms.RightToLeft.No; + this.label4.Size = new System.Drawing.Size(180, 29); + this.label4.TabIndex = 21; + this.label4.Text = "Agregar Merma"; // // agregarmermas // - 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(600, 404); - this.Controls.Add(this.btnCancelar); - this.Controls.Add(this.btnAgregar); + this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(27)))), ((int)(((byte)(104)))), ((int)(((byte)(255))))); + this.BackgroundImage = global::compabetov2.Properties.Resources.Form; + this.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; + this.ClientSize = new System.Drawing.Size(1102, 747); + this.ControlBox = false; + this.Controls.Add(this.label4); + this.Controls.Add(this.pictureBox2); + this.Controls.Add(this.pictureBox1); this.Controls.Add(this.txtResponsable); this.Controls.Add(this.label3); this.Controls.Add(this.dtFecha); this.Controls.Add(this.txtDescripcion); this.Controls.Add(this.label2); this.Controls.Add(this.label1); - this.Margin = new System.Windows.Forms.Padding(2); + this.DoubleBuffered = true; + this.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); this.Name = "agregarmermas"; - this.Text = "Agregar Merma"; + ((System.ComponentModel.ISupportInitialize)(this.pictureBox2)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit(); this.ResumeLayout(false); this.PerformLayout(); @@ -148,7 +179,8 @@ private System.Windows.Forms.DateTimePicker dtFecha; private System.Windows.Forms.Label label3; private System.Windows.Forms.TextBox txtResponsable; - private System.Windows.Forms.Button btnAgregar; - private System.Windows.Forms.Button btnCancelar; + private System.Windows.Forms.PictureBox pictureBox2; + private System.Windows.Forms.PictureBox pictureBox1; + private System.Windows.Forms.Label label4; } } \ No newline at end of file diff --git a/Merma/agregarmermas.cs b/Merma/agregarmermas.cs new file mode 100644 index 0000000..8476c67 --- /dev/null +++ b/Merma/agregarmermas.cs @@ -0,0 +1,70 @@ +using compabetov2.database; +using compabetov2.database.modelos; +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 agregarmermas : Form + { + private mermas ventanaPadre; + public agregarmermas(mermas ventanaPadre) + { + InitializeComponent(); + this.ventanaPadre = ventanaPadre; + } + + private void label2_Click(object sender, EventArgs e) + { + + } + + private void btnAgregar_Click(object sender, EventArgs e) + { + string descripcion = txtDescripcion.Text; + string fecha = dtFecha.Text; + string responsable = txtResponsable.Text; + Merma merma = new Merma(-1,fecha,responsable,descripcion); + if (service.insertarMerma(merma)) { + ventanaPadre.llenarPanel(); + Close(); + } + } + + private void pictureBox2_Click(object sender, EventArgs e) + { + // Mostrar mensaje de confirmación + DialogResult result = MessageBox.Show("¿En realidad quieres agregar esta nueva merma?", "Confirmar Agregar", MessageBoxButtons.YesNo, MessageBoxIcon.Warning); + + // Verificar la respuesta del usuario + if (result == DialogResult.Yes) + { + // Si el usuario hace clic en "Sí", proceder con la inserción + string descripcion = txtDescripcion.Text; + string fecha = dtFecha.Text; + string responsable = txtResponsable.Text; + + Merma nuevaMerma = new Merma(-1, fecha, responsable, descripcion); + + if (service.insertarMerma(nuevaMerma)) + { + MessageBox.Show("Nueva merma agregada"); + ventanaPadre.llenarPanel(); + Close(); + } + } + } + + private void pictureBox1_Click(object sender, EventArgs e) + { + this.Close (); + } + } +} diff --git a/agregarmermas.resx b/Merma/agregarmermas.resx similarity index 100% rename from agregarmermas.resx rename to Merma/agregarmermas.resx diff --git a/mermas.Designer.cs b/Merma/mermas.Designer.cs similarity index 99% rename from mermas.Designer.cs rename to Merma/mermas.Designer.cs index 9042e2a..b702914 100644 --- a/mermas.Designer.cs +++ b/Merma/mermas.Designer.cs @@ -186,7 +186,7 @@ // mermaPanel // this.mermaPanel.Location = new System.Drawing.Point(572, 348); - this.mermaPanel.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); + this.mermaPanel.Margin = new System.Windows.Forms.Padding(4); this.mermaPanel.Name = "mermaPanel"; this.mermaPanel.Size = new System.Drawing.Size(1039, 495); this.mermaPanel.TabIndex = 16; @@ -196,7 +196,7 @@ // this.btnAgregar.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.btnAgregar.Location = new System.Drawing.Point(1049, 270); - this.btnAgregar.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); + this.btnAgregar.Margin = new System.Windows.Forms.Padding(4); this.btnAgregar.Name = "btnAgregar"; this.btnAgregar.Size = new System.Drawing.Size(119, 34); this.btnAgregar.TabIndex = 17; diff --git a/mermas.cs b/Merma/mermas.cs similarity index 100% rename from mermas.cs rename to Merma/mermas.cs diff --git a/mermas.resx b/Merma/mermas.resx similarity index 100% rename from mermas.resx rename to Merma/mermas.resx diff --git a/verMerma.Designer.cs b/Merma/verMerma.Designer.cs similarity index 81% rename from verMerma.Designer.cs rename to Merma/verMerma.Designer.cs index 4ce8977..00c596d 100644 --- a/verMerma.Designer.cs +++ b/Merma/verMerma.Designer.cs @@ -35,13 +35,15 @@ this.label2 = new System.Windows.Forms.Label(); this.label1 = new System.Windows.Forms.Label(); this.label4 = new System.Windows.Forms.Label(); + this.cerrarlabel = new System.Windows.Forms.PictureBox(); + ((System.ComponentModel.ISupportInitialize)(this.cerrarlabel)).BeginInit(); this.SuspendLayout(); // // txtResponsable // this.txtResponsable.Font = new System.Drawing.Font("Microsoft Sans Serif", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.txtResponsable.Location = new System.Drawing.Point(371, 233); - this.txtResponsable.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); + this.txtResponsable.Margin = new System.Windows.Forms.Padding(4); this.txtResponsable.Name = "txtResponsable"; this.txtResponsable.Size = new System.Drawing.Size(463, 34); this.txtResponsable.TabIndex = 11; @@ -62,7 +64,7 @@ // this.dtFecha.Font = new System.Drawing.Font("Microsoft Sans Serif", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.dtFecha.Location = new System.Drawing.Point(371, 314); - this.dtFecha.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); + this.dtFecha.Margin = new System.Windows.Forms.Padding(4); this.dtFecha.Name = "dtFecha"; this.dtFecha.Size = new System.Drawing.Size(463, 34); this.dtFecha.TabIndex = 9; @@ -107,20 +109,34 @@ this.label4.BackColor = System.Drawing.Color.Transparent; this.label4.Font = new System.Drawing.Font("Microsoft Sans Serif", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.label4.ForeColor = System.Drawing.Color.Transparent; - this.label4.Location = new System.Drawing.Point(448, 169); + this.label4.Location = new System.Drawing.Point(491, 178); this.label4.Name = "label4"; - this.label4.Size = new System.Drawing.Size(193, 29); + this.label4.Size = new System.Drawing.Size(131, 29); this.label4.TabIndex = 17; - this.label4.Text = "Modificar Merma"; + this.label4.Text = "Ver Merma"; + // + // cerrarlabel + // + this.cerrarlabel.BackColor = System.Drawing.Color.Transparent; + this.cerrarlabel.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; + this.cerrarlabel.Image = global::compabetov2.Properties.Resources.cancel1; + this.cerrarlabel.Location = new System.Drawing.Point(541, 720); + this.cerrarlabel.Name = "cerrarlabel"; + this.cerrarlabel.Size = new System.Drawing.Size(125, 76); + this.cerrarlabel.TabIndex = 18; + this.cerrarlabel.TabStop = false; + this.cerrarlabel.Click += new System.EventHandler(this.pictureBox1_Click); // // verMerma // this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(27)))), ((int)(((byte)(104)))), ((int)(((byte)(255))))); this.BackgroundImage = global::compabetov2.Properties.Resources.Form; this.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; - this.ClientSize = new System.Drawing.Size(1102, 747); + this.ClientSize = new System.Drawing.Size(1102, 808); this.ControlBox = false; + this.Controls.Add(this.cerrarlabel); this.Controls.Add(this.label4); this.Controls.Add(this.txtResponsable); this.Controls.Add(this.label3); @@ -129,9 +145,11 @@ this.Controls.Add(this.label2); this.Controls.Add(this.label1); this.DoubleBuffered = true; - this.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); + this.Margin = new System.Windows.Forms.Padding(4); this.Name = "verMerma"; + this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; this.Load += new System.EventHandler(this.verMerma_Load); + ((System.ComponentModel.ISupportInitialize)(this.cerrarlabel)).EndInit(); this.ResumeLayout(false); this.PerformLayout(); @@ -146,5 +164,6 @@ private System.Windows.Forms.Label label2; private System.Windows.Forms.Label label1; private System.Windows.Forms.Label label4; + private System.Windows.Forms.PictureBox cerrarlabel; } } \ No newline at end of file diff --git a/verMerma.cs b/Merma/verMerma.cs similarity index 85% rename from verMerma.cs rename to Merma/verMerma.cs index 5db024f..331fd0b 100644 --- a/verMerma.cs +++ b/Merma/verMerma.cs @@ -19,8 +19,12 @@ namespace compabetov2 InitializeComponent(); this.merma = merma; llenarComponentes(); + } + + + private void llenarComponentes() { txtDescripcion.Text = merma.razon; @@ -28,9 +32,16 @@ namespace compabetov2 dtFecha.Text = merma.fecha; } + + private void verMerma_Load(object sender, EventArgs e) { } + + private void pictureBox1_Click(object sender, EventArgs e) + { + this.Close(); + } } } diff --git a/verMerma.resx b/Merma/verMerma.resx similarity index 100% rename from verMerma.resx rename to Merma/verMerma.resx diff --git a/MenuPrincipal.Designer.cs b/Principal/MenuPrincipal.Designer.cs similarity index 100% rename from MenuPrincipal.Designer.cs rename to Principal/MenuPrincipal.Designer.cs diff --git a/MenuPrincipal.cs b/Principal/MenuPrincipal.cs similarity index 100% rename from MenuPrincipal.cs rename to Principal/MenuPrincipal.cs diff --git a/MenuPrincipal.resx b/Principal/MenuPrincipal.resx similarity index 100% rename from MenuPrincipal.resx rename to Principal/MenuPrincipal.resx diff --git a/login.Designer.cs b/Principal/login.Designer.cs similarity index 100% rename from login.Designer.cs rename to Principal/login.Designer.cs diff --git a/login.cs b/Principal/login.cs similarity index 100% rename from login.cs rename to Principal/login.cs diff --git a/login.resx b/Principal/login.resx similarity index 100% rename from login.resx rename to Principal/login.resx diff --git a/Properties/Resources.Designer.cs b/Properties/Resources.Designer.cs index efceae2..268a1ed 100644 --- a/Properties/Resources.Designer.cs +++ b/Properties/Resources.Designer.cs @@ -80,6 +80,46 @@ namespace compabetov2.Properties { } } + /// + /// Busca un recurso adaptado de tipo System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap cancel { + get { + object obj = ResourceManager.GetObject("cancel", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Busca un recurso adaptado de tipo System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap cancel1 { + get { + object obj = ResourceManager.GetObject("cancel1", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Busca un recurso adaptado de tipo System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap check { + get { + object obj = ResourceManager.GetObject("check", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Busca un recurso adaptado de tipo System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap check1 { + get { + object obj = ResourceManager.GetObject("check1", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + /// /// Busca un recurso adaptado de tipo System.Drawing.Bitmap. /// diff --git a/Properties/Resources.resx b/Properties/Resources.resx index f8e57f5..fbb84a8 100644 --- a/Properties/Resources.resx +++ b/Properties/Resources.resx @@ -124,6 +124,9 @@ ..\Resources\Cuadro.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\Form.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + ..\Resources\Cuentas.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a @@ -139,6 +142,9 @@ ..\Resources\Rectangle 1.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\cancel.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + ..\Resources\Envios.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a @@ -154,12 +160,6 @@ ..\Resources\cua1.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - ..\Resources\Personal.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - - ..\Resources\Menui.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - ..\Resources\mermas.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a @@ -178,6 +178,9 @@ ..\Resources\cua.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\check.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + ..\Resources\LoginOriginal.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a @@ -187,11 +190,14 @@ ..\Resources\mas.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\HomeroMenu.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + ..\Resources\productoi.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - ..\Resources\Menui1.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\Menui.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a ..\Resources\rec.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a @@ -202,16 +208,22 @@ ..\Resources\Modelo.jpg;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - ..\Resources\HomeroMenu.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - - ..\Resources\reportesi.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\Menui1.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a ..\Resources\bg.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - ..\Resources\Form.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\reportesi.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\Personal.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\cancel1.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\check1.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a \ No newline at end of file diff --git a/Resources/cancel.png b/Resources/cancel.png new file mode 100644 index 0000000..d84e79e Binary files /dev/null and b/Resources/cancel.png differ diff --git a/Resources/cancel1.png b/Resources/cancel1.png new file mode 100644 index 0000000..285f5a1 Binary files /dev/null and b/Resources/cancel1.png differ diff --git a/Resources/check.png b/Resources/check.png new file mode 100644 index 0000000..8991b9e Binary files /dev/null and b/Resources/check.png differ diff --git a/Resources/check1.png b/Resources/check1.png new file mode 100644 index 0000000..ce7280b Binary files /dev/null and b/Resources/check1.png differ diff --git a/vender.Designer.cs b/Ventas/vender.Designer.cs similarity index 100% rename from vender.Designer.cs rename to Ventas/vender.Designer.cs diff --git a/vender.cs b/Ventas/vender.cs similarity index 100% rename from vender.cs rename to Ventas/vender.cs diff --git a/vender.resx b/Ventas/vender.resx similarity index 100% rename from vender.resx rename to Ventas/vender.resx diff --git a/agregarmermas.cs b/agregarmermas.cs deleted file mode 100644 index c4cadd9..0000000 --- a/agregarmermas.cs +++ /dev/null @@ -1,41 +0,0 @@ -using compabetov2.database; -using compabetov2.database.modelos; -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 agregarmermas : Form - { - private mermas ventanaPadre; - public agregarmermas(mermas ventanaPadre) - { - InitializeComponent(); - this.ventanaPadre = ventanaPadre; - } - - private void label2_Click(object sender, EventArgs e) - { - - } - - private void btnAgregar_Click(object sender, EventArgs e) - { - string descripcion = txtDescripcion.Text; - string fecha = dtFecha.Text; - string responsable = txtResponsable.Text; - Merma merma = new Merma(-1,fecha,responsable,descripcion); - if (service.insertarMerma(merma)) { - ventanaPadre.llenarPanel(); - Close(); - } - } - } -} diff --git a/bin/Debug/compabetov2.exe b/bin/Debug/compabetov2.exe index 7226f65..75db70a 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 bf8d2ca..1f1921b 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 c358f69..d442b6b 100644 Binary files a/bin/Debug/data.db and b/bin/Debug/data.db differ diff --git a/compabetov2.csproj b/compabetov2.csproj index 1853e91..ffd9c82 100644 --- a/compabetov2.csproj +++ b/compabetov2.csproj @@ -106,34 +106,34 @@ - + Form - + ActualizarMerma.cs - + Form - + AgregarEmpleado.cs - + Form - + AgregarLogin.cs - + Form - + agregarmermas.cs - + Form - + cuentas.cs @@ -150,118 +150,118 @@ - + Form - + EditarEmpleado.cs - + Form - + envios.cs - + Form - + inventario.cs - + Form - + login.cs - + Form - + MenuPrincipal.cs - + Form - + mermas.cs - + Form - + ModificarContra.cs - + Form - + personal.cs - + Form - + preguntaLogin.cs - + Form - + vender.cs - + Form - + verMerma.cs - + ActualizarMerma.cs - + AgregarEmpleado.cs Designer - + AgregarLogin.cs Designer - + agregarmermas.cs - + cuentas.cs Designer - + EditarEmpleado.cs - + envios.cs - + inventario.cs - + login.cs - + MenuPrincipal.cs - + mermas.cs - + ModificarContra.cs - + personal.cs - + preguntaLogin.cs @@ -274,10 +274,10 @@ Resources.resx True - + vender.cs - + verMerma.cs @@ -382,6 +382,10 @@ + + + + PreserveNewest diff --git a/obj/Debug/DesignTimeResolveAssemblyReferences.cache b/obj/Debug/DesignTimeResolveAssemblyReferences.cache index c30d188..3bf8201 100644 Binary files a/obj/Debug/DesignTimeResolveAssemblyReferences.cache and b/obj/Debug/DesignTimeResolveAssemblyReferences.cache differ diff --git a/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache index 5b08d3c..5f3125c 100644 Binary files a/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache and b/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache differ diff --git a/obj/Debug/TempPE/Properties.Resources.Designer.cs.dll b/obj/Debug/TempPE/Properties.Resources.Designer.cs.dll index daacd26..9bf445e 100644 Binary files a/obj/Debug/TempPE/Properties.Resources.Designer.cs.dll and b/obj/Debug/TempPE/Properties.Resources.Designer.cs.dll differ diff --git a/obj/Debug/compabetov2.Properties.Resources.resources b/obj/Debug/compabetov2.Properties.Resources.resources index fd77073..e72cb9f 100644 Binary files a/obj/Debug/compabetov2.Properties.Resources.resources and b/obj/Debug/compabetov2.Properties.Resources.resources differ diff --git a/obj/Debug/compabetov2.csproj.AssemblyReference.cache b/obj/Debug/compabetov2.csproj.AssemblyReference.cache index a853f99..f61db5d 100644 Binary files a/obj/Debug/compabetov2.csproj.AssemblyReference.cache and b/obj/Debug/compabetov2.csproj.AssemblyReference.cache differ diff --git a/obj/Debug/compabetov2.csproj.GenerateResource.cache b/obj/Debug/compabetov2.csproj.GenerateResource.cache index fd4278c..3c5b5df 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 7226f65..75db70a 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 bf8d2ca..1f1921b 100644 Binary files a/obj/Debug/compabetov2.pdb and b/obj/Debug/compabetov2.pdb differ