Mermas Design
This commit is contained in:
Generated
+186
@@ -0,0 +1,186 @@
|
||||
namespace compabetov2
|
||||
{
|
||||
partial class ActualizarMerma
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.txtResponsable = new System.Windows.Forms.TextBox();
|
||||
this.label3 = new System.Windows.Forms.Label();
|
||||
this.dtFecha = new System.Windows.Forms.DateTimePicker();
|
||||
this.txtDescripcion = new System.Windows.Forms.TextBox();
|
||||
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();
|
||||
//
|
||||
// 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);
|
||||
this.txtResponsable.Name = "txtResponsable";
|
||||
this.txtResponsable.Size = new System.Drawing.Size(463, 34);
|
||||
this.txtResponsable.TabIndex = 13;
|
||||
//
|
||||
// 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.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(162, 29);
|
||||
this.label3.TabIndex = 12;
|
||||
this.label3.Text = "Responsable:";
|
||||
//
|
||||
// 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(371, 314);
|
||||
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 = 11;
|
||||
//
|
||||
// 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(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(769, 239);
|
||||
this.txtDescripcion.TabIndex = 10;
|
||||
this.txtDescripcion.TextChanged += new System.EventHandler(this.txtDescripcion_TextChanged);
|
||||
//
|
||||
// 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.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(147, 29);
|
||||
this.label2.TabIndex = 9;
|
||||
this.label2.Text = "Descripcion:";
|
||||
this.label2.Click += new System.EventHandler(this.label2_Click);
|
||||
//
|
||||
// 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.ForeColor = System.Drawing.Color.White;
|
||||
this.label1.Location = new System.Drawing.Point(203, 319);
|
||||
this.label1.Name = "label1";
|
||||
this.label1.Size = new System.Drawing.Size(86, 29);
|
||||
this.label1.TabIndex = 8;
|
||||
this.label1.Text = "Fecha:";
|
||||
//
|
||||
// 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(448, 169);
|
||||
this.label4.Name = "label4";
|
||||
this.label4.Size = new System.Drawing.Size(193, 29);
|
||||
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);
|
||||
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, 776);
|
||||
this.ControlBox = false;
|
||||
this.Controls.Add(this.pictureBox2);
|
||||
this.Controls.Add(this.pictureBox1);
|
||||
this.Controls.Add(this.label4);
|
||||
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.DoubleBuffered = true;
|
||||
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.TextBox txtResponsable;
|
||||
private System.Windows.Forms.Label label3;
|
||||
private System.Windows.Forms.DateTimePicker dtFecha;
|
||||
private System.Windows.Forms.TextBox txtDescripcion;
|
||||
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;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,83 @@
|
||||
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 ActualizarMerma : Form
|
||||
{
|
||||
private Merma merma;
|
||||
private mermas ventanaPadre;
|
||||
public ActualizarMerma(Merma merma, mermas ventanaPadre)
|
||||
{
|
||||
InitializeComponent();
|
||||
this.merma = merma;
|
||||
this.ventanaPadre = ventanaPadre;
|
||||
llenarCampos();
|
||||
}
|
||||
|
||||
private void llenarCampos()
|
||||
{
|
||||
txtDescripcion.Text = merma.razon;
|
||||
txtResponsable.Text = merma.responsable;
|
||||
dtFecha.Text = merma.fecha;
|
||||
}
|
||||
|
||||
private void btnAgregar_Click(object sender, EventArgs e)
|
||||
{
|
||||
Merma nuevaMerma = new Merma(merma.idMerma,dtFecha.Text,txtResponsable.Text,txtDescripcion.Text);
|
||||
if (service.actualizarMerma(nuevaMerma))
|
||||
{
|
||||
MessageBox.Show("Merma actualizada");
|
||||
ventanaPadre.llenarPanel();
|
||||
Close();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private void txtDescripcion_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
private void label2_Click(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,120 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
||||
Generated
+186
@@ -0,0 +1,186 @@
|
||||
namespace compabetov2
|
||||
{
|
||||
partial class agregarmermas
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.label1 = new System.Windows.Forms.Label();
|
||||
this.label2 = new System.Windows.Forms.Label();
|
||||
this.txtDescripcion = new System.Windows.Forms.TextBox();
|
||||
this.dtFecha = new System.Windows.Forms.DateTimePicker();
|
||||
this.label3 = new System.Windows.Forms.Label();
|
||||
this.txtResponsable = new System.Windows.Forms.TextBox();
|
||||
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.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(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.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(147, 29);
|
||||
this.label2.TabIndex = 1;
|
||||
this.label2.Text = "Descripcion:";
|
||||
this.label2.Click += new System.EventHandler(this.label2_Click);
|
||||
//
|
||||
// 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(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(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(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(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.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(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(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(463, 34);
|
||||
this.txtResponsable.TabIndex = 5;
|
||||
//
|
||||
// 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(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);
|
||||
//
|
||||
// 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(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(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.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.DoubleBuffered = true;
|
||||
this.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
|
||||
this.Name = "agregarmermas";
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox2)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.Label label1;
|
||||
private System.Windows.Forms.Label label2;
|
||||
private System.Windows.Forms.TextBox txtDescripcion;
|
||||
private System.Windows.Forms.DateTimePicker dtFecha;
|
||||
private System.Windows.Forms.Label label3;
|
||||
private System.Windows.Forms.TextBox txtResponsable;
|
||||
private System.Windows.Forms.PictureBox pictureBox2;
|
||||
private System.Windows.Forms.PictureBox pictureBox1;
|
||||
private System.Windows.Forms.Label label4;
|
||||
}
|
||||
}
|
||||
@@ -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 ();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,120 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
||||
Generated
+246
@@ -0,0 +1,246 @@
|
||||
namespace compabetov2
|
||||
{
|
||||
partial class mermas
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.components = new System.ComponentModel.Container();
|
||||
this.flowLayoutPanel1 = new System.Windows.Forms.FlowLayoutPanel();
|
||||
this.panel2 = new System.Windows.Forms.Panel();
|
||||
this.pictureBox7 = new System.Windows.Forms.PictureBox();
|
||||
this.button1 = new System.Windows.Forms.Button();
|
||||
this.button2 = new System.Windows.Forms.Button();
|
||||
this.button3 = new System.Windows.Forms.Button();
|
||||
this.button5 = new System.Windows.Forms.Button();
|
||||
this.lblfecha = new System.Windows.Forms.Label();
|
||||
this.lblhora = new System.Windows.Forms.Label();
|
||||
this.horafecha = new System.Windows.Forms.Timer(this.components);
|
||||
this.mermaPanel = new System.Windows.Forms.FlowLayoutPanel();
|
||||
this.btnAgregar = new System.Windows.Forms.Button();
|
||||
this.flowLayoutPanel1.SuspendLayout();
|
||||
this.panel2.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox7)).BeginInit();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// flowLayoutPanel1
|
||||
//
|
||||
this.flowLayoutPanel1.BackgroundImage = global::compabetov2.Properties.Resources.rec;
|
||||
this.flowLayoutPanel1.Controls.Add(this.panel2);
|
||||
this.flowLayoutPanel1.Controls.Add(this.button1);
|
||||
this.flowLayoutPanel1.Controls.Add(this.button2);
|
||||
this.flowLayoutPanel1.Controls.Add(this.button3);
|
||||
this.flowLayoutPanel1.Controls.Add(this.button5);
|
||||
this.flowLayoutPanel1.Location = new System.Drawing.Point(-1, -1);
|
||||
this.flowLayoutPanel1.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
|
||||
this.flowLayoutPanel1.Name = "flowLayoutPanel1";
|
||||
this.flowLayoutPanel1.Size = new System.Drawing.Size(324, 1061);
|
||||
this.flowLayoutPanel1.TabIndex = 9;
|
||||
//
|
||||
// panel2
|
||||
//
|
||||
this.panel2.BackColor = System.Drawing.Color.Transparent;
|
||||
this.panel2.Controls.Add(this.pictureBox7);
|
||||
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(312, 263);
|
||||
this.panel2.TabIndex = 8;
|
||||
//
|
||||
// pictureBox7
|
||||
//
|
||||
this.pictureBox7.Image = global::compabetov2.Properties.Resources.HomeroMenu;
|
||||
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;
|
||||
this.pictureBox7.TabIndex = 8;
|
||||
this.pictureBox7.TabStop = false;
|
||||
//
|
||||
// button1
|
||||
//
|
||||
this.button1.BackColor = System.Drawing.Color.Transparent;
|
||||
this.button1.FlatAppearance.BorderSize = 0;
|
||||
this.button1.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
|
||||
this.button1.Font = new System.Drawing.Font("Microsoft Sans Serif", 15F);
|
||||
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(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(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
|
||||
//
|
||||
this.button2.BackColor = System.Drawing.Color.Transparent;
|
||||
this.button2.FlatAppearance.BorderSize = 0;
|
||||
this.button2.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
|
||||
this.button2.Font = new System.Drawing.Font("Microsoft Sans Serif", 15F);
|
||||
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(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(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;
|
||||
this.button2.UseVisualStyleBackColor = false;
|
||||
//
|
||||
// button3
|
||||
//
|
||||
this.button3.BackColor = System.Drawing.Color.Transparent;
|
||||
this.button3.FlatAppearance.BorderSize = 0;
|
||||
this.button3.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
|
||||
this.button3.Font = new System.Drawing.Font("Microsoft Sans Serif", 15F);
|
||||
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(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(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;
|
||||
//
|
||||
// button5
|
||||
//
|
||||
this.button5.BackColor = System.Drawing.Color.Transparent;
|
||||
this.button5.FlatAppearance.BorderSize = 0;
|
||||
this.button5.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
|
||||
this.button5.Font = new System.Drawing.Font("Microsoft Sans Serif", 15F);
|
||||
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(3, 623);
|
||||
this.button5.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
|
||||
this.button5.Name = "button5";
|
||||
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;
|
||||
//
|
||||
// lblfecha
|
||||
//
|
||||
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(741, 154);
|
||||
this.lblfecha.Name = "lblfecha";
|
||||
this.lblfecha.Size = new System.Drawing.Size(159, 58);
|
||||
this.lblfecha.TabIndex = 15;
|
||||
this.lblfecha.Text = "label2";
|
||||
this.lblfecha.TextAlign = System.Drawing.ContentAlignment.TopCenter;
|
||||
//
|
||||
// lblhora
|
||||
//
|
||||
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(929, 34);
|
||||
this.lblhora.Name = "lblhora";
|
||||
this.lblhora.Size = new System.Drawing.Size(318, 113);
|
||||
this.lblhora.TabIndex = 14;
|
||||
this.lblhora.Text = "label1";
|
||||
//
|
||||
// horafecha
|
||||
//
|
||||
this.horafecha.Enabled = true;
|
||||
this.horafecha.Tick += new System.EventHandler(this.horafecha_Tick_2);
|
||||
//
|
||||
// mermaPanel
|
||||
//
|
||||
this.mermaPanel.Location = new System.Drawing.Point(572, 348);
|
||||
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;
|
||||
this.mermaPanel.Paint += new System.Windows.Forms.PaintEventHandler(this.mermaPanel_Paint);
|
||||
//
|
||||
// btnAgregar
|
||||
//
|
||||
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);
|
||||
this.btnAgregar.Name = "btnAgregar";
|
||||
this.btnAgregar.Size = new System.Drawing.Size(119, 34);
|
||||
this.btnAgregar.TabIndex = 17;
|
||||
this.btnAgregar.Text = "Agregar";
|
||||
this.btnAgregar.UseVisualStyleBackColor = true;
|
||||
this.btnAgregar.Click += new System.EventHandler(this.btnAgregar_Click);
|
||||
//
|
||||
// mermas
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(1827, 922);
|
||||
this.Controls.Add(this.btnAgregar);
|
||||
this.Controls.Add(this.mermaPanel);
|
||||
this.Controls.Add(this.lblfecha);
|
||||
this.Controls.Add(this.lblhora);
|
||||
this.Controls.Add(this.flowLayoutPanel1);
|
||||
this.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
|
||||
this.Name = "mermas";
|
||||
this.Text = "mermas";
|
||||
this.WindowState = System.Windows.Forms.FormWindowState.Maximized;
|
||||
this.Load += new System.EventHandler(this.mermas_Load);
|
||||
this.flowLayoutPanel1.ResumeLayout(false);
|
||||
this.panel2.ResumeLayout(false);
|
||||
this.panel2.PerformLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox7)).EndInit();
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel1;
|
||||
private System.Windows.Forms.Panel panel2;
|
||||
private System.Windows.Forms.PictureBox pictureBox7;
|
||||
private System.Windows.Forms.Button button1;
|
||||
private System.Windows.Forms.Button button2;
|
||||
private System.Windows.Forms.Button button3;
|
||||
private System.Windows.Forms.Button button5;
|
||||
private System.Windows.Forms.Label lblfecha;
|
||||
private System.Windows.Forms.Label lblhora;
|
||||
private System.Windows.Forms.Timer horafecha;
|
||||
private System.Windows.Forms.FlowLayoutPanel mermaPanel;
|
||||
private System.Windows.Forms.Button btnAgregar;
|
||||
}
|
||||
}
|
||||
+186
@@ -0,0 +1,186 @@
|
||||
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.Reflection;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace compabetov2
|
||||
{
|
||||
public partial class mermas : Form
|
||||
{
|
||||
private LoginModel loginPrincipal;
|
||||
private List<Merma> mermasList;
|
||||
public mermas(LoginModel loginPrincipal)
|
||||
{
|
||||
InitializeComponent();
|
||||
this.loginPrincipal = loginPrincipal;
|
||||
llenarPanel();
|
||||
}
|
||||
|
||||
public void llenarPanel()
|
||||
{
|
||||
mermaPanel.Controls.Clear();
|
||||
getData();
|
||||
foreach (Merma merma in mermasList)
|
||||
{
|
||||
TableLayoutPanel carta = new TableLayoutPanel();
|
||||
carta.RowCount = 1;
|
||||
carta.ColumnCount = 2;
|
||||
carta.Height = 100;
|
||||
carta.Width = 770;
|
||||
carta.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 50F));
|
||||
carta.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 50F));
|
||||
carta.RowStyles.Add(new RowStyle(SizeType.Percent, 100F));
|
||||
carta.BorderStyle = BorderStyle.FixedSingle;
|
||||
|
||||
|
||||
Label fecha = new Label();
|
||||
fecha.Text = merma.fecha;
|
||||
fecha.Dock = DockStyle.Fill;
|
||||
fecha.TextAlign = ContentAlignment.MiddleLeft;
|
||||
fecha.Font = new Font(fecha.Font.FontFamily, 16, FontStyle.Bold);
|
||||
|
||||
TableLayoutPanel panelBotones = new TableLayoutPanel();
|
||||
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.RowStyles.Add(new RowStyle(SizeType.Percent, 100F));
|
||||
panelBotones.Dock = DockStyle.Fill;
|
||||
|
||||
Button btnVer = new Button();
|
||||
btnVer.Text = "Ver";
|
||||
btnVer.Dock = DockStyle.Fill;
|
||||
btnVer.FlatStyle = FlatStyle.Flat;
|
||||
btnVer.FlatAppearance.BorderSize = 0;
|
||||
btnVer.BackColor = Color.FromArgb(33, 90, 255);
|
||||
btnVer.Font = new Font(btnVer.Font.FontFamily, 16);
|
||||
btnVer.ForeColor = Color.White;
|
||||
btnVer.Click += new EventHandler(delegate (object sender, EventArgs e)
|
||||
{
|
||||
verMerma ver = new verMerma(merma);
|
||||
ver.Owner = this;
|
||||
ver.Show();
|
||||
});
|
||||
|
||||
Button btnEditar = new Button();
|
||||
btnEditar.Text = "Editar";
|
||||
btnEditar.Dock = DockStyle.Fill;
|
||||
btnEditar.FlatStyle = FlatStyle.Flat;
|
||||
btnEditar.FlatAppearance.BorderSize = 0;
|
||||
btnEditar.BackColor = Color.FromArgb(33, 90, 255);
|
||||
btnEditar.Font = new Font(btnVer.Font.FontFamily, 16);
|
||||
btnEditar.ForeColor = Color.White;
|
||||
btnEditar.Click += new EventHandler(delegate (object sender, EventArgs e)
|
||||
{
|
||||
ActualizarMerma ver = new ActualizarMerma(merma,this);
|
||||
ver.Owner = this;
|
||||
ver.Show();
|
||||
});
|
||||
|
||||
|
||||
Button btnEliminar = new Button();
|
||||
btnEliminar.Text = "Eliminar";
|
||||
btnEliminar.Dock = DockStyle.Fill;
|
||||
btnEliminar.BackColor = Color.Red;
|
||||
btnEliminar.FlatStyle = FlatStyle.Flat;
|
||||
btnEliminar.FlatAppearance.BorderSize = 0;
|
||||
btnEliminar.Font = new Font(btnVer.Font.FontFamily, 16);
|
||||
btnEliminar.ForeColor = Color.White;
|
||||
btnEliminar.Click += new EventHandler(delegate (object sender, EventArgs e)
|
||||
{
|
||||
DialogResult result = MessageBox.Show("¿Está seguro de que desea eliminar este registro?",
|
||||
"Confirmación", MessageBoxButtons.YesNo, MessageBoxIcon.Question);
|
||||
if (result == DialogResult.Yes)
|
||||
{
|
||||
if (service.eliminarMerma(merma))
|
||||
{
|
||||
llenarPanel();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
panelBotones.Controls.Add(btnVer,0,0);
|
||||
panelBotones.Controls.Add(btnEditar,1,0);
|
||||
panelBotones.Controls.Add(btnEliminar,2,0);
|
||||
|
||||
carta.Controls.Add(fecha,0,0);
|
||||
carta.Controls.Add(panelBotones,1,0);
|
||||
|
||||
mermaPanel.Controls.Add(carta);
|
||||
}
|
||||
}
|
||||
|
||||
private void getData()
|
||||
{
|
||||
mermasList = service.conseguirMerma();
|
||||
}
|
||||
|
||||
private void mermas_Load(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
private void horafecha_Tick(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
private void horafecha_Tick_1(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
private void horafecha_Tick_2(object sender, EventArgs e)
|
||||
{
|
||||
lblhora.Text = DateTime.Now.ToString("h:mm:ss");
|
||||
lblfecha.Text = DateTime.Now.ToLongDateString();
|
||||
}
|
||||
|
||||
private void button1_Click(object sender, EventArgs e)
|
||||
{
|
||||
// Cerrar el formulario de ventas
|
||||
this.Close();
|
||||
|
||||
// Verificar si ya hay una instancia del formulario principal
|
||||
MenuPrincipal menuprincipalForm = Application.OpenForms.OfType<MenuPrincipal>().FirstOrDefault();
|
||||
|
||||
if (menuprincipalForm == null)
|
||||
{
|
||||
// Si no hay una instancia, crear una nueva
|
||||
menuprincipalForm = new MenuPrincipal(loginPrincipal);
|
||||
|
||||
// Establecer el formulario principal como el formulario MDI padre
|
||||
menuprincipalForm.MdiParent = this.MdiParent;
|
||||
|
||||
// Mostrar el formulario principal
|
||||
menuprincipalForm.Show();
|
||||
}
|
||||
else
|
||||
{
|
||||
// Si ya hay una instancia, simplemente llevarlo al frente
|
||||
menuprincipalForm.BringToFront();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private void mermaPanel_Paint(object sender, PaintEventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
private void btnAgregar_Click(object sender, EventArgs e)
|
||||
{
|
||||
agregarmermas agregarmermas = new agregarmermas(this);
|
||||
agregarmermas.Owner = this;
|
||||
agregarmermas.Show();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,123 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<metadata name="horafecha.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
</root>
|
||||
Generated
+169
@@ -0,0 +1,169 @@
|
||||
namespace compabetov2
|
||||
{
|
||||
partial class verMerma
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.txtResponsable = new System.Windows.Forms.TextBox();
|
||||
this.label3 = new System.Windows.Forms.Label();
|
||||
this.dtFecha = new System.Windows.Forms.DateTimePicker();
|
||||
this.txtDescripcion = new System.Windows.Forms.TextBox();
|
||||
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);
|
||||
this.txtResponsable.Name = "txtResponsable";
|
||||
this.txtResponsable.Size = new System.Drawing.Size(463, 34);
|
||||
this.txtResponsable.TabIndex = 11;
|
||||
//
|
||||
// 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.ForeColor = System.Drawing.Color.Transparent;
|
||||
this.label3.Location = new System.Drawing.Point(187, 233);
|
||||
this.label3.Name = "label3";
|
||||
this.label3.Size = new System.Drawing.Size(162, 29);
|
||||
this.label3.TabIndex = 10;
|
||||
this.label3.Text = "Responsable:";
|
||||
//
|
||||
// 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(371, 314);
|
||||
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;
|
||||
//
|
||||
// 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(192, 450);
|
||||
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(769, 239);
|
||||
this.txtDescripcion.TabIndex = 8;
|
||||
//
|
||||
// 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.ForeColor = System.Drawing.Color.Transparent;
|
||||
this.label2.Location = new System.Drawing.Point(475, 395);
|
||||
this.label2.Name = "label2";
|
||||
this.label2.Size = new System.Drawing.Size(147, 29);
|
||||
this.label2.TabIndex = 7;
|
||||
this.label2.Text = "Descripcion:";
|
||||
//
|
||||
// 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.ForeColor = System.Drawing.Color.Transparent;
|
||||
this.label1.Location = new System.Drawing.Point(187, 319);
|
||||
this.label1.Name = "label1";
|
||||
this.label1.Size = new System.Drawing.Size(86, 29);
|
||||
this.label1.TabIndex = 6;
|
||||
this.label1.Text = "Fecha:";
|
||||
//
|
||||
// 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(491, 178);
|
||||
this.label4.Name = "label4";
|
||||
this.label4.Size = new System.Drawing.Size(131, 29);
|
||||
this.label4.TabIndex = 17;
|
||||
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, 808);
|
||||
this.ControlBox = false;
|
||||
this.Controls.Add(this.cerrarlabel);
|
||||
this.Controls.Add(this.label4);
|
||||
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.DoubleBuffered = true;
|
||||
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();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.TextBox txtResponsable;
|
||||
private System.Windows.Forms.Label label3;
|
||||
private System.Windows.Forms.DateTimePicker dtFecha;
|
||||
private System.Windows.Forms.TextBox txtDescripcion;
|
||||
private System.Windows.Forms.Label label2;
|
||||
private System.Windows.Forms.Label label1;
|
||||
private System.Windows.Forms.Label label4;
|
||||
private System.Windows.Forms.PictureBox cerrarlabel;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
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 verMerma : Form
|
||||
{
|
||||
private Merma merma;
|
||||
public verMerma(Merma merma)
|
||||
{
|
||||
InitializeComponent();
|
||||
this.merma = merma;
|
||||
llenarComponentes();
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
private void llenarComponentes()
|
||||
{
|
||||
txtDescripcion.Text = merma.razon;
|
||||
txtResponsable.Text = merma.responsable;
|
||||
dtFecha.Text = merma.fecha;
|
||||
}
|
||||
|
||||
|
||||
|
||||
private void verMerma_Load(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
private void pictureBox1_Click(object sender, EventArgs e)
|
||||
{
|
||||
this.Close();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,120 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
||||
Reference in New Issue
Block a user