Talamus
This commit is contained in:
@@ -94,14 +94,14 @@ public class TareasJam : IHttpHandler
|
|||||||
|
|
||||||
//"ftp://us2.hostedftp.com/", "agrojam", "A12345678";
|
//"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";
|
||||||
|
|
||||||
|
|
||||||
string FTPServer = "ftp://us2.hostedftp.com";
|
//string FTPServer = "ftp://us2.hostedftp.com";
|
||||||
string TFPUsr = "agrojam";
|
//string TFPUsr = "agrojam";
|
||||||
string FTPPass = "A12345678";
|
//string FTPPass = "A12345678";
|
||||||
|
|
||||||
bool ErrorProceso = false;
|
bool ErrorProceso = false;
|
||||||
|
|
||||||
@@ -198,8 +198,8 @@ public class TareasJam : IHttpHandler
|
|||||||
DTAlmacenes.AcceptChanges();
|
DTAlmacenes.AcceptChanges();
|
||||||
|
|
||||||
|
|
||||||
DataTable dtCloned = DTVentas.Clone();
|
DataTable dtCloned = DTVentas.Clone();
|
||||||
dtCloned.Columns[3].DataType = typeof(string);
|
dtCloned.Columns[3].DataType = typeof(DateTime);
|
||||||
|
|
||||||
foreach (DataRow row in DTVentas.Rows)
|
foreach (DataRow row in DTVentas.Rows)
|
||||||
{
|
{
|
||||||
@@ -207,17 +207,17 @@ public class TareasJam : IHttpHandler
|
|||||||
}
|
}
|
||||||
|
|
||||||
DTVentas = dtCloned;
|
DTVentas = dtCloned;
|
||||||
foreach(DataRow dRow in DTVentas.Rows)
|
foreach (DataRow dRow in DTVentas.Rows)
|
||||||
{
|
{
|
||||||
string tmpString = dRow[3].ToString().ToDate().ToString("yyyy/MM/dd");
|
DateTime tmpDate = dRow[3].ToString().ToDate().ToString("yyyy/MM/dd").ToDate();
|
||||||
dRow[3] = tmpString;
|
dRow[3] = tmpDate;
|
||||||
}
|
}
|
||||||
|
|
||||||
DTVentas.AcceptChanges();
|
DTVentas.AcceptChanges();
|
||||||
|
|
||||||
|
|
||||||
dtCloned = DTAlmacenes.Clone();
|
dtCloned = DTAlmacenes.Clone();
|
||||||
dtCloned.Columns[3].DataType = typeof(string);
|
dtCloned.Columns[3].DataType = typeof(DateTime);
|
||||||
|
|
||||||
foreach (DataRow row in DTAlmacenes.Rows)
|
foreach (DataRow row in DTAlmacenes.Rows)
|
||||||
{
|
{
|
||||||
@@ -225,10 +225,10 @@ public class TareasJam : IHttpHandler
|
|||||||
}
|
}
|
||||||
|
|
||||||
DTAlmacenes = dtCloned;
|
DTAlmacenes = dtCloned;
|
||||||
foreach(DataRow dRow in DTAlmacenes.Rows)
|
foreach (DataRow dRow in DTAlmacenes.Rows)
|
||||||
{
|
{
|
||||||
string tmpString = dRow[3].ToString().ToDate().ToString("yyyy/MM/dd");
|
DateTime tmpDate = dRow[3].ToString().ToDate().ToString("yyyy/MM/dd").ToDate();
|
||||||
dRow[3] = tmpString;
|
dRow[3] = tmpDate;
|
||||||
}
|
}
|
||||||
DTAlmacenes.AcceptChanges();
|
DTAlmacenes.AcceptChanges();
|
||||||
|
|
||||||
@@ -252,6 +252,16 @@ public class TareasJam : IHttpHandler
|
|||||||
|
|
||||||
SpreadsheetInfo.SetLicense(Extensiones.ModExtensiones.SerialGemBoxSpreadsheet());
|
SpreadsheetInfo.SetLicense(Extensiones.ModExtensiones.SerialGemBoxSpreadsheet());
|
||||||
|
|
||||||
|
var workbookAlmacenes = new ExcelFile();
|
||||||
|
var worksheetAlmacenes = workbookAlmacenes.Worksheets.Add("Almacenes");
|
||||||
|
worksheetAlmacenes.InsertDataTable(DTAlmacenes, new InsertDataTableOptions()
|
||||||
|
{
|
||||||
|
ColumnHeaders = true,
|
||||||
|
StartRow = 0
|
||||||
|
});
|
||||||
|
worksheetAlmacenes.Columns[3].Style.NumberFormat = "yyyy/MM/dd";
|
||||||
|
workbookAlmacenes.Save(RutaAlmacenes);
|
||||||
|
|
||||||
var workbookProductos = new ExcelFile();
|
var workbookProductos = new ExcelFile();
|
||||||
var worksheetProductos = workbookProductos.Worksheets.Add("Productos");
|
var worksheetProductos = workbookProductos.Worksheets.Add("Productos");
|
||||||
worksheetProductos.InsertDataTable(DTProductos, new InsertDataTableOptions()
|
worksheetProductos.InsertDataTable(DTProductos, new InsertDataTableOptions()
|
||||||
@@ -268,6 +278,7 @@ public class TareasJam : IHttpHandler
|
|||||||
ColumnHeaders = true,
|
ColumnHeaders = true,
|
||||||
StartRow = 0
|
StartRow = 0
|
||||||
});
|
});
|
||||||
|
worksheetVentas.Columns[3].Style.NumberFormat = "yyyy/MM/dd";
|
||||||
workbookVentas.Save(RutaVentas);
|
workbookVentas.Save(RutaVentas);
|
||||||
|
|
||||||
|
|
||||||
@@ -281,14 +292,7 @@ public class TareasJam : IHttpHandler
|
|||||||
workbookClientes.Save(RutaClientes);
|
workbookClientes.Save(RutaClientes);
|
||||||
|
|
||||||
|
|
||||||
var workbookAlmacenes = new ExcelFile();
|
|
||||||
var worksheetAlmacenes = workbookAlmacenes.Worksheets.Add("Almacenes");
|
|
||||||
worksheetAlmacenes.InsertDataTable(DTAlmacenes, new InsertDataTableOptions()
|
|
||||||
{
|
|
||||||
ColumnHeaders = true,
|
|
||||||
StartRow = 0
|
|
||||||
});
|
|
||||||
workbookAlmacenes.Save(RutaAlmacenes);
|
|
||||||
|
|
||||||
|
|
||||||
var FInfoProductos = new FileInfo(RutaProductos);
|
var FInfoProductos = new FileInfo(RutaProductos);
|
||||||
@@ -434,8 +438,8 @@ public class TareasJam : IHttpHandler
|
|||||||
|
|
||||||
|
|
||||||
ClsSisMail Correo = new ClsSisMail();
|
ClsSisMail Correo = new ClsSisMail();
|
||||||
string Para = "julian@adssistemas.mx;rene.molina@adssistemas.mx;oscar.irigoyen@adssistemas.mx";
|
// string Para = "julian@adssistemas.mx;rene.molina@adssistemas.mx;oscar.irigoyen@adssistemas.mx";
|
||||||
//string Para = "oscar.irigoyen@adssistemas.mx";
|
string Para = "oscar.irigoyen@adssistemas.mx";
|
||||||
string Asunto = ErrorProceso ? $"Carga Layout Corteva {DateTime.Now.ToString("yyyy-MM-dd")}" : $"Carga Layout Corteva Error {DateTime.Now.ToString("yyyy-MM-dd")}";
|
string Asunto = ErrorProceso ? $"Carga Layout Corteva {DateTime.Now.ToString("yyyy-MM-dd")}" : $"Carga Layout Corteva Error {DateTime.Now.ToString("yyyy-MM-dd")}";
|
||||||
|
|
||||||
Correo.SendMail(ClsPaginas.EmpresaNotificaciones, Para, Asunto, Cuerpo, Archivos:ListaArchivos);
|
Correo.SendMail(ClsPaginas.EmpresaNotificaciones, Para, Asunto, Cuerpo, Archivos:ListaArchivos);
|
||||||
|
|||||||
Reference in New Issue
Block a user