ComserDTO.cs
1 using System;
2 using System.Data;
3 
4 namespace sage.ew.serie.PoC
5 {
6  internal class ComserDTO
7  {
8  public string Empresa { get; set; }
9  public string Albaran { get; set; }
10  public string Proveedor { get; set; }
11  public string Serie { get; set; }
12  public string Articulo { get; set; }
13  public int Linea { get; set; }
14  public bool Modelo { get; set; }
15  public bool Vista { get; set; }
16  public string Numero { get; set; }
17  public bool Compra { get; set; }
18  public string Guid_id { get; set; }
19  public DateTime Created { get; set; }
20  public DateTime Modified { get; set; }
21 
22  public ComserDTO() { }
23 
24  public ComserDTO(DataRow row) : this()
25  {
26  Empresa = Convert.ToString(row["Empresa"]).TrimEnd();
27  Albaran = Convert.ToString(row["Albaran"]).TrimEnd();
28  Proveedor = Convert.ToString(row["Proveedor"]).TrimEnd();
29  Serie = Convert.ToString(row["Serie"]).TrimEnd();
30  Articulo = Convert.ToString(row["Articulo"]).TrimEnd();
31  Linea = Convert.ToInt32(row["Linea"]);
32  Modelo = Convert.ToBoolean(row["Modelo"]);
33  Vista = Convert.ToBoolean(row["Vista"]);
34  Numero = Convert.ToString(row["Numero"]).TrimEnd();
35  Compra = Convert.ToBoolean(row["Compra"]);
36  Guid_id = Convert.ToString(row["guid_id"]).TrimEnd();
37  Created = Convert.ToDateTime(row["Created"]);
38  Modified = Convert.ToDateTime(row["Modified"]);
39  }
40  }
41 }