Empresas Zona Horaria

This commit is contained in:
rakcsle
2023-10-09 11:54:42 -07:00
parent 2df7c3976c
commit f43b7759a8
649 changed files with 11445 additions and 11105 deletions

View File

@@ -49,7 +49,7 @@ Partial Class AIMMGM_ConsultaCliente
Session("FileUpload") = ""
ViewState("Orden") = ""
ViewState("ONombre") = "Nombre DESC"
TxtFecha.Text = Now.ToShortDateString
TxtFecha.Text = NowADS().ToShortDateString
If Request("CveCliente") IsNot Nothing Then
CveCliente = Request("CveCliente").ToString.ToEntero()
@@ -266,7 +266,7 @@ Partial Class AIMMGM_ConsultaCliente
Venta.UpdateVentas(dr("SubTotal").ToString.ToDouble - Total, 0, 0, dr("SubTotal").ToString.ToDouble - Total, 1, 1, dr("Fecha").ToString.ToDate, "", 43, CveVenta, "Rem")
Alert("El Registro ha sido eliminado", TipoMensaje.MsgInformacion)
If MovimientosVentas.ToEntero = 1 Then 'se cancela la venta en su totalidad
Venta.UpdateEstatusFactura(4, "", "", Now, CveVenta)
Venta.UpdateEstatusFactura(4, "", "", NowADS(), CveVenta)
End If
Venta.Commit()
@@ -473,10 +473,10 @@ Partial Class AIMMGM_ConsultaCliente
' Dim EsVistaPrevia As Boolean = True
' xlsxFileOut = String.Format("Format{0}-{1}.xlsx", Opcion, Now.Ticks)
' xlsxFileOut = String.Format("Format{0}-{1}.xlsx", Opcion, NowADS().Ticks)
' 'Exportar PDF
' pdfFileOut = String.Format("Format{0}-{1}.pdf", Opcion, Now.Ticks)
' pdfFileOut = String.Format("Format{0}-{1}.pdf", Opcion, NowADS().Ticks)
' Dim outputFileName As Object = Ruta & xlsxFileOut
' If IO.File.Exists(Ruta & "FormatoAIMMGM33.xlsx") Then
@@ -758,7 +758,7 @@ Partial Class AIMMGM_ConsultaCliente
Dim Liga As String = "http://aimmgm.adsistemas.mx/AIMMGM/Portal.aspx"
Dim LigaActivar As String = Liga & "?p=" & Extensiones.Encripta("CveU=" & CveUsr & "&Clave=" & CveCliente & "&Opcion=Activar&Hora=" & DateTime.Now.Ticks)
Dim LigaActivar As String = Liga & "?p=" & Extensiones.Encripta("CveU=" & CveUsr & "&Clave=" & CveCliente & "&Opcion=Activar&Hora=" & NowADS().Ticks)
Dim strSQL As New StringBuilder
strSQL.Append(" <html> ")

View File

@@ -130,7 +130,7 @@ Partial Class AIMMGM_Pagos
Dim dt As DataTable
If AIM.GetPagos(DdlCliente.SelectedValue.ToEntero, 2) Then
dt = AIM.DtResultados.FiltraParametros("Facturado = 0 and RequiereFactura = 1")
' GvE.Caption = String.Format("<table style='width:100%; background-color:#ADD8E6;'><tr><td>{0}</td></tr></table>", Now.ToLongDateString)
' GvE.Caption = String.Format("<table style='width:100%; background-color:#ADD8E6;'><tr><td>{0}</td></tr></table>", NowADS().ToLongDateString)
GvE.CaptionAlign = TableCaptionAlign.Left
GvE.DataSource = dt
GvE.DataBind()

View File

