ComprasDTO_Reduced.cs
1 using System;
2 using System.Collections.Generic;
3 using System.Data;
4 using System.Linq;
5 using System.Text;
6 
7 namespace sage.ew.serie.PoC
8 {
9  internal class ReducedComprasDTO
10  {
11  public bool Seleccionado { get; set; }
12  public string Serie { get; set; }
13  public string Articulo { get; set; }
14  public string Nombre { get; set; }
15  public decimal Coste { get; set; }
16  public string Baja { get; set; }
17  public DateTime? Garantia { get; set; }
18  public decimal Venta { get; set; }
19  public string Modelo { get; set; }
20  public DateTime Fecha { get; set; }
21  public string Albaran { get; set; }
22  public string Proveedor { get; set; }
23  public string Alb_venta { get; set; }
24  public DateTime? Fec_venta { get; set; }
25  public string Devolucion { get; set; }
26  public string Tecnico { get; set; }
27  public string Empresa { get; set; }
28 
29 
33  public ReducedComprasDTO() { }
34 
39  public ReducedComprasDTO(DataRow row) : this()
40  {
41  Seleccionado = Convert.ToBoolean(row["Selected"]); //Virutal
42  Serie = Convert.ToString(row["Serie"]).TrimEnd();
43  Articulo = Convert.ToString(row["Articulo"]).TrimEnd();
44  Nombre = Convert.ToString(row["Nombre"]).TrimEnd();
45  Coste = Convert.ToDecimal(row["Coste"]);
46  Baja = Convert.ToString(row["Baja"]).TrimEnd();
47  Garantia = row["Garantia"] is DBNull ? null : (DateTime?)Convert.ToDateTime(row["Garantia"]);
48  Venta = Convert.ToDecimal(row["Venta"]);
49  Modelo = Convert.ToString(row["Modelo"]).TrimEnd();
50  Fecha = Convert.ToDateTime(row["Fecha"]);
51  Albaran = Convert.ToString(row["Albaran"]).TrimEnd();
52  Proveedor = Convert.ToString(row["Proveedor"]).TrimEnd();
53  Alb_venta = Convert.ToString(row["Alb_venta"]).TrimEnd();
54  Fec_venta = row["Fec_venta"] is DBNull ? null : (DateTime?)Convert.ToDateTime(row["Fec_venta"]);
55  Devolucion = Convert.ToString(row["Devolucion"]).TrimEnd();
56  Tecnico = Convert.ToString(row["Tecnico"]).TrimEnd();
57  Empresa = Convert.ToString(row["Empresa"]).TrimEnd();
58  }
59  }
60 }
Fecha garantia (Albarán compra)