cambio de nombre, añadida otra precarga de datos para
This commit is contained in:
@@ -38,6 +38,7 @@ namespace Controladora
|
||||
>>>>>>> 675d86f (refactor: Cambiada la estructura de las controladoras)
|
||||
{
|
||||
if (t == null) return "El OrdenDeCompra es nulo fallo la carga";
|
||||
if (t.Id < 0) return "El Id esta mal cargado";
|
||||
|
||||
return (RepositorioOrdenDeCompra.Instance.Del(t)) ?
|
||||
$"El OrdenDeCompra {t.Id} se Elimino correctamente":
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -4,5 +4,6 @@ namespace Entidades
|
||||
public class DetalleOrdenDeCompra: Detalle<Producto>
|
||||
{
|
||||
public int IdOrdenDeCompra { get; set; }
|
||||
public double MontoCU { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14,29 +14,44 @@
|
||||
<FileName>Cliente.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="Entidades.Detalle<T>" Collapsed="true">
|
||||
<Position X="9.75" Y="0.5" Width="1.5" />
|
||||
<Class Name="Entidades.Detalle<T>">
|
||||
<Position X="10.25" Y="0.5" Width="1.5" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAACAAEAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAA=</HashCode>
|
||||
<FileName>Detalle.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="Entidades.DetalleFactura">
|
||||
<Position X="12" Y="1.75" Width="1.5" />
|
||||
<Position X="12.75" Y="2.25" Width="1.5" />
|
||||
<InheritanceLine Type="Entidades.Detalle<T>" ManuallyRouted="true">
|
||||
<Path>
|
||||
<Point X="11" Y="1.988" />
|
||||
<Point X="11" Y="2.365" />
|
||||
<Point X="13.5" Y="2.365" />
|
||||
<Point X="13.5" Y="2.25" />
|
||||
</Path>
|
||||
</InheritanceLine>
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAAAAAAAAAAEAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=</HashCode>
|
||||
<FileName>DetalleFactura.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="Entidades.DetalleOrdenDeCompra">
|
||||
<Position X="9.5" Y="1.75" Width="2" />
|
||||
<Position X="10" Y="2.75" Width="2" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAACAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=</HashCode>
|
||||
<HashCode>AAACAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAA=</HashCode>
|
||||
<FileName>DetalleOrdenDeCompra.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="Entidades.DetallePresupuesto">
|
||||
<Position X="7.5" Y="0.75" Width="1.75" />
|
||||
<Position X="6.25" Y="1.25" Width="1.75" />
|
||||
<InheritanceLine Type="Entidades.Detalle<T>" FixedFromPoint="true">
|
||||
<Path>
|
||||
<Point X="11" Y="1.988" />
|
||||
<Point X="11" Y="2.155" />
|
||||
<Point X="8" Y="2.155" />
|
||||
</Path>
|
||||
</InheritanceLine>
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAAAAAAAAAAEAAAAAAAAEAAAQABAAAAAAAAAAAAAAAA=</HashCode>
|
||||
<FileName>DetallePresupuesto.cs</FileName>
|
||||
@@ -66,29 +81,40 @@
|
||||
</ShowAsAssociation>
|
||||
</Class>
|
||||
<Class Name="Entidades.OrdenDeCompra">
|
||||
<Position X="9.75" Y="3.75" Width="1.5" />
|
||||
<Position X="10" Y="5.25" Width="1.5" />
|
||||
<AssociationLine Name="detalles" Type="Entidades.DetalleOrdenDeCompra">
|
||||
<MemberNameLabel ManuallyPlaced="true">
|
||||
<Position X="-0.005" Y="1.175" />
|
||||
</MemberNameLabel>
|
||||
</AssociationLine>
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAACAACAAAAQAAAAAAAAAAADBAABAAAAAAAAAAAAAAA=</HashCode>
|
||||
<HashCode>AAACAAAAAAAQAAAAAAAAAAADBAABAAAAAAAAAAAAAAA=</HashCode>
|
||||
<FileName>OrdenDeCompra.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
<ShowAsAssociation>
|
||||
<Property Name="Proveedor" />
|
||||
<Property Name="presupuesto" />
|
||||
</ShowAsAssociation>
|
||||
<ShowAsCollectionAssociation>
|
||||
<Field Name="detalles" />
|
||||
</ShowAsCollectionAssociation>
|
||||
</Class>
|
||||
<Class Name="Entidades.Presupuesto">
|
||||
<Position X="6.25" Y="2.75" Width="1.5" />
|
||||
<Position X="7.25" Y="3.5" Width="1.5" />
|
||||
<AssociationLine Name="Proveedor" Type="Entidades.Proveedor" ManuallyRouted="true" FixedFromPoint="true" FixedToPoint="true">
|
||||
<Path>
|
||||
<Point X="7" Y="5.267" />
|
||||
<Point X="7" Y="5.689" />
|
||||
<Point X="8" Y="6.017" />
|
||||
<Point X="8" Y="5.689" />
|
||||
<Point X="8.25" Y="5.689" />
|
||||
<Point X="8.25" Y="6.75" />
|
||||
</Path>
|
||||
</AssociationLine>
|
||||
<AssociationLine Name="detalles" Type="Entidades.DetallePresupuesto" FixedFromPoint="true" FixedToPoint="true">
|
||||
<Path>
|
||||
<Point X="7.25" Y="4.062" />
|
||||
<Point X="6.875" Y="4.062" />
|
||||
<Point X="6.875" Y="3.06" />
|
||||
</Path>
|
||||
</AssociationLine>
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAACAAAAAAAQAAEAAAAAAAADBAADABAAAAAAAAAAAAA=</HashCode>
|
||||
<FileName>Presupuesto.cs</FileName>
|
||||
@@ -101,16 +127,17 @@
|
||||
</ShowAsCollectionAssociation>
|
||||
</Class>
|
||||
<Class Name="Entidades.Producto">
|
||||
<Position X="3.25" Y="3.75" Width="1.75" />
|
||||
<Position X="3" Y="4.25" Width="1.75" />
|
||||
<Members>
|
||||
<Method Name="AñadirCategoria" Hidden="true" />
|
||||
<Field Name="categorias" Hidden="true" />
|
||||
<Method Name="EliminarCategoria" Hidden="true" />
|
||||
<Method Name="MostrarCategorias" Hidden="true" />
|
||||
</Members>
|
||||
<AssociationLine Name="proveedores" Type="Entidades.Proveedor" ManuallyRouted="true" FixedFromPoint="true" FixedToPoint="true">
|
||||
<Path>
|
||||
<Point X="5" Y="6.04" />
|
||||
<Point X="7.065" Y="6.04" />
|
||||
<Point X="7.065" Y="6.516" />
|
||||
<Point X="7.125" Y="6.516" />
|
||||
<Point X="4.75" Y="6.138" />
|
||||
<Point X="7.125" Y="6.138" />
|
||||
<Point X="7.125" Y="6.75" />
|
||||
</Path>
|
||||
</AssociationLine>
|
||||
|
||||
@@ -8,8 +8,6 @@ namespace Entidades
|
||||
private List<DetalleOrdenDeCompra> detalles = new List<DetalleOrdenDeCompra>();
|
||||
public Proveedor Proveedor { get; set; }
|
||||
|
||||
public Presupuesto presupuesto { get; set; }
|
||||
|
||||
public void AñadirDetalle(DetalleOrdenDeCompra detalle)
|
||||
{
|
||||
detalles.Add(detalle);
|
||||
|
||||
147
Vista/FrmOrdenDeCompra.Designer.cs
generated
Normal file
147
Vista/FrmOrdenDeCompra.Designer.cs
generated
Normal file
@@ -0,0 +1,147 @@
|
||||
namespace Vista
|
||||
{
|
||||
partial class FrmOrdenDeCompra
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
label1 = new Label();
|
||||
dgvPresupuesto = new DataGridView();
|
||||
dgvProveedor = new DataGridView();
|
||||
label2 = new Label();
|
||||
numId = new NumericUpDown();
|
||||
ID = new Label();
|
||||
btnAddProducto = new Button();
|
||||
((System.ComponentModel.ISupportInitialize)dgvPresupuesto).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)dgvProveedor).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)numId).BeginInit();
|
||||
SuspendLayout();
|
||||
//
|
||||
// label1
|
||||
//
|
||||
label1.AutoSize = true;
|
||||
label1.Location = new Point(191, 7);
|
||||
label1.Name = "label1";
|
||||
label1.Size = new Size(77, 15);
|
||||
label1.TabIndex = 17;
|
||||
label1.Text = "Presupuestos";
|
||||
//
|
||||
// dgvPresupuesto
|
||||
//
|
||||
dgvPresupuesto.AllowUserToAddRows = false;
|
||||
dgvPresupuesto.AllowUserToDeleteRows = false;
|
||||
dgvPresupuesto.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.AutoSize;
|
||||
dgvPresupuesto.EditMode = DataGridViewEditMode.EditProgrammatically;
|
||||
dgvPresupuesto.Location = new Point(191, 25);
|
||||
dgvPresupuesto.MultiSelect = false;
|
||||
dgvPresupuesto.Name = "dgvPresupuesto";
|
||||
dgvPresupuesto.RowTemplate.Height = 25;
|
||||
dgvPresupuesto.SelectionMode = DataGridViewSelectionMode.FullRowSelect;
|
||||
dgvPresupuesto.Size = new Size(347, 338);
|
||||
dgvPresupuesto.TabIndex = 16;
|
||||
//
|
||||
// dgvProveedor
|
||||
//
|
||||
dgvProveedor.AllowUserToAddRows = false;
|
||||
dgvProveedor.AllowUserToDeleteRows = false;
|
||||
dgvProveedor.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.AutoSize;
|
||||
dgvProveedor.EditMode = DataGridViewEditMode.EditProgrammatically;
|
||||
dgvProveedor.Location = new Point(544, 25);
|
||||
dgvProveedor.MultiSelect = false;
|
||||
dgvProveedor.Name = "dgvProveedor";
|
||||
dgvProveedor.RowTemplate.Height = 25;
|
||||
dgvProveedor.SelectionMode = DataGridViewSelectionMode.FullRowSelect;
|
||||
dgvProveedor.Size = new Size(376, 338);
|
||||
dgvProveedor.TabIndex = 19;
|
||||
//
|
||||
// label2
|
||||
//
|
||||
label2.AutoSize = true;
|
||||
label2.Location = new Point(544, 7);
|
||||
label2.Name = "label2";
|
||||
label2.Size = new Size(43, 15);
|
||||
label2.TabIndex = 18;
|
||||
label2.Text = "Detalle";
|
||||
//
|
||||
// numId
|
||||
//
|
||||
numId.Location = new Point(42, 25);
|
||||
numId.Maximum = new decimal(new int[] { 1410065407, 2, 0, 0 });
|
||||
numId.Name = "numId";
|
||||
numId.Size = new Size(120, 23);
|
||||
numId.TabIndex = 21;
|
||||
//
|
||||
// ID
|
||||
//
|
||||
ID.AutoSize = true;
|
||||
ID.Location = new Point(18, 27);
|
||||
ID.Name = "ID";
|
||||
ID.Size = new Size(18, 15);
|
||||
ID.TabIndex = 20;
|
||||
ID.Text = "ID";
|
||||
//
|
||||
// btnAddProducto
|
||||
//
|
||||
btnAddProducto.Location = new Point(191, 369);
|
||||
btnAddProducto.Name = "btnAddProducto";
|
||||
btnAddProducto.Size = new Size(144, 29);
|
||||
btnAddProducto.TabIndex = 22;
|
||||
btnAddProducto.Text = "Seleccionar Presupuesto";
|
||||
btnAddProducto.UseVisualStyleBackColor = true;
|
||||
btnAddProducto.Click += btnAddProducto_Click;
|
||||
//
|
||||
// OrdenDeCompra
|
||||
//
|
||||
AutoScaleDimensions = new SizeF(7F, 15F);
|
||||
AutoScaleMode = AutoScaleMode.Font;
|
||||
ClientSize = new Size(1194, 450);
|
||||
Controls.Add(btnAddProducto);
|
||||
Controls.Add(numId);
|
||||
Controls.Add(ID);
|
||||
Controls.Add(dgvProveedor);
|
||||
Controls.Add(label2);
|
||||
Controls.Add(label1);
|
||||
Controls.Add(dgvPresupuesto);
|
||||
Name = "OrdenDeCompra";
|
||||
Text = "OrdenDeCompra";
|
||||
((System.ComponentModel.ISupportInitialize)dgvPresupuesto).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)dgvProveedor).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)numId).EndInit();
|
||||
ResumeLayout(false);
|
||||
PerformLayout();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private Label label1;
|
||||
private DataGridView dgvPresupuesto;
|
||||
private DataGridView dgvProveedor;
|
||||
private Label label2;
|
||||
private NumericUpDown numId;
|
||||
private Label ID;
|
||||
private Button btnAddProducto;
|
||||
}
|
||||
}
|
||||
38
Vista/FrmOrdenDeCompra.cs
Normal file
38
Vista/FrmOrdenDeCompra.cs
Normal file
@@ -0,0 +1,38 @@
|
||||
using Controladora;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace Vista
|
||||
{
|
||||
public partial class FrmOrdenDeCompra : Form
|
||||
{
|
||||
public FrmOrdenDeCompra()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
private void CargarDatos()
|
||||
{
|
||||
dgvPresupuesto.DataSource = null;
|
||||
var listapresupuesto = ControladoraPresupuestos.Instance.Listar();
|
||||
dgvPresupuesto.DataSource = listapresupuesto;
|
||||
|
||||
numId.Value = (listapresupuesto.Count > 0) ?
|
||||
listapresupuesto.Max(x => x.Id + 1) :
|
||||
0;
|
||||
numId.Enabled = false;
|
||||
}
|
||||
|
||||
private void btnAddProducto_Click(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -18,7 +18,7 @@
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing"">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
33
Vista/FrmOrdenesDeCompras.Designer.cs
generated
33
Vista/FrmOrdenesDeCompras.Designer.cs
generated
@@ -1,6 +1,6 @@
|
||||
namespace Vista
|
||||
{
|
||||
partial class FrmOrdenDeCompra
|
||||
partial class FrmOrdenesDeCompras
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
@@ -29,16 +29,16 @@
|
||||
private void InitializeComponent()
|
||||
{
|
||||
groupBox1 = new GroupBox();
|
||||
dataGridView1 = new DataGridView();
|
||||
dgvOrdenDeCompra = new DataGridView();
|
||||
BtnAdd = new Button();
|
||||
BtnEliminar = new Button();
|
||||
groupBox1.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)dataGridView1).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)dgvOrdenDeCompra).BeginInit();
|
||||
SuspendLayout();
|
||||
//
|
||||
// groupBox1
|
||||
//
|
||||
groupBox1.Controls.Add(dataGridView1);
|
||||
groupBox1.Controls.Add(dgvOrdenDeCompra);
|
||||
groupBox1.Controls.Add(BtnAdd);
|
||||
groupBox1.Controls.Add(BtnEliminar);
|
||||
groupBox1.Location = new Point(12, 3);
|
||||
@@ -47,15 +47,15 @@
|
||||
groupBox1.TabIndex = 4;
|
||||
groupBox1.TabStop = false;
|
||||
//
|
||||
// dataGridView1
|
||||
// dgvOrdenDeCompra
|
||||
//
|
||||
dataGridView1.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.DisplayedCells;
|
||||
dataGridView1.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.AutoSize;
|
||||
dataGridView1.Location = new Point(6, 22);
|
||||
dataGridView1.Name = "dataGridView1";
|
||||
dataGridView1.RowTemplate.Height = 25;
|
||||
dataGridView1.Size = new Size(550, 235);
|
||||
dataGridView1.TabIndex = 3;
|
||||
dgvOrdenDeCompra.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.DisplayedCells;
|
||||
dgvOrdenDeCompra.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.AutoSize;
|
||||
dgvOrdenDeCompra.Location = new Point(6, 22);
|
||||
dgvOrdenDeCompra.Name = "dgvOrdenDeCompra";
|
||||
dgvOrdenDeCompra.RowTemplate.Height = 25;
|
||||
dgvOrdenDeCompra.Size = new Size(550, 235);
|
||||
dgvOrdenDeCompra.TabIndex = 3;
|
||||
//
|
||||
// BtnAdd
|
||||
//
|
||||
@@ -75,25 +75,26 @@
|
||||
BtnEliminar.TabIndex = 2;
|
||||
BtnEliminar.Text = "Eliminar";
|
||||
BtnEliminar.UseVisualStyleBackColor = true;
|
||||
BtnEliminar.Click += BtnEliminar_Click;
|
||||
//
|
||||
// FrmOrdenDeCompra
|
||||
// FrmOrdenesDeCompras
|
||||
//
|
||||
AutoScaleDimensions = new SizeF(7F, 15F);
|
||||
AutoScaleMode = AutoScaleMode.Font;
|
||||
ClientSize = new Size(800, 450);
|
||||
Controls.Add(groupBox1);
|
||||
Name = "FrmOrdenDeCompra";
|
||||
Name = "FrmOrdenesDeCompras";
|
||||
Text = "OrdenDeCompra";
|
||||
WindowState = FormWindowState.Maximized;
|
||||
groupBox1.ResumeLayout(false);
|
||||
((System.ComponentModel.ISupportInitialize)dataGridView1).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)dgvOrdenDeCompra).EndInit();
|
||||
ResumeLayout(false);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private GroupBox groupBox1;
|
||||
private DataGridView dataGridView1;
|
||||
private DataGridView dgvOrdenDeCompra;
|
||||
private Button BtnAdd;
|
||||
private Button BtnEliminar;
|
||||
}
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
using System;
|
||||
using Controladora;
|
||||
using Entidades;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
@@ -10,16 +12,63 @@ using System.Windows.Forms;
|
||||
|
||||
namespace Vista
|
||||
{
|
||||
public partial class FrmOrdenDeCompra : Form
|
||||
public partial class FrmOrdenesDeCompras : Form
|
||||
{
|
||||
public FrmOrdenDeCompra()
|
||||
public FrmOrdenesDeCompras()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
private void BtnAdd_Click(object sender, EventArgs e)
|
||||
{
|
||||
using (var form = new FrmOrdenDeCompra())
|
||||
{
|
||||
form.ShowDialog();
|
||||
ActualizarGrilla();
|
||||
}
|
||||
}
|
||||
|
||||
private void ActualizarGrilla()
|
||||
{
|
||||
dgvOrdenDeCompra.DataSource = null;
|
||||
dgvOrdenDeCompra.DataSource = ControladoraOrdenDeCompras.Instance.Listar();
|
||||
|
||||
}
|
||||
|
||||
private void BtnEliminar_Click(object sender, EventArgs e)
|
||||
{
|
||||
// Verifica si hay filas seleccionadas en dgvPresupuestos
|
||||
if (dgvOrdenDeCompra.SelectedRows.Count == 0)
|
||||
{
|
||||
MessageBox.Show("Por favor, selecciona una orden de Compra para eliminar.");
|
||||
return;
|
||||
}
|
||||
|
||||
// Recupera el ID del presupuesto seleccionado
|
||||
int ordenId = Convert.ToInt32(dgvOrdenDeCompra.SelectedRows[0].Cells["Id"].Value.ToString());
|
||||
|
||||
// Crea un objeto de Presupuesto con el ID recuperado
|
||||
var orden = new OrdenDeCompra { Id = ordenId };
|
||||
|
||||
// Confirma la eliminación con el usuario
|
||||
var result = MessageBox.Show("¿Estás seguro de que deseas eliminar esta orden?", "Confirmar Eliminación", MessageBoxButtons.YesNo);
|
||||
if (result == DialogResult.Yes)
|
||||
{
|
||||
try
|
||||
{
|
||||
// Llama al método Eliminar de la controladora con el objeto Presupuesto
|
||||
ControladoraOrdenDeCompras.Instance.Eliminar(orden);
|
||||
|
||||
// Actualiza la grilla de presupuestos después de eliminar el presupuesto
|
||||
ActualizarGrilla();
|
||||
|
||||
MessageBox.Show("Orden eliminado exitosamente.");
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
MessageBox.Show($"Error al eliminar la Orden de Compra: {ex.Message}");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing"">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
|
||||
2
Vista/FrmPresupuesto.Designer.cs
generated
2
Vista/FrmPresupuesto.Designer.cs
generated
@@ -70,7 +70,7 @@
|
||||
// ID
|
||||
//
|
||||
ID.AutoSize = true;
|
||||
ID.Location = new Point(11, 26);
|
||||
ID.Location = new Point(26, 20);
|
||||
ID.Name = "ID";
|
||||
ID.Size = new Size(18, 15);
|
||||
ID.TabIndex = 2;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
namespace Vista
|
||||
{
|
||||
partial class Remito
|
||||
partial class FrmRemito
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
@@ -10,9 +10,9 @@ using System.Windows.Forms;
|
||||
|
||||
namespace Vista
|
||||
{
|
||||
public partial class Remito : Form
|
||||
public partial class FrmRemito : Form
|
||||
{
|
||||
public Remito()
|
||||
public FrmRemito()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
39
Vista/OrdenDeCompra.Designer.cs
generated
39
Vista/OrdenDeCompra.Designer.cs
generated
@@ -1,39 +0,0 @@
|
||||
namespace Vista
|
||||
{
|
||||
partial class OrdenDeCompra
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.components = new System.ComponentModel.Container();
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(800, 450);
|
||||
this.Text = "OrdenDeCompra";
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -1,20 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace Vista
|
||||
{
|
||||
public partial class OrdenDeCompra : Form
|
||||
{
|
||||
public OrdenDeCompra()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -79,6 +79,24 @@ namespace Vista
|
||||
producto.A<EFBFBD>adirProveedor(proveedor);
|
||||
ControladoraProductos.Instance.A<EFBFBD>adir(producto);
|
||||
|
||||
Presupuesto presupuesto = new Presupuesto
|
||||
{
|
||||
Id = 1,
|
||||
Aceptado = false,
|
||||
Habilitado = true,
|
||||
Fecha = DateTime.Now,
|
||||
Proveedor = proveedor,
|
||||
};
|
||||
presupuesto.A<EFBFBD>adirDetalle(new DetallePresupuesto
|
||||
{
|
||||
Id = 1,
|
||||
Cantidad = 2,
|
||||
IdPresupuesto = 1,
|
||||
MontoCUPropuesto = 1000,
|
||||
Producto = producto,
|
||||
});
|
||||
ControladoraPresupuestos.Instance.A<EFBFBD>adir(presupuesto);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -47,13 +47,13 @@
|
||||
<Compile Update="FrmRemitos.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Update="OrdenDeCompra.cs">
|
||||
<Compile Update="FrmOrdenDeCompra.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Update="PantallaPrincipal.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Update="Remito.cs">
|
||||
<Compile Update="FrmRemito.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
|
||||
Reference in New Issue
Block a user