@@ -72,7 +72,7 @@ Partial Class AIMMGM_Registro
For Each dr As DataRow In dtExcursiones.Rows
Dim AIM As New ClsAIMMGM
If AIM.RepVentasPS(1, -1, -1, -1, "01/01/2014".ToDate, Now, 43) Then
If AIM.RepVentasPS(1, -1, -1, -1, "01/01/2014".ToDate, NowADS(), 43) Then
Contador = AIM.DtResultados.COUNT("CvePS", "CvePS = " & dr("CvePS").ToString)
If Contador >= 20 Then
dr("CvePS") = 0
@@ -299,7 +299,7 @@ Partial Class AIMMGM_Registro
If System.Web.HttpContext.Current IsNot Nothing AndAlso System.Web.HttpContext.Current.Handler IsNot Nothing Then
Dim Img, Botones As String
Dim Titulo As String
Dim Plus As String = DateTime.Now.Ticks.ToString
Dim Plus As String = NowADS().Ticks.ToString
Mensaje = Mensaje.Replace("'"c, "\'")
JSBtnAceptar = JSBtnAceptar.Replace("'"c, "\'")
@@ -335,8 +335,8 @@ Partial Class AIMMGM_Registro
Dim Pag As Page = DirectCast(System.Web.HttpContext.Current.Handler, Page)
'ScriptManager.RegisterStartupScript(Pag, Pag.GetType(), (DateTime.Now.Ticks + 1).ToString(), "MuestraAlert('" & Alerta.ToString() & "', '" & Plus & "');", True)
ScriptManager.RegisterStartupScript(Pag, Pag.GetType(), (DateTime.Now.Ticks + 1).ToString(), String.Format("MuestraAlerta('{0}','{1}','{2}','{3}','{4}');", Titulo, Mensaje, Img, Botones, JSBtnAceptar), True)
'ScriptManager.RegisterStartupScript(Pag, Pag.GetType(), (NowADS().Ticks + 1).ToString(), "MuestraAlert('" & Alerta.ToString() & "', '" & Plus & "');", True)
ScriptManager.RegisterStartupScript(Pag, Pag.GetType(), (NowADS().Ticks + 1).ToString(), String.Format("MuestraAlerta('{0}','{1}','{2}','{3}','{4}');", Titulo, Mensaje, Img, Botones, JSBtnAceptar), True)
Pag = Nothing
Catch ex As Exception
@@ -420,7 +420,7 @@ Partial Class AIMMGM_Registro
Dim tnombre As String
Dim TieneExcursion As Boolean = False
'DdlFiscalMetodoPago.SelectedValue.ToEntero1,
If Venta.AddVenta("Rem", 0, CveCliente, 2069, TmpDT.SUM("Total"), 0, 0, 0, 0, 0, TmpDT.SUM("Total"), 1, 0, CveMetodoPago, 0, 0, Now, "", "", 0, Now, -1, -1, "", "", "", 0, 0, 0, 0, DateTime.MinValue, DateTime.MinValue, DateTime.MinValue, -1, -1, 0, 1, 0, 2069, 43) Then
If Venta.AddVenta("Rem", 0, CveCliente, 2069, TmpDT.SUM("Total"), 0, 0, 0, 0, 0, TmpDT.SUM("Total"), 1, 0, CveMetodoPago, 0, 0, NowADS(), "", "", 0, NowADS(), -1, -1, "", "", "", 0, 0, 0, 0, DateTime.MinValue, DateTime.MinValue, DateTime.MinValue, -1, -1, 0, 1, 0, 2069, 43) Then
Dim CveVenta As Integer = Venta.CveVenta
For Each dr As DataRow In TmpDT.Rows
Dim CveUnidadMedida As Integer
@@ -555,7 +555,7 @@ Partial Class AIMMGM_Registro
Dim Liga As String = "http://aimmgm.adsistemas.mx/AIMMGM/Portal.aspx"
Dim LigaActivar As String = Liga & "?p=" & Encripta("CveU=" & CveUsr & "&Clave=" & CveCliente & "&Opcion=Activar&Hora=" & DateTime.Now.Ticks)
Dim LigaActivar As String = Liga & "?p=" & Encripta("CveU=" & CveUsr & "&Clave=" & CveCliente & "&Opcion=Activar&Hora=" & NowADS().Ticks)
Dim strSQL As New StringBuilder
strSQL.Append(" <html> ")

View File

