tengo el diseño de los forms listos y nompas me queda conectarlos al back

This commit is contained in:
fedpo
2024-12-02 18:48:59 +00:00
parent b6b1e69d0f
commit c17323ebe4
6 changed files with 439 additions and 93 deletions

View File

@@ -28,12 +28,150 @@
/// </summary> /// </summary>
private void InitializeComponent() private void InitializeComponent()
{ {
this.components = new System.ComponentModel.Container(); btnBuscar = new Button();
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; dateInicio = new DateTimePicker();
this.ClientSize = new System.Drawing.Size(800, 450); dateFin = new DateTimePicker();
this.Text = "FrmInformeFacturaPorFecha"; dgvFactura = new DataGridView();
dgvDetalles = new DataGridView();
label1 = new Label();
label2 = new Label();
label3 = new Label();
label4 = new Label();
btnEnviarEmail = new Button();
((System.ComponentModel.ISupportInitialize)dgvFactura).BeginInit();
((System.ComponentModel.ISupportInitialize)dgvDetalles).BeginInit();
SuspendLayout();
//
// btnBuscar
//
btnBuscar.Location = new Point(26, 111);
btnBuscar.Name = "btnBuscar";
btnBuscar.Size = new Size(200, 26);
btnBuscar.TabIndex = 0;
btnBuscar.Text = "Hacer Busqueda";
btnBuscar.UseVisualStyleBackColor = true;
//
// dateInicio
//
dateInicio.Location = new Point(26, 24);
dateInicio.Name = "dateInicio";
dateInicio.Size = new Size(200, 23);
dateInicio.TabIndex = 1;
//
// dateFin
//
dateFin.Location = new Point(26, 72);
dateFin.Name = "dateFin";
dateFin.Size = new Size(200, 23);
dateFin.TabIndex = 2;
//
// dgvFactura
//
dgvFactura.AllowUserToAddRows = false;
dgvFactura.AllowUserToDeleteRows = false;
dgvFactura.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.AutoSize;
dgvFactura.EditMode = DataGridViewEditMode.EditProgrammatically;
dgvFactura.Location = new Point(271, 24);
dgvFactura.MultiSelect = false;
dgvFactura.Name = "dgvFactura";
dgvFactura.RowHeadersVisible = false;
dgvFactura.SelectionMode = DataGridViewSelectionMode.FullRowSelect;
dgvFactura.Size = new Size(475, 469);
dgvFactura.TabIndex = 3;
//
// dgvDetalles
//
dgvDetalles.AllowUserToAddRows = false;
dgvDetalles.AllowUserToDeleteRows = false;
dgvDetalles.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.AutoSize;
dgvDetalles.EditMode = DataGridViewEditMode.EditProgrammatically;
dgvDetalles.Location = new Point(763, 24);
dgvDetalles.MultiSelect = false;
dgvDetalles.Name = "dgvDetalles";
dgvDetalles.RowHeadersVisible = false;
dgvDetalles.SelectionMode = DataGridViewSelectionMode.FullRowSelect;
dgvDetalles.Size = new Size(480, 469);
dgvDetalles.TabIndex = 4;
//
// label1
//
label1.AutoSize = true;
label1.Location = new Point(271, 6);
label1.Name = "label1";
label1.Size = new Size(51, 15);
label1.TabIndex = 5;
label1.Text = "Facturas";
//
// label2
//
label2.AutoSize = true;
label2.Location = new Point(763, 6);
label2.Name = "label2";
label2.Size = new Size(87, 15);
label2.TabIndex = 6;
label2.Text = "DetallesFactura";
//
// label3
//
label3.AutoSize = true;
label3.Location = new Point(26, 6);
label3.Name = "label3";
label3.Size = new Size(70, 15);
label3.TabIndex = 7;
label3.Text = "Fecha Inicio";
//
// label4
//
label4.AutoSize = true;
label4.Location = new Point(26, 54);
label4.Name = "label4";
label4.Size = new Size(57, 15);
label4.TabIndex = 8;
label4.Text = "Fecha Fin";
//
// btnEnviarEmail
//
btnEnviarEmail.Location = new Point(26, 364);
btnEnviarEmail.Name = "btnEnviarEmail";
btnEnviarEmail.Size = new Size(200, 26);
btnEnviarEmail.TabIndex = 9;
btnEnviarEmail.Text = "Enviar Informe Por Email";
btnEnviarEmail.UseVisualStyleBackColor = true;
//
// FrmInformeFacturaPorFecha
//
AutoScaleDimensions = new SizeF(7F, 15F);
AutoScaleMode = AutoScaleMode.Font;
ClientSize = new Size(1255, 505);
Controls.Add(btnEnviarEmail);
Controls.Add(label4);
Controls.Add(label3);
Controls.Add(label2);
Controls.Add(label1);
Controls.Add(dgvDetalles);
Controls.Add(dgvFactura);
Controls.Add(dateFin);
Controls.Add(dateInicio);
Controls.Add(btnBuscar);
Name = "FrmInformeFacturaPorFecha";
Text = "Informe: Facturas";
((System.ComponentModel.ISupportInitialize)dgvFactura).EndInit();
((System.ComponentModel.ISupportInitialize)dgvDetalles).EndInit();
ResumeLayout(false);
PerformLayout();
} }
#endregion #endregion
private Button btnBuscar;
private DateTimePicker dateInicio;
private DateTimePicker dateFin;
private DataGridView dgvFactura;
private DataGridView dgvDetalles;
private Label label1;
private Label label2;
private Label label3;
private Label label4;
private Button btnEnviarEmail;
} }
} }

