envios a medio terminar

This commit is contained in:
carlos
2024-01-23 04:47:28 -06:00
parent 881295d920
commit da855a6c85
24 changed files with 496 additions and 407 deletions
+2 -3
View File
@@ -1,8 +1,7 @@
{ {
"ExpandedNodes": [ "ExpandedNodes": [
"", ""
"\\Empleados"
], ],
"SelectedNode": "\\Empleados\\EditarEmpleado.cs", "SelectedNode": "\\Solution.sln",
"PreviewInSolutionExplorer": false "PreviewInSolutionExplorer": false
} }
Binary file not shown.
File diff suppressed because one or more lines are too long
-2
View File
@@ -63,7 +63,6 @@ namespace compabetov2
carta.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 55F)); carta.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 55F));
carta.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 45F)); carta.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 45F));
carta.RowStyles.Add(new RowStyle(SizeType.Percent, 100F)); carta.RowStyles.Add(new RowStyle(SizeType.Percent, 100F));
carta.BackColor = Color.Gray;
FlowLayoutPanel infoPanel = new FlowLayoutPanel(); FlowLayoutPanel infoPanel = new FlowLayoutPanel();
infoPanel.Dock = DockStyle.Fill; infoPanel.Dock = DockStyle.Fill;
@@ -169,7 +168,6 @@ namespace compabetov2
carta.Controls.Add(HUDPanel,1,0); carta.Controls.Add(HUDPanel,1,0);
panelCuenta.Controls.Add(carta); panelCuenta.Controls.Add(carta);
panelCuenta.BackColor = Color.Aqua;
} }
} }
+99 -337
View File
@@ -37,35 +37,18 @@
this.button3 = new System.Windows.Forms.Button(); this.button3 = new System.Windows.Forms.Button();
this.button4 = new System.Windows.Forms.Button(); this.button4 = new System.Windows.Forms.Button();
this.button5 = new System.Windows.Forms.Button(); this.button5 = new System.Windows.Forms.Button();
this.textBox1 = new System.Windows.Forms.TextBox(); this.txtCliente = new System.Windows.Forms.TextBox();
this.dateTimePicker1 = new System.Windows.Forms.DateTimePicker();
this.textBox2 = new System.Windows.Forms.TextBox();
this.textBox3 = new System.Windows.Forms.TextBox();
this.textBox4 = new System.Windows.Forms.TextBox();
this.textBox5 = new System.Windows.Forms.TextBox();
this.label1 = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label();
this.label3 = new System.Windows.Forms.Label();
this.label4 = new System.Windows.Forms.Label(); this.label4 = new System.Windows.Forms.Label();
this.label5 = new System.Windows.Forms.Label();
this.label6 = new System.Windows.Forms.Label();
this.label7 = new System.Windows.Forms.Label(); this.label7 = new System.Windows.Forms.Label();
this.label8 = new System.Windows.Forms.Label(); this.txtDireccion = new System.Windows.Forms.TextBox();
this.textBox6 = new System.Windows.Forms.TextBox();
this.textBox7 = new System.Windows.Forms.TextBox();
this.label9 = new System.Windows.Forms.Label();
this.button9 = new System.Windows.Forms.Button();
this.button8 = new System.Windows.Forms.Button();
this.button7 = new System.Windows.Forms.Button();
this.button6 = new System.Windows.Forms.Button();
this.horafecha = new System.Windows.Forms.Timer(this.components); this.horafecha = new System.Windows.Forms.Timer(this.components);
this.timer1 = new System.Windows.Forms.Timer(this.components); this.timer1 = new System.Windows.Forms.Timer(this.components);
this.timer2 = new System.Windows.Forms.Timer(this.components); this.timer2 = new System.Windows.Forms.Timer(this.components);
this.lblfecha = new System.Windows.Forms.Label(); this.lblfecha = new System.Windows.Forms.Label();
this.lblhora = new System.Windows.Forms.Label(); this.lblhora = new System.Windows.Forms.Label();
this.responsablecb = new System.Windows.Forms.ComboBox(); this.txtTelefono = new System.Windows.Forms.TextBox();
this.comboBox1 = new System.Windows.Forms.ComboBox(); this.label1 = new System.Windows.Forms.Label();
this.label10 = new System.Windows.Forms.Label(); this.panelEnvio = new System.Windows.Forms.FlowLayoutPanel();
this.flowLayoutPanel1.SuspendLayout(); this.flowLayoutPanel1.SuspendLayout();
this.panel2.SuspendLayout(); this.panel2.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.pictureBox7)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.pictureBox7)).BeginInit();
@@ -81,26 +64,26 @@
this.flowLayoutPanel1.Controls.Add(this.button4); this.flowLayoutPanel1.Controls.Add(this.button4);
this.flowLayoutPanel1.Controls.Add(this.button5); this.flowLayoutPanel1.Controls.Add(this.button5);
this.flowLayoutPanel1.Location = new System.Drawing.Point(-1, 2); 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.Name = "flowLayoutPanel1";
this.flowLayoutPanel1.Size = new System.Drawing.Size(324, 1061); this.flowLayoutPanel1.Size = new System.Drawing.Size(243, 862);
this.flowLayoutPanel1.TabIndex = 9; this.flowLayoutPanel1.TabIndex = 9;
// //
// panel2 // panel2
// //
this.panel2.BackColor = System.Drawing.Color.Transparent; this.panel2.BackColor = System.Drawing.Color.Transparent;
this.panel2.Controls.Add(this.pictureBox7); this.panel2.Controls.Add(this.pictureBox7);
this.panel2.Location = new System.Drawing.Point(3, 2); this.panel2.Location = new System.Drawing.Point(2, 2);
this.panel2.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); this.panel2.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.panel2.Name = "panel2"; 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; this.panel2.TabIndex = 8;
// //
// pictureBox7 // pictureBox7
// //
this.pictureBox7.Image = global::compabetov2.Properties.Resources.HomeroMenu; this.pictureBox7.Image = global::compabetov2.Properties.Resources.HomeroMenu;
this.pictureBox7.Location = new System.Drawing.Point(64, 34); this.pictureBox7.Location = new System.Drawing.Point(48, 28);
this.pictureBox7.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); this.pictureBox7.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.pictureBox7.Name = "pictureBox7"; this.pictureBox7.Name = "pictureBox7";
this.pictureBox7.Size = new System.Drawing.Size(190, 197); this.pictureBox7.Size = new System.Drawing.Size(190, 197);
this.pictureBox7.SizeMode = System.Windows.Forms.PictureBoxSizeMode.AutoSize; this.pictureBox7.SizeMode = System.Windows.Forms.PictureBoxSizeMode.AutoSize;
@@ -116,11 +99,11 @@
this.button1.ForeColor = System.Drawing.SystemColors.ButtonHighlight; this.button1.ForeColor = System.Drawing.SystemColors.ButtonHighlight;
this.button1.Image = global::compabetov2.Properties.Resources.Menui1; this.button1.Image = global::compabetov2.Properties.Resources.Menui1;
this.button1.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft; this.button1.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
this.button1.Location = new System.Drawing.Point(3, 269); this.button1.Location = new System.Drawing.Point(2, 220);
this.button1.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); this.button1.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.button1.Name = "button1"; this.button1.Name = "button1";
this.button1.Padding = new System.Windows.Forms.Padding(51, 0, 0, 0); this.button1.Padding = new System.Windows.Forms.Padding(38, 0, 0, 0);
this.button1.Size = new System.Drawing.Size(312, 114); this.button1.Size = new System.Drawing.Size(234, 93);
this.button1.TabIndex = 8; this.button1.TabIndex = 8;
this.button1.Text = "Menú"; this.button1.Text = "Menú";
this.button1.UseVisualStyleBackColor = false; this.button1.UseVisualStyleBackColor = false;
@@ -135,11 +118,11 @@
this.button2.ForeColor = System.Drawing.SystemColors.ButtonHighlight; this.button2.ForeColor = System.Drawing.SystemColors.ButtonHighlight;
this.button2.Image = global::compabetov2.Properties.Resources.estadisticasi; this.button2.Image = global::compabetov2.Properties.Resources.estadisticasi;
this.button2.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft; this.button2.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
this.button2.Location = new System.Drawing.Point(3, 387); this.button2.Location = new System.Drawing.Point(2, 317);
this.button2.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); this.button2.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.button2.Name = "button2"; this.button2.Name = "button2";
this.button2.Padding = new System.Windows.Forms.Padding(51, 0, 0, 0); this.button2.Padding = new System.Windows.Forms.Padding(38, 0, 0, 0);
this.button2.Size = new System.Drawing.Size(312, 114); this.button2.Size = new System.Drawing.Size(234, 93);
this.button2.TabIndex = 9; this.button2.TabIndex = 9;
this.button2.Text = "Estadisticas"; this.button2.Text = "Estadisticas";
this.button2.TextAlign = System.Drawing.ContentAlignment.MiddleRight; this.button2.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
@@ -154,11 +137,11 @@
this.button3.ForeColor = System.Drawing.SystemColors.ButtonHighlight; this.button3.ForeColor = System.Drawing.SystemColors.ButtonHighlight;
this.button3.Image = global::compabetov2.Properties.Resources.productoi; this.button3.Image = global::compabetov2.Properties.Resources.productoi;
this.button3.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft; this.button3.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
this.button3.Location = new System.Drawing.Point(3, 505); this.button3.Location = new System.Drawing.Point(2, 414);
this.button3.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); this.button3.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.button3.Name = "button3"; this.button3.Name = "button3";
this.button3.Padding = new System.Windows.Forms.Padding(51, 0, 0, 0); this.button3.Padding = new System.Windows.Forms.Padding(38, 0, 0, 0);
this.button3.Size = new System.Drawing.Size(312, 114); this.button3.Size = new System.Drawing.Size(234, 93);
this.button3.TabIndex = 10; this.button3.TabIndex = 10;
this.button3.Text = "Productos"; this.button3.Text = "Productos";
this.button3.UseVisualStyleBackColor = false; this.button3.UseVisualStyleBackColor = false;
@@ -172,11 +155,11 @@
this.button4.ForeColor = System.Drawing.SystemColors.ButtonHighlight; this.button4.ForeColor = System.Drawing.SystemColors.ButtonHighlight;
this.button4.Image = global::compabetov2.Properties.Resources.reportesi; this.button4.Image = global::compabetov2.Properties.Resources.reportesi;
this.button4.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft; this.button4.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
this.button4.Location = new System.Drawing.Point(3, 623); this.button4.Location = new System.Drawing.Point(2, 511);
this.button4.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); this.button4.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.button4.Name = "button4"; this.button4.Name = "button4";
this.button4.Padding = new System.Windows.Forms.Padding(51, 0, 0, 0); this.button4.Padding = new System.Windows.Forms.Padding(38, 0, 0, 0);
this.button4.Size = new System.Drawing.Size(312, 114); this.button4.Size = new System.Drawing.Size(234, 93);
this.button4.TabIndex = 11; this.button4.TabIndex = 11;
this.button4.Text = "Reportes"; this.button4.Text = "Reportes";
this.button4.UseVisualStyleBackColor = false; this.button4.UseVisualStyleBackColor = false;
@@ -190,238 +173,59 @@
this.button5.ForeColor = System.Drawing.SystemColors.ButtonHighlight; this.button5.ForeColor = System.Drawing.SystemColors.ButtonHighlight;
this.button5.Image = global::compabetov2.Properties.Resources.sesionc; this.button5.Image = global::compabetov2.Properties.Resources.sesionc;
this.button5.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft; this.button5.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
this.button5.Location = new System.Drawing.Point(3, 741); this.button5.Location = new System.Drawing.Point(2, 608);
this.button5.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); this.button5.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.button5.Name = "button5"; this.button5.Name = "button5";
this.button5.Padding = new System.Windows.Forms.Padding(51, 0, 0, 0); this.button5.Padding = new System.Windows.Forms.Padding(38, 0, 0, 0);
this.button5.Size = new System.Drawing.Size(312, 114); this.button5.Size = new System.Drawing.Size(234, 93);
this.button5.TabIndex = 12; this.button5.TabIndex = 12;
this.button5.Text = "Salir"; this.button5.Text = "Salir";
this.button5.UseVisualStyleBackColor = false; this.button5.UseVisualStyleBackColor = false;
// //
// textBox1 // txtCliente
// //
this.textBox1.Font = new System.Drawing.Font("Microsoft Sans Serif", 25F); this.txtCliente.Font = new System.Drawing.Font("Microsoft Sans Serif", 25F);
this.textBox1.Location = new System.Drawing.Point(943, 368); this.txtCliente.Location = new System.Drawing.Point(302, 340);
this.textBox1.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); this.txtCliente.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.textBox1.Name = "textBox1"; this.txtCliente.Name = "txtCliente";
this.textBox1.Size = new System.Drawing.Size(365, 55); this.txtCliente.Size = new System.Drawing.Size(275, 45);
this.textBox1.TabIndex = 10; this.txtCliente.TabIndex = 31;
//
// dateTimePicker1
//
this.dateTimePicker1.Font = new System.Drawing.Font("Microsoft Sans Serif", 15F);
this.dateTimePicker1.Location = new System.Drawing.Point(592, 393);
this.dateTimePicker1.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
this.dateTimePicker1.Name = "dateTimePicker1";
this.dateTimePicker1.Size = new System.Drawing.Size(296, 36);
this.dateTimePicker1.TabIndex = 29;
//
// textBox2
//
this.textBox2.Font = new System.Drawing.Font("Microsoft Sans Serif", 25F);
this.textBox2.Location = new System.Drawing.Point(1364, 372);
this.textBox2.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
this.textBox2.Name = "textBox2";
this.textBox2.Size = new System.Drawing.Size(365, 55);
this.textBox2.TabIndex = 30;
//
// textBox3
//
this.textBox3.Font = new System.Drawing.Font("Microsoft Sans Serif", 25F);
this.textBox3.Location = new System.Drawing.Point(976, 545);
this.textBox3.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
this.textBox3.Name = "textBox3";
this.textBox3.Size = new System.Drawing.Size(365, 55);
this.textBox3.TabIndex = 32;
//
// textBox4
//
this.textBox4.Font = new System.Drawing.Font("Microsoft Sans Serif", 25F);
this.textBox4.Location = new System.Drawing.Point(555, 542);
this.textBox4.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
this.textBox4.Name = "textBox4";
this.textBox4.Size = new System.Drawing.Size(365, 55);
this.textBox4.TabIndex = 31;
//
// textBox5
//
this.textBox5.Font = new System.Drawing.Font("Microsoft Sans Serif", 25F);
this.textBox5.Location = new System.Drawing.Point(1373, 545);
this.textBox5.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
this.textBox5.Name = "textBox5";
this.textBox5.Size = new System.Drawing.Size(365, 55);
this.textBox5.TabIndex = 33;
//
// label1
//
this.label1.AutoSize = true;
this.label1.Font = new System.Drawing.Font("Microsoft Sans Serif", 20F);
this.label1.ForeColor = System.Drawing.Color.Navy;
this.label1.Location = new System.Drawing.Point(585, 327);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(112, 39);
this.label1.TabIndex = 38;
this.label1.Text = "Fecha";
this.label1.TextAlign = System.Drawing.ContentAlignment.TopCenter;
//
// label2
//
this.label2.AutoSize = true;
this.label2.Font = new System.Drawing.Font("Microsoft Sans Serif", 20F);
this.label2.ForeColor = System.Drawing.Color.Navy;
this.label2.Location = new System.Drawing.Point(936, 304);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(199, 39);
this.label2.TabIndex = 39;
this.label2.Text = "Destinatario";
this.label2.TextAlign = System.Drawing.ContentAlignment.TopCenter;
//
// label3
//
this.label3.AutoSize = true;
this.label3.Font = new System.Drawing.Font("Microsoft Sans Serif", 20F);
this.label3.ForeColor = System.Drawing.Color.Navy;
this.label3.Location = new System.Drawing.Point(1367, 304);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(160, 39);
this.label3.TabIndex = 40;
this.label3.Text = "Direccion";
this.label3.TextAlign = System.Drawing.ContentAlignment.TopCenter;
// //
// label4 // label4
// //
this.label4.AutoSize = true; this.label4.AutoSize = true;
this.label4.Font = new System.Drawing.Font("Microsoft Sans Serif", 20F); this.label4.Font = new System.Drawing.Font("Microsoft Sans Serif", 20F);
this.label4.ForeColor = System.Drawing.Color.Navy; this.label4.ForeColor = System.Drawing.Color.Navy;
this.label4.Location = new System.Drawing.Point(548, 487); this.label4.Location = new System.Drawing.Point(297, 296);
this.label4.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.label4.Name = "label4"; this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(134, 39); this.label4.Size = new System.Drawing.Size(99, 31);
this.label4.TabIndex = 41; this.label4.TabIndex = 41;
this.label4.Text = "Colonia"; this.label4.Text = "Cliente";
this.label4.TextAlign = System.Drawing.ContentAlignment.TopCenter; this.label4.TextAlign = System.Drawing.ContentAlignment.TopCenter;
// this.label4.Click += new System.EventHandler(this.label4_Click);
// label5
//
this.label5.AutoSize = true;
this.label5.Font = new System.Drawing.Font("Microsoft Sans Serif", 20F);
this.label5.ForeColor = System.Drawing.Color.Navy;
this.label5.Location = new System.Drawing.Point(969, 487);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(230, 39);
this.label5.TabIndex = 42;
this.label5.Text = "Codigo Postal";
this.label5.TextAlign = System.Drawing.ContentAlignment.TopCenter;
//
// label6
//
this.label6.AutoSize = true;
this.label6.Font = new System.Drawing.Font("Microsoft Sans Serif", 20F);
this.label6.ForeColor = System.Drawing.Color.Navy;
this.label6.Location = new System.Drawing.Point(1367, 487);
this.label6.Name = "label6";
this.label6.Size = new System.Drawing.Size(182, 39);
this.label6.TabIndex = 43;
this.label6.Text = "Referencia";
this.label6.TextAlign = System.Drawing.ContentAlignment.TopCenter;
// //
// label7 // label7
// //
this.label7.AutoSize = true; this.label7.AutoSize = true;
this.label7.Font = new System.Drawing.Font("Microsoft Sans Serif", 20F); this.label7.Font = new System.Drawing.Font("Microsoft Sans Serif", 20F);
this.label7.ForeColor = System.Drawing.Color.Navy; this.label7.ForeColor = System.Drawing.Color.Navy;
this.label7.Location = new System.Drawing.Point(559, 635); this.label7.Location = new System.Drawing.Point(296, 416);
this.label7.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.label7.Name = "label7"; this.label7.Name = "label7";
this.label7.Size = new System.Drawing.Size(217, 39); this.label7.Size = new System.Drawing.Size(128, 31);
this.label7.TabIndex = 44; this.label7.TabIndex = 44;
this.label7.Text = "Responsable"; this.label7.Text = "Direccion";
this.label7.TextAlign = System.Drawing.ContentAlignment.TopCenter; this.label7.TextAlign = System.Drawing.ContentAlignment.TopCenter;
// //
// label8 // txtDireccion
// //
this.label8.AutoSize = true; this.txtDireccion.Font = new System.Drawing.Font("Microsoft Sans Serif", 25F);
this.label8.Font = new System.Drawing.Font("Microsoft Sans Serif", 20F); this.txtDireccion.Location = new System.Drawing.Point(302, 461);
this.label8.ForeColor = System.Drawing.Color.Navy; this.txtDireccion.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.label8.Location = new System.Drawing.Point(980, 635); this.txtDireccion.Name = "txtDireccion";
this.label8.Name = "label8"; this.txtDireccion.Size = new System.Drawing.Size(275, 45);
this.label8.Size = new System.Drawing.Size(150, 39); this.txtDireccion.TabIndex = 45;
this.label8.TabIndex = 46;
this.label8.Text = "Telefono";
this.label8.TextAlign = System.Drawing.ContentAlignment.TopCenter;
//
// textBox6
//
this.textBox6.Font = new System.Drawing.Font("Microsoft Sans Serif", 25F);
this.textBox6.Location = new System.Drawing.Point(976, 694);
this.textBox6.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
this.textBox6.Name = "textBox6";
this.textBox6.Size = new System.Drawing.Size(365, 55);
this.textBox6.TabIndex = 45;
//
// textBox7
//
this.textBox7.Font = new System.Drawing.Font("Microsoft Sans Serif", 25F);
this.textBox7.Location = new System.Drawing.Point(1373, 694);
this.textBox7.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
this.textBox7.Name = "textBox7";
this.textBox7.Size = new System.Drawing.Size(365, 55);
this.textBox7.TabIndex = 47;
//
// label9
//
this.label9.AutoSize = true;
this.label9.Font = new System.Drawing.Font("Microsoft Sans Serif", 20F);
this.label9.ForeColor = System.Drawing.Color.Navy;
this.label9.Location = new System.Drawing.Point(1377, 652);
this.label9.Name = "label9";
this.label9.Size = new System.Drawing.Size(150, 39);
this.label9.TabIndex = 48;
this.label9.Text = "Telefono";
this.label9.TextAlign = System.Drawing.ContentAlignment.TopCenter;
//
// button9
//
this.button9.Font = new System.Drawing.Font("Microsoft Sans Serif", 15F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.button9.Location = new System.Drawing.Point(1460, 815);
this.button9.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
this.button9.Name = "button9";
this.button9.Size = new System.Drawing.Size(171, 70);
this.button9.TabIndex = 52;
this.button9.Text = "Eliminar";
this.button9.UseVisualStyleBackColor = true;
//
// button8
//
this.button8.Font = new System.Drawing.Font("Microsoft Sans Serif", 15F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.button8.Location = new System.Drawing.Point(1260, 815);
this.button8.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
this.button8.Name = "button8";
this.button8.Size = new System.Drawing.Size(171, 70);
this.button8.TabIndex = 51;
this.button8.Text = "Editar";
this.button8.UseVisualStyleBackColor = true;
//
// button7
//
this.button7.Font = new System.Drawing.Font("Microsoft Sans Serif", 15F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.button7.Location = new System.Drawing.Point(1060, 815);
this.button7.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
this.button7.Name = "button7";
this.button7.Size = new System.Drawing.Size(171, 70);
this.button7.TabIndex = 50;
this.button7.Text = "Buscar";
this.button7.UseVisualStyleBackColor = true;
//
// button6
//
this.button6.Font = new System.Drawing.Font("Microsoft Sans Serif", 15F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.button6.Location = new System.Drawing.Point(861, 815);
this.button6.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
this.button6.Name = "button6";
this.button6.Size = new System.Drawing.Size(171, 70);
this.button6.TabIndex = 49;
this.button6.Text = "Agregar";
this.button6.UseVisualStyleBackColor = true;
// //
// horafecha // horafecha
// //
@@ -433,9 +237,10 @@
this.lblfecha.AutoSize = true; this.lblfecha.AutoSize = true;
this.lblfecha.Font = new System.Drawing.Font("Microsoft Sans Serif", 30F); this.lblfecha.Font = new System.Drawing.Font("Microsoft Sans Serif", 30F);
this.lblfecha.ForeColor = System.Drawing.Color.Navy; this.lblfecha.ForeColor = System.Drawing.Color.Navy;
this.lblfecha.Location = new System.Drawing.Point(725, 142); this.lblfecha.Location = new System.Drawing.Point(544, 115);
this.lblfecha.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.lblfecha.Name = "lblfecha"; 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 = 54; this.lblfecha.TabIndex = 54;
this.lblfecha.Text = "label2"; this.lblfecha.Text = "label2";
this.lblfecha.TextAlign = System.Drawing.ContentAlignment.TopCenter; this.lblfecha.TextAlign = System.Drawing.ContentAlignment.TopCenter;
@@ -445,87 +250,61 @@
this.lblhora.AutoSize = true; this.lblhora.AutoSize = true;
this.lblhora.Font = new System.Drawing.Font("Microsoft Sans Serif", 60F); this.lblhora.Font = new System.Drawing.Font("Microsoft Sans Serif", 60F);
this.lblhora.ForeColor = System.Drawing.Color.MediumBlue; this.lblhora.ForeColor = System.Drawing.Color.MediumBlue;
this.lblhora.Location = new System.Drawing.Point(913, 23); this.lblhora.Location = new System.Drawing.Point(685, 19);
this.lblhora.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.lblhora.Name = "lblhora"; 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 = 53; this.lblhora.TabIndex = 53;
this.lblhora.Text = "label1"; this.lblhora.Text = "label1";
// //
// responsablecb // txtTelefono
// //
this.responsablecb.Font = new System.Drawing.Font("Microsoft Sans Serif", 20F); this.txtTelefono.Font = new System.Drawing.Font("Microsoft Sans Serif", 25F);
this.responsablecb.FormattingEnabled = true; this.txtTelefono.Location = new System.Drawing.Point(303, 586);
this.responsablecb.Items.AddRange(new object[] { this.txtTelefono.Margin = new System.Windows.Forms.Padding(2);
"Fabian Herrera", this.txtTelefono.Name = "txtTelefono";
"Cristofer Perez ", this.txtTelefono.Size = new System.Drawing.Size(275, 45);
"Angel Alexander", this.txtTelefono.TabIndex = 56;
"Emilio Urenda"});
this.responsablecb.Location = new System.Drawing.Point(565, 711);
this.responsablecb.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
this.responsablecb.Name = "responsablecb";
this.responsablecb.Size = new System.Drawing.Size(353, 46);
this.responsablecb.TabIndex = 55;
// //
// comboBox1 // label1
// //
this.comboBox1.Font = new System.Drawing.Font("Microsoft Sans Serif", 20F); this.label1.AutoSize = true;
this.comboBox1.FormattingEnabled = true; this.label1.Font = new System.Drawing.Font("Microsoft Sans Serif", 20F);
this.comboBox1.Items.AddRange(new object[] { this.label1.ForeColor = System.Drawing.Color.Navy;
"Enviado", this.label1.Location = new System.Drawing.Point(297, 541);
"Completado"}); this.label1.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.comboBox1.Location = new System.Drawing.Point(421, 839); this.label1.Name = "label1";
this.comboBox1.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); this.label1.Size = new System.Drawing.Size(120, 31);
this.comboBox1.Name = "comboBox1"; this.label1.TabIndex = 55;
this.comboBox1.Size = new System.Drawing.Size(353, 46); this.label1.Text = "Telefono";
this.comboBox1.TabIndex = 56; this.label1.TextAlign = System.Drawing.ContentAlignment.TopCenter;
// //
// label10 // panelEnvio
// //
this.label10.AutoSize = true; this.panelEnvio.AutoScroll = true;
this.label10.Font = new System.Drawing.Font("Microsoft Sans Serif", 20F); this.panelEnvio.Location = new System.Drawing.Point(650, 312);
this.label10.ForeColor = System.Drawing.Color.Navy; this.panelEnvio.Name = "panelEnvio";
this.label10.Location = new System.Drawing.Point(415, 788); this.panelEnvio.Size = new System.Drawing.Size(708, 379);
this.label10.Name = "label10"; this.panelEnvio.TabIndex = 57;
this.label10.Size = new System.Drawing.Size(123, 39); this.panelEnvio.Paint += new System.Windows.Forms.PaintEventHandler(this.panelEnvio_Paint);
this.label10.TabIndex = 57;
this.label10.Text = "Estado";
this.label10.TextAlign = System.Drawing.ContentAlignment.TopCenter;
this.label10.Click += new System.EventHandler(this.label10_Click);
// //
// envios // envios
// //
this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F); this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(1371, 965); this.ClientSize = new System.Drawing.Size(1370, 772);
this.ControlBox = false; this.ControlBox = false;
this.Controls.Add(this.label10); this.Controls.Add(this.panelEnvio);
this.Controls.Add(this.comboBox1); this.Controls.Add(this.txtTelefono);
this.Controls.Add(this.responsablecb); this.Controls.Add(this.label1);
this.Controls.Add(this.lblfecha); this.Controls.Add(this.lblfecha);
this.Controls.Add(this.lblhora); this.Controls.Add(this.lblhora);
this.Controls.Add(this.button9); this.Controls.Add(this.txtDireccion);
this.Controls.Add(this.button8);
this.Controls.Add(this.button7);
this.Controls.Add(this.button6);
this.Controls.Add(this.label9);
this.Controls.Add(this.textBox7);
this.Controls.Add(this.label8);
this.Controls.Add(this.textBox6);
this.Controls.Add(this.label7); this.Controls.Add(this.label7);
this.Controls.Add(this.label6);
this.Controls.Add(this.label5);
this.Controls.Add(this.label4); this.Controls.Add(this.label4);
this.Controls.Add(this.label3); this.Controls.Add(this.txtCliente);
this.Controls.Add(this.label2);
this.Controls.Add(this.label1);
this.Controls.Add(this.textBox5);
this.Controls.Add(this.textBox3);
this.Controls.Add(this.textBox4);
this.Controls.Add(this.textBox2);
this.Controls.Add(this.dateTimePicker1);
this.Controls.Add(this.textBox1);
this.Controls.Add(this.flowLayoutPanel1); 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 = "envios"; this.Name = "envios";
this.WindowState = System.Windows.Forms.FormWindowState.Maximized; this.WindowState = System.Windows.Forms.FormWindowState.Maximized;
this.Load += new System.EventHandler(this.envios_Load); this.Load += new System.EventHandler(this.envios_Load);
@@ -548,34 +327,17 @@
private System.Windows.Forms.Button button4; private System.Windows.Forms.Button button4;
private System.Windows.Forms.Button button5; private System.Windows.Forms.Button button5;
private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel1; private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel1;
private System.Windows.Forms.TextBox textBox1; private System.Windows.Forms.TextBox txtCliente;
private System.Windows.Forms.DateTimePicker dateTimePicker1;
private System.Windows.Forms.TextBox textBox2;
private System.Windows.Forms.TextBox textBox3;
private System.Windows.Forms.TextBox textBox4;
private System.Windows.Forms.TextBox textBox5;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.Label label4; private System.Windows.Forms.Label label4;
private System.Windows.Forms.Label label5;
private System.Windows.Forms.Label label6;
private System.Windows.Forms.Label label7; private System.Windows.Forms.Label label7;
private System.Windows.Forms.Label label8; private System.Windows.Forms.TextBox txtDireccion;
private System.Windows.Forms.TextBox textBox6;
private System.Windows.Forms.TextBox textBox7;
private System.Windows.Forms.Label label9;
private System.Windows.Forms.Button button9;
private System.Windows.Forms.Button button8;
private System.Windows.Forms.Button button7;
private System.Windows.Forms.Button button6;
private System.Windows.Forms.Timer horafecha; private System.Windows.Forms.Timer horafecha;
private System.Windows.Forms.Timer timer1; private System.Windows.Forms.Timer timer1;
private System.Windows.Forms.Timer timer2; private System.Windows.Forms.Timer timer2;
private System.Windows.Forms.Label lblfecha; private System.Windows.Forms.Label lblfecha;
private System.Windows.Forms.Label lblhora; private System.Windows.Forms.Label lblhora;
private System.Windows.Forms.ComboBox responsablecb; private System.Windows.Forms.TextBox txtTelefono;
private System.Windows.Forms.ComboBox comboBox1; private System.Windows.Forms.Label label1;
private System.Windows.Forms.Label label10; private System.Windows.Forms.FlowLayoutPanel panelEnvio;
} }
} }
+47 -1
View File
@@ -1,4 +1,5 @@
using compabetov2.database.modelos; using compabetov2.database;
using compabetov2.database.modelos;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.ComponentModel; using System.ComponentModel;
@@ -17,9 +18,44 @@ namespace compabetov2
public envios(LoginModel loginPrincipal) public envios(LoginModel loginPrincipal)
{ {
InitializeComponent(); InitializeComponent();
llenarPanel();
this.loginPrincipal = loginPrincipal; this.loginPrincipal = loginPrincipal;
} }
private void llenarPanel()
{
panelEnvio.Controls.Clear();
List<Envio> envios = service.conseguirEnvio();
panelEnvio.BackColor = Color.Aqua;
foreach(Envio envio in envios)
{
TableLayoutPanel carta = new TableLayoutPanel();
carta.ColumnCount = 1;
carta.RowCount = 2;
carta.RowStyles.Add(new RowStyle(SizeType.Percent, 80F));
carta.RowStyles.Add(new RowStyle(SizeType.Percent, 20F));
carta.Width = 700;
carta.Height = 150;
carta.BackColor = Color.Gray;
FlowLayoutPanel infoPanel = new FlowLayoutPanel();
infoPanel.FlowDirection = FlowDirection.TopDown;
infoPanel.Dock = DockStyle.Fill;
Label lbFecha = new Label();
lbFecha.Text = $"Fecha: {envio.fecha}";
Label lbDireaccion = new Label();
lbDireaccion.Text = $"Direccion: {envio.direccion}";
panelEnvio.Controls.Add(carta);
}
}
private void button1_Click(object sender, EventArgs e) private void button1_Click(object sender, EventArgs e)
{ {
// Cerrar el formulario de ventas // Cerrar el formulario de ventas
@@ -63,5 +99,15 @@ namespace compabetov2
{ {
} }
private void label4_Click(object sender, EventArgs e)
{
}
private void panelEnvio_Paint(object sender, PaintEventArgs e)
{
}
} }
} }
+81 -61
View File
@@ -50,6 +50,7 @@
this.bntImprimir = new System.Windows.Forms.Button(); this.bntImprimir = new System.Windows.Forms.Button();
this.responsablecb = new System.Windows.Forms.ComboBox(); this.responsablecb = new System.Windows.Forms.ComboBox();
this.btnFiar = new System.Windows.Forms.Button(); this.btnFiar = new System.Windows.Forms.Button();
this.btnEnviar = new System.Windows.Forms.Button();
this.flowLayoutPanel2.SuspendLayout(); this.flowLayoutPanel2.SuspendLayout();
this.panel1.SuspendLayout(); this.panel1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.pictureBox9)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.pictureBox9)).BeginInit();
@@ -68,9 +69,10 @@
this.lblfecha.AutoSize = true; this.lblfecha.AutoSize = true;
this.lblfecha.Font = new System.Drawing.Font("Microsoft Sans Serif", 30F); this.lblfecha.Font = new System.Drawing.Font("Microsoft Sans Serif", 30F);
this.lblfecha.ForeColor = System.Drawing.Color.Navy; 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.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.TabIndex = 13;
this.lblfecha.Text = "label2"; this.lblfecha.Text = "label2";
this.lblfecha.TextAlign = System.Drawing.ContentAlignment.TopCenter; this.lblfecha.TextAlign = System.Drawing.ContentAlignment.TopCenter;
@@ -81,9 +83,10 @@
this.lblhora.AutoSize = true; this.lblhora.AutoSize = true;
this.lblhora.Font = new System.Drawing.Font("Microsoft Sans Serif", 60F); this.lblhora.Font = new System.Drawing.Font("Microsoft Sans Serif", 60F);
this.lblhora.ForeColor = System.Drawing.Color.MediumBlue; 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.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.TabIndex = 12;
this.lblhora.Text = "label1"; this.lblhora.Text = "label1";
this.lblhora.Click += new System.EventHandler(this.lblhora_Click); this.lblhora.Click += new System.EventHandler(this.lblhora_Click);
@@ -94,10 +97,10 @@
this.flowLayoutPanel2.Controls.Add(this.panel1); this.flowLayoutPanel2.Controls.Add(this.panel1);
this.flowLayoutPanel2.Controls.Add(this.label1); this.flowLayoutPanel2.Controls.Add(this.label1);
this.flowLayoutPanel2.Controls.Add(this.labeltotal); this.flowLayoutPanel2.Controls.Add(this.labeltotal);
this.flowLayoutPanel2.Location = new System.Drawing.Point(1605, -1); this.flowLayoutPanel2.Location = new System.Drawing.Point(1204, -1);
this.flowLayoutPanel2.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); this.flowLayoutPanel2.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.flowLayoutPanel2.Name = "flowLayoutPanel2"; 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.TabIndex = 11;
this.flowLayoutPanel2.Paint += new System.Windows.Forms.PaintEventHandler(this.flowLayoutPanel2_Paint); this.flowLayoutPanel2.Paint += new System.Windows.Forms.PaintEventHandler(this.flowLayoutPanel2_Paint);
// //
@@ -105,17 +108,17 @@
// //
this.panel1.BackColor = System.Drawing.Color.Transparent; this.panel1.BackColor = System.Drawing.Color.Transparent;
this.panel1.Controls.Add(this.pictureBox9); this.panel1.Controls.Add(this.pictureBox9);
this.panel1.Location = new System.Drawing.Point(3, 2); this.panel1.Location = new System.Drawing.Point(2, 2);
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.Name = "panel1";
this.panel1.Size = new System.Drawing.Size(312, 263); this.panel1.Size = new System.Drawing.Size(234, 214);
this.panel1.TabIndex = 8; this.panel1.TabIndex = 8;
// //
// pictureBox9 // pictureBox9
// //
this.pictureBox9.Image = global::compabetov2.Properties.Resources.HomeroMenu; this.pictureBox9.Image = global::compabetov2.Properties.Resources.HomeroMenu;
this.pictureBox9.Location = new System.Drawing.Point(64, 34); this.pictureBox9.Location = new System.Drawing.Point(48, 28);
this.pictureBox9.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); this.pictureBox9.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.pictureBox9.Name = "pictureBox9"; this.pictureBox9.Name = "pictureBox9";
this.pictureBox9.Size = new System.Drawing.Size(190, 197); this.pictureBox9.Size = new System.Drawing.Size(190, 197);
this.pictureBox9.SizeMode = System.Windows.Forms.PictureBoxSizeMode.AutoSize; this.pictureBox9.SizeMode = System.Windows.Forms.PictureBoxSizeMode.AutoSize;
@@ -128,9 +131,10 @@
this.label1.BackColor = System.Drawing.Color.Transparent; this.label1.BackColor = System.Drawing.Color.Transparent;
this.label1.Font = new System.Drawing.Font("Microsoft Sans Serif", 20F); this.label1.Font = new System.Drawing.Font("Microsoft Sans Serif", 20F);
this.label1.ForeColor = System.Drawing.Color.AliceBlue; 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.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.TabIndex = 17;
this.label1.Text = "Total:"; this.label1.Text = "Total:";
this.label1.Click += new System.EventHandler(this.label1_Click); this.label1.Click += new System.EventHandler(this.label1_Click);
@@ -141,9 +145,10 @@
this.labeltotal.BackColor = System.Drawing.Color.Transparent; this.labeltotal.BackColor = System.Drawing.Color.Transparent;
this.labeltotal.Font = new System.Drawing.Font("Microsoft Sans Serif", 20F); this.labeltotal.Font = new System.Drawing.Font("Microsoft Sans Serif", 20F);
this.labeltotal.ForeColor = System.Drawing.Color.AliceBlue; 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.Name = "labeltotal";
this.labeltotal.Size = new System.Drawing.Size(0, 39); this.labeltotal.Size = new System.Drawing.Size(0, 31);
this.labeltotal.TabIndex = 18; this.labeltotal.TabIndex = 18;
// //
// flowLayoutPanel1 // flowLayoutPanel1
@@ -155,26 +160,26 @@
this.flowLayoutPanel1.Controls.Add(this.button3); this.flowLayoutPanel1.Controls.Add(this.button3);
this.flowLayoutPanel1.Controls.Add(this.button5); this.flowLayoutPanel1.Controls.Add(this.button5);
this.flowLayoutPanel1.Location = new System.Drawing.Point(-1, 2); 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.Name = "flowLayoutPanel1";
this.flowLayoutPanel1.Size = new System.Drawing.Size(324, 1199); this.flowLayoutPanel1.Size = new System.Drawing.Size(243, 974);
this.flowLayoutPanel1.TabIndex = 8; this.flowLayoutPanel1.TabIndex = 8;
// //
// panel2 // panel2
// //
this.panel2.BackColor = System.Drawing.Color.Transparent; this.panel2.BackColor = System.Drawing.Color.Transparent;
this.panel2.Controls.Add(this.pictureBox7); this.panel2.Controls.Add(this.pictureBox7);
this.panel2.Location = new System.Drawing.Point(3, 2); this.panel2.Location = new System.Drawing.Point(2, 2);
this.panel2.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); this.panel2.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.panel2.Name = "panel2"; 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; this.panel2.TabIndex = 8;
// //
// pictureBox7 // pictureBox7
// //
this.pictureBox7.Image = global::compabetov2.Properties.Resources.HomeroMenu; this.pictureBox7.Image = global::compabetov2.Properties.Resources.HomeroMenu;
this.pictureBox7.Location = new System.Drawing.Point(64, 34); this.pictureBox7.Location = new System.Drawing.Point(48, 28);
this.pictureBox7.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); this.pictureBox7.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.pictureBox7.Name = "pictureBox7"; this.pictureBox7.Name = "pictureBox7";
this.pictureBox7.Size = new System.Drawing.Size(190, 197); this.pictureBox7.Size = new System.Drawing.Size(190, 197);
this.pictureBox7.SizeMode = System.Windows.Forms.PictureBoxSizeMode.AutoSize; this.pictureBox7.SizeMode = System.Windows.Forms.PictureBoxSizeMode.AutoSize;
@@ -190,11 +195,11 @@
this.button1.ForeColor = System.Drawing.SystemColors.ButtonHighlight; this.button1.ForeColor = System.Drawing.SystemColors.ButtonHighlight;
this.button1.Image = global::compabetov2.Properties.Resources.Menui1; this.button1.Image = global::compabetov2.Properties.Resources.Menui1;
this.button1.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft; this.button1.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
this.button1.Location = new System.Drawing.Point(3, 269); this.button1.Location = new System.Drawing.Point(2, 220);
this.button1.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); this.button1.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.button1.Name = "button1"; this.button1.Name = "button1";
this.button1.Padding = new System.Windows.Forms.Padding(51, 0, 0, 0); this.button1.Padding = new System.Windows.Forms.Padding(38, 0, 0, 0);
this.button1.Size = new System.Drawing.Size(312, 114); this.button1.Size = new System.Drawing.Size(234, 93);
this.button1.TabIndex = 8; this.button1.TabIndex = 8;
this.button1.Text = "Menú"; this.button1.Text = "Menú";
this.button1.UseVisualStyleBackColor = false; this.button1.UseVisualStyleBackColor = false;
@@ -209,11 +214,11 @@
this.button2.ForeColor = System.Drawing.SystemColors.ButtonHighlight; this.button2.ForeColor = System.Drawing.SystemColors.ButtonHighlight;
this.button2.Image = global::compabetov2.Properties.Resources.estadisticasi; this.button2.Image = global::compabetov2.Properties.Resources.estadisticasi;
this.button2.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft; this.button2.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
this.button2.Location = new System.Drawing.Point(3, 387); this.button2.Location = new System.Drawing.Point(2, 317);
this.button2.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); this.button2.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.button2.Name = "button2"; this.button2.Name = "button2";
this.button2.Padding = new System.Windows.Forms.Padding(51, 0, 0, 0); this.button2.Padding = new System.Windows.Forms.Padding(38, 0, 0, 0);
this.button2.Size = new System.Drawing.Size(312, 114); this.button2.Size = new System.Drawing.Size(234, 93);
this.button2.TabIndex = 9; this.button2.TabIndex = 9;
this.button2.Text = "Estadisticas"; this.button2.Text = "Estadisticas";
this.button2.UseVisualStyleBackColor = false; this.button2.UseVisualStyleBackColor = false;
@@ -227,11 +232,11 @@
this.button3.ForeColor = System.Drawing.SystemColors.ButtonHighlight; this.button3.ForeColor = System.Drawing.SystemColors.ButtonHighlight;
this.button3.Image = global::compabetov2.Properties.Resources.productoi; this.button3.Image = global::compabetov2.Properties.Resources.productoi;
this.button3.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft; this.button3.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
this.button3.Location = new System.Drawing.Point(3, 505); this.button3.Location = new System.Drawing.Point(2, 414);
this.button3.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); this.button3.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.button3.Name = "button3"; this.button3.Name = "button3";
this.button3.Padding = new System.Windows.Forms.Padding(51, 0, 0, 0); this.button3.Padding = new System.Windows.Forms.Padding(38, 0, 0, 0);
this.button3.Size = new System.Drawing.Size(312, 114); this.button3.Size = new System.Drawing.Size(234, 93);
this.button3.TabIndex = 10; this.button3.TabIndex = 10;
this.button3.Text = "Productos"; this.button3.Text = "Productos";
this.button3.UseVisualStyleBackColor = false; this.button3.UseVisualStyleBackColor = false;
@@ -245,11 +250,11 @@
this.button5.ForeColor = System.Drawing.SystemColors.ButtonHighlight; this.button5.ForeColor = System.Drawing.SystemColors.ButtonHighlight;
this.button5.Image = global::compabetov2.Properties.Resources.sesionc; this.button5.Image = global::compabetov2.Properties.Resources.sesionc;
this.button5.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft; this.button5.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
this.button5.Location = new System.Drawing.Point(3, 623); this.button5.Location = new System.Drawing.Point(2, 511);
this.button5.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); this.button5.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.button5.Name = "button5"; this.button5.Name = "button5";
this.button5.Padding = new System.Windows.Forms.Padding(51, 0, 0, 0); this.button5.Padding = new System.Windows.Forms.Padding(38, 0, 0, 0);
this.button5.Size = new System.Drawing.Size(312, 114); this.button5.Size = new System.Drawing.Size(234, 93);
this.button5.TabIndex = 12; this.button5.TabIndex = 12;
this.button5.Text = "Salir"; this.button5.Text = "Salir";
this.button5.UseVisualStyleBackColor = false; this.button5.UseVisualStyleBackColor = false;
@@ -257,32 +262,32 @@
// flowLayoutPanel3 // flowLayoutPanel3
// //
this.flowLayoutPanel3.AutoScroll = true; this.flowLayoutPanel3.AutoScroll = true;
this.flowLayoutPanel3.Location = new System.Drawing.Point(325, 283); this.flowLayoutPanel3.Location = new System.Drawing.Point(244, 230);
this.flowLayoutPanel3.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); this.flowLayoutPanel3.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.flowLayoutPanel3.Name = "flowLayoutPanel3"; this.flowLayoutPanel3.Name = "flowLayoutPanel3";
this.flowLayoutPanel3.Size = new System.Drawing.Size(1273, 946); this.flowLayoutPanel3.Size = new System.Drawing.Size(955, 769);
this.flowLayoutPanel3.TabIndex = 14; this.flowLayoutPanel3.TabIndex = 14;
this.flowLayoutPanel3.Paint += new System.Windows.Forms.PaintEventHandler(this.flowLayoutPanel3_Paint); this.flowLayoutPanel3.Paint += new System.Windows.Forms.PaintEventHandler(this.flowLayoutPanel3_Paint);
// //
// txtbusqueda // txtbusqueda
// //
this.txtbusqueda.Font = new System.Drawing.Font("Poppins", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 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.Location = new System.Drawing.Point(247, 178);
this.txtbusqueda.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); this.txtbusqueda.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.txtbusqueda.Name = "txtbusqueda"; this.txtbusqueda.Name = "txtbusqueda";
this.txtbusqueda.Size = new System.Drawing.Size(702, 45); this.txtbusqueda.Size = new System.Drawing.Size(528, 30);
this.txtbusqueda.TabIndex = 15; this.txtbusqueda.TabIndex = 15;
this.txtbusqueda.TextChanged += new System.EventHandler(this.txtbusqueda_TextChanged); this.txtbusqueda.TextChanged += new System.EventHandler(this.txtbusqueda_TextChanged);
// //
// bntImprimir // bntImprimir
// //
this.bntImprimir.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(27)))), ((int)(((byte)(104)))), ((int)(((byte)(255))))); this.bntImprimir.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(27)))), ((int)(((byte)(104)))), ((int)(((byte)(255)))));
this.bntImprimir.Font = new System.Drawing.Font("Poppins", 15F); this.bntImprimir.Font = new System.Drawing.Font("Microsoft Sans Serif", 15F);
this.bntImprimir.ForeColor = System.Drawing.Color.Transparent; this.bntImprimir.ForeColor = System.Drawing.Color.Transparent;
this.bntImprimir.Location = new System.Drawing.Point(1055, 210); this.bntImprimir.Location = new System.Drawing.Point(791, 171);
this.bntImprimir.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); this.bntImprimir.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.bntImprimir.Name = "bntImprimir"; 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.TabIndex = 17;
this.bntImprimir.Text = "Vender"; this.bntImprimir.Text = "Vender";
this.bntImprimir.UseVisualStyleBackColor = false; this.bntImprimir.UseVisualStyleBackColor = false;
@@ -290,40 +295,54 @@
// //
// responsablecb // responsablecb
// //
this.responsablecb.Font = new System.Drawing.Font("Poppins", 15F); this.responsablecb.Font = new System.Drawing.Font("Microsoft Sans Serif", 15F);
this.responsablecb.FormattingEnabled = true; this.responsablecb.FormattingEnabled = true;
this.responsablecb.Items.AddRange(new object[] { this.responsablecb.Items.AddRange(new object[] {
"Fabian Herrera", "Fabian Herrera",
"Cristofer Perez ", "Cristofer Perez ",
"Angel Alexander", "Angel Alexander",
"Emilio Urenda"}); "Emilio Urenda"});
this.responsablecb.Location = new System.Drawing.Point(1371, 212); this.responsablecb.Location = new System.Drawing.Point(1028, 172);
this.responsablecb.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); this.responsablecb.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.responsablecb.Name = "responsablecb"; this.responsablecb.Name = "responsablecb";
this.responsablecb.Size = new System.Drawing.Size(227, 52); this.responsablecb.Size = new System.Drawing.Size(171, 33);
this.responsablecb.TabIndex = 18; this.responsablecb.TabIndex = 18;
this.responsablecb.SelectedIndexChanged += new System.EventHandler(this.responsablecb_SelectedIndexChanged); this.responsablecb.SelectedIndexChanged += new System.EventHandler(this.responsablecb_SelectedIndexChanged);
// //
// btnFiar // btnFiar
// //
this.btnFiar.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(27)))), ((int)(((byte)(104)))), ((int)(((byte)(255))))); this.btnFiar.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(27)))), ((int)(((byte)(104)))), ((int)(((byte)(255)))));
this.btnFiar.Font = new System.Drawing.Font("Poppins", 15F); this.btnFiar.Font = new System.Drawing.Font("Microsoft Sans Serif", 15F);
this.btnFiar.ForeColor = System.Drawing.Color.Transparent; this.btnFiar.ForeColor = System.Drawing.Color.Transparent;
this.btnFiar.Location = new System.Drawing.Point(1213, 210); this.btnFiar.Location = new System.Drawing.Point(910, 171);
this.btnFiar.Margin = new System.Windows.Forms.Padding(4);
this.btnFiar.Name = "btnFiar"; 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.TabIndex = 19;
this.btnFiar.Text = "Cuenta"; this.btnFiar.Text = "Cuenta";
this.btnFiar.UseVisualStyleBackColor = false; this.btnFiar.UseVisualStyleBackColor = false;
this.btnFiar.Click += new System.EventHandler(this.btnFiar_Click); this.btnFiar.Click += new System.EventHandler(this.btnFiar_Click);
// //
// btnEnviar
//
this.btnEnviar.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(27)))), ((int)(((byte)(104)))), ((int)(((byte)(255)))));
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(791, 111);
this.btnEnviar.Margin = new System.Windows.Forms.Padding(2);
this.btnEnviar.Name = "btnEnviar";
this.btnEnviar.Size = new System.Drawing.Size(113, 44);
this.btnEnviar.TabIndex = 20;
this.btnEnviar.Text = "Enviar";
this.btnEnviar.UseVisualStyleBackColor = false;
this.btnEnviar.Click += new System.EventHandler(this.btnEnviar_Click);
//
// vender // 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.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(1827, 884); this.ClientSize = new System.Drawing.Size(1028, 627);
this.ControlBox = false; this.ControlBox = false;
this.Controls.Add(this.btnEnviar);
this.Controls.Add(this.btnFiar); this.Controls.Add(this.btnFiar);
this.Controls.Add(this.responsablecb); this.Controls.Add(this.responsablecb);
this.Controls.Add(this.bntImprimir); this.Controls.Add(this.bntImprimir);
@@ -333,7 +352,7 @@
this.Controls.Add(this.lblhora); this.Controls.Add(this.lblhora);
this.Controls.Add(this.flowLayoutPanel2); this.Controls.Add(this.flowLayoutPanel2);
this.Controls.Add(this.flowLayoutPanel1); 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.Name = "vender";
this.WindowState = System.Windows.Forms.FormWindowState.Maximized; this.WindowState = System.Windows.Forms.FormWindowState.Maximized;
this.Load += new System.EventHandler(this.vender_Load); this.Load += new System.EventHandler(this.vender_Load);
@@ -374,5 +393,6 @@
private System.Windows.Forms.Button bntImprimir; private System.Windows.Forms.Button bntImprimir;
private System.Windows.Forms.ComboBox responsablecb; private System.Windows.Forms.ComboBox responsablecb;
private System.Windows.Forms.Button btnFiar; private System.Windows.Forms.Button btnFiar;
private System.Windows.Forms.Button btnEnviar;
} }
} }
+58
View File
@@ -662,6 +662,64 @@ namespace compabetov2
{ {
}
private List<DetalleEnvioModel> listaProductosEnvio()
{
List<DetalleEnvioModel> detallesEnvio = new List<DetalleEnvioModel>();
int contador_saltar_2_vueltas = 1;
foreach (var item in flowLayoutPanel2.Controls)
{
if (contador_saltar_2_vueltas <= 3)
{
contador_saltar_2_vueltas++;
continue;
}
TableLayoutPanel panelProducto = item as TableLayoutPanel;
TableLayoutPanel panelInfo = panelProducto.Controls[1] as TableLayoutPanel;
PictureBox pic = panelProducto.Controls[0] as PictureBox;
Label idLabel = null;
foreach (Control control in pic.Controls)
{
if (control is Label)
{
idLabel = (Label)control;
break;
}
}
int idProducto = int.Parse(idLabel.Text);
Producto producto = new Producto(idProducto);
Label Lbcantidad = panelInfo.Controls[2] as Label;
string textcantidad = Lbcantidad.Text;
string[] cantidadCadenas = textcantidad.Split(' ');
int cantidad = int.Parse(cantidadCadenas[1]);
DetalleEnvioModel detalleEnvio = new DetalleEnvioModel(-1, producto, cantidad);
detallesEnvio.Add(detalleEnvio);
}
return detallesEnvio;
}
private void btnEnviar_Click(object sender, EventArgs e)
{
List<DetalleEnvioModel> detallesEnvio = listaProductosEnvio();
string responsable = responsablecb.Text.Equals("") ? loginPrincipal.usuario : responsablecb.Text;
Envio envio = new Envio(-1, DateTime.Now.ToString(), "", "", responsable);
if(detallesEnvio.Count > 0){
if (service.crearEnvio(envio, detallesEnvio))
{
MessageBox.Show("Envio hecho");
}
else
{
MessageBox.Show("No hay ningun producto agregado");
}
}
} }
} }
} }
Binary file not shown.
Binary file not shown.
BIN
View File
Binary file not shown.
+2
View File
@@ -106,6 +106,8 @@
<Reference Include="System.Xml" /> <Reference Include="System.Xml" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Compile Include="database\modelos\DetalleEnvioModel.cs" />
<Compile Include="database\modelos\Envio.cs" />
<Compile Include="Empleados\AgregarEmpleado1.cs"> <Compile Include="Empleados\AgregarEmpleado1.cs">
<SubType>Form</SubType> <SubType>Form</SubType>
</Compile> </Compile>
+128
View File
@@ -3,6 +3,7 @@ using System.Collections;
using System.Collections.Generic; using System.Collections.Generic;
using System.Data.SQLite; using System.Data.SQLite;
using System.Diagnostics.Contracts; using System.Diagnostics.Contracts;
using System.Globalization;
using System.IO; using System.IO;
using System.Linq; using System.Linq;
using System.Security.Policy; using System.Security.Policy;
@@ -1162,6 +1163,126 @@ namespace compabetov2.database
} }
} }
public static Dictionary<string, dynamic> filtrarVentaFechaMes(DateTime fecha)
{
Dictionary<string, dynamic> estadisticas = new Dictionary<string, dynamic>();
SQLiteDataReader reader = DAO.filtrarVentaFechaMesDAO(fecha);
string formatoFecha = "dd/MM/yyyy";
decimal totalDia = 0;
decimal totalMes = 0;
List<VentaModel> ventas = new List<VentaModel>();
while (reader.Read())
{
VentaModel venta = new VentaModel(
(decimal)reader["total"],
(int)reader.GetInt64(0),
reader.GetString(1)
);
string[] cadenasFech = venta.fecha.Split(' ');
DateTime.TryParseExact(cadenasFech[0], formatoFecha, CultureInfo.InvariantCulture, DateTimeStyles.None, out DateTime fechaVenta);
if (fecha.Day == fechaVenta.Day)
{
totalDia += venta.total;
}
totalMes += venta.total;
ventas.Add(venta);
}
estadisticas.Add("ventasDia", totalDia);
estadisticas.Add("ventasMes", totalMes);
return estadisticas;
}
public static bool crearEnvio(Envio envio, List<DetalleEnvioModel> detallesEnvio)
{
return DAO.crearEnvioDAO(envio, detallesEnvio);
}
public static bool crearEnvioDAO(Envio envio, List<DetalleEnvioModel> detallesEnvio)
{
var db_conexion = new Conexion();
try
{
using (SQLiteConnection conexion = db_conexion.get_connection())
{
conexion.Open();
using (var transaccion = conexion.BeginTransaction())
{
try
{
string sqlEnvio = "INSERT INTO envios (fecha, direccion, telefono) VALUES(@fecha,@direccion , @telefono);";
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.ExecuteNonQuery();
SQLiteCommand commandConsulta = new SQLiteCommand(sqlIdCuenta, conexion);
SQLiteDataReader reader = commandConsulta.ExecuteReader();
long idEnvio = -1;
while (reader.Read())
{
idEnvio = reader.GetInt64(0);
}
foreach (DetalleEnvioModel detalleEnvio in detallesEnvio)
{
SQLiteCommand commandDetalle = new SQLiteCommand(sqlDetalle, conexion);
commandDetalle.Parameters.AddWithValue("@fk_envios", idEnvio);
commandDetalle.Parameters.AddWithValue("@fk_producto", detalleEnvio.producto.idProducto);
commandDetalle.Parameters.AddWithValue("@cantidad", detalleEnvio.cantidad);
commandDetalle.ExecuteNonQuery();
}
transaccion.Commit();
return true;
}
catch (SQLiteException ex)
{
transaccion.Rollback();
MessageBox.Show(ex.Message);
return false;
}
}
}
}
catch (SQLiteException ex)
{
MessageBox.Show(ex.Message);
return false;
}
}
public static SQLiteDataReader conseguirEnvioDAO()
{
SQLiteDataReader reader = null;
var db_conexion = new Conexion();
try
{
SQLiteConnection conexion = db_conexion.get_connection();
conexion.Open();
string sql = "SELECT * FROM envios";
SQLiteCommand command = new SQLiteCommand(sql, conexion);
reader = command.ExecuteReader();
return reader;
}
catch (SQLiteException ex)
{
MessageBox.Show(ex.Message);
return reader;
}
}
private static void crearDB() private static void crearDB()
{ {
var db_conexion = new Conexion(); var db_conexion = new Conexion();
@@ -1181,6 +1302,8 @@ namespace compabetov2.database
"DROP TABLE IF EXISTS venta", "DROP TABLE IF EXISTS venta",
"DROP TABLE IF EXISTS detalle_cuenta", "DROP TABLE IF EXISTS detalle_cuenta",
"DROP TABLE IF EXISTS cuenta", "DROP TABLE IF EXISTS cuenta",
"DROP TABLE IF EXISTS detalle_envios",
"DROP TABLE IF EXISTS envios",
"CREATE TABLE Login (idlogin INTEGER PRIMARY KEY AUTOINCREMENT, tipo TEXT NOT NULL, usuario TEXT NOT NULL, "+ "CREATE TABLE Login (idlogin INTEGER PRIMARY KEY AUTOINCREMENT, tipo TEXT NOT NULL, usuario TEXT NOT NULL, "+
"contra TEXT NOT NULL)", "contra TEXT NOT NULL)",
@@ -1212,6 +1335,11 @@ namespace compabetov2.database
"CREATE TABLE detalle_cuenta (fk_cuenta INTEGER, fk_producto INTEGER,cantidad INTEGER, PRIMARY KEY (fk_cuenta, fk_producto), " + "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))", "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 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))",
"INSERT INTO Login ( tipo, usuario, contra) VALUES('admin', 'admin', '12345');", "INSERT INTO Login ( tipo, usuario, contra) VALUES('admin', 'admin', '12345');",
"INSERT INTO Empleado ( nombre, apellidos, calle, fecha_contratacion,estado, colonia, cp, no_ext,no_int, referencia, fecha_nac, telefono,fk_idLogin) VALUES('jefe', '', '', '', '', '', '', '', '', '', '', '',1);", "INSERT INTO Empleado ( nombre, apellidos, calle, fecha_contratacion,estado, colonia, cp, no_ext,no_int, referencia, fecha_nac, telefono,fk_idLogin) VALUES('jefe', '', '', '', '', '', '', '', '', '', '', '',1);",
+22
View File
@@ -0,0 +1,22 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace compabetov2.database.modelos
{
public class DetalleEnvioModel
{
public int idEnvio;
public Producto producto;
public int cantidad;
public DetalleEnvioModel(int idEnvio, Producto producto, int cantidad)
{
this.idEnvio = idEnvio;
this.producto = producto;
this.cantidad = cantidad;
}
}
}
+25
View File
@@ -0,0 +1,25 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace compabetov2.database.modelos
{
public class Envio
{
public int id;
public string fecha;
public string direccion;
public string telefono;
public string responsable;
public Envio(int id, string fecha, string direccion, string telefono, string responsable) {
this.id = id;
this.fecha = fecha;
this.direccion = direccion;
this.telefono = telefono;
this.responsable = responsable;
}
}
}
+26
View File
@@ -315,5 +315,31 @@ namespace compabetov2.database
return estadisticas; return estadisticas;
} }
public static bool crearEnvio(Envio envio, List<DetalleEnvioModel> detallesEnvio)
{
return DAO.crearEnvio(envio, detallesEnvio);
}
public static List<Envio> conseguirEnvio()
{
List<Envio> envios = new List<Envio>();
SQLiteDataReader reader = DAO.conseguirEnvioDAO();
while (reader.Read())
{
Envio envio = new Envio(
(int)reader.GetInt64(0),
reader.GetString(1),
reader.GetString(2),
reader.GetString(3),
reader.GetString(4)
);
envios.Add(envio);
}
return envios;
}
} }
} }
Binary file not shown.
Binary file not shown.
@@ -1 +1 @@
c3fae808d3f85efa42b7f49a590857079d7d8c73d25abc018ba096b666adc8e2 baa5a2f7828187fe9319be8ca85790efc04206e668b9993f2381ee1522d51c7a
@@ -122,3 +122,6 @@ C:\Users\Googl\Documents\compabetoOG\obj\Debug\compabetov2.Empleados.AgregarEmpl
C:\Users\Googl\Documents\compabetoOG\obj\Debug\compabetov2.Empleados.AgregarLogin1.resources C:\Users\Googl\Documents\compabetoOG\obj\Debug\compabetov2.Empleados.AgregarLogin1.resources
C:\Users\Googl\Documents\compabetoOG\obj\Debug\compabetov2.Empleados.EditarEmpleado1.resources C:\Users\Googl\Documents\compabetoOG\obj\Debug\compabetov2.Empleados.EditarEmpleado1.resources
C:\Users\Googl\Documents\compabetoOG\obj\Debug\compabetov2.AgregarLogin1.resources C:\Users\Googl\Documents\compabetoOG\obj\Debug\compabetov2.AgregarLogin1.resources
C:\Users\carsu\Source\Repos\compabetoOG\obj\Debug\compabetov2.Empleados.AgregarEmpleado1.resources
C:\Users\carsu\Source\Repos\compabetoOG\obj\Debug\compabetov2.AgregarLogin1.resources
C:\Users\carsu\Source\Repos\compabetoOG\obj\Debug\compabetov2.Empleados.EditarEmpleado1.resources
Binary file not shown.
Binary file not shown.
Binary file not shown.