Cambios Compras

This commit is contained in:
Rakcsle Supertramp
2020-12-02 11:11:15 -07:00
parent 9032c10f35
commit e75da60228
2 changed files with 251 additions and 218 deletions

View File

@@ -2688,8 +2688,19 @@ Partial Class Compras_Compras
TmpDT.Columns.Add("CveContrato", GetType(Integer)) TmpDT.Columns.Add("CveContrato", GetType(Integer))
TmpDT.Columns.Add("DifPSSat", GetType(Integer)) TmpDT.Columns.Add("DifPSSat", GetType(Integer))
If Not TmpDT.Columns.Contains("CveContratoDetalle") Then
TmpDT.Columns.Add("CveContratoDetalle", GetType(Integer)) TmpDT.Columns.Add("CveContratoDetalle", GetType(Integer))
End If
If Not TmpDT.Columns.Contains("CveCultivoCuadroDetalle") Then
TmpDT.Columns.Add("CveCultivoCuadroDetalle", GetType(Integer)) TmpDT.Columns.Add("CveCultivoCuadroDetalle", GetType(Integer))
End If
GvPS.DataSource = TmpDT GvPS.DataSource = TmpDT

View File

@@ -273,12 +273,19 @@ public class TareasJam : IHttpHandler
if (!ErrorProceso) if (!ErrorProceso)
{ {
try
{
////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////
this.GuardaLog($"EjecutaThalamus: llenando archivo excel ventas. "); this.GuardaLog($"EjecutaThalamus: llenando archivo excel ventas. ");
int count = 2; int count = 2;
var wbVentas = new ClosedXML.Excel.XLWorkbook(FormatoVentas); var wbVentas = new ClosedXML.Excel.XLWorkbook(FormatoVentas);
this.GuardaLog($"EjecutaThalamus: archivo excel ventas cargado. ");
this.GuardaLog($"EjecutaThalamus: archivo excel ventas creando sheet.");
var wsVentas = wbVentas.Worksheet(1); var wsVentas = wbVentas.Worksheet(1);
this.GuardaLog($"EjecutaThalamus: archivo excel ventas sheet creada.");
foreach (DataRow DRow in DTVentas.Rows) foreach (DataRow DRow in DTVentas.Rows)
{ {
@@ -340,7 +347,7 @@ public class TareasJam : IHttpHandler
this.GuardaLog($"EjecutaThalamus: guardando archivo excel clientes " + RutaClientes + " "); this.GuardaLog($"EjecutaThalamus: guardando archivo excel clientes " + RutaClientes + " ");
wbAClientes.SaveAs(RutaClientes); wbAClientes.SaveAs(RutaClientes);
var wbProductos= new ClosedXML.Excel.XLWorkbook(FormatoProductos); var wbProductos = new ClosedXML.Excel.XLWorkbook(FormatoProductos);
var wsProductos = wbProductos.Worksheet(1); var wsProductos = wbProductos.Worksheet(1);
count = 2; count = 2;
@@ -357,6 +364,16 @@ public class TareasJam : IHttpHandler
wbProductos.SaveAs(RutaProductos); wbProductos.SaveAs(RutaProductos);
///////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////
}
catch (Exception ex)
{
this.GuardaLog($"EjecutaThalamus: Error procesamiento archivos exel " + ex.StackTrace.ToString() + " ");
ErrorProceso = true;
Respuesta = false;
}
if (!ErrorProceso)
{
var FInfoProductos = new FileInfo(RutaProductos); var FInfoProductos = new FileInfo(RutaProductos);
var FInfoVentas = new FileInfo(RutaVentas); var FInfoVentas = new FileInfo(RutaVentas);
var FInfoClientes = new FileInfo(RutaClientes); var FInfoClientes = new FileInfo(RutaClientes);
@@ -459,6 +476,11 @@ public class TareasJam : IHttpHandler
Respuesta = false; Respuesta = false;
} }
}else
{
Respuesta = false;
}
SBLog.AppendLine("</table>"); SBLog.AppendLine("</table>");
} }