View File

@@ -1,17 +1,17 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<root> <root>
<!-- <!--
Microsoft ResX Schema Microsoft ResX Schema
Version 2.0 Version 2.0
The primary goals of this format is to allow a simple XML format The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes various data types are done through the TypeConverter classes
associated with the data types. associated with the data types.
Example: Example:
... ado.net/XML headers & schema ... ... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader> <resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader> <resheader name="version">2.0</resheader>
@@ -26,36 +26,36 @@
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment> <comment>This is a comment</comment>
</data> </data>
There are any number of "resheader" rows that contain simple There are any number of "resheader" rows that contain simple
name/value pairs. name/value pairs.
Each data row contains a name, and value. The row also contains a Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture. text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the Classes that don't support this are serialized and stored with the
mimetype set. mimetype set.
The mimetype is used for serialized objects, and tells the The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly: extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below. read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64 mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding. : and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64 mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding. : and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64 mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter : using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding. : and then encoded with base64 encoding.
--> -->

View File

@@ -28,12 +28,181 @@
/// </summary> /// </summary>
private void InitializeComponent() private void InitializeComponent()
{ {
this.components = new System.ComponentModel.Container(); btnEnviarEmail = new Button();
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; label4 = new Label();
this.ClientSize = new System.Drawing.Size(800, 450); label3 = new Label();
this.Text = "FrmInformeFacturasPorCliente"; label2 = new Label();
label1 = new Label();
dgvDetalle = new DataGridView();
dgvFactura = new DataGridView();
dateFin = new DateTimePicker();
dateInicio = new DateTimePicker();
btnBusqueda = new Button();
dgvCliente = new DataGridView();
label5 = new Label();
((System.ComponentModel.ISupportInitialize)dgvDetalle).BeginInit();
((System.ComponentModel.ISupportInitialize)dgvFactura).BeginInit();
((System.ComponentModel.ISupportInitialize)dgvCliente).BeginInit();
SuspendLayout();
//
// btnEnviarEmail
//
btnEnviarEmail.Location = new Point(20, 470);
btnEnviarEmail.Name = "btnEnviarEmail";
btnEnviarEmail.Size = new Size(200, 26);
btnEnviarEmail.TabIndex = 19;
btnEnviarEmail.Text = "Enviar Informe Por Email";
btnEnviarEmail.UseVisualStyleBackColor = true;
//
// label4
//
label4.AutoSize = true;
label4.Location = new Point(20, 59);
label4.Name = "label4";
label4.Size = new Size(57, 15);
label4.TabIndex = 18;
label4.Text = "Fecha Fin";
//
// label3
//
label3.AutoSize = true;
label3.Location = new Point(20, 11);
label3.Name = "label3";
label3.Size = new Size(70, 15);
label3.TabIndex = 17;
label3.Text = "Fecha Inicio";
//
// label2
//
label2.AutoSize = true;
label2.Location = new Point(757, 11);
label2.Name = "label2";
label2.Size = new Size(87, 15);
label2.TabIndex = 16;
label2.Text = "DetallesFactura";
//
// label1
//
label1.AutoSize = true;
label1.Location = new Point(265, 11);
label1.Name = "label1";
label1.Size = new Size(51, 15);
label1.TabIndex = 15;
label1.Text = "Facturas";
//
// dgvDetalle
//
dgvDetalle.AllowUserToAddRows = false;
dgvDetalle.AllowUserToDeleteRows = false;
dgvDetalle.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.AutoSize;
dgvDetalle.EditMode = DataGridViewEditMode.EditProgrammatically;
dgvDetalle.Location = new Point(757, 29);
dgvDetalle.MultiSelect = false;
dgvDetalle.Name = "dgvDetalle";
dgvDetalle.RowHeadersVisible = false;
dgvDetalle.SelectionMode = DataGridViewSelectionMode.FullRowSelect;
dgvDetalle.Size = new Size(480, 469);
dgvDetalle.TabIndex = 14;
//
// dgvFactura
//
dgvFactura.AllowUserToAddRows = false;
dgvFactura.AllowUserToDeleteRows = false;
dgvFactura.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.AutoSize;
dgvFactura.EditMode = DataGridViewEditMode.EditProgrammatically;
dgvFactura.Location = new Point(265, 29);
dgvFactura.MultiSelect = false;
dgvFactura.Name = "dgvFactura";
dgvFactura.RowHeadersVisible = false;
dgvFactura.SelectionMode = DataGridViewSelectionMode.FullRowSelect;
dgvFactura.Size = new Size(475, 469);
dgvFactura.TabIndex = 13;
//
// dateFin
//
dateFin.Location = new Point(20, 77);
dateFin.Name = "dateFin";
dateFin.Size = new Size(200, 23);
dateFin.TabIndex = 12;
//
// dateInicio
//
dateInicio.Location = new Point(20, 29);
dateInicio.Name = "dateInicio";
dateInicio.Size = new Size(200, 23);
dateInicio.TabIndex = 11;
//
// btnBusqueda
//
btnBusqueda.Location = new Point(20, 438);
btnBusqueda.Name = "btnBusqueda";
btnBusqueda.Size = new Size(200, 26);
btnBusqueda.TabIndex = 10;
btnBusqueda.Text = "Hacer Busqueda";
btnBusqueda.UseVisualStyleBackColor = true;
//
// dgvCliente
//
dgvCliente.AllowUserToAddRows = false;
dgvCliente.AllowUserToDeleteRows = false;
dgvCliente.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.AutoSize;
dgvCliente.EditMode = DataGridViewEditMode.EditProgrammatically;
dgvCliente.Location = new Point(20, 126);
dgvCliente.MultiSelect = false;
dgvCliente.Name = "dgvCliente";
dgvCliente.RowHeadersVisible = false;
dgvCliente.SelectionMode = DataGridViewSelectionMode.FullRowSelect;
dgvCliente.Size = new Size(200, 306);
dgvCliente.TabIndex = 20;
//
// label5
//
label5.AutoSize = true;
label5.Location = new Point(20, 108);
label5.Name = "label5";
label5.Size = new Size(49, 15);
label5.TabIndex = 21;
label5.Text = "Clientes";
//
// FrmInformeFacturasPorCliente
//
AutoScaleDimensions = new SizeF(7F, 15F);
AutoScaleMode = AutoScaleMode.Font;
ClientSize = new Size(1256, 508);
Controls.Add(label5);
Controls.Add(dgvCliente);
Controls.Add(btnEnviarEmail);
Controls.Add(label4);
Controls.Add(label3);
Controls.Add(label2);
Controls.Add(label1);
Controls.Add(dgvDetalle);
Controls.Add(dgvFactura);
Controls.Add(dateFin);
Controls.Add(dateInicio);
Controls.Add(btnBusqueda);
Name = "FrmInformeFacturasPorCliente";
Text = "Informe: Clientes";
((System.ComponentModel.ISupportInitialize)dgvDetalle).EndInit();
((System.ComponentModel.ISupportInitialize)dgvFactura).EndInit();
((System.ComponentModel.ISupportInitialize)dgvCliente).EndInit();
ResumeLayout(false);
PerformLayout();
} }
#endregion #endregion
private Button btnEnviarEmail;
private Label label4;
private Label label3;
private Label label2;
private Label label1;
private DataGridView dgvDetalle;
private DataGridView dgvFactura;
private DateTimePicker dateFin;
private DateTimePicker dateInicio;
private Button btnBusqueda;
private DataGridView dgvCliente;
private Label label5;
} }
} }