@@ -96,7 +96,7 @@ Partial Class AIMMGM_Registro
For Each dr As DataRow In dtExcursiones.Rows
Dim AIM As New ClsAIMMGM
If AIM.RepVentasPS(1, -1, -1, -1, "01/01/2014".ToDate, Now, 43) Then
If AIM.RepVentasPS(1, -1, -1, -1, "01/01/2014".ToDate, NowADS(), 43) Then
Contador = AIM.DtResultados.COUNT("CvePS", "CvePS = " & dr("CvePS").ToString)
If Contador >= 20 Then
dr("CvePS") = 0
@@ -387,7 +387,7 @@ Partial Class AIMMGM_Registro
If System.Web.HttpContext.Current IsNot Nothing AndAlso System.Web.HttpContext.Current.Handler IsNot Nothing Then
Dim Img, Botones As String
Dim Titulo As String
Dim Plus As String = DateTime.Now.Ticks.ToString
Dim Plus As String = NowADS().Ticks.ToString
Mensaje = Mensaje.Replace("'"c, "\'")
JSBtnAceptar = JSBtnAceptar.Replace("'"c, "\'")
@@ -423,8 +423,8 @@ Partial Class AIMMGM_Registro
Dim Pag As Page = DirectCast(System.Web.HttpContext.Current.Handler, Page)
'ScriptManager.RegisterStartupScript(Pag, Pag.GetType(), (DateTime.Now.Ticks + 1).ToString(), "MuestraAlert('" & Alerta.ToString() & "', '" & Plus & "');", True)
ScriptManager.RegisterStartupScript(Pag, Pag.GetType(), (DateTime.Now.Ticks + 1).ToString(), String.Format("MuestraAlerta('{0}','{1}','{2}','{3}','{4}');", Titulo, Mensaje, Img, Botones, JSBtnAceptar), True)
'ScriptManager.RegisterStartupScript(Pag, Pag.GetType(), (NowADS().Ticks + 1).ToString(), "MuestraAlert('" & Alerta.ToString() & "', '" & Plus & "');", True)
ScriptManager.RegisterStartupScript(Pag, Pag.GetType(), (NowADS().Ticks + 1).ToString(), String.Format("MuestraAlerta('{0}','{1}','{2}','{3}','{4}');", Titulo, Mensaje, Img, Botones, JSBtnAceptar), True)
Pag = Nothing
Catch ex As Exception
@@ -597,7 +597,7 @@ Partial Class AIMMGM_Registro
Dim tnombre As String
Dim TieneExcursion As Boolean = False
If Venta.AddVenta("Rem", 0, CveCliente, 2069, TmpDT.SUM("Total"), 0, 0, 0, 0, 0, TmpDT.SUM("Total"), 1, 0, DdlFiscalMetodoPago.SelectedValue.ToEntero, 0, 0, Now, "", "", 0, Now, -1, -1, "", "", "", 0, 0, 0, 0, DateTime.MinValue, DateTime.MinValue, DateTime.MinValue, -1, -1, 0, 0, 1, 2069, 43) Then
If Venta.AddVenta("Rem", 0, CveCliente, 2069, TmpDT.SUM("Total"), 0, 0, 0, 0, 0, TmpDT.SUM("Total"), 1, 0, DdlFiscalMetodoPago.SelectedValue.ToEntero, 0, 0, NowADS(), "", "", 0, NowADS(), -1, -1, "", "", "", 0, 0, 0, 0, DateTime.MinValue, DateTime.MinValue, DateTime.MinValue, -1, -1, 0, 0, 1, 2069, 43) Then
Dim CveVenta As Integer = Venta.CveVenta
For Each dr As DataRow In TmpDT.Rows
Dim CveUnidadMedida As Integer
@@ -715,7 +715,7 @@ Partial Class AIMMGM_Registro
Dim tnombre As String
Dim TieneExcursion As Boolean = False
If Venta.AddVenta("Rem", 0, CveCliente, 2069, TmpDT.SUM("Total"), 0, 0, 0, 0, 0, TmpDT.SUM("Total"), 1, 0, DdlFiscalMetodoPago.SelectedValue.ToEntero, 0, 0, Now, "", "", 0, Now, -1, -1, "", "", "", 0, 0, 0, 0, DateTime.MinValue, DateTime.MinValue, DateTime.MinValue, -1, -1, 0, 1, 0, 2069, 43) Then
If Venta.AddVenta("Rem", 0, CveCliente, 2069, TmpDT.SUM("Total"), 0, 0, 0, 0, 0, TmpDT.SUM("Total"), 1, 0, DdlFiscalMetodoPago.SelectedValue.ToEntero, 0, 0, NowADS(), "", "", 0, NowADS(), -1, -1, "", "", "", 0, 0, 0, 0, DateTime.MinValue, DateTime.MinValue, DateTime.MinValue, -1, -1, 0, 1, 0, 2069, 43) Then
Dim CveVenta As Integer = Venta.CveVenta
For Each dr As DataRow In TmpDT.Rows
Dim CveUnidadMedida As Integer
@@ -745,7 +745,7 @@ Partial Class AIMMGM_Registro
If Not Errorr Then
If AIM.AddPago(CveCliente, Venta.CveVentaDetalle, dr("Total").ToString.ToDouble, 1, Now, "", "Pago en terminal", TxtNumeroAsesor.Text.Trim.ToEntero, TxtNumeroAprobacion.Text.Trim.ToEntero) <= 0 Then
If AIM.AddPago(CveCliente, Venta.CveVentaDetalle, dr("Total").ToString.ToDouble, 1, NowADS(), "", "Pago en terminal", TxtNumeroAsesor.Text.Trim.ToEntero, TxtNumeroAprobacion.Text.Trim.ToEntero) <= 0 Then
Errorr = True
End If
@@ -853,7 +853,7 @@ Partial Class AIMMGM_Registro
Dim Liga As String = "http://aimmgm.adsistemas.mx/AIMMGM/Portal.aspx"
Dim LigaActivar As String = Liga & "?p=" & Encripta("CveU=" & CveUsr & "&Clave=" & CveCliente & "&Opcion=Activar&Hora=" & DateTime.Now.Ticks)
Dim LigaActivar As String = Liga & "?p=" & Encripta("CveU=" & CveUsr & "&Clave=" & CveCliente & "&Opcion=Activar&Hora=" & NowADS().Ticks)
Dim strSQL As New StringBuilder
strSQL.Append(" <html> ")
@@ -1062,7 +1062,7 @@ Partial Class AIMMGM_Registro
Cliente.Dispose()
End If
Dim ClavePago As String = String.Format("{0}-{1}", CveCliente, Now.Ticks)
Dim ClavePago As String = String.Format("{0}-{1}", CveCliente, NowADS().Ticks)
'actualizo la clavedel cliente en todos los registros
@@ -1079,8 +1079,8 @@ Partial Class AIMMGM_Registro
myNameValueCollection.Add("ref", CveCliente.ToString)
myNameValueCollection.Add("imp", TmpDT.SUM("Total").ToString) '".01"
myNameValueCollection.Add("ema", TxtEmail.Text.Trim)
myNameValueCollection.Add("urlOk", String.Format("http://aimmgm.adsistemas.mx/AIMMGM/ePagos.aspx?p={0}", Encripta(String.Format("Cve={0}&F={1}&CveCliente={2}&P=1", ClavePago, Now, CveCliente))))
myNameValueCollection.Add("urlKo", String.Format("http://aimmgm.adsistemas.mx/AIMMGM/ePagos.aspx?p={0}", Encripta(String.Format("Cve={0}&F={1}&CveCliente={2}&NP=1", ClavePago, Now, CveCliente))))
myNameValueCollection.Add("urlOk", String.Format("http://aimmgm.adsistemas.mx/AIMMGM/ePagos.aspx?p={0}", Encripta(String.Format("Cve={0}&F={1}&CveCliente={2}&P=1", ClavePago, NowADS(), CveCliente))))
myNameValueCollection.Add("urlKo", String.Format("http://aimmgm.adsistemas.mx/AIMMGM/ePagos.aspx?p={0}", Encripta(String.Format("Cve={0}&F={1}&CveCliente={2}&NP=1", ClavePago, NowADS(), CveCliente))))
myNameValueCollection.Add("autoBack", "1")
myNameValueCollection.Add("datbloq", "1")
@@ -1096,8 +1096,8 @@ Partial Class AIMMGM_Registro
'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)
Cache.Add(VSKey, pviewState, Nothing, Date.Now.AddMinutes(60), Cache.NoSlidingExpiration, CacheItemPriority.Default, Nothing) 'Store the ViewState on Cache
Dim VSKey As String = String.Format("VIEWSTATE_{0}_{1}_{2}", Session.SessionID, Request.Path, NowADS().Ticks)
Cache.Add(VSKey, pviewState, Nothing, NowADS().AddMinutes(60), Cache.NoSlidingExpiration, CacheItemPriority.Default, Nothing) 'Store the ViewState on Cache
ClientScript.RegisterHiddenField("__VIEWSTATE_KEY", VSKey)
End Sub

