Talamus Correción Columnas
This commit is contained in:
@@ -63,8 +63,36 @@ public class TareasJam : IHttpHandler
|
|||||||
string RutaClientes = $@"{ HttpContext.Current.Server.MapPath("~") }Temp\Clientes{DateTime.Now.ToString("yyyyMMdd")}.xlsx";
|
string RutaClientes = $@"{ HttpContext.Current.Server.MapPath("~") }Temp\Clientes{DateTime.Now.ToString("yyyyMMdd")}.xlsx";
|
||||||
string RutaAlmacenes = $@"{ HttpContext.Current.Server.MapPath("~") }Temp\Almacenes{DateTime.Now.ToString("yyyyMMdd")}.xlsx";
|
string RutaAlmacenes = $@"{ HttpContext.Current.Server.MapPath("~") }Temp\Almacenes{DateTime.Now.ToString("yyyyMMdd")}.xlsx";
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
if (File.Exists(RutaProductos))
|
||||||
|
{
|
||||||
|
File.Delete(RutaProductos);
|
||||||
|
}
|
||||||
|
|
||||||
//"ftp://us2.hostedftp.com/", "agrojam", "A12345678";
|
if (File.Exists(RutaVentas))
|
||||||
|
{
|
||||||
|
File.Delete(RutaVentas);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (File.Exists(RutaClientes))
|
||||||
|
{
|
||||||
|
File.Delete(RutaClientes);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (File.Exists(RutaAlmacenes))
|
||||||
|
{
|
||||||
|
File.Delete(RutaAlmacenes);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
catch (Exception ex) {
|
||||||
|
SBLog.AppendLine("<b>Error al eliminar archivos</b>");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
////"ftp://us2.hostedftp.com/", "agrojam", "A12345678";
|
||||||
//string FTPServer = "ftp://127.0.0.1/";
|
//string FTPServer = "ftp://127.0.0.1/";
|
||||||
//string TFPUsr = "Toor";
|
//string TFPUsr = "Toor";
|
||||||
//string FTPPass = "agj-3500";
|
//string FTPPass = "agj-3500";
|
||||||
@@ -148,18 +176,27 @@ public class TareasJam : IHttpHandler
|
|||||||
DTClientes.Columns[11].ColumnName = "phone.areaCode";
|
DTClientes.Columns[11].ColumnName = "phone.areaCode";
|
||||||
DTClientes.Columns[12].ColumnName = "phone.number";
|
DTClientes.Columns[12].ColumnName = "phone.number";
|
||||||
|
|
||||||
DTClientes.Columns.RemoveAt(12);
|
//DTClientes.Columns.RemoveAt(12);
|
||||||
DTClientes.Columns.RemoveAt(11);
|
//DTClientes.Columns.RemoveAt(11);
|
||||||
DTClientes.Columns.RemoveAt(10);
|
//DTClientes.Columns.RemoveAt(10);
|
||||||
DTClientes.Columns.RemoveAt(8);
|
//DTClientes.Columns.RemoveAt(8);
|
||||||
DTClientes.Columns.RemoveAt(7);
|
//DTClientes.Columns.RemoveAt(7);
|
||||||
DTClientes.AcceptChanges();
|
DTClientes.AcceptChanges();
|
||||||
|
|
||||||
DTVentas.Columns.RemoveAt(7);
|
DTVentas.Columns.RemoveAt(7);
|
||||||
DTVentas.Columns.RemoveAt(6);
|
//DTVentas.Columns.RemoveAt(6);
|
||||||
|
|
||||||
|
DTVentas.Columns[3].ColumnName = "Sale Date";
|
||||||
|
DTVentas.Columns[6].ColumnName = "Transaction ID";
|
||||||
DTVentas.AcceptChanges();
|
DTVentas.AcceptChanges();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
DTAlmacenes.Columns[2].ColumnName = "Description";
|
||||||
|
DTAlmacenes.Columns[3].ColumnName = "Stock Date";
|
||||||
|
DTAlmacenes.AcceptChanges();
|
||||||
|
|
||||||
|
|
||||||
DataTable dtCloned = DTVentas.Clone();
|
DataTable dtCloned = DTVentas.Clone();
|
||||||
dtCloned.Columns[3].DataType = typeof(string);
|
dtCloned.Columns[3].DataType = typeof(string);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user