This commit is contained in:
Antonio Gonzalez
2020-06-06 14:37:25 -07:00
23 changed files with 451 additions and 162 deletions

View File

@@ -24,6 +24,8 @@ Public Class ClsClientes
Private disposedValue As Boolean = False ' Para detectar llamadas redundantes Private disposedValue As Boolean = False ' Para detectar llamadas redundantes
'REGISTRAR CONEXIÓN 'REGISTRAR CONEXIÓN
Private CveConexion As Integer = 0 Private CveConexion As Integer = 0
Private EsTransaccionCompartida As Boolean = False
#End Region #End Region
#Region "Propiedades" #Region "Propiedades"
@@ -187,6 +189,7 @@ Public Class ClsClientes
Else Else
SqlConexion = TransaccionCompartida.Connection SqlConexion = TransaccionCompartida.Connection
SqlTransacc = TransaccionCompartida SqlTransacc = TransaccionCompartida
EsTransaccionCompartida = True
End If End If
SqlCommand = New SqlCommand("", SqlConexion) SqlCommand = New SqlCommand("", SqlConexion)
@@ -205,7 +208,7 @@ Public Class ClsClientes
#Region "Conexiones" #Region "Conexiones"
Private Sub ConexionAdd() Private Sub ConexionAdd()
If ConfigurationManager.AppSettings("RegistraConexion") IsNot Nothing AndAlso ConfigurationManager.AppSettings("RegistraConexion").ToString() = "1" Then If Not EsTransaccionCompartida AndAlso ConfigurationManager.AppSettings("RegistraConexion") IsNot Nothing AndAlso ConfigurationManager.AppSettings("RegistraConexion").ToString() = "1" Then
Try Try
DataAdapter("PA_Sis_RegistrarConexion") DataAdapter("PA_Sis_RegistrarConexion")
With SqlAdapter.SelectCommand.Parameters With SqlAdapter.SelectCommand.Parameters

View File

@@ -5045,8 +5045,8 @@ Public Class ClsPaginas
Protected Overrides Sub SavePageStateToPersistenceMedium(pviewState As Object) Protected Overrides Sub SavePageStateToPersistenceMedium(pviewState As Object)
'If Request.Form("__VIEWSTATE_KEY") IsNot Nothing Then Cache.Remove(Request.Form("__VIEWSTATE_KEY")) 'elimino la cachado anteriormente 'If Request.Form("__VIEWSTATE_KEY") IsNot Nothing Then Cache.Remove(Request.Form("__VIEWSTATE_KEY")) 'elimino la cachado anteriormente
Dim VSKey As String = String.Format("VIEWSTATE_{0}_{1}_{2}", Session.SessionID, Request.Path, Date.Now.Ticks) Dim VSKey As String = String.Format("VIEWSTATE_{0}_{1}_{2}", Session.SessionID, Request.Path, Date.Now.Ticks)
'Cache.Add(VSKey, pviewState, Nothing, Date.Now.AddMinutes(60), Cache.NoSlidingExpiration, CacheItemPriority.Default, Nothing) 'Store the ViewState on Cache Cache.Add(VSKey, pviewState, Nothing, Date.Now.AddMinutes(60), Cache.NoSlidingExpiration, CacheItemPriority.Default, Nothing) 'Store the ViewState on Cache
Session.Add(VSKey, pviewState) 'Store the ViewState on Cache 'Session.Add(VSKey, pviewState) 'Store the ViewState on Cache
ClientScript.RegisterHiddenField("__VIEWSTATE_KEY", VSKey) ClientScript.RegisterHiddenField("__VIEWSTATE_KEY", VSKey)
End Sub End Sub
@@ -5056,11 +5056,11 @@ Public Class ClsPaginas
If Not VSKey.StartsWith("VIEWSTATE_") Then 'Request the Key from the page and validade it. If Not VSKey.StartsWith("VIEWSTATE_") Then 'Request the Key from the page and validade it.
Throw New Exception(String.Format("Invalid VIEWSTATE Key: {0}", VSKey)) Throw New Exception(String.Format("Invalid VIEWSTATE Key: {0}", VSKey))
End If End If
If Session(VSKey) Is Nothing Then 'si por algún motivo, el caché expiró, le dice a la página que se recargue y obtenga los datos de nuevo, y así evitar errores al obtener el viewstate vacío If Cache(VSKey) Is Nothing Then 'si por algún motivo, el caché expiró, le dice a la página que se recargue y obtenga los datos de nuevo, y así evitar errores al obtener el viewstate vacío
Response.Redirect(Request.RawUrl) Response.Redirect(Request.RawUrl)
Return Nothing Return Nothing
Else Else
Return Session(VSKey) Return Cache(VSKey)
End If End If
End Function End Function
@@ -5268,6 +5268,8 @@ Public Class ClsPaginas
params.Add(param) params.Add(param)
Next Next
Bytes = wsreport.StreamPDFBytes(RutaReporte, ds, params.ToArray(), NombreArchivo, Formato, CveEmpresa, CveUsuario) Bytes = wsreport.StreamPDFBytes(RutaReporte, ds, params.ToArray(), NombreArchivo, Formato, CveEmpresa, CveUsuario)
wsreport = Nothing
params = Nothing
Else Else
If IsNothing(MR) Then MR = New ReportViewer If IsNothing(MR) Then MR = New ReportViewer
Try Try
@@ -5340,6 +5342,7 @@ Public Class ClsPaginas
End If End If
sw.Stop() sw.Stop()
If sw.Elapsed.TotalSeconds > 5 Then If sw.Elapsed.TotalSeconds > 5 Then
GuardaLog($"Reporte:{RutaReporte} | Tiempo Renderizado Milisegundos: {sw.ElapsedMilliseconds},Total Segundos: {sw.Elapsed.TotalSeconds} ") GuardaLog($"Reporte:{RutaReporte} | Tiempo Renderizado Milisegundos: {sw.ElapsedMilliseconds},Total Segundos: {sw.Elapsed.TotalSeconds} ")
End If End If
@@ -5592,7 +5595,7 @@ Public Class ClsPaginas
HttpContext.Current.Response.SuppressContent = True HttpContext.Current.Response.SuppressContent = True
HttpContext.Current.ApplicationInstance.CompleteRequest() HttpContext.Current.ApplicationInstance.CompleteRequest()
HttpContext.Current.Response.End() HttpContext.Current.Response.End()
bytes = Nothing
Catch ex As Exception Catch ex As Exception
If UsuarioActual.CveRol = 1 Then If UsuarioActual.CveRol = 1 Then

View File

@@ -210,23 +210,24 @@ Public Class ClsSisNotificaciones
Private Sub EnviarCorreos(DTNotificacionesCorreo As DataTable) Private Sub EnviarCorreos(DTNotificacionesCorreo As DataTable)
For Each notificacion As DataRow In DTNotificacionesCorreo.Rows For Each notificacion As DataRow In DTNotificacionesCorreo.Rows
MandaMail(notificacion("CveNotificacionBitacora").ToString.ToEntero, notificacion("Encabezado").ToString, notificacion("Cuerpo").ToString, notificacion("Correo").ToString, "") Dim Hilo As New System.Threading.Thread(Sub() MandaMail(notificacion("CveNotificacionBitacora").ToString.ToEntero, notificacion("Encabezado").ToString, notificacion("Cuerpo").ToString, notificacion("Correo").ToString, ""))
Hilo.Start()
Next Next
End Sub End Sub
Private Sub MandaMail(CveNotificacionBitacora As Integer, Asunto As String, Cuerpo As String, Mail As String, MailCC As String) Private Sub MandaMail(CveNotificacionBitacora As Integer, Asunto As String, Cuerpo As String, Mail As String, MailCC As String)
Dim ObjMail As New ClsSisMail() Dim ObjMail As New ClsSisMail()
Dim ObjNotificacion As New ClsSisNotificaciones
Try Try
Dim ResultadoMail As Integer = 0 Dim ResultadoMail As Integer = 0
Dim LSRutasMail As New List(Of ClsSisMail.ArchivoMail) Dim LSRutasMail As New List(Of ClsSisMail.ArchivoMail)
If ObjMail.SendMail(ClsPaginas.EmpresaNotificaciones, Mail, Asunto, Cuerpo, MailCC, LSRutasMail) Then If ObjMail.SendMail(ClsPaginas.EmpresaNotificaciones, Mail, Asunto, Cuerpo, MailCC, LSRutasMail) Then
UpdateNotificacionesBitacoraNotifico(CveNotificacionBitacora, 1) ObjNotificacion.UpdateNotificacionesBitacoraNotifico(CveNotificacionBitacora, 1)
End If End If
Catch ex As Exception Catch ex As Exception
OnError("Ocurrió error al mandar el Mail", ex) OnError("Ocurrió error al mandar el Mail", ex)
End Try End Try
ObjNotificacion.Dispose()
End Sub End Sub
#End Region #End Region
@@ -1328,10 +1329,6 @@ Public Class ClsSisNotificaciones
Next Next
End If End If
If DTNotificacionesCorreo IsNot Nothing AndAlso DTNotificacionesCorreo.Rows.Count > 0 Then
EnviarCorreos(DTNotificacionesCorreo)
End If
If DTNotificacionesApp IsNot Nothing AndAlso DTNotificacionesApp.Rows.Count > 0 Then If DTNotificacionesApp IsNot Nothing AndAlso DTNotificacionesApp.Rows.Count > 0 Then
Dim DtTokens As DataTable = Nothing Dim DtTokens As DataTable = Nothing
@@ -1391,6 +1388,10 @@ Public Class ClsSisNotificaciones
End If End If
End If End If
If DTNotificacionesCorreo IsNot Nothing AndAlso DTNotificacionesCorreo.Rows.Count > 0 Then
EnviarCorreos(DTNotificacionesCorreo)
End If
If Not DTNotificacionesApp Is Nothing Then DTNotificacionesApp.Dispose() If Not DTNotificacionesApp Is Nothing Then DTNotificacionesApp.Dispose()
'If Not DTNotificacionesCampana Is Nothing Then DTNotificacionesCampana.Dispose() 'If Not DTNotificacionesCampana Is Nothing Then DTNotificacionesCampana.Dispose()
If Not DTNotificacionesCorreo Is Nothing Then DTNotificacionesCorreo.Dispose() If Not DTNotificacionesCorreo Is Nothing Then DTNotificacionesCorreo.Dispose()

