Thalamus cambio de tipode dato de celda a fecha
This commit is contained in:
Binary file not shown.
Binary file not shown.
@@ -205,7 +205,7 @@ public class TareasJam : IHttpHandler
|
||||
|
||||
|
||||
DataTable dtCloned = DTVentas.Clone();
|
||||
dtCloned.Columns[3].DataType = typeof(string);
|
||||
dtCloned.Columns[3].DataType = typeof(DateTime);
|
||||
|
||||
foreach (DataRow row in DTVentas.Rows)
|
||||
{
|
||||
@@ -215,7 +215,7 @@ public class TareasJam : IHttpHandler
|
||||
DTVentas = dtCloned;
|
||||
foreach (DataRow dRow in DTVentas.Rows)
|
||||
{
|
||||
string tmpDate = dRow[3].ToString().ToDate().ToString("yyyy/MM/dd");
|
||||
DateTime tmpDate = dRow[3].ToString().ToDate().ToString("yyyy/MM/dd").ToDate();
|
||||
dRow[3] = tmpDate;
|
||||
}
|
||||
|
||||
@@ -223,7 +223,7 @@ public class TareasJam : IHttpHandler
|
||||
|
||||
|
||||
dtCloned = DTAlmacenes.Clone();
|
||||
dtCloned.Columns[3].DataType = typeof(string);
|
||||
dtCloned.Columns[3].DataType = typeof(DateTime);
|
||||
|
||||
foreach (DataRow row in DTAlmacenes.Rows)
|
||||
{
|
||||
@@ -233,7 +233,7 @@ public class TareasJam : IHttpHandler
|
||||
DTAlmacenes = dtCloned;
|
||||
foreach (DataRow dRow in DTAlmacenes.Rows)
|
||||
{
|
||||
string tmpDate = dRow[3].ToString().ToDate().ToString("yyyy/MM/dd");
|
||||
DateTime tmpDate = dRow[3].ToString().ToDate().ToString("yyyy/MM/dd").ToDate();
|
||||
dRow[3] = tmpDate;
|
||||
}
|
||||
DTAlmacenes.AcceptChanges();
|
||||
@@ -249,8 +249,6 @@ public class TareasJam : IHttpHandler
|
||||
|
||||
if (!ErrorProceso)
|
||||
{
|
||||
|
||||
|
||||
//////////////////////////////////////////////////////////////
|
||||
int count = 2;
|
||||
var wbVentas = new ClosedXML.Excel.XLWorkbook(FormatoVentas);
|
||||
@@ -261,7 +259,7 @@ public class TareasJam : IHttpHandler
|
||||
wsVentas.Cell(count, 1).Value = "'" + DRow["systemId"].ToString();
|
||||
wsVentas.Cell(count, 2).Value = DRow["Branch"].ToString();
|
||||
wsVentas.Cell(count, 3).Value = "'" + DRow["Code"].ToString();
|
||||
wsVentas.Cell(count, 4).Value = "'" + DRow["Sale Date"].ToString();
|
||||
wsVentas.Cell(count, 4).Value = DRow["Sale Date"].ToString();
|
||||
wsVentas.Cell(count, 5).Value = DRow["Quantity"].ToString();
|
||||
wsVentas.Cell(count, 6).Value = DRow["Amount"].ToString();
|
||||
wsVentas.Cell(count, 7).Value = DRow["Transaction ID"].ToString();
|
||||
@@ -279,7 +277,7 @@ public class TareasJam : IHttpHandler
|
||||
wsAlmacenes.Cell(count, 1).Value = "'" + DRow["Code"].ToString();
|
||||
wsAlmacenes.Cell(count, 2).Value = DRow["Quantity"].ToString();
|
||||
wsAlmacenes.Cell(count, 3).Value = DRow["Description"].ToString();
|
||||
wsAlmacenes.Cell(count, 4).Value = "'" + DRow["Stock Date"].ToString();
|
||||
wsAlmacenes.Cell(count, 4).Value = DRow["Stock Date"].ToString();
|
||||
count++;
|
||||
}
|
||||
wbAlmacenes.SaveAs(RutaAlmacenes);
|
||||
@@ -455,7 +453,7 @@ public class TareasJam : IHttpHandler
|
||||
Ventas.Ruta = RutaVentas;
|
||||
Clientes.Ruta = RutaClientes;
|
||||
Almacenes.Ruta = RutaAlmacenes;
|
||||
|
||||
|
||||
ListaArchivos.Add(Productos);
|
||||
ListaArchivos.Add(Ventas);
|
||||
ListaArchivos.Add(Clientes);
|
||||
@@ -479,7 +477,7 @@ public class TareasJam : IHttpHandler
|
||||
private bool CargarArchivos(FileInfo FInfo, string FTPServer, string FTPUsr, string FTPPass )
|
||||
{
|
||||
bool Respuesta;
|
||||
|
||||
|
||||
if (FInfo.Exists)
|
||||
{
|
||||
FtpWebRequest request = (FtpWebRequest)WebRequest.Create($"{FTPServer}/{FInfo.Name}");
|
||||
|
||||
Reference in New Issue
Block a user