-merge
This commit is contained in:
@@ -2048,7 +2048,7 @@ Public Class ClsInventarios
|
|||||||
Return Retorno
|
Return Retorno
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
Public Function GetExistenciasProductosLike(PS As String, CveClasificacion As Integer, CveSubProyecto As Integer, Estatus As Integer, AplicaParaVenta As Integer, CveEmpresa As Integer) As Boolean
|
Public Function GetExistenciasProductosLike(PS As String, CveClasificacion As Integer, CveSubProyecto As Integer, Estatus As Integer, AplicaParaVenta As Integer, CveEmpresa As Integer, Optional CveMarca As Integer = -1) As Boolean
|
||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Boolean = False
|
||||||
|
|
||||||
DataAdapter("PA_ProductosServiciosInventario")
|
DataAdapter("PA_ProductosServiciosInventario")
|
||||||
@@ -2059,6 +2059,7 @@ Public Class ClsInventarios
|
|||||||
.Add("@Estatus", SqlDbType.Int).Value = Estatus
|
.Add("@Estatus", SqlDbType.Int).Value = Estatus
|
||||||
.Add("@AplicaParaVenta", SqlDbType.Int).Value = AplicaParaVenta
|
.Add("@AplicaParaVenta", SqlDbType.Int).Value = AplicaParaVenta
|
||||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||||
|
.Add("@CveMarca", SqlDbType.Int).Value = CveMarca
|
||||||
End With
|
End With
|
||||||
|
|
||||||
Try
|
Try
|
||||||
|
|||||||
@@ -416,7 +416,29 @@ Public Class ClsSisUsuarios
|
|||||||
Return Retorno
|
Return Retorno
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
|
Public Function ValidaUsuarioCodigoAcceso(CodigoAcceso As String, CveEmpresa As Integer) As Integer
|
||||||
|
Dim Retorno As Integer = Nothing
|
||||||
|
|
||||||
|
DataAdapter("PA_Sis_UsuariosCodigoAccesoGet")
|
||||||
|
|
||||||
|
With SqlAdapter.SelectCommand.Parameters
|
||||||
|
.Add("@CodigoAcceso", SqlDbType.VarChar).Value = CodigoAcceso
|
||||||
|
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||||
|
End With
|
||||||
|
|
||||||
|
Try
|
||||||
|
SqlAdapter.Fill(Data)
|
||||||
|
If Data.Rows.Count > 0 Then
|
||||||
|
Retorno = Data.Rows(0)("CveUsuario").ToString.ToEntero
|
||||||
|
End If
|
||||||
|
|
||||||
|
Catch ex As SqlException
|
||||||
|
OnError("Ocurrió un error al obtener el usuario.", ex)
|
||||||
|
Retorno = Nothing
|
||||||
|
End Try
|
||||||
|
|
||||||
|
Return Retorno
|
||||||
|
End Function
|
||||||
Public Function ValidaUsuarioPortalCliente(CveCliente As Integer, Usuario As String, Password As String) As Usuario
|
Public Function ValidaUsuarioPortalCliente(CveCliente As Integer, Usuario As String, Password As String) As Usuario
|
||||||
Dim Retorno As Usuario = Nothing
|
Dim Retorno As Usuario = Nothing
|
||||||
|
|
||||||
@@ -799,7 +821,7 @@ Public Class ClsSisUsuarios
|
|||||||
Public Function AddUsuario(Usuario As String, Contraseña As String, Nombre As String, CveRol As Integer, Correo As String,
|
Public Function AddUsuario(Usuario As String, Contraseña As String, Nombre As String, CveRol As Integer, Correo As String,
|
||||||
CvePersonal As Integer, CveVendedor As Integer, CambiarContraseña As Boolean,
|
CvePersonal As Integer, CveVendedor As Integer, CambiarContraseña As Boolean,
|
||||||
CveUsuarioIng As Integer, CveEmpresa As Integer, CveSubProyecto As Integer, Optional Rol As String = "-1", Optional CveAlmacenAsignado As Integer = -1, Optional AsignarSubProyecto As Boolean = False, Optional AsignarOC As Boolean = False,
|
CveUsuarioIng As Integer, CveEmpresa As Integer, CveSubProyecto As Integer, Optional Rol As String = "-1", Optional CveAlmacenAsignado As Integer = -1, Optional AsignarSubProyecto As Boolean = False, Optional AsignarOC As Boolean = False,
|
||||||
Optional CvePlataforma As Integer = -1, Optional CveClientePlataforma As Integer = -1, Optional CveProveedorPlataforma As Integer = -1, Optional DescuentoAutorizado As Double = 0) As Integer
|
Optional CvePlataforma As Integer = -1, Optional CveClientePlataforma As Integer = -1, Optional CveProveedorPlataforma As Integer = -1, Optional DescuentoAutorizado As Double = 0, Optional CodigoAcceso As String = "-1") As Integer
|
||||||
Dim Retorno = -1
|
Dim Retorno = -1
|
||||||
DataAdapter("PA_Sis_UsuarioAdd")
|
DataAdapter("PA_Sis_UsuarioAdd")
|
||||||
With SqlAdapter.SelectCommand.Parameters
|
With SqlAdapter.SelectCommand.Parameters
|
||||||
@@ -819,6 +841,7 @@ Public Class ClsSisUsuarios
|
|||||||
.Add("@CveCliente", SqlDbType.Int).Value = CveClientePlataforma
|
.Add("@CveCliente", SqlDbType.Int).Value = CveClientePlataforma
|
||||||
.Add("@CveProveedor", SqlDbType.Int).Value = CveProveedorPlataforma
|
.Add("@CveProveedor", SqlDbType.Int).Value = CveProveedorPlataforma
|
||||||
.Add("@DescuentoAutorizado", SqlDbType.Float).Value = DescuentoAutorizado
|
.Add("@DescuentoAutorizado", SqlDbType.Float).Value = DescuentoAutorizado
|
||||||
|
.Add("@CodigoAcceso", SqlDbType.VarChar).Value = CodigoAcceso
|
||||||
|
|
||||||
.Add("@CveUsuario", SqlDbType.Int).Direction = ParameterDirection.Output
|
.Add("@CveUsuario", SqlDbType.Int).Direction = ParameterDirection.Output
|
||||||
End With
|
End With
|
||||||
@@ -917,7 +940,7 @@ Public Class ClsSisUsuarios
|
|||||||
End Function
|
End Function
|
||||||
Public Function UpdateUsuario(Usuario As String, Nombre As String, CveRol As Integer, Correo As String, CvePersonal As Integer,
|
Public Function UpdateUsuario(Usuario As String, Nombre As String, CveRol As Integer, Correo As String, CvePersonal As Integer,
|
||||||
CveVendedor As Integer, CambiarContraseña As Boolean, Activo As Boolean, CveEmpresa As Integer, CveUsuario As Integer, CveAlmacenAsignado As Integer, CveSubProyecto As Integer, Optional CveUsuarioModifico As Integer = -1, Optional AsignarSubProyecto As Boolean = False, Optional AsignarOC As Boolean = False,
|
CveVendedor As Integer, CambiarContraseña As Boolean, Activo As Boolean, CveEmpresa As Integer, CveUsuario As Integer, CveAlmacenAsignado As Integer, CveSubProyecto As Integer, Optional CveUsuarioModifico As Integer = -1, Optional AsignarSubProyecto As Boolean = False, Optional AsignarOC As Boolean = False,
|
||||||
Optional DescuentoAutorizado As Double = 0) As Boolean
|
Optional DescuentoAutorizado As Double = 0, Optional CodigoAcceso As String = "-1") As Boolean
|
||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Boolean = False
|
||||||
|
|
||||||
DataAdapter("PA_Sis_UsuarioUpdate")
|
DataAdapter("PA_Sis_UsuarioUpdate")
|
||||||
@@ -938,6 +961,7 @@ Public Class ClsSisUsuarios
|
|||||||
.Add("@AsignarSubProyecto", SqlDbType.Bit).Value = AsignarSubProyecto
|
.Add("@AsignarSubProyecto", SqlDbType.Bit).Value = AsignarSubProyecto
|
||||||
.Add("@AsignarOC", SqlDbType.Bit).Value = AsignarOC
|
.Add("@AsignarOC", SqlDbType.Bit).Value = AsignarOC
|
||||||
.Add("@DescuentoAutorizado", SqlDbType.Float).Value = DescuentoAutorizado
|
.Add("@DescuentoAutorizado", SqlDbType.Float).Value = DescuentoAutorizado
|
||||||
|
.Add("@CodigoAcceso", SqlDbType.VarChar).Value = CodigoAcceso
|
||||||
End With
|
End With
|
||||||
|
|
||||||
Try
|
Try
|
||||||
|
|||||||
@@ -60,7 +60,9 @@ Public Class Usuario
|
|||||||
|
|
||||||
Public Property UTCOffset As Integer
|
Public Property UTCOffset As Integer
|
||||||
|
|
||||||
Public Property isLoginseted As Boolean = False
|
Public Property isLoginseted As Boolean = False
|
||||||
|
|
||||||
|
Public Property SesionBloqueada As Boolean = False
|
||||||
|
|
||||||
Public ReadOnly Property FechaActualCliente As DateTime
|
Public ReadOnly Property FechaActualCliente As DateTime
|
||||||
Get
|
Get
|
||||||
|
|||||||
@@ -694,10 +694,11 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState
|
|||||||
Dim CveSubProyecto = IfNull(context.Request("cvesubproyecto"), "-1").ToString.ToEntero
|
Dim CveSubProyecto = IfNull(context.Request("cvesubproyecto"), "-1").ToString.ToEntero
|
||||||
Dim UsoClasificacion = IfNull(context.Request("usoclasificacion"), "-1").ToString.ToEntero
|
Dim UsoClasificacion = IfNull(context.Request("usoclasificacion"), "-1").ToString.ToEntero
|
||||||
Dim AplicaParaVenta = IfNull(context.Request("aplicaparaventa"), "1").ToString.ToEntero
|
Dim AplicaParaVenta = IfNull(context.Request("aplicaparaventa"), "1").ToString.ToEntero
|
||||||
|
Dim AplicaParaVenta = IfNull(context.Request("aplicaparaventa"), "-1").ToString.ToEntero
|
||||||
|
Dim CveMarca = IfNull(context.Request("cvemarca"), "-1").ToString.ToEntero
|
||||||
|
|
||||||
Dim UsaGlobal As Boolean = True
|
Dim UsaGlobal As Boolean = True
|
||||||
|
|
||||||
|
|
||||||
'verifica existencias
|
'verifica existencias
|
||||||
If Pagina.Contiene("ventas/ventas", "oc/oc", "inv/traspaso") AndAlso CveEmpresa.Contiene(72, 80, 119, 140, 141, 152, 153, 159, 160, 161, 162, 163) Then
|
If Pagina.Contiene("ventas/ventas", "oc/oc", "inv/traspaso") AndAlso CveEmpresa.Contiene(72, 80, 119, 140, 141, 152, 153, 159, 160, 161, 162, 163) Then
|
||||||
UsaGlobal = False
|
UsaGlobal = False
|
||||||
@@ -707,7 +708,7 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState
|
|||||||
'End If
|
'End If
|
||||||
|
|
||||||
Dim objInv As New ClsInventarios
|
Dim objInv As New ClsInventarios
|
||||||
If objInv.GetExistenciasProductosLike(Name, CveClasificacion, CveSubProyecto, Estatus.ToEntero, AplicaParaVenta, CveEmpresa) Then
|
If objInv.GetExistenciasProductosLike(Name, CveClasificacion, CveSubProyecto, Estatus.ToEntero, AplicaParaVenta, CveEmpresa, CveMarca) Then
|
||||||
|
|
||||||
' limpio los almacenes donde no tiene ningun producto existencia
|
' limpio los almacenes donde no tiene ningun producto existencia
|
||||||
|
|
||||||
|
|||||||
@@ -88,6 +88,7 @@ Partial Class CatSubProyectos
|
|||||||
|
|
||||||
Private Sub RecargaGlobal()
|
Private Sub RecargaGlobal()
|
||||||
GlobalDTSubProyectos(-1, CveEmpresa:=UsuarioActual.CveEmpresa) = Nothing
|
GlobalDTSubProyectos(-1, CveEmpresa:=UsuarioActual.CveEmpresa) = Nothing
|
||||||
|
GlobalDTSubProyectosUsuarios(-1, -1, UsuarioActual.CveEmpresa) = Nothing
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
#Region "O R D E N A M I E N T O"
|
#Region "O R D E N A M I E N T O"
|
||||||
|
|||||||
@@ -1200,7 +1200,8 @@ function setwebservice(idDdlWS, idhdValue, idhdText, btn) {
|
|||||||
metodo: (!(DdlWS.data('metodo')) || DdlWS.data('metodo') == 'getps') ? ((!(DdlWS.parent().data('metodo')) || DdlWS.parent().data('metodo') == 'getps') ? 'getps' : DdlWS.parent().data('metodo')) : DdlWS.data('metodo'),
|
metodo: (!(DdlWS.data('metodo')) || DdlWS.data('metodo') == 'getps') ? ((!(DdlWS.parent().data('metodo')) || DdlWS.parent().data('metodo') == 'getps') ? 'getps' : DdlWS.parent().data('metodo')) : DdlWS.data('metodo'),
|
||||||
Pagina: (!(DdlWS.data('pagina')) || DdlWS.data('pagina') == '') ? '-2' : DdlWS.data('pagina'),
|
Pagina: (!(DdlWS.data('pagina')) || DdlWS.data('pagina') == '') ? '-2' : DdlWS.data('pagina'),
|
||||||
ColTexto: (!(DdlWS.data('coltexto')) || DdlWS.data('coltexto') == '') ? 'NC' : DdlWS.data('coltexto'),
|
ColTexto: (!(DdlWS.data('coltexto')) || DdlWS.data('coltexto') == '') ? 'NC' : DdlWS.data('coltexto'),
|
||||||
aplicaparaventa: (!(DdlWS.data('aplicaparaventa')) || DdlWS.data('aplicaparaventa') == '') ? -1 : DdlWS.data('aplicaparaventa')
|
aplicaparaventa: (!(DdlWS.data('aplicaparaventa')) || DdlWS.data('aplicaparaventa') == '') ? -1 : DdlWS.data('aplicaparaventa'),
|
||||||
|
cvemarca: (!(DdlWS.data('cvemarca')) || DdlWS.data('cvemarca') == '') ? -1 : DdlWS.data('cvemarca')
|
||||||
|
|
||||||
//Metodo: metodo
|
//Metodo: metodo
|
||||||
};
|
};
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -6,8 +6,8 @@ Imports System.Data
|
|||||||
Imports System.Threading
|
Imports System.Threading
|
||||||
|
|
||||||
Partial Class Sistemas_UsuarioDetalle
|
Partial Class Sistemas_UsuarioDetalle
|
||||||
Inherits ClsPaginas
|
Inherits ClsPaginas
|
||||||
|
|
||||||
#Region "P R O P I E D A D E S"
|
#Region "P R O P I E D A D E S"
|
||||||
Private Property DTEstatusSubProyectos As DataTable
|
Private Property DTEstatusSubProyectos As DataTable
|
||||||
Get
|
Get
|
||||||
@@ -84,6 +84,11 @@ Partial Class Sistemas_UsuarioDetalle
|
|||||||
Get
|
Get
|
||||||
Return ViewState("Password").ToString
|
Return ViewState("Password").ToString
|
||||||
End Get
|
End Get
|
||||||
|
End Property
|
||||||
|
Private ReadOnly Property CodigoAcceso As String
|
||||||
|
Get
|
||||||
|
Return ViewState("CodigoAcceso").ToString
|
||||||
|
End Get
|
||||||
End Property
|
End Property
|
||||||
Private Property DtClasificaciones As DataTable
|
Private Property DtClasificaciones As DataTable
|
||||||
Get
|
Get
|
||||||
@@ -390,10 +395,10 @@ Partial Class Sistemas_UsuarioDetalle
|
|||||||
Set(value As Integer)
|
Set(value As Integer)
|
||||||
ViewState("CveEmpresaAnterior") = value
|
ViewState("CveEmpresaAnterior") = value
|
||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
|
|
||||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||||
If Not IsPostBack Then
|
If Not IsPostBack Then
|
||||||
|
|
||||||
@@ -444,27 +449,30 @@ Partial Class Sistemas_UsuarioDetalle
|
|||||||
TrDescuentoAutorizado.Visible = True
|
TrDescuentoAutorizado.Visible = True
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
If UsuarioActual.Empresa.Funcionalidad(599) = "1" Then
|
||||||
CargaDatos()
|
TrCodigoAcceso.Visible = True
|
||||||
InicializaClonarUsuario()
|
|
||||||
InicializaRestricciones()
|
|
||||||
CargaGvBitacora()
|
|
||||||
CargaEmpresasAsignaciones()
|
|
||||||
CreaDtAsignacionesMultiEmpresa()
|
|
||||||
CveEmpresaAnterior = DdlEmpresaAsignaciones.SelectedValue.ToEntero
|
|
||||||
|
|
||||||
End If
|
End If
|
||||||
End Sub
|
|
||||||
|
|
||||||
'DOCUMENTACION
|
|
||||||
'LOS CAMPOS DE DATATABLE "ACCION" SE REFIERE AL ESTATUS DE LOS CAMBIOS QUE OCURRIERON ANTES DE DARLE GUARDAR
|
|
||||||
' 0/NULL/VACIO = ORIGINAL (SIN CAMBIO)
|
|
||||||
' 1 = AGREGADO
|
|
||||||
' 2 = ELIMINADO
|
|
||||||
' 3 = NADA (AGREGADO Y ELIMINADO): CUANDO AGREGA UN REGISTRO Y LO ELIMINA, ES DECIR, NO SE GUARDA NADA
|
|
||||||
' 4 = UPDATE
|
|
||||||
|
|
||||||
|
|
||||||
|
CargaDatos()
|
||||||
|
InicializaClonarUsuario()
|
||||||
|
InicializaRestricciones()
|
||||||
|
CargaGvBitacora()
|
||||||
|
CargaEmpresasAsignaciones()
|
||||||
|
CreaDtAsignacionesMultiEmpresa()
|
||||||
|
CveEmpresaAnterior = DdlEmpresaAsignaciones.SelectedValue.ToEntero
|
||||||
|
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
'DOCUMENTACION
|
||||||
|
'LOS CAMPOS DE DATATABLE "ACCION" SE REFIERE AL ESTATUS DE LOS CAMBIOS QUE OCURRIERON ANTES DE DARLE GUARDAR
|
||||||
|
' 0/NULL/VACIO = ORIGINAL (SIN CAMBIO)
|
||||||
|
' 1 = AGREGADO
|
||||||
|
' 2 = ELIMINADO
|
||||||
|
' 3 = NADA (AGREGADO Y ELIMINADO): CUANDO AGREGA UN REGISTRO Y LO ELIMINA, ES DECIR, NO SE GUARDA NADA
|
||||||
|
' 4 = UPDATE
|
||||||
|
|
||||||
|
|
||||||
#Region " C A R G A R - D A T O S "
|
#Region " C A R G A R - D A T O S "
|
||||||
Private Sub CargaDatos()
|
Private Sub CargaDatos()
|
||||||
|
|
||||||
@@ -518,10 +526,10 @@ Partial Class Sistemas_UsuarioDetalle
|
|||||||
CargarRol()
|
CargarRol()
|
||||||
CargaAsignaciones()
|
CargaAsignaciones()
|
||||||
|
|
||||||
CargaUsuarioResponsable
|
CargaUsuarioResponsable()
|
||||||
|
|
||||||
' ValidaAccesoEstatusOC()
|
' ValidaAccesoEstatusOC()
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Public Sub CargaUsuarioResponsable()
|
Public Sub CargaUsuarioResponsable()
|
||||||
@@ -545,7 +553,7 @@ Partial Class Sistemas_UsuarioDetalle
|
|||||||
ViewState("CveRol") = ObjUsuario.CveRol.ToString
|
ViewState("CveRol") = ObjUsuario.CveRol.ToString
|
||||||
DdlRol.SelectedValue = ObjUsuario.CveRol.ToString
|
DdlRol.SelectedValue = ObjUsuario.CveRol.ToString
|
||||||
TxtCorreo.Text = ObjUsuario.Correo
|
TxtCorreo.Text = ObjUsuario.Correo
|
||||||
|
TxtCodigoAcceso.Text = ObjUsuario.DtResultados.Rows(0)("CodigoAcceso").ToString()
|
||||||
|
|
||||||
Dim autoip As String = ObjUsuario.DtResultados.Rows(0)("AutorizadoxIP").ToString().ToUpper()
|
Dim autoip As String = ObjUsuario.DtResultados.Rows(0)("AutorizadoxIP").ToString().ToUpper()
|
||||||
'chkSessionxEquipo.Checked = (autoip = "1" OrElse autoip = "TRUE")
|
'chkSessionxEquipo.Checked = (autoip = "1" OrElse autoip = "TRUE")
|
||||||
@@ -553,6 +561,7 @@ Partial Class Sistemas_UsuarioDetalle
|
|||||||
'DdlAutoriza.SelectedValue = ObjUsuario.CveAutoriza.ToString
|
'DdlAutoriza.SelectedValue = ObjUsuario.CveAutoriza.ToString
|
||||||
|
|
||||||
ViewState("Password") = ObjUsuario.Contraseña
|
ViewState("Password") = ObjUsuario.Contraseña
|
||||||
|
ViewState("CodigoAcceso") = ObjUsuario.DtResultados.Rows(0)("CodigoAcceso").ToString()
|
||||||
|
|
||||||
ViewState("CveEmpresa") = ObjUsuario.CveEmpresaPredeterminada
|
ViewState("CveEmpresa") = ObjUsuario.CveEmpresaPredeterminada
|
||||||
DdlEmpresa.SelectedValue = CveEmpresa.ToString
|
DdlEmpresa.SelectedValue = CveEmpresa.ToString
|
||||||
@@ -749,23 +758,23 @@ Partial Class Sistemas_UsuarioDetalle
|
|||||||
|
|
||||||
If CveTipoDocumentoAsignado <> "-1" Then DdlTipoDocumento.SelectedValueExist(CveTipoDocumentoAsignado)
|
If CveTipoDocumentoAsignado <> "-1" Then DdlTipoDocumento.SelectedValueExist(CveTipoDocumentoAsignado)
|
||||||
UpFiltrosAsignarPermiso.Update()
|
UpFiltrosAsignarPermiso.Update()
|
||||||
End Sub
|
End Sub
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
'Private Sub CargaSucursal()
|
'Private Sub CargaSucursal()
|
||||||
' DtSubProyectos2 = GlobalDTSubProyectos(-1, CveEmpresa:=UsuarioActual.CveEmpresa).FiltraParametros("CveSubProyecto =" & DdlSubProyectos.SelectedValue.ToEntero)
|
' DtSubProyectos2 = GlobalDTSubProyectos(-1, CveEmpresa:=UsuarioActual.CveEmpresa).FiltraParametros("CveSubProyecto =" & DdlSubProyectos.SelectedValue.ToEntero)
|
||||||
' If DtSubProyectos2.Rows.Count > 0 Then
|
' If DtSubProyectos2.Rows.Count > 0 Then
|
||||||
' Dim dr As DataRow
|
' Dim dr As DataRow
|
||||||
' dr = DtSubProyectos2(0)
|
' dr = DtSubProyectos2(0)
|
||||||
' CveSucursal = dr("CveSucursal").ToString.ToEntero
|
' CveSucursal = dr("CveSucursal").ToString.ToEntero
|
||||||
' Else
|
' Else
|
||||||
' CveSucursal = -1
|
' CveSucursal = -1
|
||||||
' End If
|
' End If
|
||||||
|
|
||||||
'End Sub
|
'End Sub
|
||||||
|
|
||||||
#Region " G U A R D A R - U P D A T E "
|
#Region " G U A R D A R - U P D A T E "
|
||||||
|
|
||||||
Private Function ValidaUsername(Username As String, Correo As String) As Boolean
|
Private Function ValidaUsername(Username As String, Correo As String) As Boolean
|
||||||
Dim Retorno As Boolean = True
|
Dim Retorno As Boolean = True
|
||||||
'If CveUsuario = -1 Then
|
'If CveUsuario = -1 Then
|
||||||
@@ -818,10 +827,11 @@ Partial Class Sistemas_UsuarioDetalle
|
|||||||
DtAsignacionesMultiEmpresa.Rows.Add(Row)
|
DtAsignacionesMultiEmpresa.Rows.Add(Row)
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
Dim CodigoAcceso As String = If(String.IsNullOrEmpty(TxtCodigoAcceso.Text.Trim), "-1", TxtCodigoAcceso.Text.Trim)
|
||||||
|
|
||||||
'REGISTRA O ACTUALIZA LOS DATOS GENERALES DEL USUARIO
|
'REGISTRA O ACTUALIZA LOS DATOS GENERALES DEL USUARIO
|
||||||
If CveUsuario = -1 Then
|
If CveUsuario = -1 Then
|
||||||
CveUsuario = ObjUsuarios.AddUsuario(TxtUsuario.Text.Trim, Encripta(ContraseñaPredeterminada), TxtNombre.Text.Trim, DdlRol.SelectedValue.ToEntero, TxtCorreo.Text.Trim, DdlPersonal.SelectedValue.ToEntero, DdlVendedor.SelectedValue.ToEntero, ChkCambiarContraseña.Checked, UsuarioActual.CveUsuario, DdlEmpresa.SelectedValue.ToEntero, DdlSubProyectos.SelectedValue.ToEntero, CveAlmacenAsignado:=DdlAlmacenGeneral.SelectedValue.ToEntero, AsignarSubProyecto:=ChkAsignarSubProyecto.Checked, AsignarOC:=ChkAsignarOC.Checked, DescuentoAutorizado:=TxtDescuentoAutorizado.Text.ToDouble)
|
CveUsuario = ObjUsuarios.AddUsuario(TxtUsuario.Text.Trim, Encripta(ContraseñaPredeterminada), TxtNombre.Text.Trim, DdlRol.SelectedValue.ToEntero, TxtCorreo.Text.Trim, DdlPersonal.SelectedValue.ToEntero, DdlVendedor.SelectedValue.ToEntero, ChkCambiarContraseña.Checked, UsuarioActual.CveUsuario, DdlEmpresa.SelectedValue.ToEntero, DdlSubProyectos.SelectedValue.ToEntero, CveAlmacenAsignado:=DdlAlmacenGeneral.SelectedValue.ToEntero, AsignarSubProyecto:=ChkAsignarSubProyecto.Checked, AsignarOC:=ChkAsignarOC.Checked, DescuentoAutorizado:=TxtDescuentoAutorizado.Text.ToDouble, CodigoAcceso:=CodigoAcceso)
|
||||||
EsNuevoUsuario = True
|
EsNuevoUsuario = True
|
||||||
If CveUsuario = -1 Then
|
If CveUsuario = -1 Then
|
||||||
TieneError = True
|
TieneError = True
|
||||||
@@ -833,7 +843,7 @@ Partial Class Sistemas_UsuarioDetalle
|
|||||||
End If
|
End If
|
||||||
Next
|
Next
|
||||||
Else
|
Else
|
||||||
If Not ObjUsuarios.UpdateUsuario(TxtUsuario.Text.Trim, TxtNombre.Text.Trim, DdlRol.SelectedValue.ToEntero, TxtCorreo.Text.Trim, DdlPersonal.SelectedValue.ToEntero, DdlVendedor.SelectedValue.ToEntero, ChkCambiarContraseña.Checked, ChkEstatus.Checked, DdlEmpresa.SelectedValue.ToEntero, CveUsuario, DdlAlmacenGeneral.SelectedValue.ToEntero, DdlSubProyectos.SelectedValue.ToEntero, UsuarioActual.CveUsuario, AsignarSubProyecto:=ChkAsignarSubProyecto.Checked, AsignarOC:=ChkAsignarOC.Checked, DescuentoAutorizado:=TxtDescuentoAutorizado.Text.ToDouble) Then
|
If Not ObjUsuarios.UpdateUsuario(TxtUsuario.Text.Trim, TxtNombre.Text.Trim, DdlRol.SelectedValue.ToEntero, TxtCorreo.Text.Trim, DdlPersonal.SelectedValue.ToEntero, DdlVendedor.SelectedValue.ToEntero, ChkCambiarContraseña.Checked, ChkEstatus.Checked, DdlEmpresa.SelectedValue.ToEntero, CveUsuario, DdlAlmacenGeneral.SelectedValue.ToEntero, DdlSubProyectos.SelectedValue.ToEntero, UsuarioActual.CveUsuario, AsignarSubProyecto:=ChkAsignarSubProyecto.Checked, AsignarOC:=ChkAsignarOC.Checked, DescuentoAutorizado:=TxtDescuentoAutorizado.Text.ToDouble, CodigoAcceso:=CodigoAcceso) Then
|
||||||
TieneError = True
|
TieneError = True
|
||||||
End If
|
End If
|
||||||
|
|
||||||
@@ -1398,10 +1408,10 @@ Partial Class Sistemas_UsuarioDetalle
|
|||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
OnError("Ocurrió error al mandar MAIL", ex)
|
OnError("Ocurrió error al mandar MAIL", ex)
|
||||||
End Try
|
End Try
|
||||||
End Sub
|
End Sub
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
|
|
||||||
#Region " E L I M I N A R - U S U A R I O "
|
#Region " E L I M I N A R - U S U A R I O "
|
||||||
Protected Sub BtnEliminar_Click(sender As Object, e As System.EventArgs) Handles BtnEliminar.Click
|
Protected Sub BtnEliminar_Click(sender As Object, e As System.EventArgs) Handles BtnEliminar.Click
|
||||||
''DENTRO DEL PROCEDIMIENTO ELIMINA TODO LO RELACIONADO CON EL USUARIO (ALMACENES, SUBPROYECTOS, ACCESO A EMPRESAS...)
|
''DENTRO DEL PROCEDIMIENTO ELIMINA TODO LO RELACIONADO CON EL USUARIO (ALMACENES, SUBPROYECTOS, ACCESO A EMPRESAS...)
|
||||||
@@ -1413,10 +1423,10 @@ Partial Class Sistemas_UsuarioDetalle
|
|||||||
Alert("Ocurrió un error al eliminar el usuario. Por favor vuelva a intentar", TipoMensaje.MsgError)
|
Alert("Ocurrió un error al eliminar el usuario. Por favor vuelva a intentar", TipoMensaje.MsgError)
|
||||||
End If
|
End If
|
||||||
ObjUsuario.Dispose()
|
ObjUsuario.Dispose()
|
||||||
End Sub
|
End Sub
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
|
|
||||||
#Region " CONTRASEÑA "
|
#Region " CONTRASEÑA "
|
||||||
Protected Sub LnkRestablecer_Click(sender As Object, e As EventArgs) Handles LnkRestablecer.Click
|
Protected Sub LnkRestablecer_Click(sender As Object, e As EventArgs) Handles LnkRestablecer.Click
|
||||||
Dim Usuario As New ClsSisUsuarios
|
Dim Usuario As New ClsSisUsuarios
|
||||||
@@ -1430,11 +1440,15 @@ Partial Class Sistemas_UsuarioDetalle
|
|||||||
|
|
||||||
Protected Sub LnkVerPass_Click(sender As Object, e As EventArgs) Handles LnkVerPass.Click
|
Protected Sub LnkVerPass_Click(sender As Object, e As EventArgs) Handles LnkVerPass.Click
|
||||||
Alert(Extensiones.Decripta(Password))
|
Alert(Extensiones.Decripta(Password))
|
||||||
End Sub
|
End Sub
|
||||||
|
Protected Sub LnkVerCodigoAcceso_Click(sender As Object, e As EventArgs) Handles LnkVerCodigoAcceso.Click
|
||||||
|
Alert(CodigoAcceso)
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
|
|
||||||
#Region "TAB - ASIGNACIONES"
|
#Region "TAB - ASIGNACIONES"
|
||||||
Protected Sub DdlEmpresaAsignaciones_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlEmpresaAsignaciones.SelectedIndexChanged
|
Protected Sub DdlEmpresaAsignaciones_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlEmpresaAsignaciones.SelectedIndexChanged
|
||||||
|
|
||||||
@@ -1496,8 +1510,8 @@ Partial Class Sistemas_UsuarioDetalle
|
|||||||
DtAsignacionesMultiEmpresa.Columns.Add("CveSucursal", GetType(Integer))
|
DtAsignacionesMultiEmpresa.Columns.Add("CveSucursal", GetType(Integer))
|
||||||
DtAsignacionesMultiEmpresa.Columns.Add("CveAlmacen", GetType(Integer))
|
DtAsignacionesMultiEmpresa.Columns.Add("CveAlmacen", GetType(Integer))
|
||||||
DtAsignacionesMultiEmpresa.Columns.Add("CveTipoDocumento", GetType(String))
|
DtAsignacionesMultiEmpresa.Columns.Add("CveTipoDocumento", GetType(String))
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
#Region " PROYECTOS-SUBPROYECTOS "
|
#Region " PROYECTOS-SUBPROYECTOS "
|
||||||
Private Sub CargaProyectos()
|
Private Sub CargaProyectos()
|
||||||
DdlProyecto.Items.Clear()
|
DdlProyecto.Items.Clear()
|
||||||
@@ -1879,8 +1893,8 @@ Partial Class Sistemas_UsuarioDetalle
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
ChkAsignarAllProyectos.Checked = False
|
ChkAsignarAllProyectos.Checked = False
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
#Region "GV SUBPROYECTOS"
|
#Region "GV SUBPROYECTOS"
|
||||||
Protected Sub GvSubProyectos_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvSubProyectos.RowDataBound
|
Protected Sub GvSubProyectos_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvSubProyectos.RowDataBound
|
||||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||||
@@ -1982,14 +1996,14 @@ Partial Class Sistemas_UsuarioDetalle
|
|||||||
GvSubProyectos.EditIndex = -1
|
GvSubProyectos.EditIndex = -1
|
||||||
|
|
||||||
CargaGvSubProyectos()
|
CargaGvSubProyectos()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
#Region " ALMACENES "
|
#Region " ALMACENES "
|
||||||
|
|
||||||
Private Function GetAlmacenesSinGV() As String
|
Private Function GetAlmacenesSinGV() As String
|
||||||
Dim SB As New StringBuilder
|
Dim SB As New StringBuilder
|
||||||
Dim prefix As String = ""
|
Dim prefix As String = ""
|
||||||
@@ -2098,8 +2112,8 @@ Partial Class Sistemas_UsuarioDetalle
|
|||||||
Private Sub CargaGVAlmacen()
|
Private Sub CargaGVAlmacen()
|
||||||
GvAlmacenes.DataSource = DtAlmacenes.FiltraParametros(String.Format("CveEmpresa = {0} And (isnull(Accion,0) < 2 Or Accion = 4)", DdlEmpresaAsignaciones.SelectedValue.ToEntero))
|
GvAlmacenes.DataSource = DtAlmacenes.FiltraParametros(String.Format("CveEmpresa = {0} And (isnull(Accion,0) < 2 Or Accion = 4)", DdlEmpresaAsignaciones.SelectedValue.ToEntero))
|
||||||
GvAlmacenes.DataBind()
|
GvAlmacenes.DataBind()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
#Region "GV ALMACENES"
|
#Region "GV ALMACENES"
|
||||||
Protected Sub GvAlmacenes_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvAlmacenes.RowDataBound
|
Protected Sub GvAlmacenes_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvAlmacenes.RowDataBound
|
||||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||||
@@ -2186,11 +2200,11 @@ Partial Class Sistemas_UsuarioDetalle
|
|||||||
GvAlmacenes.EditIndex = -1
|
GvAlmacenes.EditIndex = -1
|
||||||
|
|
||||||
CargaGVAlmacen()
|
CargaGVAlmacen()
|
||||||
End Sub
|
End Sub
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
#Region " CUENTAS BANCARIAS "
|
#Region " CUENTAS BANCARIAS "
|
||||||
Private Sub CargaCuentasBancarias()
|
Private Sub CargaCuentasBancarias()
|
||||||
DdlCuentasBancarias.Items.Clear()
|
DdlCuentasBancarias.Items.Clear()
|
||||||
@@ -2253,9 +2267,9 @@ Partial Class Sistemas_UsuarioDetalle
|
|||||||
|
|
||||||
DtCuentasBancarias.AcceptChanges()
|
DtCuentasBancarias.AcceptChanges()
|
||||||
CargaGvCuentasBancarias()
|
CargaGvCuentasBancarias()
|
||||||
End Sub
|
End Sub
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
#Region " ESTATUS DE ÓRDENES DE COMPRA"
|
#Region " ESTATUS DE ÓRDENES DE COMPRA"
|
||||||
Private Sub CargaEstatusOrdenesCompra()
|
Private Sub CargaEstatusOrdenesCompra()
|
||||||
' Exit Sub
|
' Exit Sub
|
||||||
@@ -2449,9 +2463,9 @@ Partial Class Sistemas_UsuarioDetalle
|
|||||||
Else
|
Else
|
||||||
CargaGridEstatusUsuarioOC("OC")
|
CargaGridEstatusUsuarioOC("OC")
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
#Region "GRIDVIEW"
|
#Region "GRIDVIEW"
|
||||||
|
|
||||||
Protected Sub GvEstatusUsuariosREQ_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvEstatusUsuariosREQ.RowDataBound
|
Protected Sub GvEstatusUsuariosREQ_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvEstatusUsuariosREQ.RowDataBound
|
||||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||||
Dim tmpT As DataTable = DTEstatusSubProyectos.FiltraParametros(String.Format("CveSubProyecto = {0}", e.Row.DBCampo("CveSubProyecto").ToString))
|
Dim tmpT As DataTable = DTEstatusSubProyectos.FiltraParametros(String.Format("CveSubProyecto = {0}", e.Row.DBCampo("CveSubProyecto").ToString))
|
||||||
@@ -2706,13 +2720,13 @@ Partial Class Sistemas_UsuarioDetalle
|
|||||||
End If
|
End If
|
||||||
Next
|
Next
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
#Region "ESTATUS DE ORDENES DE SERVICIO"
|
#Region "ESTATUS DE ORDENES DE SERVICIO"
|
||||||
Private Sub CargaEstatusOS()
|
Private Sub CargaEstatusOS()
|
||||||
CreaGridEstatusOS()
|
CreaGridEstatusOS()
|
||||||
@@ -2865,9 +2879,9 @@ Partial Class Sistemas_UsuarioDetalle
|
|||||||
End If
|
End If
|
||||||
Next
|
Next
|
||||||
Next
|
Next
|
||||||
End Sub
|
End Sub
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
#Region " ESTATUS ORDENES DE COMPRA - CLASIFICACIONES USUARIO OC "
|
#Region " ESTATUS ORDENES DE COMPRA - CLASIFICACIONES USUARIO OC "
|
||||||
Private Sub InicializaEstasClasificacionesOC()
|
Private Sub InicializaEstasClasificacionesOC()
|
||||||
|
|
||||||
@@ -2929,15 +2943,15 @@ Partial Class Sistemas_UsuarioDetalle
|
|||||||
ObjOC.Dispose()
|
ObjOC.Dispose()
|
||||||
|
|
||||||
CargaGVOCClasificaciones()
|
CargaGVOCClasificaciones()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
|
|
||||||
#Region "TAB - ACCESO MODULOS"
|
#Region "TAB - ACCESO MODULOS"
|
||||||
Public Sub CargaModulosAcceso()
|
Public Sub CargaModulosAcceso()
|
||||||
Dim ObjPermisos As New ClsSisUsuarios
|
Dim ObjPermisos As New ClsSisUsuarios
|
||||||
@@ -3023,10 +3037,10 @@ Partial Class Sistemas_UsuarioDetalle
|
|||||||
Alert("Los Permisos se eliminaron correctamente.", TipoMensaje.MsgInformacion, "window.location.href=""/Sistemas/Usuarios.aspx""")
|
Alert("Los Permisos se eliminaron correctamente.", TipoMensaje.MsgInformacion, "window.location.href=""/Sistemas/Usuarios.aspx""")
|
||||||
End If
|
End If
|
||||||
ObjUsuario.Dispose()
|
ObjUsuario.Dispose()
|
||||||
End Sub
|
End Sub
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
|
|
||||||
#Region "TAB - PERMISO MODULOS"
|
#Region "TAB - PERMISO MODULOS"
|
||||||
Public Sub CargaModulosPermisos()
|
Public Sub CargaModulosPermisos()
|
||||||
Dim ObjProcesos As New ClsSisUsuarios
|
Dim ObjProcesos As New ClsSisUsuarios
|
||||||
@@ -3126,10 +3140,10 @@ Partial Class Sistemas_UsuarioDetalle
|
|||||||
Alert("Los Procesos se eliminaron correctamente.", TipoMensaje.MsgInformacion, "window.location.href=""/Sistemas/Usuarios.aspx""")
|
Alert("Los Procesos se eliminaron correctamente.", TipoMensaje.MsgInformacion, "window.location.href=""/Sistemas/Usuarios.aspx""")
|
||||||
End If
|
End If
|
||||||
ObjUsuario.Dispose()
|
ObjUsuario.Dispose()
|
||||||
End Sub
|
End Sub
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
|
|
||||||
#Region "TAB - ACCESO EMPRESAS"
|
#Region "TAB - ACCESO EMPRESAS"
|
||||||
Private Sub CargaEmpresas()
|
Private Sub CargaEmpresas()
|
||||||
Dim ClsUsuarios As New ClsSisUsuarios
|
Dim ClsUsuarios As New ClsSisUsuarios
|
||||||
@@ -3319,10 +3333,10 @@ Partial Class Sistemas_UsuarioDetalle
|
|||||||
Private Sub LnkRenviaCorreo_Click(sender As Object, e As EventArgs) Handles LnkRenviaCorreo.Click
|
Private Sub LnkRenviaCorreo_Click(sender As Object, e As EventArgs) Handles LnkRenviaCorreo.Click
|
||||||
EnviaCorreo()
|
EnviaCorreo()
|
||||||
Alert("Correo enviado con exito.", TipoMensaje.MsgInformacion)
|
Alert("Correo enviado con exito.", TipoMensaje.MsgInformacion)
|
||||||
End Sub
|
End Sub
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
|
|
||||||
#Region "TAB - RESTRICCIONES ACCESO "
|
#Region "TAB - RESTRICCIONES ACCESO "
|
||||||
Private Sub InicializaRestricciones()
|
Private Sub InicializaRestricciones()
|
||||||
CargaDtRestricciones()
|
CargaDtRestricciones()
|
||||||
@@ -3535,8 +3549,8 @@ Partial Class Sistemas_UsuarioDetalle
|
|||||||
CargaGvRestricciones()
|
CargaGvRestricciones()
|
||||||
|
|
||||||
RegistraScript("$('#DivAgregarRestricción').modal('hide')")
|
RegistraScript("$('#DivAgregarRestricción').modal('hide')")
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
#Region " GV "
|
#Region " GV "
|
||||||
Private Sub GvRestricciones_RowCommand(sender As Object, e As GridViewCommandEventArgs) Handles GvRestricciones.RowCommand
|
Private Sub GvRestricciones_RowCommand(sender As Object, e As GridViewCommandEventArgs) Handles GvRestricciones.RowCommand
|
||||||
|
|
||||||
@@ -3626,13 +3640,13 @@ Partial Class Sistemas_UsuarioDetalle
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
CargaGvRestricciones()
|
CargaGvRestricciones()
|
||||||
End Sub
|
End Sub
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
|
|
||||||
#Region "TAB - INDICADORES"
|
#Region "TAB - INDICADORES"
|
||||||
Public Sub CargaGridIndicadores()
|
Public Sub CargaGridIndicadores()
|
||||||
Dim Objeto As New ClsIndicadores
|
Dim Objeto As New ClsIndicadores
|
||||||
@@ -3649,11 +3663,11 @@ Partial Class Sistemas_UsuarioDetalle
|
|||||||
e.Row.FCCheckBox("chkIndicador").Checked = True
|
e.Row.FCCheckBox("chkIndicador").Checked = True
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
|
|
||||||
#Region " CLONAR USUARIO "
|
#Region " CLONAR USUARIO "
|
||||||
Private Sub InicializaClonarUsuario()
|
Private Sub InicializaClonarUsuario()
|
||||||
DdlUsuarioClonar.DataSource = GlobalDTUsuarios(-1, UsuarioActual.CveEmpresa)
|
DdlUsuarioClonar.DataSource = GlobalDTUsuarios(-1, UsuarioActual.CveEmpresa)
|
||||||
@@ -3739,12 +3753,12 @@ Partial Class Sistemas_UsuarioDetalle
|
|||||||
'CargaDatos()
|
'CargaDatos()
|
||||||
|
|
||||||
Return Retorno
|
Return Retorno
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
|
|
||||||
#Region " MANDA CORREO "
|
#Region " MANDA CORREO "
|
||||||
Private Sub MandaCorreo(Asunto As String, Para As String, Body As String)
|
Private Sub MandaCorreo(Asunto As String, Para As String, Body As String)
|
||||||
Dim a As String = String.Format("{0} -- {1} ---- -->", Asunto, Para)
|
Dim a As String = String.Format("{0} -- {1} ---- -->", Asunto, Para)
|
||||||
@@ -3752,13 +3766,13 @@ Partial Class Sistemas_UsuarioDetalle
|
|||||||
Dim Mail As New ClsSisMail()
|
Dim Mail As New ClsSisMail()
|
||||||
'Mail.MandaCorreo(ClsPaginas.EmpresaNotificaciones, Para, Asunto, "", "", Nothing, Body)
|
'Mail.MandaCorreo(ClsPaginas.EmpresaNotificaciones, Para, Asunto, "", "", Nothing, Body)
|
||||||
Mail.SendMail(ClsPaginas.EmpresaNotificaciones, Para, Asunto, Body)
|
Mail.SendMail(ClsPaginas.EmpresaNotificaciones, Para, Asunto, Body)
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
|
|
||||||
#Region " ASIGNACIONES DE PERMISOS "
|
#Region " ASIGNACIONES DE PERMISOS "
|
||||||
Protected Sub DdlEmpresaAsignarPermiso_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlEmpresaAsignarPermiso.SelectedIndexChanged
|
Protected Sub DdlEmpresaAsignarPermiso_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlEmpresaAsignarPermiso.SelectedIndexChanged
|
||||||
CargaAsignaciones()
|
CargaAsignaciones()
|
||||||
@@ -3782,8 +3796,8 @@ Partial Class Sistemas_UsuarioDetalle
|
|||||||
|
|
||||||
CargaDtEstatusOC()
|
CargaDtEstatusOC()
|
||||||
CargaGvEstatusOC()
|
CargaGvEstatusOC()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
#Region " EMPRESAS "
|
#Region " EMPRESAS "
|
||||||
Public Sub CargaDTEmpresasAsignar()
|
Public Sub CargaDTEmpresasAsignar()
|
||||||
Dim ObjPermisos As New ClsSisUsuarios
|
Dim ObjPermisos As New ClsSisUsuarios
|
||||||
@@ -3842,10 +3856,10 @@ Partial Class Sistemas_UsuarioDetalle
|
|||||||
|
|
||||||
CargaAsignaciones()
|
CargaAsignaciones()
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
#Region " ROLES "
|
#Region " ROLES "
|
||||||
Private Sub CargaDtRolesAsignar()
|
Private Sub CargaDtRolesAsignar()
|
||||||
Dim ClsUsuarios As New ClsSisUsuarios
|
Dim ClsUsuarios As New ClsSisUsuarios
|
||||||
@@ -3934,9 +3948,9 @@ Partial Class Sistemas_UsuarioDetalle
|
|||||||
DTRolesAsignar.AcceptChanges()
|
DTRolesAsignar.AcceptChanges()
|
||||||
|
|
||||||
CargaGVRolesAsignar()
|
CargaGVRolesAsignar()
|
||||||
End Sub
|
End Sub
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
#Region " ALMACENES "
|
#Region " ALMACENES "
|
||||||
Private Sub CargaDtAlmacenAsignar()
|
Private Sub CargaDtAlmacenAsignar()
|
||||||
Dim ClsUsuarios As New ClsSisUsuarios
|
Dim ClsUsuarios As New ClsSisUsuarios
|
||||||
@@ -4027,11 +4041,11 @@ Partial Class Sistemas_UsuarioDetalle
|
|||||||
DtAlmacenesAsignar.AcceptChanges()
|
DtAlmacenesAsignar.AcceptChanges()
|
||||||
|
|
||||||
CargaGVAlmacenAsignar()
|
CargaGVAlmacenAsignar()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
#Region " PROYECTOS-SUBPROYECTOS "
|
#Region " PROYECTOS-SUBPROYECTOS "
|
||||||
Private Sub CargaDtSubProyectosAsignar()
|
Private Sub CargaDtSubProyectosAsignar()
|
||||||
Dim ClsUsuarios As New ClsSisUsuarios
|
Dim ClsUsuarios As New ClsSisUsuarios
|
||||||
@@ -4142,10 +4156,10 @@ Partial Class Sistemas_UsuarioDetalle
|
|||||||
DtSubProyectosAsignar.AcceptChanges()
|
DtSubProyectosAsignar.AcceptChanges()
|
||||||
|
|
||||||
CargarGvSubProyectosAsignar()
|
CargarGvSubProyectosAsignar()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
#Region " CUENTAS BANCARIAS "
|
#Region " CUENTAS BANCARIAS "
|
||||||
Private Sub CargaCuentasBancariasAsignar()
|
Private Sub CargaCuentasBancariasAsignar()
|
||||||
DdlCuentasBancariasAsignar.Items.Clear()
|
DdlCuentasBancariasAsignar.Items.Clear()
|
||||||
@@ -4230,9 +4244,9 @@ Partial Class Sistemas_UsuarioDetalle
|
|||||||
DtCuentasBancariasAsignar.AcceptChanges()
|
DtCuentasBancariasAsignar.AcceptChanges()
|
||||||
|
|
||||||
CargaGvCuentasBancariasAsignar()
|
CargaGvCuentasBancariasAsignar()
|
||||||
End Sub
|
End Sub
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
#Region " MODULOS "
|
#Region " MODULOS "
|
||||||
Public Sub CargaDTModulosAsignar()
|
Public Sub CargaDTModulosAsignar()
|
||||||
Dim ObjPermisos As New ClsSisUsuarios
|
Dim ObjPermisos As New ClsSisUsuarios
|
||||||
@@ -4267,10 +4281,10 @@ Partial Class Sistemas_UsuarioDetalle
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
#Region " PERMISOS "
|
#Region " PERMISOS "
|
||||||
Public Sub CargaDTPermisosAsignar()
|
Public Sub CargaDTPermisosAsignar()
|
||||||
Dim ObjPermisos As New ClsSisUsuarios
|
Dim ObjPermisos As New ClsSisUsuarios
|
||||||
@@ -4305,9 +4319,9 @@ Partial Class Sistemas_UsuarioDetalle
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
#Region " INDICADORES "
|
#Region " INDICADORES "
|
||||||
Public Sub CargaDTIndicadoresAsignar()
|
Public Sub CargaDTIndicadoresAsignar()
|
||||||
Dim ObjIndicadores As New ClsSisUsuarios
|
Dim ObjIndicadores As New ClsSisUsuarios
|
||||||
@@ -4335,13 +4349,13 @@ Partial Class Sistemas_UsuarioDetalle
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
|
|
||||||
#Region " USUARIO CONTROLADO "
|
#Region " USUARIO CONTROLADO "
|
||||||
Private Sub InicializaUsuarioControlado()
|
Private Sub InicializaUsuarioControlado()
|
||||||
Dim ClsUsuarios As New ClsSisUsuarios
|
Dim ClsUsuarios As New ClsSisUsuarios
|
||||||
@@ -4391,12 +4405,12 @@ Partial Class Sistemas_UsuarioDetalle
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
ClsUsuarios.Dispose()
|
ClsUsuarios.Dispose()
|
||||||
End Sub
|
End Sub
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
|
|
||||||
#Region "C O N T O L E S DE U S U A R I O S"
|
#Region "C O N T O L E S DE U S U A R I O S"
|
||||||
|
|
||||||
#Region "ESTATUS DE ÓRDENES DE COMPRA"
|
#Region "ESTATUS DE ÓRDENES DE COMPRA"
|
||||||
Private Sub CargaDtEstatusOCPermisos()
|
Private Sub CargaDtEstatusOCPermisos()
|
||||||
Dim ClsUsuarios As New ClsSisUsuarios
|
Dim ClsUsuarios As New ClsSisUsuarios
|
||||||
@@ -4517,10 +4531,10 @@ Partial Class Sistemas_UsuarioDetalle
|
|||||||
|
|
||||||
DTEstatusOC = dt
|
DTEstatusOC = dt
|
||||||
DTEstatusOCAsignar = dt
|
DTEstatusOCAsignar = dt
|
||||||
End Sub
|
End Sub
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
|
|
||||||
#Region "GV ESTATUS DE OC"
|
#Region "GV ESTATUS DE OC"
|
||||||
Protected Sub GvEstatusOC_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvEstatusOC.RowDataBound
|
Protected Sub GvEstatusOC_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvEstatusOC.RowDataBound
|
||||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||||
@@ -4631,11 +4645,11 @@ Partial Class Sistemas_UsuarioDetalle
|
|||||||
GvEstatusUsuariosOC.Columns(i).Visible = (dtValida IsNot Nothing AndAlso dtValida.Rows.Count = 1)
|
GvEstatusUsuariosOC.Columns(i).Visible = (dtValida IsNot Nothing AndAlso dtValida.Rows.Count = 1)
|
||||||
End If
|
End If
|
||||||
Next
|
Next
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
Protected Sub LnkAgregarClasificacion_Click(sender As Object, e As EventArgs)
|
Protected Sub LnkAgregarClasificacion_Click(sender As Object, e As EventArgs)
|
||||||
If DtClasificaciones IsNot Nothing Then
|
If DtClasificaciones IsNot Nothing Then
|
||||||
Dim CveClasificacion As Integer = DdlClasificacion.SelectedValue.ToEntero
|
Dim CveClasificacion As Integer = DdlClasificacion.SelectedValue.ToEntero
|
||||||
@@ -4762,10 +4776,10 @@ Partial Class Sistemas_UsuarioDetalle
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
#Region "USUARIO RESPONSABLE"
|
#Region "USUARIO RESPONSABLE"
|
||||||
|
|
||||||
Protected Sub BtnUpdateUsuarioResponsable_Click(sender As Object, e As EventArgs)
|
Protected Sub BtnUpdateUsuarioResponsable_Click(sender As Object, e As EventArgs)
|
||||||
Dim ObjUsuarios As New ClsSisUsuarios
|
Dim ObjUsuarios As New ClsSisUsuarios
|
||||||
If ObjUsuarios.UpdateUsuarioResponsableMasivo(CveUsuario, DdlUsuarioResponsable.SelectedValue.ToEntero) Then
|
If ObjUsuarios.UpdateUsuarioResponsableMasivo(CveUsuario, DdlUsuarioResponsable.SelectedValue.ToEntero) Then
|
||||||
@@ -4773,10 +4787,10 @@ Partial Class Sistemas_UsuarioDetalle
|
|||||||
RegistraScript("$('#DivUpdateUsuarioResponsable').modal('hide')")
|
RegistraScript("$('#DivUpdateUsuarioResponsable').modal('hide')")
|
||||||
End If
|
End If
|
||||||
ObjUsuarios.Dispose()
|
ObjUsuarios.Dispose()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
Protected Sub LnkAutorizarEquipo_Click(sender As Object, e As EventArgs)
|
Protected Sub LnkAutorizarEquipo_Click(sender As Object, e As EventArgs)
|
||||||
'CveUsuario
|
'CveUsuario
|
||||||
Dim AdsCodex As String = Encripta(String.Format("{0}_{1}_{2}", CveUsuario, DateTime.Now.Ticks, UsuarioActual.CveUsuario))
|
Dim AdsCodex As String = Encripta(String.Format("{0}_{1}_{2}", CveUsuario, DateTime.Now.Ticks, UsuarioActual.CveUsuario))
|
||||||
|
|||||||
@@ -585,6 +585,14 @@
|
|||||||
</div>
|
</div>
|
||||||
</ContentTemplate>
|
</ContentTemplate>
|
||||||
</asp:UpdatePanel>
|
</asp:UpdatePanel>
|
||||||
|
|
||||||
|
<asp:UpdatePanel ID="UpTurno" runat="server" UpdateMode="Conditional" class=" xspadding .nolineheight bordered whitoutcol" style="color: white;">
|
||||||
|
<ContentTemplate>
|
||||||
|
<div id="DivBloqueo" runat="server" style="width: 100%; text-align: center;" visible="false">
|
||||||
|
<asp:Button ID="BtnBloquearAcceso" CssClass="btn red-haze btn-outline btn-circle btn-sm" runat="server" Text="Bloquear Turno" OnClick="BtnBloquearAcceso_Click" />
|
||||||
|
</div>
|
||||||
|
</ContentTemplate>
|
||||||
|
</asp:UpdatePanel>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
@@ -833,7 +841,7 @@
|
|||||||
<td>
|
<td>
|
||||||
<asp:UpdatePanel runat="server">
|
<asp:UpdatePanel runat="server">
|
||||||
<ContentTemplate>
|
<ContentTemplate>
|
||||||
<asp:TextBox ID="TxtTotal" runat="server" ClientIDMode="Static" BorderStyle="None" Style="text-align: right; font-weight:bold" Text="0.00" Width="78px" ReadOnly="true"></asp:TextBox>
|
<asp:TextBox ID="TxtTotal" runat="server" ClientIDMode="Static" BorderStyle="None" Style="text-align: right; font-weight: bold" Text="0.00" Width="78px" ReadOnly="true"></asp:TextBox>
|
||||||
<asp:HiddenField ID="HdnVentaSaldo" runat="server" ClientIDMode="Static" Value="0" />
|
<asp:HiddenField ID="HdnVentaSaldo" runat="server" ClientIDMode="Static" Value="0" />
|
||||||
<asp:HiddenField ID="HdnTotalVenta" runat="server" ClientIDMode="Static" Value="0" />
|
<asp:HiddenField ID="HdnTotalVenta" runat="server" ClientIDMode="Static" Value="0" />
|
||||||
</ContentTemplate>
|
</ContentTemplate>
|
||||||
@@ -1917,6 +1925,45 @@
|
|||||||
</asp:Panel>
|
</asp:Panel>
|
||||||
<!-- ModalPopupExtender -->
|
<!-- ModalPopupExtender -->
|
||||||
|
|
||||||
|
|
||||||
|
<%-- ******************************************** Bloqueo de Caja *************************************************************************************************************************************** --%>
|
||||||
|
|
||||||
|
<asp:Button ID="BtnShowBloqueo" runat="server" Text="Show Modal Popup" Style="visibility: hidden; display: none;" />
|
||||||
|
<asp:Button ID="BtnCloseBloqueo" runat="server" CssClass="btn btn-danger" Style="visibility: hidden; display: none;" Text="Cancelar" />
|
||||||
|
|
||||||
|
<!-- ModalPopupExtender -->
|
||||||
|
<cc1:ModalPopupExtender ID="mpeBloque" runat="server" PopupControlID="PanelBloqueo" TargetControlID="BtnShowBloqueo"
|
||||||
|
BackgroundCssClass="modalBackground">
|
||||||
|
</cc1:ModalPopupExtender>
|
||||||
|
|
||||||
|
<asp:Panel ID="PanelBloqueo" runat="server" CssClass="modalPopup" align="center" Style="display: none">
|
||||||
|
<table border="0" width="250px" cellspacing="1" style="background-color: White; padding-left: 10px;">
|
||||||
|
<tr style="background-color: #3598dc; color: #FFFFFF; font-size: 14px; text-align:center">
|
||||||
|
<td colspan="2"><asp:Label runat="server" Text="<i class='fa fa-lock fa-2 icontxt'></i> Acceso Restringido"/></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td colspan="1"> </td>
|
||||||
|
<td colspan="1"> </td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td colspan="1">
|
||||||
|
<asp:Label runat="server" Text="Código de Acceso:" Font-Bold="true" Width="120px" />
|
||||||
|
</td>
|
||||||
|
<td colspan="1">
|
||||||
|
<asp:TextBox ID="TxtCodigoAcceso" runat="server" type="password" ></asp:TextBox>
|
||||||
|
<asp:RequiredFieldValidator ID="RFVCodigoAcceso" runat="server" ControlToValidate="TxtCodigoAcceso" Display="None" ErrorMessage="<span class='has-error'><span id='username-error' class='help-block'>El campo <b>''Código de Acceso''</b> es necesario.</span></span>" ValidationGroup="GrpValidarCodigo"></asp:RequiredFieldValidator>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td colspan="1"> </td>
|
||||||
|
<td colspan="1"> </td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<asp:Button ID="BtnCambiar" runat="server" CssClass="btn btn-success btn-sm" Text="Desbloquear" ValidationGroup="GrpValidarCodigo" OnClick="BtnCambiar_Click" />
|
||||||
|
|
||||||
|
</asp:Panel>
|
||||||
|
<!-- ModalPopupExtender -->
|
||||||
|
|
||||||
<div id="DivEstadoCaja" class="modal ADS fade" role="dialog">
|
<div id="DivEstadoCaja" class="modal ADS fade" role="dialog">
|
||||||
<div class="modal-dialog" style="width: 470px; min-width: 470px;">
|
<div class="modal-dialog" style="width: 470px; min-width: 470px;">
|
||||||
<div class="modal-content">
|
<div class="modal-content">
|
||||||
@@ -2656,6 +2703,16 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-12">
|
||||||
|
<div class="form-group form-md-line-input input-iconright">
|
||||||
|
<asp:DropDownList ID="DdlMarcaPS" CssClass="form-control input-sm select2me" runat="server" DataTextField="Marca" DataValueField="CveMarca" Width="100%" OnSelectedIndexChanged="DdlMarcaPS_SelectedIndexChanged" AutoPostBack="true">
|
||||||
|
<asp:ListItem Selected="True" Text="Seleccione la Marca (Todas)" Value="-1"></asp:ListItem>
|
||||||
|
</asp:DropDownList>
|
||||||
|
<label for="<%= DdlMarcaPS.ClientID.ToString()%>">Marca:</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
<div class="form-group form-md-line-input input-iconright">
|
<div class="form-group form-md-line-input input-iconright">
|
||||||
@@ -2840,6 +2897,16 @@
|
|||||||
<br />
|
<br />
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-9">
|
<div class="col-md-9">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-12">
|
||||||
|
<div class="form-group form-md-line-input input-iconright">
|
||||||
|
<asp:DropDownList ID="DdlMarcaPSAjuste" CssClass="form-control input-sm select2me" runat="server" DataTextField="Marca" DataValueField="CveMarca" Width="100%" OnSelectedIndexChanged="DdlMarcaPS_SelectedIndexChanged" AutoPostBack="true">
|
||||||
|
<asp:ListItem Selected="True" Text="Seleccione la Marca (Todas)" Value="-1"></asp:ListItem>
|
||||||
|
</asp:DropDownList>
|
||||||
|
<label for="<%= DdlMarcaPSAjuste.ClientID.ToString()%>">Marca:</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<div class="form-group form-md-line-input input-iconright">
|
<div class="form-group form-md-line-input input-iconright">
|
||||||
<ADS:Dropdownlost ID="DdlPSAjuste" CssStyle="width: 100%;" CssClass=" form-control input-sm DdlPS" IncluyeTodos="false" CssClassDdl="select2me form-control" runat="server" CausesValidation="true" DataTextField="PSCodigo" DataValueField="CvePS" Onselectedindexchange="DdlPSAjuste_selectedindexchange"></ADS:Dropdownlost>
|
<ADS:Dropdownlost ID="DdlPSAjuste" CssStyle="width: 100%;" CssClass=" form-control input-sm DdlPS" IncluyeTodos="false" CssClassDdl="select2me form-control" runat="server" CausesValidation="true" DataTextField="PSCodigo" DataValueField="CvePS" Onselectedindexchange="DdlPSAjuste_selectedindexchange"></ADS:Dropdownlost>
|
||||||
<asp:HiddenField ID="HdnPSAjusteMarca" ClientIDMode="Static" runat="server" Value="-1" />
|
<asp:HiddenField ID="HdnPSAjusteMarca" ClientIDMode="Static" runat="server" Value="-1" />
|
||||||
@@ -2868,7 +2935,7 @@
|
|||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
<div class="form-group form-md-line-input input-iconright">
|
<div class="form-group form-md-line-input input-iconright">
|
||||||
<asp:TextBox ID="TxtEtiqueta" CssClass="form-control" runat="server" MaxLength="50"></asp:TextBox>
|
<asp:TextBox ID="TxtEtiqueta" CssClass="form-control" runat="server" MaxLength="50"></asp:TextBox>
|
||||||
<label for="<%= TxtEtiqueta.ClientID.ToString()%>">Etiqueta:</label>
|
<label for="<%= TxtEtiqueta.ClientID.ToString()%>">Etiqueta:</label>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -2945,11 +3012,11 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="col-md-4">
|
<div class="col-md-4">
|
||||||
<div class="form-group form-md-line-input input-iconright">
|
<div class="form-group form-md-line-input input-iconright">
|
||||||
<asp:TextBox ID="TxtMesesUso" CssClass="form-control" runat="server" MaxLength="50" Enabled="false" style="font-weight:bold; font-size:20pt;"></asp:TextBox>
|
<asp:TextBox ID="TxtMesesUso" CssClass="form-control" runat="server" MaxLength="50" Enabled="false" Style="font-weight: bold; font-size: 20pt;"></asp:TextBox>
|
||||||
<asp:RequiredFieldValidator ID="RFVMesesUso" runat="server" ControlToValidate="TxtMesesUso" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Meses de Uso''</b> es necesario, por favor ingréselo." ValidationGroup="GrpAddVenta"></asp:RequiredFieldValidator>
|
<asp:RequiredFieldValidator ID="RFVMesesUso" runat="server" ControlToValidate="TxtMesesUso" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Meses de Uso''</b> es necesario, por favor ingréselo." ValidationGroup="GrpAddVenta"></asp:RequiredFieldValidator>
|
||||||
<ajax:ValidatorCalloutExtender ID="VCEMesesUso" runat="server" HighlightCssClass="vco" TargetControlID="RFVMesesUso"></ajax:ValidatorCalloutExtender>
|
<ajax:ValidatorCalloutExtender ID="VCEMesesUso" runat="server" HighlightCssClass="vco" TargetControlID="RFVMesesUso"></ajax:ValidatorCalloutExtender>
|
||||||
<ajax:FilteredTextBoxExtender ID="FTBEMesesUso" runat="server" TargetControlID="TxtMesesUso" FilterType="Custom, Numbers" ValidChars="." />
|
<ajax:FilteredTextBoxExtender ID="FTBEMesesUso" runat="server" TargetControlID="TxtMesesUso" FilterType="Custom, Numbers" ValidChars="." />
|
||||||
<label for="<%= TxtMesesUso.ClientID.ToString()%>" style="font-weight:bold">Meses de Uso:</label>
|
<label for="<%= TxtMesesUso.ClientID.ToString()%>" style="font-weight: bold">Meses de Uso:</label>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -2974,11 +3041,11 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="col-md-4">
|
<div class="col-md-4">
|
||||||
<div class="form-group form-md-line-input input-iconright">
|
<div class="form-group form-md-line-input input-iconright">
|
||||||
<asp:TextBox ID="TxtPorcentajeAjuste" CssClass="form-control" Enabled="false" runat="server" MaxLength="50" style="font-weight:bold; font-size:20pt;"></asp:TextBox>
|
<asp:TextBox ID="TxtPorcentajeAjuste" CssClass="form-control" Enabled="false" runat="server" MaxLength="50" Style="font-weight: bold; font-size: 20pt;"></asp:TextBox>
|
||||||
<asp:RequiredFieldValidator ID="RFVPorcentajeAjuste" runat="server" ControlToValidate="TxtPorcentajeAjuste" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''% Ajuste''</b> es necesario, por favor ingréselo." ValidationGroup="GrpAddVenta"></asp:RequiredFieldValidator>
|
<asp:RequiredFieldValidator ID="RFVPorcentajeAjuste" runat="server" ControlToValidate="TxtPorcentajeAjuste" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''% Ajuste''</b> es necesario, por favor ingréselo." ValidationGroup="GrpAddVenta"></asp:RequiredFieldValidator>
|
||||||
<ajax:ValidatorCalloutExtender ID="VCEPorcentajeAjuste" runat="server" HighlightCssClass="vco" TargetControlID="RFVPorcentajeAjuste"></ajax:ValidatorCalloutExtender>
|
<ajax:ValidatorCalloutExtender ID="VCEPorcentajeAjuste" runat="server" HighlightCssClass="vco" TargetControlID="RFVPorcentajeAjuste"></ajax:ValidatorCalloutExtender>
|
||||||
<ajax:FilteredTextBoxExtender ID="FTBEPorcentajeAjuste" runat="server" TargetControlID="TxtPorcentajeAjuste" FilterType="Custom, Numbers" ValidChars="." />
|
<ajax:FilteredTextBoxExtender ID="FTBEPorcentajeAjuste" runat="server" TargetControlID="TxtPorcentajeAjuste" FilterType="Custom, Numbers" ValidChars="." />
|
||||||
<label for="<%= TxtPorcentajeAjuste.ClientID.ToString()%>" style="font-weight:bold">% Ajuste:</label>
|
<label for="<%= TxtPorcentajeAjuste.ClientID.ToString()%>" style="font-weight: bold">% Ajuste:</label>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -3008,11 +3075,11 @@
|
|||||||
<div class="row" style="margin-top: 17px;">
|
<div class="row" style="margin-top: 17px;">
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
<div class="form-group form-md-line-input input-iconright">
|
<div class="form-group form-md-line-input input-iconright">
|
||||||
<asp:TextBox ID="TxtImporteAjuste" CssClass="form-control" runat="server" Enabled="false" MaxLength="50" ></asp:TextBox>
|
<asp:TextBox ID="TxtImporteAjuste" CssClass="form-control" runat="server" Enabled="false" MaxLength="50"></asp:TextBox>
|
||||||
<asp:RequiredFieldValidator ID="RFVImporteAjuste" runat="server" ControlToValidate="TxtImporteAjuste" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Importe''</b> es necesario, por favor ingréselo." ValidationGroup="GrpAddVenta"></asp:RequiredFieldValidator>
|
<asp:RequiredFieldValidator ID="RFVImporteAjuste" runat="server" ControlToValidate="TxtImporteAjuste" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Importe''</b> es necesario, por favor ingréselo." ValidationGroup="GrpAddVenta"></asp:RequiredFieldValidator>
|
||||||
<ajax:ValidatorCalloutExtender ID="VCEImporteAjuste" runat="server" HighlightCssClass="vco" TargetControlID="RFVImporteAjuste"></ajax:ValidatorCalloutExtender>
|
<ajax:ValidatorCalloutExtender ID="VCEImporteAjuste" runat="server" HighlightCssClass="vco" TargetControlID="RFVImporteAjuste"></ajax:ValidatorCalloutExtender>
|
||||||
<ajax:FilteredTextBoxExtender ID="FTBEImporteAjuste" runat="server" TargetControlID="TxtImporteAjuste" FilterType="Custom, Numbers" ValidChars="." />
|
<ajax:FilteredTextBoxExtender ID="FTBEImporteAjuste" runat="server" TargetControlID="TxtImporteAjuste" FilterType="Custom, Numbers" ValidChars="." />
|
||||||
<label for="<%= TxtImporteAjuste.ClientID.ToString()%>" style="font-weight:bold">Importe:</label>
|
<label for="<%= TxtImporteAjuste.ClientID.ToString()%>" style="font-weight: bold">Importe:</label>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
@@ -3046,6 +3113,20 @@
|
|||||||
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
|
|
||||||
|
// Get the input field
|
||||||
|
var txtCodigoAcceso = document.getElementById("C_TxtCodigoAcceso");
|
||||||
|
|
||||||
|
// Execute a function when the user releases a key on the keyboard
|
||||||
|
txtCodigoAcceso.addEventListener("keyup", function (event) {
|
||||||
|
// Number 13 is the "Enter" key on the keyboard
|
||||||
|
if (event.keyCode === 13) {
|
||||||
|
// Cancel the default action, if needed
|
||||||
|
event.preventDefault();
|
||||||
|
// Trigger the button element with a click
|
||||||
|
document.getElementById("C_BtnCambiar").click();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
function ValidarCodigoEnsamble(source, arguments) {
|
function ValidarCodigoEnsamble(source, arguments) {
|
||||||
let CveMarca = HdnPSAjusteMarca.value;
|
let CveMarca = HdnPSAjusteMarca.value;
|
||||||
let CveClasificacion = HdnPSAjusteClasificacion.value;
|
let CveClasificacion = HdnPSAjusteClasificacion.value;
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ Imports System.Security.Cryptography.X509Certificates
|
|||||||
Imports System.Globalization
|
Imports System.Globalization
|
||||||
Imports System.Net.Http
|
Imports System.Net.Http
|
||||||
Imports Microsoft.Reporting.WebForms
|
Imports Microsoft.Reporting.WebForms
|
||||||
|
Imports ADSSession
|
||||||
|
|
||||||
Partial Class PV
|
Partial Class PV
|
||||||
Inherits ClsPaginas
|
Inherits ClsPaginas
|
||||||
@@ -1007,6 +1008,25 @@ Partial Class PV
|
|||||||
|
|
||||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||||
If Not IsPostBack Then
|
If Not IsPostBack Then
|
||||||
|
If UsuarioActual.Empresa.Funcionalidad(599) = "1" Then
|
||||||
|
Dim DrUsuario As DataRow = GlobalDTUsuarios(CveUsuario:=UsuarioActual.CveUsuario, CveEmpresa:=UsuarioActual.CveEmpresa).Rows(0)
|
||||||
|
|
||||||
|
If DrUsuario("CodigoAcceso").ToString() <> "" Then
|
||||||
|
If UsuarioActual.SesionBloqueada Then
|
||||||
|
DivBloqueo.Visible = False
|
||||||
|
TxtCodigoAcceso.Focus()
|
||||||
|
RegistraScript("window.onload = function MuestraBloqueo() { document.getElementById(""C_BtnShowBloqueo"").click(); setTimeout(function(){ $('#C_TxtCodigoAcceso').focus(); }, 1000); }")
|
||||||
|
Else
|
||||||
|
DivBloqueo.Visible = True
|
||||||
|
End If
|
||||||
|
Else
|
||||||
|
DivBloqueo.Visible = False
|
||||||
|
End If
|
||||||
|
|
||||||
|
Else
|
||||||
|
DivBloqueo.Visible = False
|
||||||
|
End If
|
||||||
|
|
||||||
DdlBPPS.setEsWebService(True)
|
DdlBPPS.setEsWebService(True)
|
||||||
DdlBPPS.ddlWS.Attributes.Add("data-clear", "1")
|
DdlBPPS.ddlWS.Attributes.Add("data-clear", "1")
|
||||||
ViewState("ProcesoCorrecto") = True
|
ViewState("ProcesoCorrecto") = True
|
||||||
@@ -1116,6 +1136,8 @@ Partial Class PV
|
|||||||
CargarAlmacenes()
|
CargarAlmacenes()
|
||||||
CargaFormaEntrega()
|
CargaFormaEntrega()
|
||||||
CargaCuentasTerminal()
|
CargaCuentasTerminal()
|
||||||
|
CargaMarcasFiltro()
|
||||||
|
|
||||||
If UsuarioActual.Empresa.Funcionalidad(531).ToString = "1" Then
|
If UsuarioActual.Empresa.Funcionalidad(531).ToString = "1" Then
|
||||||
CargaAjuste()
|
CargaAjuste()
|
||||||
RVPorDesc.MaximumValue = UsuarioActual.DescuentoAutorizado.ToString
|
RVPorDesc.MaximumValue = UsuarioActual.DescuentoAutorizado.ToString
|
||||||
@@ -1231,6 +1253,21 @@ Partial Class PV
|
|||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Private Sub CargaMarcasFiltro()
|
||||||
|
|
||||||
|
Using ObjMarcas As New ClsProductosServicios
|
||||||
|
If ObjMarcas.GetMarcas(UsuarioActual.CveEmpresa) Then
|
||||||
|
DdlMarcaPS.DataSource = ObjMarcas.DtResultados
|
||||||
|
DdlMarcaPSAjuste.DataSource = ObjMarcas.DtResultados
|
||||||
|
End If
|
||||||
|
End Using
|
||||||
|
DdlMarcaPS.DataBind()
|
||||||
|
DdlMarcaPSAjuste.DataBind()
|
||||||
|
|
||||||
|
UpModalVenta.Update()
|
||||||
|
UpAjuste.Update()
|
||||||
|
End Sub
|
||||||
|
|
||||||
Private Function CargaVenta() As Boolean
|
Private Function CargaVenta() As Boolean
|
||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Boolean = False
|
||||||
'CARGA PARA FACTURACION
|
'CARGA PARA FACTURACION
|
||||||
@@ -2722,7 +2759,7 @@ Partial Class PV
|
|||||||
End If
|
End If
|
||||||
DdlClasificacion.DataBind()
|
DdlClasificacion.DataBind()
|
||||||
End Sub
|
End Sub
|
||||||
Private Sub CargaPS(CveClasificacion As Integer, Objeto As ADServerControl.Dropdownlost, Optional AplicaAlmacen As Boolean = True)
|
Private Sub CargaPS(CveClasificacion As Integer, Objeto As ADServerControl.Dropdownlost, Optional AplicaAlmacen As Boolean = True, Optional CveMarca As Integer = -1)
|
||||||
Objeto.setEsWebService(UsuarioActual.Empresa.Funcionalidad(141).ToString = "1")
|
Objeto.setEsWebService(UsuarioActual.Empresa.Funcionalidad(141).ToString = "1")
|
||||||
If Not UsuarioActual.Empresa.Funcionalidad(141).ToString = "1" Then
|
If Not UsuarioActual.Empresa.Funcionalidad(141).ToString = "1" Then
|
||||||
Objeto.ddl.Items.Clear()
|
Objeto.ddl.Items.Clear()
|
||||||
@@ -2742,6 +2779,7 @@ Partial Class PV
|
|||||||
Objeto.ddlWS.Attributes.Add("data-pagina", "-1")
|
Objeto.ddlWS.Attributes.Add("data-pagina", "-1")
|
||||||
End If
|
End If
|
||||||
Objeto.ddlWS.Attributes.Add("data-aplicaparaventa", "1")
|
Objeto.ddlWS.Attributes.Add("data-aplicaparaventa", "1")
|
||||||
|
Objeto.ddlWS.Attributes.Add("data-cvemarca", CveMarca.ToString)
|
||||||
Objeto.ddlWS.Attributes.Add("data-Estatus", "1")
|
Objeto.ddlWS.Attributes.Add("data-Estatus", "1")
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
@@ -3038,6 +3076,18 @@ Partial Class PV
|
|||||||
|
|
||||||
Protected Sub BtnEmitirImprimir_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles BtnEmitirImprimir.Click
|
Protected Sub BtnEmitirImprimir_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles BtnEmitirImprimir.Click
|
||||||
|
|
||||||
|
If UsuarioActual.Empresa.Funcionalidad(599) = "1" Then
|
||||||
|
Dim DrUsuario As DataRow = GlobalDTUsuarios(CveUsuario:=UsuarioActual.CveUsuario, CveEmpresa:=UsuarioActual.CveEmpresa).Rows(0)
|
||||||
|
|
||||||
|
If DrUsuario("CodigoAcceso").ToString() <> "" Then
|
||||||
|
If UsuarioActual.SesionBloqueada Then
|
||||||
|
Alert("Acceso denegado. La sesión se encuentra bloqueada", TipoMensaje.MsgAdvertencia)
|
||||||
|
Exit Sub
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
End If
|
||||||
|
|
||||||
If Not CveCliente > 0 Then
|
If Not CveCliente > 0 Then
|
||||||
Alert("Es necesario seleccionar el cliente al cual se le va a facturar.", TipoMensaje.MsgAdvertencia)
|
Alert("Es necesario seleccionar el cliente al cual se le va a facturar.", TipoMensaje.MsgAdvertencia)
|
||||||
Exit Sub
|
Exit Sub
|
||||||
@@ -7350,4 +7400,93 @@ Partial Class PV
|
|||||||
|
|
||||||
Public Property Valido As Boolean
|
Public Property Valido As Boolean
|
||||||
End Class
|
End Class
|
||||||
|
Protected Sub DdlMarcaPS_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||||
|
CargaPS(DdlClasificacion.SelectedValue.ToEntero(), DdlPS, CveMarca:=DdlMarcaPS.SelectedValue.ToEntero())
|
||||||
|
UpModalVenta.Update()
|
||||||
|
End Sub
|
||||||
|
Protected Sub DdlMarcaPSAjuste_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||||
|
CargaPS(DdlClasificacion.SelectedValue.ToEntero(), DdlPSAjuste, CveMarca:=DdlMarcaPSAjuste.SelectedValue.ToEntero())
|
||||||
|
UpAjuste.Update()
|
||||||
|
End Sub
|
||||||
|
Protected Sub BtnCambiar_Click(sender As Object, e As EventArgs)
|
||||||
|
If String.IsNullOrEmpty(TxtCodigoAcceso.Text.Trim) Then
|
||||||
|
Alert("Es necesario un código de acceso", TipoMensaje.MsgAdvertencia)
|
||||||
|
Exit Sub
|
||||||
|
End If
|
||||||
|
|
||||||
|
Dim CveUsuarioNuevo As Integer = -1
|
||||||
|
|
||||||
|
Using ObjUsuarios As New ClsSisUsuarios
|
||||||
|
CveUsuarioNuevo = ObjUsuarios.ValidaUsuarioCodigoAcceso(TxtCodigoAcceso.Text.Trim, UsuarioActual.CveEmpresa)
|
||||||
|
End Using
|
||||||
|
|
||||||
|
Dim DrUsuario As DataRow = Nothing
|
||||||
|
|
||||||
|
If CveUsuarioNuevo > 0 Then
|
||||||
|
DrUsuario = GlobalDTUsuarios(CveUsuarioNuevo, UsuarioActual.CveEmpresa).FiltraParametros("Estatus = 1", "", {"CveUsuario", "Usuario", "Nombre", "Contraseña", "CveEmpresa", "Rol"}).Rows(0)
|
||||||
|
End If
|
||||||
|
|
||||||
|
If DrUsuario IsNot Nothing Then
|
||||||
|
|
||||||
|
Dim tUsuario, tContraseña As String
|
||||||
|
Dim tCveEmpresa As Integer
|
||||||
|
tUsuario = DrUsuario("Usuario").ToString
|
||||||
|
tContraseña = DrUsuario("Contraseña").ToString
|
||||||
|
tCveEmpresa = DrUsuario("CveEmpresa").ToString.ToEntero
|
||||||
|
|
||||||
|
Dim ObjUsuario As New ClsSisUsuarios
|
||||||
|
Dim Usuario As Usuario
|
||||||
|
|
||||||
|
Usuario = ObjUsuario.ValidaUsuario(tUsuario, tContraseña, IMEI, tCveEmpresa)
|
||||||
|
|
||||||
|
ObjUsuario.Dispose()
|
||||||
|
|
||||||
|
If Usuario IsNot Nothing Then
|
||||||
|
Dim dt As Data.DataTable = GlobalDTUsuarios(Usuario.CveUsuario)
|
||||||
|
ADSSessionConfig.sessionUser = Usuario
|
||||||
|
ADSSessionConfig.sessionUser.CvePlataforma = 1
|
||||||
|
ADSSessionConfig.sessionDpage = False
|
||||||
|
ADSSessionConfig.sessionUser.ModoSimulacion = False
|
||||||
|
|
||||||
|
If dt IsNot Nothing Then
|
||||||
|
If dt.Rows.Count >= 1 Then
|
||||||
|
If dt.Rows.Count > 1 Then ADSSessionConfig.sessionUser.MultipleEmpresa = True
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
dt.Dispose()
|
||||||
|
|
||||||
|
Dim ObjEmpresa As New ClsSisEmpresas()
|
||||||
|
If ObjEmpresa.GetEmpresas(tCveEmpresa, "-1", "-1", "-1", "-1") Then
|
||||||
|
If ObjEmpresa.GetEmpresasFuncionalidades(tCveEmpresa) Then
|
||||||
|
Dim dttmp As Data.DataTable = ObjEmpresa.DtResultados
|
||||||
|
|
||||||
|
Dim EmpresasFuncionalidades As New HybridDictionary
|
||||||
|
For Each Row As Data.DataRow In dttmp.Rows
|
||||||
|
EmpresasFuncionalidades.Add(Convert.ToInt32(Row("CveFuncionalidad")), Row("Valor").ToString)
|
||||||
|
Next
|
||||||
|
ObjEmpresa.Empresa.SetFuncionalidades(EmpresasFuncionalidades)
|
||||||
|
|
||||||
|
End If
|
||||||
|
|
||||||
|
UsuarioActual.Empresa = ObjEmpresa.Empresa
|
||||||
|
ADSSessionConfig.sessionUser.CveEmpresa = ObjEmpresa.Empresa.CveEmpresa
|
||||||
|
|
||||||
|
ADSSession.ADSSessionConfig.SessionManager(ADSSession.OpcionSession.CambiarEmpresa, Nothing, ObjEmpresa.Empresa.CveEmpresa)
|
||||||
|
End If
|
||||||
|
ObjEmpresa.Dispose()
|
||||||
|
|
||||||
|
End If
|
||||||
|
|
||||||
|
Response.Redirect($"~/Ventas/PV.aspx")
|
||||||
|
Else
|
||||||
|
Alert("No existe el código de acceso", TipoMensaje.MsgAdvertencia)
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
Protected Sub BtnBloquearAcceso_Click(sender As Object, e As EventArgs)
|
||||||
|
UsuarioActual.SesionBloqueada = True
|
||||||
|
|
||||||
|
Response.Redirect($"~/Ventas/PV.aspx")
|
||||||
|
End Sub
|
||||||
End Class
|
End Class
|
||||||
|
|||||||
@@ -15,7 +15,14 @@ Partial Class ProductosyServicios
|
|||||||
Return ViewState("CvePS").ToString.ToEntero
|
Return ViewState("CvePS").ToString.ToEntero
|
||||||
End Get
|
End Get
|
||||||
End Property
|
End Property
|
||||||
|
Public Property PSAdicionalAnterior As String
|
||||||
|
Get
|
||||||
|
Return ViewState("PSAdicionalAnterior").ToString
|
||||||
|
End Get
|
||||||
|
Set(value As String)
|
||||||
|
ViewState("PSAdicionalAnterior") = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
Private Property CveSATPS As Integer
|
Private Property CveSATPS As Integer
|
||||||
Get
|
Get
|
||||||
Return ViewState("CveSATPS").ToString.ToEntero
|
Return ViewState("CveSATPS").ToString.ToEntero
|
||||||
@@ -1654,13 +1661,14 @@ Partial Class ProductosyServicios
|
|||||||
Private Sub GvPSAdicionales_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvPSAdicionales.RowDataBound
|
Private Sub GvPSAdicionales_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvPSAdicionales.RowDataBound
|
||||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||||
|
|
||||||
If e.Row.RowState = DataControlRowState.Edit OrElse e.Row.RowState = 5 Then
|
|
||||||
e.Row.FCDropDownList("DdlPSAdicional").DataSource = GlobalDTPS(UsuarioActual.CveEmpresa) '.FiltraParametros("CvePS = " + CvePS.ToString)
|
|
||||||
e.Row.FCDropDownList("DdlPSAdicional").DataBind()
|
|
||||||
e.Row.FCDropDownList("DdlPSAdicional").SelectedValue = e.Row.DBCampo("CvePSAdicional")
|
|
||||||
End If
|
|
||||||
|
|
||||||
End If
|
If e.Row.RowState = DataControlRowState.Edit OrElse e.Row.RowState = 5 Then
|
||||||
|
e.Row.FCDropDownList("DdlPSAdicional").DataSource = GlobalDTPS(UsuarioActual.CveEmpresa) '.FiltraParametros("CvePS = " + CvePS.ToString)
|
||||||
|
e.Row.FCDropDownList("DdlPSAdicional").DataBind()
|
||||||
|
e.Row.FCDropDownList("DdlPSAdicional").SelectedValue = e.Row.DBCampo("CvePSAdicional")
|
||||||
|
End If
|
||||||
|
|
||||||
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
Protected Sub GvPSAdicionales_RowCancelingEdit(sender As Object, e As GridViewCancelEditEventArgs) Handles GvPSAdicionales.RowCancelingEdit
|
Protected Sub GvPSAdicionales_RowCancelingEdit(sender As Object, e As GridViewCancelEditEventArgs) Handles GvPSAdicionales.RowCancelingEdit
|
||||||
GvPSAdicionales.EditIndex = -1
|
GvPSAdicionales.EditIndex = -1
|
||||||
@@ -1670,10 +1678,13 @@ Partial Class ProductosyServicios
|
|||||||
Dim TieneError = False
|
Dim TieneError = False
|
||||||
|
|
||||||
Dim CvePSAdicional = GvPSAdicionales.Rows(e.RowIndex).DataKey("CvePSAdicional").ToEntero
|
Dim CvePSAdicional = GvPSAdicionales.Rows(e.RowIndex).DataKey("CvePSAdicional").ToEntero
|
||||||
|
Dim PSAdicional = GvPSAdicionales.Rows(e.RowIndex).DataKey("PS").ToString
|
||||||
|
|
||||||
Dim ObjProductosServicios As New ClsProductosServicios()
|
Dim ObjProductosServicios As New ClsProductosServicios()
|
||||||
If Not ObjProductosServicios.RemovePSAdicionales(CvePS, CvePSAdicional) Then
|
If Not ObjProductosServicios.RemovePSAdicionales(CvePS, CvePSAdicional) Then
|
||||||
TieneError = True
|
TieneError = True
|
||||||
|
Else
|
||||||
|
TieneError = EliminarProductosEquivalenteEnFranquicia(ObjProductosServicios, PSAdicional)
|
||||||
End If
|
End If
|
||||||
ObjProductosServicios.Dispose()
|
ObjProductosServicios.Dispose()
|
||||||
|
|
||||||
@@ -1720,7 +1731,7 @@ Partial Class ProductosyServicios
|
|||||||
If Not ObjProductosServicios.UpdatePSAdicionales(CvePS, DdlPSAdicional.SelectedValue.ToEntero, CvePSAdicional, If(TxtCantidadPSAdicional.Visible, TxtCantidadPSAdicional.Text.ToDecimal, 0)) Then
|
If Not ObjProductosServicios.UpdatePSAdicionales(CvePS, DdlPSAdicional.SelectedValue.ToEntero, CvePSAdicional, If(TxtCantidadPSAdicional.Visible, TxtCantidadPSAdicional.Text.ToDecimal, 0)) Then
|
||||||
TieneError = True
|
TieneError = True
|
||||||
Else
|
Else
|
||||||
TieneError = GuardarProductosEquivalenteEnFranquicia(ObjProductosServicios, False)
|
TieneError = GuardarProductosEquivalenteEnFranquicia(ObjProductosServicios, False, PSAdicionalAnterior)
|
||||||
End If
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
@@ -1743,6 +1754,7 @@ Partial Class ProductosyServicios
|
|||||||
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
|
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
|
||||||
BtnAgregarPSAdicional.Text = "Guardar"
|
BtnAgregarPSAdicional.Text = "Guardar"
|
||||||
TxtCantidadPSAdicional.Text = GvRow.DataKey("Cantidad")
|
TxtCantidadPSAdicional.Text = GvRow.DataKey("Cantidad")
|
||||||
|
PSAdicionalAnterior = GvRow.DataKey("PS").ToString
|
||||||
|
|
||||||
If TxtCantidadPSAdicional.Text.ToEntero = 0 Then
|
If TxtCantidadPSAdicional.Text.ToEntero = 0 Then
|
||||||
UpCantidad.Visible = False
|
UpCantidad.Visible = False
|
||||||
@@ -2936,7 +2948,7 @@ Partial Class ProductosyServicios
|
|||||||
Return False
|
Return False
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
Private Function GuardarProductosEquivalenteEnFranquicia(ObjPS As ClsProductosServicios, Agregar As Boolean) As Boolean
|
Private Function GuardarProductosEquivalenteEnFranquicia(ObjPS As ClsProductosServicios, Agregar As Boolean, Optional PSAdicionalAnterior As String = "") As Boolean
|
||||||
If UsuarioActual.Empresa.Funcionalidad(563) <> "" Then
|
If UsuarioActual.Empresa.Funcionalidad(563) <> "" Then
|
||||||
|
|
||||||
Dim StrEmpresas As String = UsuarioActual.Empresa.Funcionalidad(563)
|
Dim StrEmpresas As String = UsuarioActual.Empresa.Funcionalidad(563)
|
||||||
@@ -2949,7 +2961,7 @@ Partial Class ProductosyServicios
|
|||||||
Alert(String.Format("El producto de la página no existe en la franquicia: '{0}'", GlobalDTEmpresas(Franquicia).FiltroPrimeroValor("Empresa")), TipoMensaje.MsgAdvertencia)
|
Alert(String.Format("El producto de la página no existe en la franquicia: '{0}'", GlobalDTEmpresas(Franquicia).FiltroPrimeroValor("Empresa")), TipoMensaje.MsgAdvertencia)
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If CvePSPagina <= 0 Then
|
If CvePSAdicional <= 0 Then
|
||||||
Alert(String.Format("El producto adicional no existe en la franquicia: '{0}'", GlobalDTEmpresas(Franquicia).FiltroPrimeroValor("Empresa")), TipoMensaje.MsgAdvertencia)
|
Alert(String.Format("El producto adicional no existe en la franquicia: '{0}'", GlobalDTEmpresas(Franquicia).FiltroPrimeroValor("Empresa")), TipoMensaje.MsgAdvertencia)
|
||||||
End If
|
End If
|
||||||
|
|
||||||
@@ -2958,16 +2970,36 @@ Partial Class ProductosyServicios
|
|||||||
Return True
|
Return True
|
||||||
End If
|
End If
|
||||||
Else
|
Else
|
||||||
Dim PSAnterior As String = GlobalDTPS(Franquicia).FiltroPrimeroValor("PS", String.Format("CvePS = '{0}'", CvePSAdicional))
|
Dim CvepsAdicionalAnt As Integer = GlobalDTPS(Franquicia).FiltroPrimeroValor("CvePS", String.Format("PS = '{0}'", PSAdicionalAnterior)).ToEntero
|
||||||
Dim CvePSAnterio As Integer = GlobalDTPS(Franquicia).FiltroPrimeroValor("CvePS", String.Format("PS = '{0}'", PSAnterior)).ToEntero
|
|
||||||
|
|
||||||
If Not ObjPS.UpdatePSAdicionales(CvePSPagina, CvePSAdicional, CvePSAnterio, If(TxtCantidadPSAdicional.Visible, TxtCantidadPSAdicional.Text.ToDecimal, 0)) Then
|
If CvepsAdicionalAnt <= 0 Then
|
||||||
Return True
|
Alert(String.Format("El producto adicional no existe en la franquicia: '{0}'", GlobalDTEmpresas(Franquicia).FiltroPrimeroValor("Empresa")), TipoMensaje.MsgAdvertencia)
|
||||||
|
Else
|
||||||
|
If Not ObjPS.UpdatePSAdicionales(CvePSPagina, CvePSAdicional, CvepsAdicionalAnt, If(TxtCantidadPSAdicional.Visible, TxtCantidadPSAdicional.Text.ToDecimal, 0)) Then
|
||||||
|
Return True
|
||||||
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
End If
|
End If
|
||||||
Next
|
Next
|
||||||
End If
|
End If
|
||||||
Return False
|
Return False
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
|
|
||||||
|
Private Function EliminarProductosEquivalenteEnFranquicia(ObjPS As ClsProductosServicios, PSAdicional As String) As Boolean
|
||||||
|
If UsuarioActual.Empresa.Funcionalidad(563) <> "" Then
|
||||||
|
Dim StrEmpresas As String = UsuarioActual.Empresa.Funcionalidad(563)
|
||||||
|
Dim EmpresasFranquicia As List(Of Integer) = StrEmpresas.Split(","c).ToList().ConvertAll(Function(x) Convert.ToInt32(x))
|
||||||
|
For Each Franquicia As Integer In EmpresasFranquicia
|
||||||
|
Dim CvepsAdicional As Integer = GlobalDTPS(Franquicia).FiltroPrimeroValor("CvePS", String.Format("PS = '{0}'", PSAdicional)).ToEntero
|
||||||
|
Dim CvePSPagina As Integer = GlobalDTPS(Franquicia).FiltroPrimeroValor("CvePS", String.Format("Codigo = '{0}'", TxtCodigo.Text.Trim)).ToEntero
|
||||||
|
If Not ObjPS.RemovePSAdicionales(CvePSPagina, CvepsAdicional) Then
|
||||||
|
Return True
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
End If
|
||||||
|
Return False
|
||||||
|
End Function
|
||||||
End Class
|
End Class
|
||||||
|
|||||||
@@ -341,11 +341,39 @@ Partial Class Ventas_RepProductosServiciosDetalle
|
|||||||
If AnioMes.Trim.Length = 7 Then
|
If AnioMes.Trim.Length = 7 Then
|
||||||
txtFechaI.Text = If(AnioMes <> "-1", String.Format("01/{0}/{1}", AnioMes.Substring(5, 2).PadLeft(2, "0"c), AnioMes.Substring(0, 4)), txtFechaI.Text)
|
txtFechaI.Text = If(AnioMes <> "-1", String.Format("01/{0}/{1}", AnioMes.Substring(5, 2).PadLeft(2, "0"c), AnioMes.Substring(0, 4)), txtFechaI.Text)
|
||||||
FechaFtemporal = $"01/{AnioMes.Substring(5, 2).PadLeft(2, "0"c)}/{AnioMes.Substring(0, 4)}"
|
FechaFtemporal = $"01/{AnioMes.Substring(5, 2).PadLeft(2, "0"c)}/{AnioMes.Substring(0, 4)}"
|
||||||
txtFechaF.Text = String.Format("{2}/{0}/{1}", AnioMes.Substring(5, 2).PadLeft(2, "0"c), AnioMes.Substring(0, 4), FechaFtemporal.ToDate.LastDayOfMonth.Day)
|
|
||||||
|
If FechaF = "-1" Then
|
||||||
|
txtFechaF.Text = String.Format("{2}/{0}/{1}", AnioMes.Substring(5, 2).PadLeft(2, "0"c), AnioMes.Substring(0, 4), FechaFtemporal.ToDate.LastDayOfMonth.Day)
|
||||||
|
Else
|
||||||
|
Dim FechaFRef As DateTime = FechaF.ToDateTime
|
||||||
|
Dim FechaFMonth As DateTime = String.Format("{2}/{0}/{1}", AnioMes.Substring(5, 2).PadLeft(2, "0"c), AnioMes.Substring(0, 4), FechaFtemporal.ToDate.LastDayOfMonth.Day).ToDate()
|
||||||
|
|
||||||
|
If FechaFRef > FechaFMonth Then
|
||||||
|
txtFechaF.Text = FechaFMonth.ToString("dd/MM/yyyy")
|
||||||
|
Else
|
||||||
|
txtFechaF.Text = FechaFRef.ToString("dd/MM/yyyy")
|
||||||
|
End If
|
||||||
|
|
||||||
|
End If
|
||||||
|
|
||||||
Else
|
Else
|
||||||
txtFechaI.Text = If(AnioMes <> "-1", String.Format("01/{0}/{1}", AnioMes.Substring(5, 1).PadLeft(2, "0"c), AnioMes.Substring(0, 4)), txtFechaI.Text)
|
txtFechaI.Text = If(AnioMes <> "-1", String.Format("01/{0}/{1}", AnioMes.Substring(5, 1).PadLeft(2, "0"c), AnioMes.Substring(0, 4)), txtFechaI.Text)
|
||||||
FechaFtemporal = $"01/{AnioMes.Substring(5, 1).PadLeft(2, "0"c)}/{AnioMes.Substring(0, 4)}"
|
FechaFtemporal = $"01/{AnioMes.Substring(5, 1).PadLeft(2, "0"c)}/{AnioMes.Substring(0, 4)}"
|
||||||
txtFechaF.Text = String.Format("{2}/{0}/{1}", AnioMes.Substring(5, 1).PadLeft(2, "0"c), AnioMes.Substring(0, 4), FechaFtemporal.ToDate.LastDayOfMonth.Day)
|
|
||||||
|
If FechaF = "-1" Then
|
||||||
|
txtFechaF.Text = String.Format("{2}/{0}/{1}", AnioMes.Substring(5, 1).PadLeft(2, "0"c), AnioMes.Substring(0, 4), FechaFtemporal.ToDate.LastDayOfMonth.Day)
|
||||||
|
Else
|
||||||
|
Dim FechaFRef As DateTime = FechaF.ToDateTime
|
||||||
|
Dim FechaFMonth As DateTime = String.Format("{2}/{0}/{1}", AnioMes.Substring(5, 1).PadLeft(2, "0"c), AnioMes.Substring(0, 4), FechaFtemporal.ToDate.LastDayOfMonth.Day).ToDate
|
||||||
|
|
||||||
|
If FechaFRef > FechaFMonth Then
|
||||||
|
txtFechaF.Text = FechaFMonth.ToString("dd/MM/yyyy")
|
||||||
|
Else
|
||||||
|
txtFechaF.Text = FechaFRef.ToString("dd/MM/yyyy")
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|||||||
Reference in New Issue
Block a user