View File

@@ -192,10 +192,10 @@ Namespace Extensiones
Public Sub GuardaLogAD(Mensaje As String, Optional Archivo As String = "Log") Public Sub GuardaLogAD(Mensaje As String, Optional Archivo As String = "Log")
Dim ArchivoW As StreamWriter Dim ArchivoW As StreamWriter
Dim MensajeFormato = $"{Chr(13)}{Chr(10)}Log: {Mensaje} | Fecha:{Now.ToString("dd/MM/yyyy HH:mm")}" Dim MensajeFormato = String.Format("{0}{1}Log: {2} | Fecha:{3}", Chr(13), Chr(10), Mensaje, Now.ToString("dd/MM/yyyy HH:mm"))
Try Try
ArchivoW = New StreamWriter($"{AppDomain.CurrentDomain.BaseDirectory}\Log\{Archivo}.txt", True, System.Text.Encoding.UTF8) ArchivoW = New StreamWriter(String.Format("{0}\Log\{1}.txt", AppDomain.CurrentDomain.BaseDirectory, Archivo), True, System.Text.Encoding.UTF8)
Catch ex As UnauthorizedAccessException Catch ex As UnauthorizedAccessException
'Alert("No hay permisos para guardar en el Log.", Extensiones.TipoMensaje.MsgError) 'Alert("No hay permisos para guardar en el Log.", Extensiones.TipoMensaje.MsgError)
Exit Sub Exit Sub

View File

@@ -2292,7 +2292,7 @@ Partial Class Bancos_ProveedoresAbonar
'If Archivo.Exists Then 'If Archivo.Exists Then
Msg.AppendFormat("<li> <a class=""Texto"" target='_blank' href=""/Compras/PopUpVerFactura.aspx?P={0}"">Imprimir movimiento</a></li> ", Encripta(String.Format("OP=IECHEQUE&CVEIE={0}", CveIE))) Msg.AppendFormat("<li> <a class=""Texto"" target='_blank' href=""/Compras/PopUpVerFactura.aspx?P={0}"">Imprimir movimiento</a></li> ", Encripta(String.Format("OP=IECHEQUE&CVEIE={0}", CveIE)))
'End If 'End If
Msg.AppendFormat("<li><a class=""Texto"" target='_blank' href=""/Bancos/Reportes.aspx?Opcion=ImprimeMov&CveIE={0}"">Listado</a></li>", CveIE) Msg.AppendFormat("<li><a class=""Texto"" target='_blank' href=""/Compras/PopUpVerFactura.aspx?P={0}"">Listado</a></li>", Encripta(String.Format("Opcion=ImprimeMov&CveIE={0}", CveIE)))
If IDPoliza > 0 Then Msg.AppendFormat("<li><a class=""Texto"" target='_blank' href=""/Contabilidad/RegPoliza.aspx?IdPoliza={0}"">Póliza</a></li>", IDPoliza) If IDPoliza > 0 Then Msg.AppendFormat("<li><a class=""Texto"" target='_blank' href=""/Contabilidad/RegPoliza.aspx?IdPoliza={0}"">Póliza</a></li>", IDPoliza)
Dim Mensaje As String = String.Format("<br />El Documento se generó correctamente.<br /><br /><br />Descargas:<ul>{0}</ul>", Msg.ToString) Dim Mensaje As String = String.Format("<br />El Documento se generó correctamente.<br /><br /><br />Descargas:<ul>{0}</ul>", Msg.ToString)

View File

@@ -4047,6 +4047,7 @@ Partial Class PopUpVerFactura
ObjCompra.Dispose() ObjCompra.Dispose()
Dim rds2 = New ReportDataSource("DataSet2", dtnc) Dim rds2 = New ReportDataSource("DataSet2", dtnc)
reportDataSetsList.Add(rds2) reportDataSetsList.Add(rds2)
dtnc.Dispose()
Dim paramList As New List(Of ReportParameter) Dim paramList As New List(Of ReportParameter)
With paramList With paramList
@@ -4075,15 +4076,19 @@ Partial Class PopUpVerFactura
End If End If
End With End With
dtMovs.Dispose()
ImprimirPDF("Empresas\Grales\Formatos\rptChequeMovimientos.rdlc", reportDataSetsList, paramList, ObjIE.Folio, "PDF")
ImprimirPDF("Empresas\Grales\Formatos\rptChequeMovimientos.rdlc", reportDataSetsList, paramList, "IE Movimient", "PDF")
End If End If
End If End If
End If End If
DtGvRH.Dispose()
DtComprobacion.Dispose()
ParamComprobacion.Dispose()
ObjIE.Dispose() ObjIE.Dispose()
End Sub End Sub

View File

@@ -1432,11 +1432,11 @@ Partial Class Compras_ReembolsosComprobaciones
Dim Mensaje As New StringBuilder Dim Mensaje As New StringBuilder
If CvePrePolizaExcedente > 0 Then If CvePrePolizaExcedente > 0 Then
Mensaje.AppendFormat("Abono Registrado Correctamente. <br/><br/> Cheque: <a target='_blank' href=/Bancos/IE.aspx?CveIE={0}>{1}</a> <br/><br/> <a target='_blank' href=""/Bancos/Reportes.aspx?Opcion=ImprimeMov&CveIE={0}"">Imprimir</a>", CveIEExcedente, TxtFolio.Text) Mensaje.AppendFormat("Abono Registrado Correctamente. <br/><br/> Cheque: <a target='_blank' href=/Bancos/IE.aspx?CveIE={0}>{1}</a> <br/><br/> <a target='_blank' href=""/Compras/PopUpVerFactura.aspx?P={2}"">Imprimir</a>", CveIEExcedente, TxtFolio.Text, Encripta(String.Format("Opcion=ImprimeMov&CveIE={0}", CveIEExcedente)))
Mensaje.AppendFormat("</br> <br/>Póliza: <b> <a href='/Contabilidad/RegPoliza.aspx?IdPoliza={0}' class='Texto' target='_blank'>{1}</a><br/>", ObjMov.ContaIdPoliza, ObjMov.ContaFolio) Mensaje.AppendFormat("</br> <br/>Póliza: <b> <a href='/Contabilidad/RegPoliza.aspx?IdPoliza={0}' class='Texto' target='_blank'>{1}</a><br/>", ObjMov.ContaIdPoliza, ObjMov.ContaFolio)
Alert(Mensaje.ToString, TipoMensaje.MsgInformacion) Alert(Mensaje.ToString, TipoMensaje.MsgInformacion)
Else Else
Mensaje.AppendFormat("Abono Registrado Correctamente. <br/><br/> <a class=""Texto"" target='_blank' href=""/Bancos/Reportes.aspx?Opcion=ImprimeMov&CveIE={0}"">Imprimir</a>", CveIERegistrado) Mensaje.AppendFormat("Abono Registrado Correctamente. <br/><br/> <a class=""Texto"" target='_blank' href=""/Compras/PopUpVerFactura.aspx?P={0}"">Imprimir</a>", Encripta(String.Format("Opcion=ImprimeMov&CveIE={0}", CveIERegistrado)))
If CvePrePolizaIERegistrado > 0 Then If CvePrePolizaIERegistrado > 0 Then
Mensaje.AppendFormat("</br> <br/>Póliza: <b> <a href='/Contabilidad/RegPoliza.aspx?IdPoliza={0}' class='Texto' target='_blank'>{1}</a><br/>", ObjMov.ContaIdPoliza, ObjMov.ContaFolio) Mensaje.AppendFormat("</br> <br/>Póliza: <b> <a href='/Contabilidad/RegPoliza.aspx?IdPoliza={0}' class='Texto' target='_blank'>{1}</a><br/>", ObjMov.ContaIdPoliza, ObjMov.ContaFolio)
End If End If

View File

