formulario datos envio

This commit is contained in:
carlos
2024-02-03 04:59:42 -06:00
30 changed files with 903 additions and 240 deletions
+2 -22
View File
@@ -33,7 +33,6 @@
this.button1 = new System.Windows.Forms.Button();
this.button2 = new System.Windows.Forms.Button();
this.button3 = new System.Windows.Forms.Button();
this.button4 = new System.Windows.Forms.Button();
this.button5 = new System.Windows.Forms.Button();
this.flowLayoutPanel1 = new System.Windows.Forms.FlowLayoutPanel();
this.panelCuenta = new System.Windows.Forms.FlowLayoutPanel();
@@ -99,6 +98,7 @@
this.button2.TabIndex = 9;
this.button2.Text = "Reportes";
this.button2.UseVisualStyleBackColor = false;
this.button2.Click += new System.EventHandler(this.button2_Click);
//
// button3
//
@@ -118,24 +118,6 @@
this.button3.Text = "Productos";
this.button3.UseVisualStyleBackColor = false;
//
// button4
//
this.button4.BackColor = System.Drawing.Color.Transparent;
this.button4.FlatAppearance.BorderSize = 0;
this.button4.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.button4.Font = new System.Drawing.Font("Microsoft Sans Serif", 15F);
this.button4.ForeColor = System.Drawing.SystemColors.ButtonHighlight;
this.button4.Image = global::compabetov2.Properties.Resources.reportesi;
this.button4.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
this.button4.Location = new System.Drawing.Point(3, 623);
this.button4.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
this.button4.Name = "button4";
this.button4.Padding = new System.Windows.Forms.Padding(51, 0, 0, 0);
this.button4.Size = new System.Drawing.Size(312, 114);
this.button4.TabIndex = 11;
this.button4.Text = "Reportes";
this.button4.UseVisualStyleBackColor = false;
//
// button5
//
this.button5.BackColor = System.Drawing.Color.Transparent;
@@ -145,7 +127,7 @@
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, 741);
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);
@@ -161,7 +143,6 @@
this.flowLayoutPanel1.Controls.Add(this.button1);
this.flowLayoutPanel1.Controls.Add(this.button2);
this.flowLayoutPanel1.Controls.Add(this.button3);
this.flowLayoutPanel1.Controls.Add(this.button4);
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);
@@ -205,7 +186,6 @@
private System.Windows.Forms.Button button1;
private System.Windows.Forms.Button button2;
private System.Windows.Forms.Button button3;
private System.Windows.Forms.Button button4;
private System.Windows.Forms.Button button5;
private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel1;
private System.Windows.Forms.FlowLayoutPanel panelCuenta;
+6
View File
@@ -226,5 +226,11 @@ namespace compabetov2
{
}
private void button2_Click(object sender, EventArgs e)
{
Estadiscticas verstats = new Estadiscticas();
verstats.Show();
}
}
}
+1
View File
@@ -105,6 +105,7 @@
this.button2.TabIndex = 9;
this.button2.Text = "Reportes";
this.button2.UseVisualStyleBackColor = false;
this.button2.Click += new System.EventHandler(this.button2_Click);
//
// button3
//
+6
View File
@@ -256,5 +256,11 @@ namespace compabetov2
menuprincipalForm.BringToFront();
}
}
private void button2_Click(object sender, EventArgs e)
{
Estadiscticas verstats = new Estadiscticas();
verstats.Show();
}
}
}
+3 -23
View File
@@ -35,7 +35,6 @@
this.button1 = new System.Windows.Forms.Button();
this.button2 = new System.Windows.Forms.Button();
this.button3 = new System.Windows.Forms.Button();
this.button4 = new System.Windows.Forms.Button();
this.button5 = new System.Windows.Forms.Button();
this.txtCliente = new System.Windows.Forms.TextBox();
this.label4 = new System.Windows.Forms.Label();
@@ -61,7 +60,6 @@
this.flowLayoutPanel1.Controls.Add(this.button1);
this.flowLayoutPanel1.Controls.Add(this.button2);
this.flowLayoutPanel1.Controls.Add(this.button3);
this.flowLayoutPanel1.Controls.Add(this.button4);
this.flowLayoutPanel1.Controls.Add(this.button5);
this.flowLayoutPanel1.Location = new System.Drawing.Point(-1, 2);
this.flowLayoutPanel1.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
@@ -126,6 +124,7 @@
this.button2.TabIndex = 9;
this.button2.Text = "Reportes";
this.button2.UseVisualStyleBackColor = false;
this.button2.Click += new System.EventHandler(this.button2_Click);
//
// button3
//
@@ -145,24 +144,6 @@
this.button3.Text = "Productos";
this.button3.UseVisualStyleBackColor = false;
//
// button4
//
this.button4.BackColor = System.Drawing.Color.Transparent;
this.button4.FlatAppearance.BorderSize = 0;
this.button4.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.button4.Font = new System.Drawing.Font("Microsoft Sans Serif", 15F);
this.button4.ForeColor = System.Drawing.SystemColors.ButtonHighlight;
this.button4.Image = global::compabetov2.Properties.Resources.reportesi;
this.button4.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
this.button4.Location = new System.Drawing.Point(3, 623);
this.button4.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
this.button4.Name = "button4";
this.button4.Padding = new System.Windows.Forms.Padding(51, 0, 0, 0);
this.button4.Size = new System.Drawing.Size(312, 114);
this.button4.TabIndex = 11;
this.button4.Text = "Reportes";
this.button4.UseVisualStyleBackColor = false;
//
// button5
//
this.button5.BackColor = System.Drawing.Color.Transparent;
@@ -172,7 +153,7 @@
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, 741);
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);
@@ -277,7 +258,7 @@
//
this.panelEnvio.AutoScroll = true;
this.panelEnvio.Location = new System.Drawing.Point(867, 384);
this.panelEnvio.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.panelEnvio.Margin = new System.Windows.Forms.Padding(4);
this.panelEnvio.Name = "panelEnvio";
this.panelEnvio.Size = new System.Drawing.Size(944, 466);
this.panelEnvio.TabIndex = 57;
@@ -319,7 +300,6 @@
private System.Windows.Forms.Button button1;
private System.Windows.Forms.Button button2;
private System.Windows.Forms.Button button3;
private System.Windows.Forms.Button button4;
private System.Windows.Forms.Button button5;
private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel1;
private System.Windows.Forms.TextBox txtCliente;
+45
View File
@@ -15,14 +15,53 @@ namespace compabetov2
{
public partial class envios : Form
{
private Point lastPoint;
private LoginModel loginPrincipal;
public envios(LoginModel loginPrincipal)
{
InitializeComponent();
llenarPanel();
this.loginPrincipal = loginPrincipal;
}
private void InitializePanelEnvio()
{
// Asegúrate de que panelEnvio ya está creado en tu formulario
// Habilitar eventos táctiles simulados
panelEnvio.MouseDown += PanelEnvio_MouseDown;
panelEnvio.MouseMove += PanelEnvio_MouseMove;
panelEnvio.MouseUp += PanelEnvio_MouseUp;
}
private void PanelEnvio_MouseDown(object sender, MouseEventArgs e)
{
lastPoint = new Point(e.X, e.Y);
panelEnvio.Capture = true;
}
private void PanelEnvio_MouseMove(object sender, MouseEventArgs e)
{
if (e.Button == MouseButtons.Left)
{
int deltaX = lastPoint.X - e.X;
int deltaY = lastPoint.Y - e.Y;
// Ajustar la dirección del desplazamiento
panelEnvio.AutoScrollPosition = new Point(panelEnvio.AutoScrollPosition.X + deltaX, panelEnvio.AutoScrollPosition.Y - deltaY);
lastPoint = new Point(e.X, e.Y);
}
}
private void PanelEnvio_MouseUp(object sender, MouseEventArgs e)
{
panelEnvio.Capture = false;
}
private void llenarPanel()
{
panelEnvio.Controls.Clear();
@@ -323,5 +362,11 @@ namespace compabetov2
{
}
private void button2_Click(object sender, EventArgs e)
{
Estadiscticas verstats = new Estadiscticas();
verstats.Show();
}
}
}
+82 -40
View File
@@ -48,15 +48,17 @@
this.lbTotalMes = new System.Windows.Forms.Label();
this.lbVendedorMes = new System.Windows.Forms.Label();
this.lbProductoMes = new System.Windows.Forms.Label();
this.pictureBox2 = new System.Windows.Forms.PictureBox();
((System.ComponentModel.ISupportInitialize)(this.dgvDia)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.dgvMes)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.pictureBox2)).BeginInit();
this.SuspendLayout();
//
// dtpBuscar
//
this.dtpBuscar.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.dtpBuscar.Location = new System.Drawing.Point(16, 15);
this.dtpBuscar.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.dtpBuscar.Location = new System.Drawing.Point(36, 191);
this.dtpBuscar.Margin = new System.Windows.Forms.Padding(4);
this.dtpBuscar.Name = "dtpBuscar";
this.dtpBuscar.Size = new System.Drawing.Size(341, 26);
this.dtpBuscar.TabIndex = 0;
@@ -69,8 +71,8 @@
this.Precio,
this.Cantidad,
this.Total});
this.dgvDia.Location = new System.Drawing.Point(12, 69);
this.dgvDia.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.dgvDia.Location = new System.Drawing.Point(32, 245);
this.dgvDia.Margin = new System.Windows.Forms.Padding(4);
this.dgvDia.Name = "dgvDia";
this.dgvDia.RowHeadersWidth = 51;
this.dgvDia.Size = new System.Drawing.Size(591, 185);
@@ -109,11 +111,11 @@
//
// btnBuscar
//
this.btnBuscar.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.btnBuscar.Location = new System.Drawing.Point(399, 14);
this.btnBuscar.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.btnBuscar.Font = new System.Drawing.Font("Poppins", 7.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.btnBuscar.Location = new System.Drawing.Point(384, 190);
this.btnBuscar.Margin = new System.Windows.Forms.Padding(4);
this.btnBuscar.Name = "btnBuscar";
this.btnBuscar.Size = new System.Drawing.Size(100, 28);
this.btnBuscar.Size = new System.Drawing.Size(92, 27);
this.btnBuscar.TabIndex = 2;
this.btnBuscar.Text = "Buscar";
this.btnBuscar.UseVisualStyleBackColor = true;
@@ -122,22 +124,26 @@
// label1
//
this.label1.AutoSize = true;
this.label1.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.label1.Location = new System.Drawing.Point(16, 46);
this.label1.BackColor = System.Drawing.Color.Transparent;
this.label1.Font = new System.Drawing.Font("Poppins", 10.2F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.label1.ForeColor = System.Drawing.Color.Transparent;
this.label1.Location = new System.Drawing.Point(36, 222);
this.label1.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(134, 20);
this.label1.Size = new System.Drawing.Size(156, 30);
this.label1.TabIndex = 3;
this.label1.Text = "Resumen del dia";
//
// label2
//
this.label2.AutoSize = true;
this.label2.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.label2.Location = new System.Drawing.Point(20, 330);
this.label2.BackColor = System.Drawing.Color.Transparent;
this.label2.Font = new System.Drawing.Font("Poppins", 10.2F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.label2.ForeColor = System.Drawing.Color.Transparent;
this.label2.Location = new System.Drawing.Point(36, 476);
this.label2.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(144, 20);
this.label2.Size = new System.Drawing.Size(168, 30);
this.label2.TabIndex = 4;
this.label2.Text = "Resumen del mes";
//
@@ -149,8 +155,8 @@
this.dataGridViewTextBoxColumn2,
this.dataGridViewTextBoxColumn3,
this.dataGridViewTextBoxColumn4});
this.dgvMes.Location = new System.Drawing.Point(16, 354);
this.dgvMes.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.dgvMes.Location = new System.Drawing.Point(32, 500);
this.dgvMes.Margin = new System.Windows.Forms.Padding(4);
this.dgvMes.Name = "dgvMes";
this.dgvMes.RowHeadersWidth = 51;
this.dgvMes.Size = new System.Drawing.Size(591, 185);
@@ -190,74 +196,107 @@
// lbProductDia
//
this.lbProductDia.AutoSize = true;
this.lbProductDia.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.lbProductDia.Location = new System.Drawing.Point(669, 110);
this.lbProductDia.BackColor = System.Drawing.Color.Transparent;
this.lbProductDia.Font = new System.Drawing.Font("Poppins", 10.2F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.lbProductDia.ForeColor = System.Drawing.Color.Transparent;
this.lbProductDia.Location = new System.Drawing.Point(862, 245);
this.lbProductDia.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.lbProductDia.Name = "lbProductDia";
this.lbProductDia.Size = new System.Drawing.Size(180, 20);
this.lbProductDia.Size = new System.Drawing.Size(210, 30);
this.lbProductDia.TabIndex = 6;
this.lbProductDia.Text = "Producto mas vendido:";
this.lbProductDia.Click += new System.EventHandler(this.lbProductDia_Click);
//
// lbVendedorDia
//
this.lbVendedorDia.AutoSize = true;
this.lbVendedorDia.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.lbVendedorDia.Location = new System.Drawing.Point(669, 183);
this.lbVendedorDia.BackColor = System.Drawing.Color.Transparent;
this.lbVendedorDia.Font = new System.Drawing.Font("Poppins", 10.2F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.lbVendedorDia.ForeColor = System.Drawing.Color.Transparent;
this.lbVendedorDia.Location = new System.Drawing.Point(862, 318);
this.lbVendedorDia.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.lbVendedorDia.Name = "lbVendedorDia";
this.lbVendedorDia.Size = new System.Drawing.Size(132, 20);
this.lbVendedorDia.Size = new System.Drawing.Size(154, 30);
this.lbVendedorDia.TabIndex = 7;
this.lbVendedorDia.Text = "Mejor vendedos:";
this.lbVendedorDia.Click += new System.EventHandler(this.lbVendedorDia_Click);
//
// lbTotalDia
//
this.lbTotalDia.AutoSize = true;
this.lbTotalDia.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.lbTotalDia.Location = new System.Drawing.Point(424, 262);
this.lbTotalDia.BackColor = System.Drawing.Color.Transparent;
this.lbTotalDia.Font = new System.Drawing.Font("Poppins", 10.2F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.lbTotalDia.ForeColor = System.Drawing.Color.Transparent;
this.lbTotalDia.Location = new System.Drawing.Point(444, 438);
this.lbTotalDia.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.lbTotalDia.Name = "lbTotalDia";
this.lbTotalDia.Size = new System.Drawing.Size(105, 20);
this.lbTotalDia.Size = new System.Drawing.Size(120, 30);
this.lbTotalDia.TabIndex = 8;
this.lbTotalDia.Text = "Total del dia:";
//
// lbTotalMes
//
this.lbTotalMes.AutoSize = true;
this.lbTotalMes.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.lbTotalMes.Location = new System.Drawing.Point(424, 543);
this.lbTotalMes.BackColor = System.Drawing.Color.Transparent;
this.lbTotalMes.Font = new System.Drawing.Font("Poppins", 10.2F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.lbTotalMes.ForeColor = System.Drawing.Color.Transparent;
this.lbTotalMes.Location = new System.Drawing.Point(440, 689);
this.lbTotalMes.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.lbTotalMes.Name = "lbTotalMes";
this.lbTotalMes.Size = new System.Drawing.Size(115, 20);
this.lbTotalMes.Size = new System.Drawing.Size(129, 30);
this.lbTotalMes.TabIndex = 9;
this.lbTotalMes.Text = "Total del Mes:";
//
// lbVendedorMes
//
this.lbVendedorMes.AutoSize = true;
this.lbVendedorMes.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.lbVendedorMes.Location = new System.Drawing.Point(669, 471);
this.lbVendedorMes.BackColor = System.Drawing.Color.Transparent;
this.lbVendedorMes.Font = new System.Drawing.Font("Poppins", 10.2F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.lbVendedorMes.ForeColor = System.Drawing.Color.Transparent;
this.lbVendedorMes.Location = new System.Drawing.Point(865, 561);
this.lbVendedorMes.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.lbVendedorMes.Name = "lbVendedorMes";
this.lbVendedorMes.Size = new System.Drawing.Size(132, 20);
this.lbVendedorMes.Size = new System.Drawing.Size(151, 30);
this.lbVendedorMes.TabIndex = 11;
this.lbVendedorMes.Text = "Mejor vendedos:";
this.lbVendedorMes.Text = "Mejor vendedor:";
this.lbVendedorMes.Click += new System.EventHandler(this.lbVendedorMes_Click);
//
// lbProductoMes
//
this.lbProductoMes.AutoSize = true;
this.lbProductoMes.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.lbProductoMes.Location = new System.Drawing.Point(669, 399);
this.lbProductoMes.BackColor = System.Drawing.Color.Transparent;
this.lbProductoMes.Font = new System.Drawing.Font("Poppins", 10.2F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.lbProductoMes.ForeColor = System.Drawing.Color.Transparent;
this.lbProductoMes.Location = new System.Drawing.Point(865, 489);
this.lbProductoMes.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.lbProductoMes.Name = "lbProductoMes";
this.lbProductoMes.Size = new System.Drawing.Size(180, 20);
this.lbProductoMes.Size = new System.Drawing.Size(210, 30);
this.lbProductoMes.TabIndex = 10;
this.lbProductoMes.Text = "Producto mas vendido:";
this.lbProductoMes.Click += new System.EventHandler(this.lbProductoMes_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(1047, 689);
this.pictureBox2.Name = "pictureBox2";
this.pictureBox2.Size = new System.Drawing.Size(100, 69);
this.pictureBox2.TabIndex = 28;
this.pictureBox2.TabStop = false;
this.pictureBox2.Click += new System.EventHandler(this.pictureBox2_Click);
//
// Estadiscticas
//
this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(1067, 593);
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(1147, 758);
this.ControlBox = false;
this.Controls.Add(this.pictureBox2);
this.Controls.Add(this.lbVendedorMes);
this.Controls.Add(this.lbProductoMes);
this.Controls.Add(this.lbTotalMes);
@@ -265,17 +304,19 @@
this.Controls.Add(this.lbVendedorDia);
this.Controls.Add(this.lbProductDia);
this.Controls.Add(this.dgvMes);
this.Controls.Add(this.label2);
this.Controls.Add(this.label1);
this.Controls.Add(this.btnBuscar);
this.Controls.Add(this.dgvDia);
this.Controls.Add(this.dtpBuscar);
this.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.Controls.Add(this.label1);
this.Controls.Add(this.label2);
this.DoubleBuffered = true;
this.Margin = new System.Windows.Forms.Padding(4);
this.Name = "Estadiscticas";
this.Text = "Estadiscticas";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Load += new System.EventHandler(this.Estadiscticas_Load);
((System.ComponentModel.ISupportInitialize)(this.dgvDia)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.dgvMes)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.pictureBox2)).EndInit();
this.ResumeLayout(false);
this.PerformLayout();
@@ -303,5 +344,6 @@
private System.Windows.Forms.Label lbTotalMes;
private System.Windows.Forms.Label lbVendedorMes;
private System.Windows.Forms.Label lbProductoMes;
private System.Windows.Forms.PictureBox pictureBox2;
}
}
+26 -1
View File
@@ -122,7 +122,7 @@ namespace compabetov2
precio.Value = $"{producto.producto.precion}";
cantidad.Value = $"{producto.cantidad}";
total.Value = $"{producto.cantidad * producto.producto.precion}";
// Agregar las celdas a la fila
nuevaFila.Cells.Add(productoN);
nuevaFila.Cells.Add(precio);
@@ -309,5 +309,30 @@ namespace compabetov2
{
}
private void lbVendedorMes_Click(object sender, EventArgs e)
{
}
private void lbProductoMes_Click(object sender, EventArgs e)
{
}
private void lbVendedorDia_Click(object sender, EventArgs e)
{
}
private void lbProductDia_Click(object sender, EventArgs e)
{
}
private void pictureBox2_Click(object sender, EventArgs e)
{
this.Close();
}
}
}
+24
View File
@@ -129,6 +129,30 @@
<metadata name="Total.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Producto.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Precio.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Cantidad.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Total.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="dataGridViewTextBoxColumn1.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="dataGridViewTextBoxColumn2.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="dataGridViewTextBoxColumn3.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="dataGridViewTextBoxColumn4.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="dataGridViewTextBoxColumn1.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
+1
View File
@@ -125,6 +125,7 @@
this.button2.TabIndex = 9;
this.button2.Text = "Reportes";
this.button2.UseVisualStyleBackColor = false;
this.button2.Click += new System.EventHandler(this.button2_Click);
//
// button3
//
+6
View File
@@ -248,5 +248,11 @@ namespace compabetov2
{
}
private void button2_Click(object sender, EventArgs e)
{
Estadiscticas verstats = new Estadiscticas();
verstats.Show();
}
}
}
+2
View File
@@ -117,6 +117,7 @@
this.button2.TabIndex = 9;
this.button2.Text = "Reportes";
this.button2.UseVisualStyleBackColor = false;
this.button2.Click += new System.EventHandler(this.button2_Click);
//
// button3
//
@@ -184,6 +185,7 @@
//
// mermaPanel
//
this.mermaPanel.AutoScroll = true;
this.mermaPanel.Location = new System.Drawing.Point(572, 348);
this.mermaPanel.Margin = new System.Windows.Forms.Padding(4);
this.mermaPanel.Name = "mermaPanel";
+46
View File
@@ -1,5 +1,6 @@
using compabetov2.database;
using compabetov2.database.modelos;
using compabetov2.Empleados;
using System;
using System.Collections.Generic;
using System.ComponentModel;
@@ -14,7 +15,10 @@ using System.Windows.Forms;
namespace compabetov2
{
public partial class mermas : Form
{
private Point lastPoint;
private LoginModel loginPrincipal;
private List<Merma> mermasList;
public mermas(LoginModel loginPrincipal)
@@ -24,6 +28,42 @@ namespace compabetov2
llenarPanel();
}
private void InitializeMermaPanel()
{
// Asegúrate de que mermaPanel ya está creado en tu formulario
// Habilitar eventos táctiles simulados
mermaPanel.MouseDown += MermaPanel_MouseDown;
mermaPanel.MouseMove += MermaPanel_MouseMove;
mermaPanel.MouseUp += MermaPanel_MouseUp;
}
private void MermaPanel_MouseDown(object sender, MouseEventArgs e)
{
lastPoint = new Point(e.X, e.Y);
mermaPanel.Capture = true;
}
private void MermaPanel_MouseMove(object sender, MouseEventArgs e)
{
if (e.Button == MouseButtons.Left)
{
int deltaX = lastPoint.X - e.X;
int deltaY = lastPoint.Y - e.Y;
// Ajustar la dirección del desplazamiento
mermaPanel.AutoScrollPosition = new Point(mermaPanel.AutoScrollPosition.X + deltaX, mermaPanel.AutoScrollPosition.Y - deltaY);
lastPoint = new Point(e.X, e.Y);
}
}
private void MermaPanel_MouseUp(object sender, MouseEventArgs e)
{
mermaPanel.Capture = false;
}
public void llenarPanel()
{
mermaPanel.Controls.Clear();
@@ -182,5 +222,11 @@ namespace compabetov2
agregarmermas.Owner = this;
agregarmermas.Show();
}
private void button2_Click(object sender, EventArgs e)
{
Estadiscticas verstats = new Estadiscticas();
verstats.Show();
}
}
}
+52 -50
View File
@@ -72,9 +72,9 @@
this.panel1.Controls.Add(this.pictureBox1);
this.panel1.Dock = System.Windows.Forms.DockStyle.Fill;
this.panel1.Location = new System.Drawing.Point(0, 0);
this.panel1.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
this.panel1.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.panel1.Name = "panel1";
this.panel1.Size = new System.Drawing.Size(1725, 772);
this.panel1.Size = new System.Drawing.Size(1258, 627);
this.panel1.TabIndex = 4;
this.panel1.Paint += new System.Windows.Forms.PaintEventHandler(this.panel1_Paint);
//
@@ -83,9 +83,10 @@
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(776, 112);
this.lblfecha.Location = new System.Drawing.Point(582, 91);
this.lblfecha.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.lblfecha.Name = "lblfecha";
this.lblfecha.Size = new System.Drawing.Size(159, 58);
this.lblfecha.Size = new System.Drawing.Size(126, 46);
this.lblfecha.TabIndex = 9;
this.lblfecha.Text = "label2";
this.lblfecha.TextAlign = System.Drawing.ContentAlignment.TopCenter;
@@ -96,9 +97,10 @@
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(953, -6);
this.lblhora.Location = new System.Drawing.Point(715, -5);
this.lblhora.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.lblhora.Name = "lblhora";
this.lblhora.Size = new System.Drawing.Size(318, 113);
this.lblhora.Size = new System.Drawing.Size(249, 91);
this.lblhora.TabIndex = 8;
this.lblhora.Text = "label1";
this.lblhora.Click += new System.EventHandler(this.lblhora_Click);
@@ -112,26 +114,26 @@
this.flowLayoutPanel1.Controls.Add(this.button3);
this.flowLayoutPanel1.Controls.Add(this.button5);
this.flowLayoutPanel1.Location = new System.Drawing.Point(-1, 2);
this.flowLayoutPanel1.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
this.flowLayoutPanel1.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.flowLayoutPanel1.Name = "flowLayoutPanel1";
this.flowLayoutPanel1.Size = new System.Drawing.Size(324, 1061);
this.flowLayoutPanel1.Size = new System.Drawing.Size(243, 862);
this.flowLayoutPanel1.TabIndex = 7;
//
// 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.Location = new System.Drawing.Point(2, 2);
this.panel2.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.panel2.Name = "panel2";
this.panel2.Size = new System.Drawing.Size(312, 263);
this.panel2.Size = new System.Drawing.Size(234, 214);
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.Location = new System.Drawing.Point(48, 28);
this.pictureBox7.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.pictureBox7.Name = "pictureBox7";
this.pictureBox7.Size = new System.Drawing.Size(190, 197);
this.pictureBox7.SizeMode = System.Windows.Forms.PictureBoxSizeMode.AutoSize;
@@ -147,11 +149,11 @@
this.button1.ForeColor = System.Drawing.SystemColors.ButtonHighlight;
this.button1.Image = global::compabetov2.Properties.Resources.Menui1;
this.button1.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
this.button1.Location = new System.Drawing.Point(3, 269);
this.button1.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
this.button1.Location = new System.Drawing.Point(2, 220);
this.button1.Margin = new System.Windows.Forms.Padding(2, 2, 2, 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.Padding = new System.Windows.Forms.Padding(38, 0, 0, 0);
this.button1.Size = new System.Drawing.Size(234, 93);
this.button1.TabIndex = 8;
this.button1.Text = "Menú";
this.button1.UseVisualStyleBackColor = false;
@@ -166,12 +168,13 @@
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.Location = new System.Drawing.Point(2, 317);
this.button2.Margin = new System.Windows.Forms.Padding(2, 2, 2, 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.Padding = new System.Windows.Forms.Padding(38, 0, 0, 0);
this.button2.Size = new System.Drawing.Size(234, 93);
this.button2.TabIndex = 9;
this.button2.Text = "Reportes";
this.button2.UseVisualStyleBackColor = false;
this.button2.Click += new System.EventHandler(this.button2_Click);
//
@@ -184,11 +187,11 @@
this.button3.ForeColor = System.Drawing.SystemColors.ButtonHighlight;
this.button3.Image = global::compabetov2.Properties.Resources.productoi;
this.button3.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
this.button3.Location = new System.Drawing.Point(3, 505);
this.button3.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
this.button3.Location = new System.Drawing.Point(2, 414);
this.button3.Margin = new System.Windows.Forms.Padding(2, 2, 2, 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.Padding = new System.Windows.Forms.Padding(38, 0, 0, 0);
this.button3.Size = new System.Drawing.Size(234, 93);
this.button3.TabIndex = 10;
this.button3.Text = "Productos";
this.button3.UseVisualStyleBackColor = false;
@@ -202,11 +205,11 @@
this.button5.ForeColor = System.Drawing.SystemColors.ButtonHighlight;
this.button5.Image = global::compabetov2.Properties.Resources.sesionc;
this.button5.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
this.button5.Location = new System.Drawing.Point(3, 623);
this.button5.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
this.button5.Location = new System.Drawing.Point(2, 511);
this.button5.Margin = new System.Windows.Forms.Padding(2, 2, 2, 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.Padding = new System.Windows.Forms.Padding(38, 0, 0, 0);
this.button5.Size = new System.Drawing.Size(234, 93);
this.button5.TabIndex = 12;
this.button5.Text = "Salir";
this.button5.UseVisualStyleBackColor = false;
@@ -215,10 +218,10 @@
// pictureBox4
//
this.pictureBox4.Image = global::compabetov2.Properties.Resources.inventario;
this.pictureBox4.Location = new System.Drawing.Point(1451, 603);
this.pictureBox4.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
this.pictureBox4.Location = new System.Drawing.Point(1088, 490);
this.pictureBox4.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.pictureBox4.Name = "pictureBox4";
this.pictureBox4.Size = new System.Drawing.Size(293, 282);
this.pictureBox4.Size = new System.Drawing.Size(220, 229);
this.pictureBox4.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
this.pictureBox4.TabIndex = 6;
this.pictureBox4.TabStop = false;
@@ -227,10 +230,10 @@
// pictureBox5
//
this.pictureBox5.Image = global::compabetov2.Properties.Resources.Cuentas;
this.pictureBox5.Location = new System.Drawing.Point(584, 603);
this.pictureBox5.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
this.pictureBox5.Location = new System.Drawing.Point(438, 490);
this.pictureBox5.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.pictureBox5.Name = "pictureBox5";
this.pictureBox5.Size = new System.Drawing.Size(293, 282);
this.pictureBox5.Size = new System.Drawing.Size(220, 229);
this.pictureBox5.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
this.pictureBox5.TabIndex = 5;
this.pictureBox5.TabStop = false;
@@ -239,10 +242,10 @@
// pictureBox6
//
this.pictureBox6.Image = global::compabetov2.Properties.Resources.mermas;
this.pictureBox6.Location = new System.Drawing.Point(1013, 603);
this.pictureBox6.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
this.pictureBox6.Location = new System.Drawing.Point(760, 490);
this.pictureBox6.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.pictureBox6.Name = "pictureBox6";
this.pictureBox6.Size = new System.Drawing.Size(293, 282);
this.pictureBox6.Size = new System.Drawing.Size(220, 229);
this.pictureBox6.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
this.pictureBox6.TabIndex = 4;
this.pictureBox6.TabStop = false;
@@ -251,10 +254,10 @@
// pictureBox3
//
this.pictureBox3.Image = global::compabetov2.Properties.Resources.Envios;
this.pictureBox3.Location = new System.Drawing.Point(1451, 209);
this.pictureBox3.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
this.pictureBox3.Location = new System.Drawing.Point(1088, 170);
this.pictureBox3.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.pictureBox3.Name = "pictureBox3";
this.pictureBox3.Size = new System.Drawing.Size(293, 282);
this.pictureBox3.Size = new System.Drawing.Size(220, 229);
this.pictureBox3.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
this.pictureBox3.TabIndex = 3;
this.pictureBox3.TabStop = false;
@@ -263,10 +266,10 @@
// pictureBox2
//
this.pictureBox2.Image = global::compabetov2.Properties.Resources.Vender;
this.pictureBox2.Location = new System.Drawing.Point(584, 209);
this.pictureBox2.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
this.pictureBox2.Location = new System.Drawing.Point(438, 170);
this.pictureBox2.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.pictureBox2.Name = "pictureBox2";
this.pictureBox2.Size = new System.Drawing.Size(293, 282);
this.pictureBox2.Size = new System.Drawing.Size(220, 229);
this.pictureBox2.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
this.pictureBox2.TabIndex = 2;
this.pictureBox2.TabStop = false;
@@ -275,10 +278,10 @@
// pictureBox1
//
this.pictureBox1.Image = global::compabetov2.Properties.Resources.Personal;
this.pictureBox1.Location = new System.Drawing.Point(1013, 209);
this.pictureBox1.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
this.pictureBox1.Location = new System.Drawing.Point(760, 170);
this.pictureBox1.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.pictureBox1.Name = "pictureBox1";
this.pictureBox1.Size = new System.Drawing.Size(293, 282);
this.pictureBox1.Size = new System.Drawing.Size(220, 229);
this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
this.pictureBox1.TabIndex = 1;
this.pictureBox1.TabStop = false;
@@ -291,13 +294,12 @@
//
// MenuPrincipal
//
this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F);
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(1725, 772);
this.ClientSize = new System.Drawing.Size(1258, 627);
this.ControlBox = false;
this.Controls.Add(this.panel1);
this.IsMdiContainer = true;
this.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.Name = "MenuPrincipal";
this.WindowState = System.Windows.Forms.FormWindowState.Maximized;
this.Load += new System.EventHandler(this.MenuPrincipal_Load);
+13 -16
View File
@@ -76,9 +76,16 @@ namespace compabetov2
private void pictureBox4_Click(object sender, EventArgs e)
{
inventario inventario = new inventario(loginPrincipal);
inventario.Show();
if (loginPrincipal.tipo.Equals("empleado"))
{
MessageBox.Show("Usted no tiene permisos de acceder a este apartado");
}
else
{
inventario inventario = new inventario(loginPrincipal);
inventario.Show();
}
}
private void lblfecha_Click(object sender, EventArgs e)
@@ -114,20 +121,9 @@ namespace compabetov2
private void pictureBox3_Click(object sender, EventArgs e)
{
envios envios = new envios(loginPrincipal);
if (loginPrincipal.tipo.Equals("empleado"))
{
MessageBox.Show("Usted no tiene permisos de acceder a este apartado");
}
else
{
envios envios = new envios(loginPrincipal);
envios.Show();
}
envios.Show();
}
private void pictureBox5_Click(object sender, EventArgs e)
@@ -192,6 +188,7 @@ namespace compabetov2
else
{
Estadiscticas estadiscticas = new Estadiscticas();
estadiscticas.Owner = this;
estadiscticas.Show();
}
+148
View File
@@ -0,0 +1,148 @@
namespace compabetov2.Ventas
{
partial class datosEnvio
{
/// <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.txtCliente = new System.Windows.Forms.TextBox();
this.txtDireccion = new System.Windows.Forms.TextBox();
this.label2 = new System.Windows.Forms.Label();
this.txtTelefono = new System.Windows.Forms.TextBox();
this.label3 = new System.Windows.Forms.Label();
this.btnAceptar = new System.Windows.Forms.Button();
this.btnCancelar = new System.Windows.Forms.Button();
this.SuspendLayout();
//
// label1
//
this.label1.AutoSize = true;
this.label1.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.label1.Location = new System.Drawing.Point(22, 25);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(62, 20);
this.label1.TabIndex = 0;
this.label1.Text = "Cliente:";
//
// txtCliente
//
this.txtCliente.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.txtCliente.Location = new System.Drawing.Point(25, 61);
this.txtCliente.Name = "txtCliente";
this.txtCliente.Size = new System.Drawing.Size(337, 26);
this.txtCliente.TabIndex = 1;
//
// txtDireccion
//
this.txtDireccion.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.txtDireccion.Location = new System.Drawing.Point(25, 149);
this.txtDireccion.Name = "txtDireccion";
this.txtDireccion.Size = new System.Drawing.Size(337, 26);
this.txtDireccion.TabIndex = 3;
//
// label2
//
this.label2.AutoSize = true;
this.label2.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.label2.Location = new System.Drawing.Point(22, 110);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(79, 20);
this.label2.TabIndex = 2;
this.label2.Text = "Direccion:";
//
// txtTelefono
//
this.txtTelefono.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.txtTelefono.Location = new System.Drawing.Point(24, 227);
this.txtTelefono.Name = "txtTelefono";
this.txtTelefono.Size = new System.Drawing.Size(338, 26);
this.txtTelefono.TabIndex = 5;
//
// label3
//
this.label3.AutoSize = true;
this.label3.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.label3.Location = new System.Drawing.Point(21, 191);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(75, 20);
this.label3.TabIndex = 4;
this.label3.Text = "Telefono:";
//
// btnAceptar
//
this.btnAceptar.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.btnAceptar.Location = new System.Drawing.Point(103, 277);
this.btnAceptar.Name = "btnAceptar";
this.btnAceptar.Size = new System.Drawing.Size(77, 31);
this.btnAceptar.TabIndex = 6;
this.btnAceptar.Text = "Aceptar";
this.btnAceptar.UseVisualStyleBackColor = true;
this.btnAceptar.Click += new System.EventHandler(this.btnAceptar_Click);
//
// btnCancelar
//
this.btnCancelar.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.btnCancelar.Location = new System.Drawing.Point(203, 277);
this.btnCancelar.Name = "btnCancelar";
this.btnCancelar.Size = new System.Drawing.Size(83, 31);
this.btnCancelar.TabIndex = 8;
this.btnCancelar.Text = "Cancelar";
this.btnCancelar.UseVisualStyleBackColor = true;
this.btnCancelar.Click += new System.EventHandler(this.btnCancelar_Click);
//
// datosEnvio
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(374, 341);
this.Controls.Add(this.btnCancelar);
this.Controls.Add(this.btnAceptar);
this.Controls.Add(this.txtTelefono);
this.Controls.Add(this.label3);
this.Controls.Add(this.txtDireccion);
this.Controls.Add(this.label2);
this.Controls.Add(this.txtCliente);
this.Controls.Add(this.label1);
this.Name = "datosEnvio";
this.Text = "Datos del envio";
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.Label label1;
private System.Windows.Forms.TextBox txtCliente;
private System.Windows.Forms.TextBox txtDireccion;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.TextBox txtTelefono;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.Button btnAceptar;
private System.Windows.Forms.Button btnCancelar;
}
}
+48
View File
@@ -0,0 +1,48 @@
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.Ventas
{
public partial class datosEnvio : Form
{
private Envio envio;
List<DetalleEnvioModel> detallesEnvio;
vender ventanaPadre;
public datosEnvio(Envio envio, List<DetalleEnvioModel> detallesEnvio, vender ventanaPadre)
{
InitializeComponent();
this.envio = envio;
this.detallesEnvio = detallesEnvio;
this.ventanaPadre = ventanaPadre;
}
private void btnAceptar_Click(object sender, EventArgs e)
{
envio.cliente = txtCliente.Text;
envio.direccion = txtDireccion.Text;
envio.telefono = txtTelefono.Text;
if (service.crearEnvio(envio, detallesEnvio))
{
MessageBox.Show("Envio hecho");
ventanaPadre.ImprimirTicketEnvio();
ventanaPadre.eliminarProductosTocket();
ventanaPadre.llenarLayout();
ventanaPadre.total = 0;
}
}
private void btnCancelar_Click(object sender, EventArgs e)
{
Close();
}
}
}
+120
View File
@@ -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>
+68 -61
View File
@@ -69,9 +69,10 @@
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(619, 128);
this.lblfecha.Location = new System.Drawing.Point(464, 104);
this.lblfecha.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.lblfecha.Name = "lblfecha";
this.lblfecha.Size = new System.Drawing.Size(159, 58);
this.lblfecha.Size = new System.Drawing.Size(126, 46);
this.lblfecha.TabIndex = 13;
this.lblfecha.Text = "label2";
this.lblfecha.TextAlign = System.Drawing.ContentAlignment.TopCenter;
@@ -82,9 +83,10 @@
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(807, 9);
this.lblhora.Location = new System.Drawing.Point(605, 7);
this.lblhora.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.lblhora.Name = "lblhora";
this.lblhora.Size = new System.Drawing.Size(318, 113);
this.lblhora.Size = new System.Drawing.Size(249, 91);
this.lblhora.TabIndex = 12;
this.lblhora.Text = "label1";
this.lblhora.Click += new System.EventHandler(this.lblhora_Click);
@@ -95,10 +97,10 @@
this.flowLayoutPanel2.Controls.Add(this.panel1);
this.flowLayoutPanel2.Controls.Add(this.label1);
this.flowLayoutPanel2.Controls.Add(this.labeltotal);
this.flowLayoutPanel2.Location = new System.Drawing.Point(1605, -1);
this.flowLayoutPanel2.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
this.flowLayoutPanel2.Location = new System.Drawing.Point(1204, -1);
this.flowLayoutPanel2.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.flowLayoutPanel2.Name = "flowLayoutPanel2";
this.flowLayoutPanel2.Size = new System.Drawing.Size(324, 1191);
this.flowLayoutPanel2.Size = new System.Drawing.Size(243, 968);
this.flowLayoutPanel2.TabIndex = 11;
this.flowLayoutPanel2.Paint += new System.Windows.Forms.PaintEventHandler(this.flowLayoutPanel2_Paint);
//
@@ -106,17 +108,17 @@
//
this.panel1.BackColor = System.Drawing.Color.Transparent;
this.panel1.Controls.Add(this.pictureBox9);
this.panel1.Location = new System.Drawing.Point(3, 2);
this.panel1.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
this.panel1.Location = new System.Drawing.Point(2, 2);
this.panel1.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.panel1.Name = "panel1";
this.panel1.Size = new System.Drawing.Size(312, 263);
this.panel1.Size = new System.Drawing.Size(234, 214);
this.panel1.TabIndex = 8;
//
// pictureBox9
//
this.pictureBox9.Image = global::compabetov2.Properties.Resources.HomeroMenu;
this.pictureBox9.Location = new System.Drawing.Point(64, 34);
this.pictureBox9.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
this.pictureBox9.Location = new System.Drawing.Point(48, 28);
this.pictureBox9.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.pictureBox9.Name = "pictureBox9";
this.pictureBox9.Size = new System.Drawing.Size(190, 197);
this.pictureBox9.SizeMode = System.Windows.Forms.PictureBoxSizeMode.AutoSize;
@@ -129,9 +131,10 @@
this.label1.BackColor = System.Drawing.Color.Transparent;
this.label1.Font = new System.Drawing.Font("Microsoft Sans Serif", 20F);
this.label1.ForeColor = System.Drawing.Color.AliceBlue;
this.label1.Location = new System.Drawing.Point(3, 267);
this.label1.Location = new System.Drawing.Point(2, 218);
this.label1.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(102, 39);
this.label1.Size = new System.Drawing.Size(83, 31);
this.label1.TabIndex = 17;
this.label1.Text = "Total:";
this.label1.Click += new System.EventHandler(this.label1_Click);
@@ -142,9 +145,10 @@
this.labeltotal.BackColor = System.Drawing.Color.Transparent;
this.labeltotal.Font = new System.Drawing.Font("Microsoft Sans Serif", 20F);
this.labeltotal.ForeColor = System.Drawing.Color.AliceBlue;
this.labeltotal.Location = new System.Drawing.Point(111, 267);
this.labeltotal.Location = new System.Drawing.Point(89, 218);
this.labeltotal.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.labeltotal.Name = "labeltotal";
this.labeltotal.Size = new System.Drawing.Size(0, 39);
this.labeltotal.Size = new System.Drawing.Size(0, 31);
this.labeltotal.TabIndex = 18;
//
// flowLayoutPanel1
@@ -156,26 +160,26 @@
this.flowLayoutPanel1.Controls.Add(this.button3);
this.flowLayoutPanel1.Controls.Add(this.button5);
this.flowLayoutPanel1.Location = new System.Drawing.Point(-1, 2);
this.flowLayoutPanel1.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
this.flowLayoutPanel1.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.flowLayoutPanel1.Name = "flowLayoutPanel1";
this.flowLayoutPanel1.Size = new System.Drawing.Size(324, 1199);
this.flowLayoutPanel1.Size = new System.Drawing.Size(243, 974);
this.flowLayoutPanel1.TabIndex = 8;
//
// panel2
//
this.panel2.BackColor = System.Drawing.Color.Transparent;
this.panel2.Controls.Add(this.pictureBox7);
this.panel2.Location = new System.Drawing.Point(3, 2);
this.panel2.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
this.panel2.Location = new System.Drawing.Point(2, 2);
this.panel2.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.panel2.Name = "panel2";
this.panel2.Size = new System.Drawing.Size(312, 263);
this.panel2.Size = new System.Drawing.Size(234, 214);
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.Location = new System.Drawing.Point(48, 28);
this.pictureBox7.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.pictureBox7.Name = "pictureBox7";
this.pictureBox7.Size = new System.Drawing.Size(190, 197);
this.pictureBox7.SizeMode = System.Windows.Forms.PictureBoxSizeMode.AutoSize;
@@ -191,11 +195,11 @@
this.button1.ForeColor = System.Drawing.SystemColors.ButtonHighlight;
this.button1.Image = global::compabetov2.Properties.Resources.Menui1;
this.button1.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
this.button1.Location = new System.Drawing.Point(3, 269);
this.button1.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
this.button1.Location = new System.Drawing.Point(2, 220);
this.button1.Margin = new System.Windows.Forms.Padding(2, 2, 2, 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.Padding = new System.Windows.Forms.Padding(38, 0, 0, 0);
this.button1.Size = new System.Drawing.Size(234, 93);
this.button1.TabIndex = 8;
this.button1.Text = "Menú";
this.button1.UseVisualStyleBackColor = false;
@@ -210,14 +214,15 @@
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.Location = new System.Drawing.Point(2, 317);
this.button2.Margin = new System.Windows.Forms.Padding(2, 2, 2, 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.Padding = new System.Windows.Forms.Padding(38, 0, 0, 0);
this.button2.Size = new System.Drawing.Size(234, 93);
this.button2.TabIndex = 9;
this.button2.Text = "Estadisticas";
this.button2.Text = "Reportes";
this.button2.UseVisualStyleBackColor = false;
this.button2.Click += new System.EventHandler(this.button2_Click);
//
// button3
//
@@ -228,11 +233,11 @@
this.button3.ForeColor = System.Drawing.SystemColors.ButtonHighlight;
this.button3.Image = global::compabetov2.Properties.Resources.productoi;
this.button3.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
this.button3.Location = new System.Drawing.Point(3, 505);
this.button3.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
this.button3.Location = new System.Drawing.Point(2, 414);
this.button3.Margin = new System.Windows.Forms.Padding(2, 2, 2, 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.Padding = new System.Windows.Forms.Padding(38, 0, 0, 0);
this.button3.Size = new System.Drawing.Size(234, 93);
this.button3.TabIndex = 10;
this.button3.Text = "Productos";
this.button3.UseVisualStyleBackColor = false;
@@ -246,11 +251,11 @@
this.button5.ForeColor = System.Drawing.SystemColors.ButtonHighlight;
this.button5.Image = global::compabetov2.Properties.Resources.sesionc;
this.button5.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
this.button5.Location = new System.Drawing.Point(3, 623);
this.button5.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
this.button5.Location = new System.Drawing.Point(2, 511);
this.button5.Margin = new System.Windows.Forms.Padding(2, 2, 2, 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.Padding = new System.Windows.Forms.Padding(38, 0, 0, 0);
this.button5.Size = new System.Drawing.Size(234, 93);
this.button5.TabIndex = 12;
this.button5.Text = "Salir";
this.button5.UseVisualStyleBackColor = false;
@@ -258,32 +263,33 @@
// flowLayoutPanel3
//
this.flowLayoutPanel3.AutoScroll = true;
this.flowLayoutPanel3.Location = new System.Drawing.Point(325, 350);
this.flowLayoutPanel3.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
this.flowLayoutPanel3.Location = new System.Drawing.Point(244, 284);
this.flowLayoutPanel3.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.flowLayoutPanel3.Name = "flowLayoutPanel3";
this.flowLayoutPanel3.Size = new System.Drawing.Size(1273, 879);
this.flowLayoutPanel3.Size = new System.Drawing.Size(955, 714);
this.flowLayoutPanel3.TabIndex = 14;
this.flowLayoutPanel3.Paint += new System.Windows.Forms.PaintEventHandler(this.flowLayoutPanel3_Paint);
//
// txtbusqueda
//
this.txtbusqueda.Font = new System.Drawing.Font("Microsoft Sans Serif", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.txtbusqueda.Location = new System.Drawing.Point(329, 219);
this.txtbusqueda.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
this.txtbusqueda.Location = new System.Drawing.Point(247, 178);
this.txtbusqueda.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.txtbusqueda.Name = "txtbusqueda";
this.txtbusqueda.Size = new System.Drawing.Size(703, 36);
this.txtbusqueda.Size = new System.Drawing.Size(528, 30);
this.txtbusqueda.TabIndex = 15;
this.txtbusqueda.TextChanged += new System.EventHandler(this.txtbusqueda_TextChanged);
//
// bntImprimir
//
this.bntImprimir.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(27)))), ((int)(((byte)(104)))), ((int)(((byte)(255)))));
this.bntImprimir.Enabled = false;
this.bntImprimir.Font = new System.Drawing.Font("Microsoft Sans Serif", 15F);
this.bntImprimir.ForeColor = System.Drawing.Color.Transparent;
this.bntImprimir.Location = new System.Drawing.Point(1055, 210);
this.bntImprimir.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
this.bntImprimir.Location = new System.Drawing.Point(791, 171);
this.bntImprimir.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.bntImprimir.Name = "bntImprimir";
this.bntImprimir.Size = new System.Drawing.Size(151, 54);
this.bntImprimir.Size = new System.Drawing.Size(113, 44);
this.bntImprimir.TabIndex = 17;
this.bntImprimir.Text = "Vender";
this.bntImprimir.UseVisualStyleBackColor = false;
@@ -293,22 +299,22 @@
//
this.responsablecb.Font = new System.Drawing.Font("Microsoft Sans Serif", 15F);
this.responsablecb.FormattingEnabled = true;
this.responsablecb.Location = new System.Drawing.Point(1371, 220);
this.responsablecb.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
this.responsablecb.Location = new System.Drawing.Point(1028, 177);
this.responsablecb.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.responsablecb.Name = "responsablecb";
this.responsablecb.Size = new System.Drawing.Size(227, 37);
this.responsablecb.Size = new System.Drawing.Size(171, 33);
this.responsablecb.TabIndex = 18;
this.responsablecb.SelectedIndexChanged += new System.EventHandler(this.responsablecb_SelectedIndexChanged);
//
// btnFiar
//
this.btnFiar.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(27)))), ((int)(((byte)(104)))), ((int)(((byte)(255)))));
this.btnFiar.Enabled = false;
this.btnFiar.Font = new System.Drawing.Font("Microsoft Sans Serif", 15F);
this.btnFiar.ForeColor = System.Drawing.Color.Transparent;
this.btnFiar.Location = new System.Drawing.Point(1213, 210);
this.btnFiar.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.btnFiar.Location = new System.Drawing.Point(910, 171);
this.btnFiar.Name = "btnFiar";
this.btnFiar.Size = new System.Drawing.Size(151, 54);
this.btnFiar.Size = new System.Drawing.Size(113, 44);
this.btnFiar.TabIndex = 19;
this.btnFiar.Text = "Cuenta";
this.btnFiar.UseVisualStyleBackColor = false;
@@ -317,12 +323,13 @@
// btnEnviar
//
this.btnEnviar.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(27)))), ((int)(((byte)(104)))), ((int)(((byte)(255)))));
this.btnEnviar.Enabled = false;
this.btnEnviar.Font = new System.Drawing.Font("Microsoft Sans Serif", 15F);
this.btnEnviar.ForeColor = System.Drawing.Color.Transparent;
this.btnEnviar.Location = new System.Drawing.Point(1055, 137);
this.btnEnviar.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
this.btnEnviar.Location = new System.Drawing.Point(852, 219);
this.btnEnviar.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.btnEnviar.Name = "btnEnviar";
this.btnEnviar.Size = new System.Drawing.Size(151, 54);
this.btnEnviar.Size = new System.Drawing.Size(113, 44);
this.btnEnviar.TabIndex = 20;
this.btnEnviar.Text = "Enviar";
this.btnEnviar.UseVisualStyleBackColor = false;
@@ -330,9 +337,9 @@
//
// vender
//
this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F);
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(1370, 627);
this.ClientSize = new System.Drawing.Size(1370, 509);
this.ControlBox = false;
this.Controls.Add(this.btnEnviar);
this.Controls.Add(this.btnFiar);
@@ -344,7 +351,7 @@
this.Controls.Add(this.lblhora);
this.Controls.Add(this.flowLayoutPanel2);
this.Controls.Add(this.flowLayoutPanel1);
this.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
this.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.Name = "vender";
this.WindowState = System.Windows.Forms.FormWindowState.Maximized;
this.Load += new System.EventHandler(this.vender_Load);
+139 -16
View File
@@ -1,5 +1,6 @@
using compabetov2.database;
using compabetov2.database.modelos;
using compabetov2.Ventas;
using System;
using System.Collections.Generic;
using System.ComponentModel;
@@ -22,8 +23,10 @@ namespace compabetov2
{
private Point lastPoint;
private List<Producto> productos;
private decimal total = 0;
public decimal total = 0;
private LoginModel loginPrincipal;
@@ -37,6 +40,44 @@ namespace compabetov2
this.loginPrincipal = loginPrincipal;
}
private void InitializeFlowLayout()
{
// Inicializar el flowLayoutPanel3 (asegúrate de que ya está creado en tu formulario)
// Habilitar eventos táctiles simulados
flowLayoutPanel3.MouseDown += FlowLayoutPanel3_MouseDown;
flowLayoutPanel3.MouseMove += FlowLayoutPanel3_MouseMove;
flowLayoutPanel3.MouseUp += FlowLayoutPanel3_MouseUp;
}
private void FlowLayoutPanel3_MouseDown(object sender, MouseEventArgs e)
{
lastPoint = new Point(e.X, e.Y);
flowLayoutPanel3.Capture = true;
}
private void FlowLayoutPanel3_MouseMove(object sender, MouseEventArgs e)
{
if (e.Button == MouseButtons.Left)
{
int deltaX = lastPoint.X - e.X;
int deltaY = lastPoint.Y - e.Y;
// Ajustar la dirección del desplazamiento
flowLayoutPanel3.AutoScrollPosition = new Point(flowLayoutPanel3.AutoScrollPosition.X + deltaX, flowLayoutPanel3.AutoScrollPosition.Y - deltaY);
lastPoint = new Point(e.X, e.Y);
}
}
private void FlowLayoutPanel3_MouseUp(object sender, MouseEventArgs e)
{
flowLayoutPanel3.Capture = false;
}
private void llenarComBox()
{
List<Empleado> empleados = service.conseguirEmpleados();
@@ -46,7 +87,7 @@ namespace compabetov2
}
}
private void llenarLayout()
public void llenarLayout()
{
flowLayoutPanel3.Controls.Clear();
foreach (Producto producto in productos)
@@ -406,6 +447,8 @@ namespace compabetov2
}
private void button1_Click(object sender, EventArgs e)
{
// Cerrar el formulario de ventas
@@ -463,6 +506,8 @@ namespace compabetov2
MessageBox.Show("Venta hecha");
eliminarProductosTocket();
llenarLayout();
total= 0;
}
}
@@ -496,6 +541,63 @@ namespace compabetov2
}
}
public void ImprimirTicketEnvio()
{
using (PrintDocument documentoImpresion = new PrintDocument())
{
documentoImpresion.PrintPage += (sender, e) => ImprimirContenidoEnvio(e);
using (PrintDialog printDialog = new PrintDialog())
{
printDialog.Document = documentoImpresion;
if (printDialog.ShowDialog() == DialogResult.OK)
{
documentoImpresion.Print();
}
}
}
}
private void ImprimirContenidoEnvio(PrintPageEventArgs e)
{
string responsable = responsablecb.SelectedItem.ToString();
// Contenido que deseas imprimir
string contenido = " Mini Súper\n" +
" Compa BETO\n" +
" Saturnino Peña #44\n" +
" Lomas de la Laguna\n" +
" 311 169 2829\n" +
$" Fecha: {DateTime.Now.ToString("dd/MM/yyyy")}\n" +
$" Hora: {DateTime.Now.ToString("hh:mm:ss")}\n" +
$" Atendió:\n " +
$" {responsable}\n" +
$" ENVIO:\n " +
$" EN CAMINO:\n " +
"Producto | Precio | Cantidad\n" +
"------------------------------------\n";
contenido += crearContenidoImprimir();
contenido += $"------------------------------------\n" +
$" Total: ${total}\n" +
"------------------------------------\n" +
" Mini Súper\n" +
" Compa BETO\n" +
" ¡Gracias por su compra!";
// Configuración de la fuente y del área de impresión
Font fuente = new Font("Arial", 10); // Ajustar el tamaño de fuente según sea necesario
PointF posicion = new PointF(0, e.MarginBounds.Top);
// Imprimir el contenido
e.Graphics.DrawString(contenido, fuente, Brushes.Black, posicion);
}
private void ImprimirContenido(PrintPageEventArgs e)
{
@@ -569,8 +671,9 @@ namespace compabetov2
cadenas = textoLbTotal.Split('$');
string totalProducto = cadenas[1];
resultado += $"{productoNombre} | ${precioProducto} | {cantidadProducto}\n";
resultado += $"{(productoNombre.Length > 10 ? $"{productoNombre}\n" : $"{productoNombre}")} | ${precioProducto} | {cantidadProducto}\n";
}
return resultado;
}
@@ -702,7 +805,23 @@ namespace compabetov2
private void responsablecb_SelectedIndexChanged(object sender, EventArgs e)
{
bntImprimir.Enabled = responsablecb.SelectedIndex != -1;
// Verificar si hay un elemento seleccionado en el ComboBox
if (responsablecb.SelectedItem != null)
{
// Habilitar los botones
bntImprimir.Enabled = true;
btnFiar.Enabled = true;
btnEnviar.Enabled = true;
}
else {
bntImprimir.Enabled = false;
btnFiar.Enabled = false;
btnEnviar.Enabled = false;
}
}
@@ -767,20 +886,16 @@ namespace compabetov2
string responsable = responsablecb.Text.Equals("") ? loginPrincipal.usuario : responsablecb.Text;
Envio envio = new Envio(-1, DateTime.Now.ToString(), "", "", responsable,"","",total+10);
if(detallesEnvio.Count > 0){
if (service.crearEnvio(envio, detallesEnvio))
{
MessageBox.Show("Envio hecho");
eliminarProductosTocket();
llenarLayout();
}
else
{
MessageBox.Show("No hay ningun producto agregado");
}
datosEnvio datosEnvio = new datosEnvio(envio, detallesEnvio,this);
datosEnvio.Show();
}
else
{
MessageBox.Show("No hay ningun producto agregado");
}
}
private void eliminarProductosTocket()
public void eliminarProductosTocket()
{
for (int i = flowLayoutPanel2.Controls.Count -1; i > 2; i--)
{
@@ -789,7 +904,15 @@ namespace compabetov2
flowLayoutPanel1.Controls.Remove(c);
}
label1.Text = "Total: 0";
txtbusqueda.Text = "";
}
private void button2_Click(object sender, EventArgs e)
{
Estadiscticas estadiscticas = new Estadiscticas();
estadiscticas.Owner = this;
estadiscticas.Show();
}
}
}
BIN
View File
Binary file not shown.
+10 -9
View File
@@ -942,7 +942,7 @@ namespace compabetov2.database
{
try
{
string sqlCuenta = "INSERT INTO cuenta (total, fecha, estado, descripcion) VALUES(@total, @fecha, 'ACTIVO', @descripcion);";
string sqlCuenta = "INSERT INTO cuenta (total, fecha, estado, descripcion,cliente) VALUES(@total, @fecha, 'ACTIVO', @descripcion,'');";
string sqlDetalle = "INSERT INTO detalle_cuenta (fk_cuenta, fk_producto, cantidad) VALUES(@fk_cuenta, @fk_producto, @cantidad);";
string sqlIdCuenta = "SELECT idCuenta FROM cuenta ORDER BY idCuenta DESC LIMIT 1";
string sqlProductoStock = "SELECT stock FROM Producto WHERE idproducto = @idproducto";
@@ -1237,14 +1237,15 @@ namespace compabetov2.database
{
try
{
string sqlEnvio = "INSERT INTO envios (fecha, direccion, telefono,responzable,total) VALUES(@fecha,@direccion , @telefono, @responzable, @total);";
string sqlEnvio = "INSERT INTO envios (fecha, direccion, telefono,responzable,total,cliente) VALUES(@fecha,@direccion , @telefono, @responzable, @total,@cliente);";
string sqlDetalle = "INSERT INTO detalle_envios (fk_envios, fk_producto, cantidad) VALUES(@fk_envios, @fk_producto, @cantidad);";
string sqlIdCuenta = "SELECT idEnvios FROM envios ORDER BY idEnvios DESC LIMIT 1";
SQLiteCommand commandCuenta = new SQLiteCommand(sqlEnvio, conexion);
commandCuenta.Parameters.AddWithValue("@fecha", envio.fecha);
commandCuenta.Parameters.AddWithValue("@direccion", "");
commandCuenta.Parameters.AddWithValue("@telefono", "");
commandCuenta.Parameters.AddWithValue("@direccion", envio.direccion);
commandCuenta.Parameters.AddWithValue("@telefono", envio.telefono);
commandCuenta.Parameters.AddWithValue("@cliente", envio.cliente);
commandCuenta.Parameters.AddWithValue("@responzable", envio.responsable);
commandCuenta.Parameters.AddWithValue("@total", envio.total);
commandCuenta.ExecuteNonQuery();
@@ -1439,7 +1440,7 @@ namespace compabetov2.database
SQLiteCommand commandVenta = new SQLiteCommand(sqlVenta, conexion);
commandVenta.Parameters.AddWithValue("@fecha", DateTime.Now.ToString());
commandVenta.Parameters.AddWithValue("@total", envio.total);
commandVenta.Parameters.AddWithValue("@total", envio.total + 10);
commandVenta.Parameters.AddWithValue("@responzable", envio.responsable);
commandVenta.ExecuteNonQuery();
@@ -1550,17 +1551,17 @@ namespace compabetov2.database
"CREATE TABLE Merma (idmerma INTEGER PRIMARY KEY AUTOINCREMENT, fecha TEXT, responsable TEXT, razon TEXT)",
"CREATE TABLE venta (idVenta INTEGER PRIMARY KEY AUTOINCREMENT,fecha TEXT, total DECIMAL(10, 2));",
"CREATE TABLE venta (idVenta INTEGER PRIMARY KEY AUTOINCREMENT,fecha TEXT, total DECIMAL(10, 2),responzable TEXT DEFAULT '');",
"CREATE TABLE detalle_venta (fk_venta INTEGER, fk_producto INTEGER, PRIMARY KEY (fk_venta, fk_producto), " +
"CREATE TABLE detalle_venta (fk_venta INTEGER, fk_producto INTEGER,cantidad INTEGER DEFAULT 0, PRIMARY KEY (fk_venta, fk_producto), " +
"FOREIGN KEY (fk_venta) REFERENCES venta(idVenta),FOREIGN KEY (fk_producto) REFERENCES producto(idproducto));",
"CREATE TABLE cuenta (idCuenta INTEGER PRIMARY KEY AUTOINCREMENT, total DECIMAL(10,2), fecha TEXT, estado TEXT DEFAULT 'ACTIVO', descripcion TEXT)",
"CREATE TABLE cuenta (idCuenta INTEGER PRIMARY KEY AUTOINCREMENT, total DECIMAL(10,2), fecha TEXT, estado TEXT DEFAULT 'ACTIVO', descripcion TEXT, cliente TEXT DEFAULT '')",
"CREATE TABLE detalle_cuenta (fk_cuenta INTEGER, fk_producto INTEGER,cantidad INTEGER, PRIMARY KEY (fk_cuenta, fk_producto), " +
"FOREIGN KEY (fk_cuenta) REFERENCES Cuenta(idCuenta),FOREIGN KEY (fk_producto) REFERENCES producto(idproducto))",
"CREATE TABLE envios (idEnvios INTEGER PRIMARY KEY AUTOINCREMENT, fecha TEXT, direccion TEXT, telefono TEXT,responzable TEXT DEFAULT '',estado TEXT DEFAULT 'EN PROCESO')",
"CREATE TABLE envios (idEnvios INTEGER PRIMARY KEY AUTOINCREMENT, fecha TEXT, direccion TEXT, telefono TEXT,responzable TEXT DEFAULT '',estado TEXT DEFAULT 'EN PROCESO', total DECIMAL(10,2) DEFAULT 0,cliente TEXT)",
"CREATE TABLE detalle_envios (fk_envios INTEGER, fk_producto INTEGER,cantidad INTEGER, PRIMARY KEY (fk_envios, fk_producto), " +
"FOREIGN KEY (fk_envios) REFERENCES envios(idEnvios),FOREIGN KEY (fk_producto) REFERENCES producto(idproducto))",
+3 -1
View File
@@ -11,12 +11,14 @@ namespace compabetov2.database.modelos
public int idVenta;
public int cantidad;
public Producto producto;
public decimal total;
public DetalleVentaModel(int cantidad, Producto producto, int id = -1)
public DetalleVentaModel(int cantidad, Producto producto, int id = -1, decimal total = 0)
{
this.cantidad = cantidad;
this.producto = producto;
this.idVenta = id;
this.total = total;
}
}
}
+2 -1
View File
@@ -326,6 +326,7 @@ namespace compabetov2.database
while (reader.Read())
{
decimal total = reader.GetDecimal(6);
Envio envio = new Envio(
(int)reader.GetInt64(0),
reader.GetString(1),
@@ -334,7 +335,7 @@ namespace compabetov2.database
reader.GetString(4),
reader.GetString(5),
reader.GetString(7),
reader.GetDecimal(6)
total
) ;
envios.Add(envio);
Binary file not shown.
Binary file not shown.
@@ -1,3 +1,4 @@
<<<<<<< HEAD
C:\Users\carsu\Source\Repos\compabetoOG\bin\Debug\SqlServerTypes\x64\msvcr120.dll
C:\Users\carsu\Source\Repos\compabetoOG\bin\Debug\SqlServerTypes\x64\SqlServerSpatial140.dll
C:\Users\carsu\Source\Repos\compabetoOG\bin\Debug\SqlServerTypes\x86\msvcr120.dll
@@ -45,3 +46,52 @@ C:\Users\carsu\Source\Repos\compabetoOG\obj\Debug\compabetov2.application
C:\Users\carsu\Source\Repos\compabetoOG\obj\Debug\compabetov2.csproj.CopyComplete
C:\Users\carsu\Source\Repos\compabetoOG\obj\Debug\compabetov2.exe
C:\Users\carsu\Source\Repos\compabetoOG\obj\Debug\compabetov2.pdb
=======
C:\Users\Googl\Documents\compabetoOG\bin\Debug\SqlServerTypes\x64\msvcr120.dll
C:\Users\Googl\Documents\compabetoOG\bin\Debug\SqlServerTypes\x64\SqlServerSpatial140.dll
C:\Users\Googl\Documents\compabetoOG\bin\Debug\SqlServerTypes\x86\msvcr120.dll
C:\Users\Googl\Documents\compabetoOG\bin\Debug\SqlServerTypes\x86\SqlServerSpatial140.dll
C:\Users\Googl\Documents\compabetoOG\bin\Debug\compabetov2.exe.config
C:\Users\Googl\Documents\compabetoOG\bin\Debug\compabetov2.exe.manifest
C:\Users\Googl\Documents\compabetoOG\bin\Debug\compabetov2.application
C:\Users\Googl\Documents\compabetoOG\bin\Debug\compabetov2.exe
C:\Users\Googl\Documents\compabetoOG\bin\Debug\compabetov2.pdb
C:\Users\Googl\Documents\compabetoOG\bin\Debug\EntityFramework.dll
C:\Users\Googl\Documents\compabetoOG\bin\Debug\EntityFramework.SqlServer.dll
C:\Users\Googl\Documents\compabetoOG\bin\Debug\Microsoft.SqlServer.Types.dll
C:\Users\Googl\Documents\compabetoOG\bin\Debug\System.Data.SQLite.dll
C:\Users\Googl\Documents\compabetoOG\bin\Debug\System.Data.SQLite.EF6.dll
C:\Users\Googl\Documents\compabetoOG\bin\Debug\System.Data.SQLite.Linq.dll
C:\Users\Googl\Documents\compabetoOG\bin\Debug\EntityFramework.xml
C:\Users\Googl\Documents\compabetoOG\bin\Debug\EntityFramework.SqlServer.xml
C:\Users\Googl\Documents\compabetoOG\bin\Debug\System.Data.SQLite.xml
C:\Users\Googl\Documents\compabetoOG\obj\Debug\compabetov2.csproj.AssemblyReference.cache
C:\Users\Googl\Documents\compabetoOG\obj\Debug\compabetov2.Empleados.AgregarEmpleado1.resources
C:\Users\Googl\Documents\compabetoOG\obj\Debug\compabetov2.AgregarLogin1.resources
C:\Users\Googl\Documents\compabetoOG\obj\Debug\compabetov2.Empleados.EditarEmpleado1.resources
C:\Users\Googl\Documents\compabetoOG\obj\Debug\compabetov2.Estadiscticas.resources
C:\Users\Googl\Documents\compabetoOG\obj\Debug\compabetov2.ActualizarMerma.resources
C:\Users\Googl\Documents\compabetoOG\obj\Debug\compabetov2.AgregarEmpleado.resources
C:\Users\Googl\Documents\compabetoOG\obj\Debug\compabetov2.AgregarLogin.resources
C:\Users\Googl\Documents\compabetoOG\obj\Debug\compabetov2.agregarmermas.resources
C:\Users\Googl\Documents\compabetoOG\obj\Debug\compabetov2.cuentas.resources
C:\Users\Googl\Documents\compabetoOG\obj\Debug\compabetov2.EditarEmpleado.resources
C:\Users\Googl\Documents\compabetoOG\obj\Debug\compabetov2.envios.resources
C:\Users\Googl\Documents\compabetoOG\obj\Debug\compabetov2.inventario.resources
C:\Users\Googl\Documents\compabetoOG\obj\Debug\compabetov2.login.resources
C:\Users\Googl\Documents\compabetoOG\obj\Debug\compabetov2.MenuPrincipal.resources
C:\Users\Googl\Documents\compabetoOG\obj\Debug\compabetov2.mermas.resources
C:\Users\Googl\Documents\compabetoOG\obj\Debug\compabetov2.ModificarContra.resources
C:\Users\Googl\Documents\compabetoOG\obj\Debug\compabetov2.personal.resources
C:\Users\Googl\Documents\compabetoOG\obj\Debug\compabetov2.Confirmacion.resources
C:\Users\Googl\Documents\compabetoOG\obj\Debug\compabetov2.Properties.Resources.resources
C:\Users\Googl\Documents\compabetoOG\obj\Debug\compabetov2.vender.resources
C:\Users\Googl\Documents\compabetoOG\obj\Debug\compabetov2.verMerma.resources
C:\Users\Googl\Documents\compabetoOG\obj\Debug\compabetov2.csproj.GenerateResource.cache
C:\Users\Googl\Documents\compabetoOG\obj\Debug\compabetov2.csproj.CoreCompileInputs.cache
C:\Users\Googl\Documents\compabetoOG\obj\Debug\compabetov2.exe.manifest
C:\Users\Googl\Documents\compabetoOG\obj\Debug\compabetov2.application
C:\Users\Googl\Documents\compabetoOG\obj\Debug\compabetov2.csproj.CopyComplete
C:\Users\Googl\Documents\compabetoOG\obj\Debug\compabetov2.exe
C:\Users\Googl\Documents\compabetoOG\obj\Debug\compabetov2.pdb
>>>>>>> c401f0a5d425880eadaf1bd65205d8559b5d39bc