View File

@@ -10,8 +10,8 @@ Partial Class AIMMGM_Ventas
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
If Not Page.IsPostBack Then
txtFechaI.Text = "01/01/" & Now.Year
txtFechaF.Text = Now.ToShortDateString
txtFechaI.Text = "01/01/" & NowADS().Year
txtFechaF.Text = NowADS().ToShortDateString
Dim dt As DataTable

View File

@@ -64,7 +64,7 @@ Partial Class AIMMGM_ePagos
Dim Fecha As String = ClsPaginas.UrlParametros("F").ToString
If Fecha.ToDate > Now.AddHours(-1) AndAlso ClsPaginas.UrlParametros("P") IsNot Nothing AndAlso ClsPaginas.UrlParametros("P").ToString = "1" Then
If Fecha.ToDate > NowADS().AddHours(-1) AndAlso ClsPaginas.UrlParametros("P") IsNot Nothing AndAlso ClsPaginas.UrlParametros("P").ToString = "1" Then
ClavePago = ClsPaginas.UrlParametros("CVE").ToString
CargaCompra()
@@ -124,7 +124,7 @@ Partial Class AIMMGM_ePagos
Dim tnombre As String
Dim TieneExcursion As Boolean = False
If Venta.AddVenta("Rem", 0, CveCliente, 2069, TmpDT.SUM("Total"), 0, 0, 0, 0, 0, TmpDT.SUM("Total"), 1, 0, CveMetodoPago, 0, 0, Now, "", "", -1, Now, -1, -1, "", "", "", 0, 0, 0, 0, DateTime.MinValue, DateTime.MinValue, DateTime.MinValue, -1, -1, 0, 1, 0, 2069, 43) Then
If Venta.AddVenta("Rem", 0, CveCliente, 2069, TmpDT.SUM("Total"), 0, 0, 0, 0, 0, TmpDT.SUM("Total"), 1, 0, CveMetodoPago, 0, 0, NowADS(), "", "", -1, NowADS(), -1, -1, "", "", "", 0, 0, 0, 0, DateTime.MinValue, DateTime.MinValue, DateTime.MinValue, -1, -1, 0, 1, 0, 2069, 43) Then
Dim CveVenta As Integer = Venta.CveVenta
For Each dr As DataRow In TmpDT.Rows
Dim CveUnidadMedida As Integer
@@ -154,7 +154,7 @@ Partial Class AIMMGM_ePagos
Next
If Not Errorr Then
If AIM.AddPago(CveCliente, -1, TmpDT.SUM("Total"), 1, Now, "", "Pago en línea", 0, 0) <= 0 Then
If AIM.AddPago(CveCliente, -1, TmpDT.SUM("Total"), 1, NowADS(), "", "Pago en línea", 0, 0) <= 0 Then
Errorr = True
End If
If Not Errorr Then
@@ -199,7 +199,7 @@ Partial Class AIMMGM_ePagos
If System.Web.HttpContext.Current IsNot Nothing AndAlso System.Web.HttpContext.Current.Handler IsNot Nothing Then
Dim Img, Botones As String
Dim Titulo As String
Dim Plus As String = DateTime.Now.Ticks.ToString
Dim Plus As String = NowADS().Ticks.ToString
Mensaje = Mensaje.Replace("'"c, "\'")
JSBtnAceptar = JSBtnAceptar.Replace("'"c, "\'")
@@ -235,8 +235,8 @@ Partial Class AIMMGM_ePagos
Dim Pag As Page = DirectCast(System.Web.HttpContext.Current.Handler, Page)
'ScriptManager.RegisterStartupScript(Pag, Pag.GetType(), (DateTime.Now.Ticks + 1).ToString(), "MuestraAlert('" & Alerta.ToString() & "', '" & Plus & "');", True)
ScriptManager.RegisterStartupScript(Pag, Pag.GetType(), (DateTime.Now.Ticks + 1).ToString(), String.Format("MuestraAlerta('{0}','{1}','{2}','{3}','{4}');", Titulo, Mensaje, Img, Botones, JSBtnAceptar), True)
'ScriptManager.RegisterStartupScript(Pag, Pag.GetType(), (NowADS().Ticks + 1).ToString(), "MuestraAlert('" & Alerta.ToString() & "', '" & Plus & "');", True)
ScriptManager.RegisterStartupScript(Pag, Pag.GetType(), (NowADS().Ticks + 1).ToString(), String.Format("MuestraAlerta('{0}','{1}','{2}','{3}','{4}');", Titulo, Mensaje, Img, Botones, JSBtnAceptar), True)
Pag = Nothing
Catch ex As Exception
@@ -312,7 +312,7 @@ Partial Class AIMMGM_ePagos
Dim Liga As String = "http://aimmgm.adsistemas.mx/AIMMGM/Portal.aspx"
Dim LigaActivar As String = Liga & "?p=" & Encripta("CveU=" & CveUsr & "&Clave=" & CveCliente & "&Opcion=Activar&Hora=" & DateTime.Now.Ticks)
Dim LigaActivar As String = Liga & "?p=" & Encripta("CveU=" & CveUsr & "&Clave=" & CveCliente & "&Opcion=Activar&Hora=" & NowADS().Ticks)
Dim strSQL As New StringBuilder
strSQL.Append(" <html> ")