@@ -3089,6 +3089,46 @@
<PaddingBottom>2pt</PaddingBottom> <PaddingBottom>2pt</PaddingBottom>
</Style> </Style>
</Textbox> </Textbox>
<Textbox Name="Cuentas">
<CanGrow>true</CanGrow>
<KeepTogether>true</KeepTogether>
<Paragraphs>
<Paragraph>
<TextRuns>
<TextRun>
<Value>Cuentas Bancarias: </Value>
<Style>
<FontSize>8pt</FontSize>
<FontWeight>Bold</FontWeight>
</Style>
</TextRun>
<TextRun>
<Value>=Parameters!Cuentas.Value</Value>
<MarkupType>HTML</MarkupType>
<Style>
<FontSize>8pt</FontSize>
</Style>
</TextRun>
</TextRuns>
<Style />
</Paragraph>
</Paragraphs>
<rd:DefaultName>Cuentas</rd:DefaultName>
<Top>5.72992cm</Top>
<Left>0.20457cm</Left>
<Height>1.34594cm</Height>
<Width>15.48536cm</Width>
<ZIndex>43</ZIndex>
<Style>
<Border>
<Style>None</Style>
</Border>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>2pt</PaddingBottom>
</Style>
</Textbox>
</ReportItems> </ReportItems>
<Height>5.19589in</Height> <Height>5.19589in</Height>
<Style /> <Style />
@@ -3403,6 +3443,12 @@
<Nullable>true</Nullable> <Nullable>true</Nullable>
<Prompt>ReportParameter1</Prompt> <Prompt>ReportParameter1</Prompt>
</ReportParameter> </ReportParameter>
<ReportParameter Name="Cuentas">
<DataType>String</DataType>
<Nullable>true</Nullable>
<AllowBlank>true</AllowBlank>
<Prompt>ReportParameter1</Prompt>
</ReportParameter>
</ReportParameters> </ReportParameters>
<EmbeddedImages> <EmbeddedImages>
<EmbeddedImage Name="LogoEMD"> <EmbeddedImage Name="LogoEMD">

View File

@@ -2986,6 +2986,46 @@
<PaddingBottom>2pt</PaddingBottom> <PaddingBottom>2pt</PaddingBottom>
</Style> </Style>
</Textbox> </Textbox>
<Textbox Name="Cuentas">
<CanGrow>true</CanGrow>
<KeepTogether>true</KeepTogether>
<Paragraphs>
<Paragraph>
<TextRuns>
<TextRun>
<Value>Cuentas Bancarias: </Value>
<Style>
<FontSize>8pt</FontSize>
<FontWeight>Bold</FontWeight>
</Style>
</TextRun>
<TextRun>
<Value>=Parameters!Cuentas.Value</Value>
<MarkupType>HTML</MarkupType>
<Style>
<FontSize>8pt</FontSize>
</Style>
</TextRun>
</TextRuns>
<Style />
</Paragraph>
</Paragraphs>
<rd:DefaultName>Cuentas</rd:DefaultName>
<Top>5.38277cm</Top>
<Left>0.20457cm</Left>
<Height>1.34594cm</Height>
<Width>15.48536cm</Width>
<ZIndex>42</ZIndex>
<Style>
<Border>
<Style>None</Style>
</Border>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>2pt</PaddingBottom>
</Style>
</Textbox>
</ReportItems> </ReportItems>
<Height>5.1933in</Height> <Height>5.1933in</Height>
<Style /> <Style />
@@ -3027,7 +3067,7 @@
</Paragraph> </Paragraph>
</Paragraphs> </Paragraphs>
<rd:DefaultName>Textbox8</rd:DefaultName> <rd:DefaultName>Textbox8</rd:DefaultName>
<Top>0.08114cm</Top> <Top>0.08113cm</Top>
<Left>0.20457cm</Left> <Left>0.20457cm</Left>
<Height>0.46771cm</Height> <Height>0.46771cm</Height>
<Width>6.86562cm</Width> <Width>6.86562cm</Width>
@@ -3396,6 +3436,12 @@
<Nullable>true</Nullable> <Nullable>true</Nullable>
<Prompt>ReportParameter1</Prompt> <Prompt>ReportParameter1</Prompt>
</ReportParameter> </ReportParameter>
<ReportParameter Name="Cuentas">
<DataType>String</DataType>
<Nullable>true</Nullable>
<AllowBlank>true</AllowBlank>
<Prompt>ReportParameter1</Prompt>
</ReportParameter>
</ReportParameters> </ReportParameters>
<EmbeddedImages> <EmbeddedImages>
<EmbeddedImage Name="LOGOPrisay3"> <EmbeddedImage Name="LOGOPrisay3">

View File

@@ -54,7 +54,7 @@
<br /> <br />
<asp:UpdatePanel runat="server" ID="UppD" UpdateMode="Conditional"> <asp:UpdatePanel runat="server" ID="UppD" UpdateMode="Conditional">
<ContentTemplate> <ContentTemplate>
<asp:GridView ID="GvD" DataKeyNames="CvePS,CveUM,CveAlmacen,PU,Existencia,Serie,CveSeccionAlmacen,FechaCaducidad,Lote" runat="server" AutoGenerateColumns="False" EmptyDataText="No hay movimientos pendientes" CssClass="table table-hover Widthall" GridLines="None"> <asp:GridView ID="GvD" DataKeyNames="CvePS,CveUM,CveAlmacen,PU,Existencia,Serie,SeccionAlmacen,CveSeccionAlmacen,FechaCaducidad,Lote,Codigo,PS" runat="server" AutoGenerateColumns="False" EmptyDataText="No hay movimientos pendientes" CssClass="table table-hover Widthall" GridLines="None">
<Columns> <Columns>
<asp:BoundField HeaderText="Producto" DataField="CodigoPS" /> <asp:BoundField HeaderText="Producto" DataField="CodigoPS" />
<asp:BoundField HeaderText="Serie" DataField="Serie" ItemStyle-Width="5%" /> <asp:BoundField HeaderText="Serie" DataField="Serie" ItemStyle-Width="5%" />

View File

@@ -1,6 +1,7 @@
 
Imports System.Data Imports System.Data
Imports Extensiones Imports Extensiones
Imports GemBox.Spreadsheet
Partial Class Inventarios_AjustesSeccionAlmacen Partial Class Inventarios_AjustesSeccionAlmacen
Inherits ClsPaginas Inherits ClsPaginas
@@ -145,21 +146,69 @@ Partial Class Inventarios_AjustesSeccionAlmacen
End Sub End Sub
Protected Sub BtnDescargar_Click(sender As Object, e As EventArgs) Handles LbDescargarExcel.Click, BtnDescargar.Click Protected Sub BtnDescargar_Click(sender As Object, e As EventArgs) Handles LbDescargarExcel.Click, BtnDescargar.Click
Dim Directorio As String = ModExtensiones.DirectorioBaseEmpresas & "Empresas\Grales\Formatos\FormatoAjusteSecCad.xlsx" If GvD.Rows.Count > 0 Then
Dim Archivo As New IO.FileInfo(Directorio) DescargarExcel()
If Archivo.Exists Then Else
Response.Clear() Dim Directorio As String = ModExtensiones.DirectorioBaseEmpresas & "Empresas\Grales\Formatos\FormatoAjusteSecCad.xlsx"
Response.ClearHeaders() Dim Archivo As New IO.FileInfo(Directorio)
Response.ClearContent() If Archivo.Exists Then
Response.AddHeader("Content-Disposition", "attachment; filename=" + Archivo.Name) Response.Clear()
Response.AddHeader("Content-Length", Archivo.Length.ToString()) Response.ClearHeaders()
Response.ContentType = "text/plain" Response.ClearContent()
Response.Flush() Response.AddHeader("Content-Disposition", "attachment; filename=" + Archivo.Name)
Response.TransmitFile(Archivo.FullName) Response.AddHeader("Content-Length", Archivo.Length.ToString())
Response.End() Response.ContentType = "text/plain"
Response.Flush()
Response.TransmitFile(Archivo.FullName)
Response.End()
End If
End If End If
End Sub End Sub
Private Sub DescargarExcel()
Dim DtExcel As DataTable = (From row As GridViewRow In GvD.Rows
Where row.RowType = DataControlRowType.DataRow
Select New With
{
.Cantidad = row.DataKey("Existencia"),
.Codigo = row.DataKey("Codigo"),
.PS = row.DataKey("PS"),
.SeccionAlmacen = row.DataKey("SeccionAlmacen"),
.Serie = row.DataKey("Serie"),
.Lote = row.DataKey("Lote"),
.FechaCaducidad = row.DataKey("FechaCaducidad")
}).QueryToDataTable(True)
If DtExcel.Rows.Count < 1 Then
Alert("No hay resutados en la busqueda.", TipoMensaje.MsgAdvertencia)
Exit Sub
End If
DtExcel.TableName = "Ajustes"
DtExcel.Columns("Codigo").ColumnName = "Código"
DtExcel.Columns("PS").ColumnName = "Producto/Servicio"
SpreadsheetInfo.SetLicense(ModExtensiones.SerialGemBoxSpreadsheet)
Dim FileExcel As New ExcelFile()
Dim worksheet = FileExcel.Worksheets.Add(DtExcel.TableName)
worksheet.InsertDataTable(DtExcel, New InsertDataTableOptions() With
{
.ColumnHeaders = True,
.StartRow = 0,
.StartColumn = 0
})
worksheet.Rows(0).Style.FillPattern.SetPattern(FillPatternStyle.Solid, SpreadsheetColor.FromArgb(75, 119, 190), SpreadsheetColor.FromArgb(255, 255, 255))
worksheet.Rows(0).Style.Font.Color = SpreadsheetColor.FromArgb(255, 255, 255)
Dim columnCount = worksheet.CalculateMaxUsedColumns()
For i = 0 To columnCount
worksheet.Columns(i).AutoFit(1, worksheet.Rows(0), worksheet.Rows(worksheet.Rows.Count - 1))
Next
FileExcel.Save(Response, "FormatoAjusteSecCad.xlsx", SaveOptions.XlsxDefault)
End Sub
Protected Sub BtnCargaExcel_Click(sender As Object, e As EventArgs) Handles BtnCargaExcel.Click Protected Sub BtnCargaExcel_Click(sender As Object, e As EventArgs) Handles BtnCargaExcel.Click
If TxtExcel.getfiles().Archivos.Count > 0 Then If TxtExcel.getfiles().Archivos.Count > 0 Then
Dim file As Archivo = TxtExcel.getfiles().Archivos(0) Dim file As Archivo = TxtExcel.getfiles().Archivos(0)
@@ -257,7 +306,12 @@ Partial Class Inventarios_AjustesSeccionAlmacen
Dim CveUM As Integer = DrPS("CveUM").ToString().ToEntero() Dim CveUM As Integer = DrPS("CveUM").ToString().ToEntero()
Dim SeccionAlmacen As String = RowExcel("SeccionAlmacen").ToString.Trim Dim SeccionAlmacen As String = RowExcel("SeccionAlmacen").ToString.Trim
Dim CveSeccionAlmacen As Integer = dtSecciones.FiltroPrimeroValor("CveSeccion", $"SeccionAlmacen='{SeccionAlmacen}'") Dim CveSeccionAlmacen As Integer = -1
Dim DrSeccion As DataRow = dtSecciones.FiltroPrimero($"SeccionAlmacen='{SeccionAlmacen}'")
If DrSeccion IsNot Nothing Then
CveSeccionAlmacen = DrSeccion("CveSeccion").ToString().ToEntero()
End If
Dim Serie As String = RowExcel("Serie").ToString() Dim Serie As String = RowExcel("Serie").ToString()
Dim Lote As String = RowExcel("Lote").ToString() Dim Lote As String = RowExcel("Lote").ToString()

