cambios nachito a form factura
This commit is contained in:
26
Vista/FrmFacturas.Designer.cs
generated
26
Vista/FrmFacturas.Designer.cs
generated
@@ -29,33 +29,49 @@
|
||||
private void InitializeComponent()
|
||||
{
|
||||
groupBox1 = new GroupBox();
|
||||
dataGridView2 = new DataGridView();
|
||||
dataGridView1 = new DataGridView();
|
||||
BtnAdd = new Button();
|
||||
groupBox1.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)dataGridView2).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)dataGridView1).BeginInit();
|
||||
SuspendLayout();
|
||||
//
|
||||
// groupBox1
|
||||
//
|
||||
groupBox1.Controls.Add(dataGridView2);
|
||||
groupBox1.Controls.Add(dataGridView1);
|
||||
groupBox1.Controls.Add(BtnAdd);
|
||||
groupBox1.Location = new Point(12, 12);
|
||||
groupBox1.Name = "groupBox1";
|
||||
groupBox1.Size = new Size(776, 351);
|
||||
groupBox1.Size = new Size(1041, 426);
|
||||
groupBox1.TabIndex = 5;
|
||||
groupBox1.TabStop = false;
|
||||
//
|
||||
// dataGridView2
|
||||
//
|
||||
dataGridView2.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.Fill;
|
||||
dataGridView2.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.AutoSize;
|
||||
dataGridView2.Location = new Point(623, 0);
|
||||
dataGridView2.Name = "dataGridView2";
|
||||
dataGridView2.RowTemplate.Height = 25;
|
||||
dataGridView2.SelectionMode = DataGridViewSelectionMode.FullRowSelect;
|
||||
dataGridView2.Size = new Size(384, 426);
|
||||
dataGridView2.TabIndex = 4;
|
||||
//
|
||||
// dataGridView1
|
||||
//
|
||||
dataGridView1.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.Fill;
|
||||
dataGridView1.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.AutoSize;
|
||||
dataGridView1.Location = new Point(6, 22);
|
||||
dataGridView1.Location = new Point(6, 16);
|
||||
dataGridView1.Name = "dataGridView1";
|
||||
dataGridView1.RowTemplate.Height = 25;
|
||||
dataGridView1.SelectionMode = DataGridViewSelectionMode.FullRowSelect;
|
||||
dataGridView1.Size = new Size(594, 235);
|
||||
dataGridView1.Size = new Size(508, 241);
|
||||
dataGridView1.TabIndex = 3;
|
||||
dataGridView1.CellBorderStyleChanged += dataGridView1_CellBorderStyleChanged;
|
||||
dataGridView1.CellClick += dataGridView1_CellClick;
|
||||
dataGridView1.CellContentClick += dataGridView1_CellContentClick;
|
||||
//
|
||||
// BtnAdd
|
||||
//
|
||||
@@ -71,12 +87,13 @@
|
||||
//
|
||||
AutoScaleDimensions = new SizeF(7F, 15F);
|
||||
AutoScaleMode = AutoScaleMode.Font;
|
||||
ClientSize = new Size(800, 450);
|
||||
ClientSize = new Size(1068, 450);
|
||||
Controls.Add(groupBox1);
|
||||
Name = "FrmFacturas";
|
||||
Text = "Ventas";
|
||||
WindowState = FormWindowState.Maximized;
|
||||
groupBox1.ResumeLayout(false);
|
||||
((System.ComponentModel.ISupportInitialize)dataGridView2).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)dataGridView1).EndInit();
|
||||
ResumeLayout(false);
|
||||
}
|
||||
@@ -86,5 +103,6 @@
|
||||
private GroupBox groupBox1;
|
||||
private DataGridView dataGridView1;
|
||||
private Button BtnAdd;
|
||||
private DataGridView dataGridView2;
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,6 @@
|
||||
using Controladora;
|
||||
using Entidades;
|
||||
using System.Collections.ObjectModel;
|
||||
|
||||
namespace Vista
|
||||
{
|
||||
@@ -9,6 +11,8 @@ namespace Vista
|
||||
{
|
||||
InitializeComponent();
|
||||
ActualizarGrilla();
|
||||
dataGridView1.CellClick += dataGridView1_CellClick;
|
||||
ConfigurarDataGridView2();
|
||||
}
|
||||
private void ActualizarGrilla()
|
||||
{
|
||||
@@ -26,5 +30,60 @@ namespace Vista
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
private void dataGridView1_CellContentClick(object sender, DataGridViewCellEventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
private void ConfigurarDataGridView2()
|
||||
{
|
||||
dataGridView2.AutoGenerateColumns = false;
|
||||
dataGridView2.Columns.Add(new DataGridViewTextBoxColumn
|
||||
{
|
||||
DataPropertyName = "Producto",
|
||||
HeaderText = "Producto"
|
||||
});
|
||||
dataGridView2.Columns.Add(new DataGridViewTextBoxColumn
|
||||
{
|
||||
DataPropertyName = "Cantidad",
|
||||
HeaderText = "Cantidad"
|
||||
});
|
||||
|
||||
dataGridView2.Columns.Add(new DataGridViewTextBoxColumn
|
||||
{
|
||||
DataPropertyName = "PrecioUnitario",
|
||||
HeaderText = "PrecioUnitariod"
|
||||
});
|
||||
dataGridView2.Columns.Add(new DataGridViewTextBoxColumn
|
||||
{
|
||||
DataPropertyName = "Subtotal",
|
||||
HeaderText = "Subtotal"
|
||||
});
|
||||
}
|
||||
private void ActualizarGrillaLotes(ReadOnlyCollection<Lote> lotes)
|
||||
{
|
||||
dataGridView2.DataSource = null;
|
||||
if (lotes.Any())
|
||||
{
|
||||
var loteDatos = lotes.Select(lote => new
|
||||
{
|
||||
Producto = lote.NombreProducto,
|
||||
Cantidad = lote.CantidadDeProductos,
|
||||
Subtotal = lote.Subtotal,
|
||||
PrecioUnitario = lote.PrecioUnitario,
|
||||
}).ToList();
|
||||
|
||||
dataGridView2.DataSource = loteDatos;
|
||||
}
|
||||
}
|
||||
private void dataGridView1_CellClick(object sender, DataGridViewCellEventArgs e)
|
||||
{
|
||||
if (e.RowIndex >= 0)
|
||||
{
|
||||
var selectedFactura = (Factura)dataGridView1.Rows[e.RowIndex].DataBoundItem;
|
||||
var lotes = ControladoraLotes.Instance.ListarPorFacturaId(selectedFactura.Id);
|
||||
ActualizarGrillaLotes(lotes);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
56
Vista/Vista - Backup.csproj.user
Normal file
56
Vista/Vista - Backup.csproj.user
Normal file
@@ -0,0 +1,56 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<Compile Update="AddCategoria.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Update="AddProducto.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<<<<<<< HEAD
|
||||
<Compile Update="FrmFacturas.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
=======
|
||||
>>>>>>> 5b78d74e54350285696596720e82f5fbd99b4d02
|
||||
<Compile Update="FrmInforme.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Update="FrmPresupuesto.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Update="FrmCliente.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Update="FrmFactura.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Update="FrmPedidosDePresupuestos.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Update="FrmOrdenDeCompra.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Update="FrmProducto.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Update="FrmProveedor.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Update="FrmRemitos.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Update="FrmProductos.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Update="FrmProveedores.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Update="FrmClientes.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Update="PantallaPrincipal.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
@@ -1,5 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup />
|
||||
<ItemGroup>
|
||||
<Compile Update="AddCategoria.cs">
|
||||
<SubType>Form</SubType>
|
||||
@@ -7,43 +8,43 @@
|
||||
<Compile Update="AddProducto.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Update="FrmInforme.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Update="FrmPresupuesto.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Update="FrmCliente.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Update="FrmClientes.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Update="FrmFactura.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Update="FrmPedidosDePresupuestos.cs">
|
||||
<Compile Update="FrmFacturas.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Update="FrmInforme.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Update="FrmOrdenDeCompra.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Update="FrmPedidosDePresupuestos.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Update="FrmPresupuesto.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Update="FrmProducto.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Update="FrmProveedor.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Update="FrmRemitos.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Update="FrmProductos.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Update="FrmProveedor.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Update="FrmProveedores.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Update="FrmFacturas.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Update="FrmClientes.cs">
|
||||
<Compile Update="FrmRemitos.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Update="PantallaPrincipal.cs">
|
||||
|
||||
Reference in New Issue
Block a user