View File

@@ -1,17 +1,17 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<root> <root>
<!-- <!--
Microsoft ResX Schema Microsoft ResX Schema
Version 2.0 Version 2.0
The primary goals of this format is to allow a simple XML format The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes various data types are done through the TypeConverter classes
associated with the data types. associated with the data types.
Example: Example:
... ado.net/XML headers & schema ... ... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader> <resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader> <resheader name="version">2.0</resheader>
@@ -26,36 +26,36 @@
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment> <comment>This is a comment</comment>
</data> </data>
There are any number of "resheader" rows that contain simple There are any number of "resheader" rows that contain simple
name/value pairs. name/value pairs.
Each data row contains a name, and value. The row also contains a Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture. text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the Classes that don't support this are serialized and stored with the
mimetype set. mimetype set.
The mimetype is used for serialized objects, and tells the The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly: extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below. read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64 mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding. : and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64 mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding. : and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64 mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter : using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding. : and then encoded with base64 encoding.
--> -->

View File

@@ -28,12 +28,51 @@
/// </summary> /// </summary>
private void InitializeComponent() private void InitializeComponent()
{ {
this.components = new System.ComponentModel.Container(); dgvProductos = new DataGridView();
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; label1 = new Label();
this.ClientSize = new System.Drawing.Size(800, 450); ((System.ComponentModel.ISupportInitialize)dgvProductos).BeginInit();
this.Text = "FrmInformeProductosMasVendidos"; SuspendLayout();
//
// dgvProductos
//
dgvProductos.AllowUserToAddRows = false;
dgvProductos.AllowUserToDeleteRows = false;
dgvProductos.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.AutoSize;
dgvProductos.EditMode = DataGridViewEditMode.EditProgrammatically;
dgvProductos.Location = new Point(12, 28);
dgvProductos.MultiSelect = false;
dgvProductos.Name = "dgvProductos";
dgvProductos.RowHeadersVisible = false;
dgvProductos.SelectionMode = DataGridViewSelectionMode.FullRowSelect;
dgvProductos.Size = new Size(755, 469);
dgvProductos.TabIndex = 4;
//
// label1
//
label1.AutoSize = true;
label1.Location = new Point(12, 9);
label1.Name = "label1";
label1.Size = new Size(137, 15);
label1.TabIndex = 5;
label1.Text = "Productos Más Vendidos";
//
// FrmInformeProductosMasVendidos
//
AutoScaleDimensions = new SizeF(7F, 15F);
AutoScaleMode = AutoScaleMode.Font;
ClientSize = new Size(780, 509);
Controls.Add(label1);
Controls.Add(dgvProductos);
Name = "FrmInformeProductosMasVendidos";
Text = "Informe: Productos";
((System.ComponentModel.ISupportInitialize)dgvProductos).EndInit();
ResumeLayout(false);
PerformLayout();
} }
#endregion #endregion
private DataGridView dgvProductos;
private Label label1;
} }
} }

View File

@@ -1,17 +1,17 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<root> <root>
<!-- <!--
Microsoft ResX Schema Microsoft ResX Schema
Version 2.0 Version 2.0
The primary goals of this format is to allow a simple XML format The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes various data types are done through the TypeConverter classes
associated with the data types. associated with the data types.
Example: Example:
... ado.net/XML headers & schema ... ... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader> <resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader> <resheader name="version">2.0</resheader>
@@ -26,36 +26,36 @@
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment> <comment>This is a comment</comment>
</data> </data>
There are any number of "resheader" rows that contain simple There are any number of "resheader" rows that contain simple
name/value pairs. name/value pairs.
Each data row contains a name, and value. The row also contains a Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture. text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the Classes that don't support this are serialized and stored with the
mimetype set. mimetype set.
The mimetype is used for serialized objects, and tells the The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly: extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below. read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64 mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding. : and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64 mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding. : and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64 mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter : using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding. : and then encoded with base64 encoding.
--> -->