View File

@@ -1325,7 +1325,7 @@
<ajax:ValidatorCalloutExtender ID="VCOCantidad1" runat="server" HighlightCssClass="vco" TargetControlID="RFVCantidad" Width="300px"></ajax:ValidatorCalloutExtender> <ajax:ValidatorCalloutExtender ID="VCOCantidad1" runat="server" HighlightCssClass="vco" TargetControlID="RFVCantidad" Width="300px"></ajax:ValidatorCalloutExtender>
<asp:CustomValidator ID="CVCantidad" runat="server" ClientValidationFunction="ValidaDecimal6digits" ControlToValidate="TxtCantidad" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cantidad''</b> no tiene el formato correcto (6 decimales). Por favor rectifique y vuelva a intentar." ValidateEmptyText="True" ValidationGroup="GprAgregaPS"></asp:CustomValidator> <asp:CustomValidator ID="CVCantidad" runat="server" ClientValidationFunction="ValidaDecimal6digits" ControlToValidate="TxtCantidad" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cantidad''</b> no tiene el formato correcto (6 decimales). Por favor rectifique y vuelva a intentar." ValidateEmptyText="True" ValidationGroup="GprAgregaPS"></asp:CustomValidator>
<ajax:ValidatorCalloutExtender ID="VCECantidad" runat="server" HighlightCssClass="vco" TargetControlID="CVCantidad" Width="300px"></ajax:ValidatorCalloutExtender> <ajax:ValidatorCalloutExtender ID="VCECantidad" runat="server" HighlightCssClass="vco" TargetControlID="CVCantidad" Width="300px"></ajax:ValidatorCalloutExtender>
<label for="<%= txtCantidad.ClientID.ToString()%>">Cant</label> <label for="<%= txtCantidad.ClientID.ToString()%>">Cantidad</label>
<br /> <br />
</div> </div>
<div runat="server" id="divClasificacionProducto" class="form-group form-md-line-input input-iconright"> <div runat="server" id="divClasificacionProducto" class="form-group form-md-line-input input-iconright">
@@ -1342,6 +1342,7 @@
<label for="<%= DdlUnidad.ClientID.ToString()%>">U.M.</label> <label for="<%= DdlUnidad.ClientID.ToString()%>">U.M.</label>
<br /> <br />
</div> </div>
<div runat="server" id="divPrecio" class="form-group form-md-line-input input-iconright" visible="false"> <div runat="server" id="divPrecio" class="form-group form-md-line-input input-iconright" visible="false">
<asp:TextBox ID="txtPrecio" CssClass="form-control input-sm" runat="server" Width="50%" Visible="false"></asp:TextBox> <asp:TextBox ID="txtPrecio" CssClass="form-control input-sm" runat="server" Width="50%" Visible="false"></asp:TextBox>
<label for="<%= txtPrecio.ClientID.ToString()%>">P.U.</label> <label for="<%= txtPrecio.ClientID.ToString()%>">P.U.</label>
@@ -1350,7 +1351,7 @@
<div runat="server" id="divSerie" class="form-group form-md-line-input input-iconright" visible="false"> <div runat="server" id="divSerie" class="form-group form-md-line-input input-iconright" visible="false">
<asp:TextBox ID="TxtnSerie" CssClass="form-control input-sm" runat="server" Width="80px" Visible="false"></asp:TextBox> <asp:TextBox ID="TxtnSerie" CssClass="form-control input-sm" runat="server" Width="80px" Visible="false"></asp:TextBox>
<asp:Button Text="" ID="BtnSerieAddNew" OnClick="BtnSerieAddNew_Click" Style="display: none" runat="server" /> <asp:Button Text="" ID="BtnSerieAddNew" OnClick="BtnSerieAddNew_Click" Style="display: none" runat="server" />
<label for="<%= TxtnSerie.ClientID.ToString()%>">Serie Lote</label> <label for="<%= TxtnSerie.ClientID.ToString()%>">Serie</label>
<br /> <br />
</div> </div>
<div runat="server" id="divLote" class="form-group form-md-line-input input-iconright" visible="false"> <div runat="server" id="divLote" class="form-group form-md-line-input input-iconright" visible="false">

View File

@@ -2165,6 +2165,10 @@ Partial Class Inventarios_EntradasSalidas
'TrLote2.Visible = True 'TrLote2.Visible = True
End If End If
If CBool(dr("AplicaSeccion")) Then
divSeccionAlmacen.Visible = True
End If
End If End If
End If End If
@@ -2370,6 +2374,9 @@ Partial Class Inventarios_EntradasSalidas
TxtObservacionesdetalle.Text = GvRow.DataKey("Observaciones") TxtObservacionesdetalle.Text = GvRow.DataKey("Observaciones")
DdlSeccionAlmacen.SelectedValueExist(GvRow.DataKey("CveSeccionAlmacen")) DdlSeccionAlmacen.SelectedValueExist(GvRow.DataKey("CveSeccionAlmacen"))
LkAgregarDetalle.Text = "Actualizar" LkAgregarDetalle.Text = "Actualizar"
Dim Origen As Integer = GlobalDTInvConceptos.FiltroPrimeroValor("Origen", String.Format("CveConcepto = {0}", DdlConcepto.SelectedValue)).ToEntero
divPrecio.Visible = Origen = 1
txtPrecio.Visible = Origen = 1
UpAgregar.Update() UpAgregar.Update()
RegistraScript("$('#ModalAgregar').modal()") RegistraScript("$('#ModalAgregar').modal()")
CargaGVM(DtMovimientos.FiltraParametros("Estatus <> 'E' ")) CargaGVM(DtMovimientos.FiltraParametros("Estatus <> 'E' "))
@@ -2392,6 +2399,9 @@ Partial Class Inventarios_EntradasSalidas
TxtnSerie.Text = GvRow.DataKey("Serie") TxtnSerie.Text = GvRow.DataKey("Serie")
TxtObservacionesdetalle.Text = GvRow.DataKey("Observaciones") TxtObservacionesdetalle.Text = GvRow.DataKey("Observaciones")
DdlSeccionAlmacen.SelectedValueExist(GvRow.DataKey("CveSeccionAlmacen")) DdlSeccionAlmacen.SelectedValueExist(GvRow.DataKey("CveSeccionAlmacen"))
Dim Origen As Integer = GlobalDTInvConceptos.FiltroPrimeroValor("Origen", String.Format("CveConcepto = {0}", DdlConcepto.SelectedValue)).ToEntero
divPrecio.Visible = Origen = 1
txtPrecio.Visible = Origen = 1
LkAgregarDetalle.Text = "Actualizar" LkAgregarDetalle.Text = "Actualizar"
UpAgregar.Update() UpAgregar.Update()
RegistraScript("$('#ModalAgregar').modal()") RegistraScript("$('#ModalAgregar').modal()")
@@ -4198,7 +4208,9 @@ Partial Class Inventarios_EntradasSalidas
Else Else
VisualizaPUExtranjero(False) VisualizaPUExtranjero(False)
End If End If
Dim Origen As Integer = GlobalDTInvConceptos.FiltroPrimeroValor("Origen", String.Format("CveConcepto = {0}", DdlConcepto.SelectedValue)).ToEntero
divPrecio.Visible = Origen = 1
txtPrecio.Visible = Origen = 1
UpAgregar.Update() UpAgregar.Update()
End Sub End Sub

