RegulariserDTO.cs
1 using System;
2 using System.Data;
3 
4 namespace sage.ew.serie.PoC
5 {
6  internal class RegulariserDTO
7  {
8  public string Empresa { get; set; }
9  public string Almacen { get; set; }
10  public DateTime Fecha { get; set; }
11  public string Documento { get; set; }
12  public string Articulo { get; set; }
13  public int Linea { get; set; }
14  public string Serie { get; set; }
15  public bool Baja { get; set; }
16  public bool Vista { get; set; }
17  public string Numero { get; set; }
18  public bool Modelo { get; set; }
19  public DateTime? Fechalog { get; set; }
20  public string Guid_id { get; set; }
21  public DateTime Created { get; set; }
22  public DateTime Modified { get; set; }
23 
24  public RegulariserDTO() { }
25 
26  public RegulariserDTO(DataRow row) : this()
27  {
28  Empresa = Convert.ToString(row["Empresa"]).TrimEnd();
29  Almacen = Convert.ToString(row["Almacen"]).TrimEnd();
30  Fecha = Convert.ToDateTime(row["Fecha"]);
31  Documento = Convert.ToString(row["Documento"]).TrimEnd();
32  Articulo = Convert.ToString(row["Articulo"]).TrimEnd();
33  Linea = Convert.ToInt32(row["Linea"]);
34  Serie = Convert.ToString(row["Serie"]).TrimEnd();
35  Baja = Convert.ToBoolean(row["Baja"]);
36  Vista = Convert.ToBoolean(row["Vista"]);
37  Numero = Convert.ToString(row["Numero"]).TrimEnd();
38  Modelo = Convert.ToBoolean(row["Modelo"]);
39  Fechalog = row["Fechalog"] is DBNull ? null : (DateTime?)Convert.ToDateTime(row["Fechalog"]);
40  Guid_id = Convert.ToString(row["guid_id"]).TrimEnd();
41  Created = Convert.ToDateTime(row["Created"]);
42  Modified = Convert.ToDateTime(row["Modified"]);
43 
44  }
45  }
46 }
Tipo de desglose de árbol pasando el Almacen