View File

@@ -18,9 +18,7 @@
Entregas por Realizar Entregas por Realizar
</asp:Content> </asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="HB" runat="Server"> <asp:Content ID="Content4" ContentPlaceHolderID="HB" runat="Server">
<li>
<asp:LinkButton ID="LnkImprimir" runat="server" OnClick="LnkImprimir_Click"> <i class="fa fa-file-pdf-o" style="font-weight:bold;"></i> PDF</asp:LinkButton>
</li>
</asp:Content> </asp:Content>
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server"> <asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">

View File

@@ -1019,7 +1019,7 @@ Partial Class Inventarios_RecepcionAlmacen
CveImportacionSurtir = pCveImportacion CveImportacionSurtir = pCveImportacion
CveImportacionProveedor = ddlProveedor.SelectedValue.ToEntero CveImportacionProveedor = ddlProveedor.SelectedValue.ToEntero
CveImportacionCompra = DdlFactura.SelectedValue.ToEntero CveImportacionCompra = DdlFactura.SelectedValue.ToEntero
LbProveedor.Text = ObjCompras.DtResultados.Rows(0)("Aduanal").ToString LbProveedor.Text = ObjCompras.DtResultados.Rows(0)("ProveedorCompra").ToString
HLFolio.Text = ObjCompras.DtResultados.Rows(0)("PedimentoDescripcion").ToString HLFolio.Text = ObjCompras.DtResultados.Rows(0)("PedimentoDescripcion").ToString
If UsuarioActual.TienePermisoProceso(201) Then If UsuarioActual.TienePermisoProceso(201) Then
HLFolio.NavigateUrl = $"/Compras/Importaciones.aspx?CveImportacion={CveImportacionSurtir}" HLFolio.NavigateUrl = $"/Compras/Importaciones.aspx?CveImportacion={CveImportacionSurtir}"
@@ -3100,12 +3100,13 @@ Partial Class Inventarios_RecepcionAlmacen
End If End If
Dim CvePrePoliza As Integer = 0 Dim CvePrePoliza As Integer = 0
Dim UsaComplementariaCostoIndirecto As Boolean = False Dim UsaComplementariaCostoIndirecto As Boolean = False
Dim ConceptoPrePoliza As String = LbProveedor.Text
If UsuarioActual.CveEmpresa = 119 Then UsaComplementariaCostoIndirecto = False If UsuarioActual.CveEmpresa = 119 Then UsaComplementariaCostoIndirecto = False
Dim PorcentajeCompraImportacion As Decimal = 0 ' si hay mas de una factura de importación saber lo que se está recibiendo Dim PorcentajeCompraImportacion As Decimal = 0 ' si hay mas de una factura de importación saber lo que se está recibiendo
'SE REGISTRAN LAS PREPOLIZAS 'SE REGISTRAN LAS PREPOLIZAS
If Not ErrorMovInv Then If Not ErrorMovInv Then
CvePrePoliza = ObjConta.AddPrePolizas("Inventario/RecepcionAlmacen CostoInd", 74, 0, 0, 1, FechaMovto, TxtObservaciones.Text.Trim, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) CvePrePoliza = ObjConta.AddPrePolizas("Inventario/RecepcionAlmacen CostoInd", 74, 0, 0, 1, FechaMovto, ConceptoPrePoliza, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
Dim DtTempCompras As DataTable = Nothing Dim DtTempCompras As DataTable = Nothing
PorcentajeCompraImportacion = 1 PorcentajeCompraImportacion = 1
If CveFleteSurtir > 0 Then If CveFleteSurtir > 0 Then

View File

@@ -63,21 +63,68 @@
<asp:RequiredFieldValidator ID="rfvFechaF" runat="server" ControlToValidate="txtFechaF" Display="None" ErrorMessage="El campo <b>''Fecha Final''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="Valida"></asp:RequiredFieldValidator> <asp:RequiredFieldValidator ID="rfvFechaF" runat="server" ControlToValidate="txtFechaF" Display="None" ErrorMessage="El campo <b>''Fecha Final''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="Valida"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="vcoRfvFF" runat="server" HighlightCssClass="vco" TargetControlID="rfvFechaF" Width="350px"></ajax:ValidatorCalloutExtender> <ajax:ValidatorCalloutExtender ID="vcoRfvFF" runat="server" HighlightCssClass="vco" TargetControlID="rfvFechaF" Width="350px"></ajax:ValidatorCalloutExtender>
</div> </div>
<label runat="server" id="LblSubProyecto" class="col-md-1 truncate">SubProyecto:</label>
<div runat="server" id="DivSubProyecto" class="col-md-2">
<asp:DropDownList ID="DdlSubProyecto" runat="server" AppendDataBoundItems="true" DataTextField="SubProyecto" DataValueField="CveSubProyecto" Class="table-group-action-input form-control input-inline input-small input-sm select2me">
<asp:ListItem Selected="True" Text="Todas" Value="-1"></asp:ListItem>
</asp:DropDownList>
</div> </div>
<label runat="server" id="LblGripo" class="col-md-1 truncate">Grupo:</label>
<div runat="server" id="Div1" class="col-md-1">
<asp:DropDownList ID="DdlGrupo" runat="server" Class="table-group-action-input form-control input-inline input-small input-sm select2me">
<asp:ListItem Selected="True" Text="Detalle" Value="1"></asp:ListItem>
<asp:ListItem Text="Cliente" Value="2"></asp:ListItem>
<asp:ListItem Text="Cliente sin desglosar mostrador" Value="3"></asp:ListItem>
<asp:ListItem Text="Centro Costo" Value="4"></asp:ListItem>
<asp:ListItem Text="Clasificaciones" Value="5"></asp:ListItem>
<asp:ListItem Text="Centro Costo-Clasificaciones" Value="6"></asp:ListItem>
<asp:ListItem Text="Clasificaciones-Centro Costo" Value="7"></asp:ListItem>
</asp:DropDownList>
</div>
</div>
</div> </div>
</div> </div>
<div class="portlet-body"> <div class="portlet-body" style="display: none">
<div class="row">
<label class="col-md-1 ">Cliente:</label>
<div class="col-md-2">
<ADS:Dropdownlost CssClassDdl="select2me" ID="DdlClientes" Width="100%" data-metodo="getcliente" runat="server" DataTextField="NombreComercial" DataValueField="CveCliente" CssStyle="width: 100%;">
</ADS:Dropdownlost>
</div>
<label class="col-md-1 truncate">Clasificación:</label>
<div class="col-md-2">
<asp:DropDownList ID="DdlClasificacion" AutoPostBack="true" Class="table-group-action-input form-control input-inline input-small input-sm select2me" runat="server" AppendDataBoundItems="true" DataTextField="Clasificacion" DataValueField="CveClasificacion" Style="width: 100%">
<asp:ListItem Selected="True" Text="Todas" Value="-1"></asp:ListItem>
</asp:DropDownList>
</div>
</div>
</div> </div>
</div> </div>
<div class="row">
<div class="col-md-12" style="vertical-align: middle;" align="left">
<div style="z-index: 5; position: relative;">
<div id="DivVirtualAdvertencia" clientidmode="Static" runat="server" class="alert alert-warning" style="padding: 5px; margin-bottom: 5px; padding-right: 25px;">
<button type="button" class="close" data-dismiss="alert" style="margin-top: 5px;" aria-hidden="true"></button>
<strong style="font-size: 20px; margin-right: 25px;">Información: </strong>
<asp:Literal Text="Los importes de venta, hacen referencia a los productos que tienen costo" runat="server"></asp:Literal>
</div>
</div>
</div></div>
</ContentTemplate> </ContentTemplate>
</asp:UpdatePanel> </asp:UpdatePanel>
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional"> <asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional">
<ContentTemplate> <ContentTemplate>
<div class="row" style="margin-right: 10px; margin-top: 18px;" align="right"> <div class="row" style="margin-right: 10px; margin-top: 18px;" align="right">
<input type="text" id="TxtBusqueda" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvDatos.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" /> <input type="text" id="TxtBusqueda" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvDatos.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvDatos.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a> <a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvDatos.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
</div> </div>
<table class="table Widthall "> <table class="table Widthall " id="TbDetalle" runat="server">
<tr> <tr>
<td class="dataTables_scrollHead text-center bold" style="font-size: 14px; width: 55%; border-right: 3px solid white;">Ventas</td> <td class="dataTables_scrollHead text-center bold" style="font-size: 14px; width: 55%; border-right: 3px solid white;">Ventas</td>
<td class="dataTables_scrollHead text-center bold" style="font-size: 14px; width: 45%; border-right: 3px solid white;">Movimientos</td> <td class="dataTables_scrollHead text-center bold" style="font-size: 14px; width: 45%; border-right: 3px solid white;">Movimientos</td>
@@ -94,6 +141,13 @@
<asp:BoundField DataField="Importe" ItemStyle-HorizontalAlign="Right" HeaderText="Importe" DataFormatString="{0:N2}" /> <asp:BoundField DataField="Importe" ItemStyle-HorizontalAlign="Right" HeaderText="Importe" DataFormatString="{0:N2}" />
</Columns> </Columns>
</asp:GridView> </asp:GridView>
<asp:GridView ID="GvGrupo" runat="server" GridLines="None" ShowHeaderWhenEmpty="true" EmptyDataText="No se han encontrado datos con los filtros seleccionados" OnRowDataBound="GvGrupo_RowDataBound" CssClass="table table-hover table-striped ScrollAD mysmallbtn" Width="99%" data-sort="true" AutoGenerateColumns="False">
<Columns>
<asp:BoundField DataField="Grupo" HeaderText="Grupo" ItemStyle-Width="700px" />
<asp:BoundField DataField="SubTotal" ItemStyle-HorizontalAlign="Right" HeaderText="Ventas" DataFormatString="{0:N2}" />
<asp:BoundField DataField="Importe" ItemStyle-HorizontalAlign="Right" HeaderText="Costo" DataFormatString="{0:N2}" />
</Columns>
</asp:GridView>
</ContentTemplate> </ContentTemplate>
</asp:UpdatePanel> </asp:UpdatePanel>
</asp:Content> </asp:Content>

View File

@@ -16,18 +16,50 @@ public partial class Inventarios_RepMovimientosSalida : ClsPaginas
if (!IsPostBack) if (!IsPostBack)
{ {
InicializaValores(); InicializaValores();
}
}
private void InicializaValores()
{
txtFechaI.Text = DateTime.Now.FirstDayOfMonth().ToShortDateString();
txtFechaF.Text = DateTime.Now.ToShortDateString();
DdlSubProyecto.DataSource = get_GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa);
DdlSubProyecto.DataBind();
//Cargo Clasificaciones //Cargo Clasificaciones
DdlClasificacion.DataSource = get_GlobalDTClasificaciones(UsuarioActual.CveEmpresa); DdlClasificacion.DataSource = get_GlobalDTClasificaciones(UsuarioActual.CveEmpresa);
DdlClasificacion.DataBind(); DdlClasificacion.DataBind();
DdlClientes.setEsWebService(true);
}
private void Consulta() private void Consulta()
txtFechaI.Text = DateTime.Now.FirstDayOfMonth().ToShortDateString(); {
int tCveCliente = -1; int tCveCliente = -1;
} int tCveGrupo = -1;
if (DdlClientes.SelectedValue.ToEntero() > 0) tCveCliente = DdlClientes.SelectedValue.ToEntero();
if (DdlGrupo.SelectedValue.ToEntero() > 0) tCveGrupo = DdlGrupo.SelectedValue.ToEntero();
ClsInventarios ObjInv = new ClsInventarios(); ClsInventarios ObjInv = new ClsInventarios();
if (ObjInv.GetRepMovimientosSalida(txtFechaI.Text.ToDate(), txtFechaF.Text.ToDate(), DdlSubProyecto.SelectedValue.ToEntero(), tCveCliente, DdlClasificacion.SelectedValue.ToEntero(), DdlGrupo.SelectedValue.ToEntero(), UsuarioActual.CveEmpresa)) if (ObjInv.GetRepMovimientosSalida(txtFechaI.Text.ToDate(), txtFechaF.Text.ToDate(), DdlSubProyecto.SelectedValue.ToEntero(), tCveCliente, DdlClasificacion.SelectedValue.ToEntero(), DdlGrupo.SelectedValue.ToEntero(), UsuarioActual.CveEmpresa))
{ {
if (tCveGrupo == 1)
GvDatos.DataSource = ObjInv.DtResultados; GvDatos.DataSource = ObjInv.DtResultados;
else
GvGrupo.DataSource = ObjInv.DtResultados;
}
ObjInv.Dispose();
GvDatos.DataBind();
GvGrupo.DataBind();
UpDatos.Update();
if (DdlGrupo.SelectedValue == "1")
{
TbDetalle.Visible = true;
GvDatos.Visible = true;
GvGrupo.Visible = false;
}
else else
{ {
TbDetalle.Visible = false; TbDetalle.Visible = false;
@@ -48,6 +80,25 @@ public partial class Inventarios_RepMovimientosSalida : ClsPaginas
{ {
if (e.Row.RowIndex == 0) if (e.Row.RowIndex == 0)
{ {
e.Row.Cells[0].Text = "Total";
e.Row.CssClass = "Totales";
}
}
}
protected void GvGrupo_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
if (e.Row.RowIndex == 0)
{
e.Row.Cells[0].Text = "Total";
e.Row.CssClass = "Totales";
}
else
{
if (e.Row.DBCampo("Grupo2") == "" && e.Row.DBCampo("Grupo1") != "")
{ {
e.Row.CssClass = "SubTotales"; e.Row.CssClass = "SubTotales";
} }
@@ -55,6 +106,14 @@ public partial class Inventarios_RepMovimientosSalida : ClsPaginas
} }
} }
public override void VerifyRenderingInServerForm(Control control) public override void VerifyRenderingInServerForm(Control control)
{
//base.VerifyRenderingInServerForm(control);
}
protected void LnkExcel_Click(object sender, EventArgs e)
{
if (DdlGrupo.SelectedValue == "1")
{
GvDatos.ExportToExcelG("Movimientos de Salida", "Movimientos de Salida", UsuarioActual); GvDatos.ExportToExcelG("Movimientos de Salida", "Movimientos de Salida", UsuarioActual);
} }

View File

@@ -37,7 +37,8 @@
<label class="col-md-1 " runat="server" style="margin-top: 5px; font-size:12px;">Proveedor:</label> <label class="col-md-1 " runat="server" style="margin-top: 5px; font-size:12px;">Proveedor:</label>
<div class="col-md-2" runat="server"> <div class="col-md-2" runat="server">
<asp:DropDownList ID="DdlProveedor" runat="server" DataTextField="RazonSocial" DataValueField="CveProveedor" Class="table-group-action-input form-control input-inline input-sm select2me" Width="100%"></asp:DropDownList> <%--<asp:DropDownList ID="DdlProveedor" runat="server" DataTextField="RazonSocial" DataValueField="CveProveedor" Class="table-group-action-input form-control input-inline input-sm select2me" Width="100%"></asp:DropDownList>--%>
<ADS:Dropdownlost runat="server" ID="DdlProveedores" CssStyle="width: 100%;" Width="100%" CssClassDdl="select2me " DataTextField="NombreCortoProveedor" DataValueField="CveProveedor" />
</div> </div>
<label class="col-md-1 " runat="server" style="margin-top: 5px; font-size:12px;">Fecha Inicio:</label> <label class="col-md-1 " runat="server" style="margin-top: 5px; font-size:12px;">Fecha Inicio:</label>

View File

@@ -70,6 +70,8 @@ public partial class OC_RepSolicitudesAnticipo : ClsPaginas
protected void InicializaDatos() protected void InicializaDatos()
{ {
txtFechaI.Text = DateTime.Now.AddMonths(-1).FirstDayOfMonth().ToShortDateString();
txtFechaF.Text = DateTime.Now.ToShortDateString();
CveProveedor = -1; CveProveedor = -1;
CargaProveedor(); CargaProveedor();
CargaDatos(); CargaDatos();
@@ -77,17 +79,17 @@ public partial class OC_RepSolicitudesAnticipo : ClsPaginas
protected void CargaProveedor() protected void CargaProveedor()
{ {
DdlProveedor.DataSource = get_GlobalDTCompProveedores(UsuarioActual.CveEmpresa); DdlProveedores.setEsWebService(true);
DdlProveedor.DataBind(); DdlProveedores.Attributes.Add("data-metodo", "getproveedores");
DdlProveedor.Items.Insert(0, new System.Web.UI.WebControls.ListItem("Todos", "-1")); DdlProveedores.SelectedText = "Seleccione";
DdlProveedor.SelectedValue = "-1"; DdlProveedores.SelectedValue = "-1";
} }
protected void CargaDatos() protected void CargaDatos()
{ {
ClsOC ObjOC = new ClsOC(); ClsOC ObjOC = new ClsOC();
CveProveedor = DdlProveedor.SelectedValue.ToEntero(); CveProveedor = DdlProveedores.SelectedValue.ToEntero();
FechaI = (txtFechaI.Text.ToString() != "" ? txtFechaI.Text.ToDateTime() : MinFecha); FechaI = (txtFechaI.Text.ToString() != "" ? txtFechaI.Text.ToDateTime() : MinFecha);
FechaF = (txtFechaF.Text.ToString() != "" ? txtFechaF.Text.ToDateTime() : DateTime.Now); FechaF = (txtFechaF.Text.ToString() != "" ? txtFechaF.Text.ToDateTime() : DateTime.Now);
@@ -140,7 +142,7 @@ public partial class OC_RepSolicitudesAnticipo : ClsPaginas
String FechaF; String FechaF;
if (txtFechaF.Text == "" || txtFechaF.Text == "__/__/____") { FechaF = ""; } else { FechaF = $"&emsp;<b>Fecha Final:</b> {txtFechaF.Text}"; } if (txtFechaF.Text == "" || txtFechaF.Text == "__/__/____") { FechaF = ""; } else { FechaF = $"&emsp;<b>Fecha Final:</b> {txtFechaF.Text}"; }
String Proveedor; String Proveedor;
if (DdlProveedor.SelectedValue != "-1") { Proveedor = $"&emsp;<b>Proveedor:</b> {DdlProveedor.SelectedItem.Text}"; } else { Proveedor = ""; } if (DdlProveedores.SelectedValue != "-1") { Proveedor = $"&emsp;<b>Proveedor:</b> {DdlProveedores.ddl.SelectedItem.Text}"; } else { Proveedor = ""; }
String Estatus; String Estatus;
if (DdlEstatus.SelectedValue != "1") { Estatus = $"&emsp;<b>Estatus:</b> {DdlEstatus.SelectedItem.Text}"; } else { Estatus = ""; } if (DdlEstatus.SelectedValue != "1") { Estatus = $"&emsp;<b>Estatus:</b> {DdlEstatus.SelectedItem.Text}"; } else { Estatus = ""; }
@@ -200,13 +202,7 @@ public partial class OC_RepSolicitudesAnticipo : ClsPaginas
} }
all = ms.ToArray(); all = ms.ToArray();
} }
//ImprimirbytesPDF(all, "RepSolicitudesAnticipo"); ImprimirbytesPDF(all, "RepSolicitudesAnticipo");
ZipFile zip = new ZipFile();
zip.AddEntry("RepSolicitudesAnticipo", all);
zip.Save(Response.OutputStream);
Response.AddHeader("content-Disposition", "attachment; filename=RepSolicitudesAnticipo.zip");
Response.ContentType = "application/zip";
Response.End();
} }
} }

View File

@@ -1,4 +1,5 @@
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="CatSesiones.aspx.vb" Inherits="Sistemas_CatSesiones" %> <%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="CatSesiones.aspx.vb" Inherits="Sistemas_CatSesiones" %>
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server"> <asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
</asp:Content> </asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server"> <asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
@@ -10,7 +11,7 @@
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server"> <asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
</asp:Content> </asp:Content>
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server"> <asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
<asp:DropDownList ID="DdlVariable" runat="server" AutoPostBack="True" Width="300px" CssClass="table-group-action-input form-control input-inline input-small input-sm select2me"> <asp:DropDownList ID="DdlVariable" runat="server" AutoPostBack="True" Width="300px" CssClass="table-group-action-input form-control input-inline input-small input-sm select2me">
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem> <asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
<asp:ListItem Text="Usuarios" Value="GlobalDTUsuarios"></asp:ListItem> <asp:ListItem Text="Usuarios" Value="GlobalDTUsuarios"></asp:ListItem>
<asp:ListItem Text="Empresas" Value="GlobalDTEmpresas"></asp:ListItem> <asp:ListItem Text="Empresas" Value="GlobalDTEmpresas"></asp:ListItem>
@@ -21,7 +22,7 @@
<asp:ListItem Text="ProyectosUsuarios" Value="GlobalDTProyectosUsuarios"></asp:ListItem> <asp:ListItem Text="ProyectosUsuarios" Value="GlobalDTProyectosUsuarios"></asp:ListItem>
<asp:ListItem Text="Sub Proyectos" Value="GlobalDTSubProyectos"></asp:ListItem> <asp:ListItem Text="Sub Proyectos" Value="GlobalDTSubProyectos"></asp:ListItem>
<asp:ListItem Text="Sub ProyectosUsuarios" Value="GlobalDTSubProyectosUsuarios"></asp:ListItem> <asp:ListItem Text="Sub ProyectosUsuarios" Value="GlobalDTSubProyectosUsuarios"></asp:ListItem>
<%-- <asp:ListItem Text="Sucursales" Value="GlobalDTSucursales"></asp:ListItem>--%> <%-- <asp:ListItem Text="Sucursales" Value="GlobalDTSucursales"></asp:ListItem>--%>
<asp:ListItem Text="Proveedores" Value="GlobalDTCompProveedores"></asp:ListItem> <asp:ListItem Text="Proveedores" Value="GlobalDTCompProveedores"></asp:ListItem>
<asp:ListItem Text="Métodos de Pago" Value="GlobalDTMetodosPago"></asp:ListItem> <asp:ListItem Text="Métodos de Pago" Value="GlobalDTMetodosPago"></asp:ListItem>
<asp:ListItem Text="Paises" Value="GlobalDTGralPaises"></asp:ListItem> <asp:ListItem Text="Paises" Value="GlobalDTGralPaises"></asp:ListItem>
@@ -40,28 +41,30 @@
<asp:ListItem Text="Conta - Plantillas " Value="GlobalDTContaPlantillasPolizas"></asp:ListItem> <asp:ListItem Text="Conta - Plantillas " Value="GlobalDTContaPlantillasPolizas"></asp:ListItem>
<asp:ListItem Text="Usuarios Activos" Value="UsuariosActivos"></asp:ListItem> <asp:ListItem Text="Usuarios Activos" Value="UsuariosActivos"></asp:ListItem>
<asp:ListItem Text="ProductosServicios" Value="ProductosServicios"></asp:ListItem> <asp:ListItem Text="ProductosServicios" Value="ProductosServicios"></asp:ListItem>
<asp:ListItem Text="ProductosServiciosSimplificado" Value="PSSimplificado"></asp:ListItem> <asp:ListItem Text="ProductosServiciosSimplificado" Value="PSSimplificado"></asp:ListItem>
<asp:ListItem Text="CONAC" Value="CONAC"></asp:ListItem> <asp:ListItem Text="CONAC" Value="CONAC"></asp:ListItem>
<asp:ListItem Text="Tipo Cambio" Value="TipoCambio"></asp:ListItem> <asp:ListItem Text="Tipo Cambio" Value="TipoCambio"></asp:ListItem>
<asp:ListItem Text="Combustible" Value="GlobalDTCombustibles"></asp:ListItem> <asp:ListItem Text="Combustible" Value="GlobalDTCombustibles"></asp:ListItem>
<asp:ListItem Text="Inventarios - PS Equivalencias" Value="GlobalDTProductosServiciosEquivalencias"></asp:ListItem> <asp:ListItem Text="Inventarios - PS Equivalencias" Value="GlobalDTProductosServiciosEquivalencias"></asp:ListItem>
<asp:ListItem Text="RH" Value="RH"></asp:ListItem> <asp:ListItem Text="RH" Value="RH"></asp:ListItem>
<asp:ListItem Text="Ventas" Value="Ventas"></asp:ListItem> <asp:ListItem Text="Ventas" Value="Ventas"></asp:ListItem>
<asp:ListItem Text="Precios Lista " Value="GlobalDTPrecioListas"></asp:ListItem> <asp:ListItem Text="Precios Lista " Value="GlobalDTPrecioListas"></asp:ListItem>
<asp:ListItem Text="Paqueterias" Value="GlobalDTPaqueterias"></asp:ListItem> <asp:ListItem Text="Paqueterias" Value="GlobalDTPaqueterias"></asp:ListItem>
<asp:ListItem Text="GlobalDTTiposGastos" Value="GlobalDTTiposGastos"></asp:ListItem> <asp:ListItem Text="GlobalDTTiposGastos" Value="GlobalDTTiposGastos"></asp:ListItem>
<asp:ListItem Text="GlobalDTVtaTiposRelacion" Value="GlobalDTVtaTiposRelacion"></asp:ListItem> <asp:ListItem Text="GlobalDTVtaTiposRelacion" Value="GlobalDTVtaTiposRelacion"></asp:ListItem>
<asp:ListItem Text="GlobalDTContratos" Value="GlobalDTContratos"></asp:ListItem> <asp:ListItem Text="GlobalDTContratos" Value="GlobalDTContratos"></asp:ListItem>
<asp:ListItem Text="GlobalDTSATMotivoTraslado" Value="GlobalDTSATMotivoTraslado"></asp:ListItem> <asp:ListItem Text="GlobalDTSATMotivoTraslado" Value="GlobalDTSATMotivoTraslado"></asp:ListItem>
<asp:ListItem Text="GlobalDTConceptosContables" Value="GlobalDTConceptosContables"></asp:ListItem> <asp:ListItem Text="GlobalDTConceptosContables" Value="GlobalDTConceptosContables"></asp:ListItem>
<asp:ListItem Text="GlobalDTClasificacionPorcentaje" Value="GlobalDTClasificacionPorcentaje"></asp:ListItem> <asp:ListItem Text="GlobalDTClasificacionPorcentaje" Value="GlobalDTClasificacionPorcentaje"></asp:ListItem>
<asp:ListItem Text="GlobalDTInvPSSeccionesAlmacen" Value="GlobalDTInvPSSeccionesAlmacen"></asp:ListItem>
</asp:DropDownList>&nbsp;&nbsp; </asp:DropDownList>&nbsp;&nbsp;
<asp:Button ID="BtnCargar" runat="server" Text="Cargar" class="btn btn-primary"/>&nbsp;&nbsp;<asp:Button ID="BtnRefresh" runat="server" Text="Consultar" class="btn btn-primary" />
<asp:Button ID="BtnCargar" runat="server" Text="Cargar" class="btn btn-primary" />&nbsp;&nbsp;<asp:Button ID="BtnRefresh" runat="server" Text="Consultar" class="btn btn-primary" />
<br /> <br />
<br /> <br />
<asp:Label ID="LblTotal" runat="server" Text=""></asp:Label> <asp:Label ID="LblTotal" runat="server" Text=""></asp:Label>
<asp:GridView ID="Gv" runat="server" Font-Size="6px" Font-Names="Verdana" CssClass="table table-striped table-advance table-hover" style="margin-top:-10px; text-align:center;" GridLines="None"></asp:GridView> <asp:GridView ID="Gv" runat="server" Font-Size="6px" Font-Names="Verdana" CssClass="table table-striped table-advance table-hover" Style="margin-top: -10px; text-align: center;" GridLines="None"></asp:GridView>
</asp:Content> </asp:Content>
<asp:Content ID="Content" ContentPlaceHolderID="JS" runat="Server"> <asp:Content ID="Content" ContentPlaceHolderID="JS" runat="Server">
</asp:Content> </asp:Content>

View File

@@ -59,7 +59,7 @@ Partial Class Sistemas_CatSesiones
ElseIf DdlVariable.SelectedItem.Value = "ProductosServicios" Then ElseIf DdlVariable.SelectedItem.Value = "ProductosServicios" Then
CargaProductosServicios() CargaProductosServicios()
ElseIf DdlVariable.SelectedItem.Value = "PSSimplificado" Then ElseIf DdlVariable.SelectedItem.Value = "PSSimplificado" Then
CargaProductosServiciossimplificado() CargaProductosServiciosSimplificado()
ElseIf DdlVariable.SelectedItem.Value = "CONAC" Then ElseIf DdlVariable.SelectedItem.Value = "CONAC" Then
CargaCONAC() CargaCONAC()
@@ -89,8 +89,10 @@ Partial Class Sistemas_CatSesiones
CargaSATMotivoTraslado() CargaSATMotivoTraslado()
ElseIf DdlVariable.SelectedItem.Value = "GlobalDTConceptosContables" Then ElseIf DdlVariable.SelectedItem.Value = "GlobalDTConceptosContables" Then
CargaConceptosContables() CargaConceptosContables()
ElseIf DdlVariable.SelectedItem.Value = "GlobalDTClasificacionPorcentaje" Then ElseIf DdlVariable.SelectedItem.Value = "GlobalDTClasificacionPorcentaje" Then
CargaDTClasificacionPorcentaje() CargaDTClasificacionPorcentaje()
ElseIf DdlVariable.SelectedItem.Value = "GlobalDTInvPSSeccionesAlmacen" Then
CargaDTInvPSSeccionesAlmacen()
End If End If
@@ -364,7 +366,7 @@ Partial Class Sistemas_CatSesiones
Private Sub CargaPaises() Private Sub CargaPaises()
Dim Gral As New ClsGenerales Dim Gral As New ClsGenerales
If Gral.GetGralPaises Then Application("GlobalDTGralPaises") = Gral.DtResultados Else Application("GlobalDTGralPaises") = Nothing If Gral.GetGralPaises Then Application("GlobalDTGralPaises") = Gral.DtResultados Else Application("GlobalDTGralPaises") = Nothing
If Gral.GetClasificacionPorcentaje(-1, -1, -1, -1, 1) Then Application("GlobalDTClasificacionPorcentaje") = Gral.DtResultados Else Application("GlobalDTClasificacionPorcentaje") = Nothing If Gral.GetClasificacionPorcentaje(-1, -1, -1, -1, 1) Then Application("GlobalDTClasificacionPorcentaje") = Gral.DtResultados Else Application("GlobalDTClasificacionPorcentaje") = Nothing
Gral.Dispose() Gral.Dispose()
End Sub End Sub
@@ -554,12 +556,16 @@ Partial Class Sistemas_CatSesiones
LblTotal.Text = dominio LblTotal.Text = dominio
End Sub End Sub
Private Sub CargaDTClasificacionPorcentaje() Private Sub CargaDTClasificacionPorcentaje()
Dim ObjGenerales As New ClsGenerales Dim ObjGenerales As New ClsGenerales
If ObjGenerales.GetClasificacionPorcentaje(-1) Then Application("GlobalDTClasificacionPorcentaje") = ObjGenerales.DtResultados Else Application("GlobalDTClasificacionPorcentaje") = Nothing If ObjGenerales.GetClasificacionPorcentaje(-1) Then Application("GlobalDTClasificacionPorcentaje") = ObjGenerales.DtResultados Else Application("GlobalDTClasificacionPorcentaje") = Nothing
ObjGenerales.Dispose() ObjGenerales.Dispose()
End Sub End Sub
Private Sub CargaDTInvPSSeccionesAlmacen()
GlobalDTInvPSSeccionesAlmacen(UsuarioActual.CveEmpresa, -1, -1) = Nothing
End Sub
End Class End Class

View File

@@ -94,7 +94,7 @@ Partial Class Ventas_RepIngresos
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
If Not IsPostBack Then If Not IsPostBack Then
TCEspecifico = -1 TCEspecifico = -1
TipoCambio = 2 TipoCambio = 1
CveSubProyecto = -1 CveSubProyecto = -1
TxtFechaInicio.Text = String.Format("01/01/{0}", Now.Year) TxtFechaInicio.Text = String.Format("01/01/{0}", Now.Year)
DdlSubProyecto.DataSource = GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, -1, 1) DdlSubProyecto.DataSource = GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, -1, 1)

View File

@@ -2049,7 +2049,7 @@ Public Class WSSIGApp
Return TmpDT Return TmpDT
End Function End Function
Private Function AgregarProductoServicioRem(TmpDT As DataTable, PS As MVentaProductos, CveEmpresa As Integer, CveSubProyecto As Integer, Private Function AgregarProductoServicioRem(TmpDT As DataTable, PS As MVentaProductos, CveEmpresa As Integer, CveSubProyecto As Integer,
Optional SerieLote As String = "", Optional TiempoEntrega As String = "", Optional EntregaDirecta As Integer = 0, Optional Serie As String = "", Optional TiempoEntrega As String = "", Optional EntregaDirecta As Integer = 0,
Optional CveContratoDetalle As Integer = 0, Optional CveVentaDetalle As Integer = 0, Optional CveMovimientoDetallePedido As Integer = 0, Optional CveContratoDetalle As Integer = 0, Optional CveVentaDetalle As Integer = 0, Optional CveMovimientoDetallePedido As Integer = 0,
Optional CveOrdenCompraDetalle As Integer = 0, Optional CveVentaDetalleRemision As Integer = 0, Optional CveVentaDetalleCotizacion As Integer = 0, Optional CveOrdenCompraDetalle As Integer = 0, Optional CveVentaDetalleRemision As Integer = 0, Optional CveVentaDetalleCotizacion As Integer = 0,
Optional CuentaPredial As String = "", Optional RegeneraIEPS As Boolean = True, Optional CveVentaDetallePedido2 As Integer = 0) As DataRow Optional CuentaPredial As String = "", Optional RegeneraIEPS As Boolean = True, Optional CveVentaDetallePedido2 As Integer = 0) As DataRow
@@ -2083,7 +2083,7 @@ Public Class WSSIGApp
Row("Proyecto") = DrSubProyecto("Proyecto").ToString() Row("Proyecto") = DrSubProyecto("Proyecto").ToString()
Row("CveSubProyecto") = CveSubProyecto Row("CveSubProyecto") = CveSubProyecto
Row("SubProyecto") = DrSubProyecto("SubProyecto").ToString() Row("SubProyecto") = DrSubProyecto("SubProyecto").ToString()
Row("SerieLote") = SerieLote Row("Serie") = Serie
Row("TiempoEntrega") = TiempoEntrega Row("TiempoEntrega") = TiempoEntrega
Row("Orden") = TmpDT.Rows.Count + 1 Row("Orden") = TmpDT.Rows.Count + 1
Row("Cantidad") = PS.Cantidad Row("Cantidad") = PS.Cantidad