Ventas Medicas Pago directo inicial
This commit is contained in:
@@ -1040,58 +1040,58 @@ Public Class ClsBancos
|
||||
Select Case dr("ClaveFormaPagoSAT").ToString
|
||||
Case "02"
|
||||
If Cuentapago <> "" AndAlso Not Cuentapago.Length.Contiene(11, 18) Then
|
||||
Mensaje = "La cuenta ordenante no cumple con el formato esperado."
|
||||
Mensaje = $"La cuenta ordenante {Cuentapago} no cumple con el formato esperado 11, 18 caracteres."
|
||||
End If
|
||||
|
||||
If CuentaBeneficiario <> "" AndAlso Not (CuentaBeneficiario.Length.Contiene(10, 11, 15, 16, 18, 50)) Then
|
||||
Mensaje = $"{Mensaje} La Cuenta Beneficiario no cumple con el formato esperado."
|
||||
Mensaje = $"{Mensaje} La Cuenta Beneficiario {CuentaBeneficiario} no cumple con el formato esperado 10, 11, 15, 16, 18, 50 caracteres."
|
||||
End If
|
||||
Case "03"
|
||||
If Cuentapago <> "" AndAlso Not Cuentapago.Length.Contiene(10, 16, 18) Then
|
||||
Mensaje = "La cuenta ordenante no cumple con el formato esperado."
|
||||
Mensaje = $"La cuenta ordenante {Cuentapago} no cumple con el formato esperado 10, 16, 18 caracteres."
|
||||
End If
|
||||
If CuentaBeneficiario <> "" AndAlso Not (CuentaBeneficiario.Length.Contiene(10, 18)) Then
|
||||
Mensaje = $"{Mensaje} La Cuenta Beneficiario no cumple con el formato esperado."
|
||||
Mensaje = $"{Mensaje} La Cuenta Beneficiario {CuentaBeneficiario} no cumple con el formato esperado 10, 18 caracteres."
|
||||
End If
|
||||
Case "04"
|
||||
|
||||
If Cuentapago <> "" AndAlso Not Cuentapago.Length.Contiene(16) Then
|
||||
Mensaje = "La cuenta ordenante no cumple con el formato esperado."
|
||||
Mensaje = $"La cuenta ordenante {Cuentapago} no cumple con el formato esperado 16 caracteres."
|
||||
End If
|
||||
|
||||
If CuentaBeneficiario <> "" AndAlso Not (CuentaBeneficiario.Length.Contiene(10, 11, 15, 16, 18, 50)) Then
|
||||
Mensaje = $"{Mensaje} La Cuenta Beneficiario no cumple con el formato esperado."
|
||||
Mensaje = $"{Mensaje} La Cuenta Beneficiario {CuentaBeneficiario} no cumple con el formato esperado 10, 11, 15, 16, 18, 50 caracteres."
|
||||
End If
|
||||
|
||||
Case "05"
|
||||
If Cuentapago <> "" AndAlso Not Cuentapago.Length.Contiene(10, 11, 15, 16, 18, 50) Then
|
||||
Mensaje = "La cuenta ordenante no cumple con el formato esperado."
|
||||
Mensaje = $"La cuenta ordenante {Cuentapago} no cumple con el formato esperado 10, 11, 15, 16, 18, 50 caracteres."
|
||||
End If
|
||||
|
||||
If CuentaBeneficiario <> "" AndAlso Not (CuentaBeneficiario.Length.Contiene(10, 11, 15, 16, 18, 50)) Then
|
||||
Mensaje = $"{Mensaje} La Cuenta Beneficiario no cumple con el formato esperado."
|
||||
Mensaje = $"{Mensaje} La Cuenta Beneficiario {CuentaBeneficiario} no cumple con el formato esperado 10, 11, 15, 16, 18, 50 caracteres."
|
||||
End If
|
||||
Case "06"
|
||||
If Cuentapago <> "" AndAlso Not Cuentapago.Length.Contiene(10) Then
|
||||
Mensaje = "La cuenta ordenante no cumple con el formato esperado."
|
||||
Mensaje = $"La cuenta ordenante {Cuentapago} no cumple con el formato esperado 10 caracteres."
|
||||
End If
|
||||
|
||||
CuentaBeneficiario = ""
|
||||
Case "28"
|
||||
If Cuentapago <> "" AndAlso Not Cuentapago.Length.Contiene(16) Then
|
||||
Mensaje = "La cuenta ordenante no cumple con el formato esperado."
|
||||
Mensaje = $"La cuenta ordenante {Cuentapago} no cumple con el formato esperado 16 caracteres."
|
||||
End If
|
||||
|
||||
If CuentaBeneficiario <> "" AndAlso Not (CuentaBeneficiario.Length.Contiene(10, 11, 15, 16, 18, 50)) Then
|
||||
Mensaje = $"{Mensaje} La Cuenta Beneficiario no cumple con el formato esperado."
|
||||
Mensaje = $"{Mensaje} La Cuenta Beneficiario {CuentaBeneficiario} no cumple con el formato esperado 10, 11, 15, 16, 18, 50 caracteres."
|
||||
End If
|
||||
Case "29"
|
||||
If Cuentapago <> "" AndAlso Not Cuentapago.Length.Contiene(15, 16) Then
|
||||
Mensaje = "La cuenta ordenante no cumple con el formato esperado."
|
||||
Mensaje = $"La cuenta ordenante {Cuentapago} no cumple con el formato esperado 15, 16 caracteres."
|
||||
End If
|
||||
|
||||
If CuentaBeneficiario <> "" AndAlso Not (CuentaBeneficiario.Length.Contiene(10, 11, 15, 16, 18, 50)) Then
|
||||
Mensaje = $"{Mensaje} La Cuenta Beneficiario no cumple con el formato esperado."
|
||||
Mensaje = $"{Mensaje} La Cuenta Beneficiario {CuentaBeneficiario} no cumple con el formato esperado 10, 11, 15, 16, 18, 50 caracteres."
|
||||
End If
|
||||
|
||||
Case Else
|
||||
|
||||
@@ -67,6 +67,10 @@ Public Class ClsOS
|
||||
Public Property SubProyecto As String
|
||||
Public Property Condiciones As String
|
||||
|
||||
Public Property CveMedico As Integer = -1
|
||||
Public Property CveProcedimiento As Integer = -1
|
||||
Public Property CveTipoVenta As Integer = -1
|
||||
|
||||
|
||||
|
||||
Private Class Especificaciones
|
||||
@@ -547,6 +551,11 @@ Public Class ClsOS
|
||||
Me.SubProyecto = Data.Rows(0)("SubProyecto").ToString
|
||||
Me.Condiciones = Data.Rows(0)("Condiciones").ToString
|
||||
|
||||
Me.CveMedico = Data.Rows(0)("CveMedico").ToString.ToEntero
|
||||
Me.CveProcedimiento = Data.Rows(0)("CveProcedimiento").ToString.ToEntero
|
||||
Me.CveTipoVenta = Data.Rows(0)("CveTipoVenta").ToString.ToEntero
|
||||
|
||||
|
||||
End If
|
||||
Retorno = True
|
||||
Catch ex As Exception
|
||||
@@ -601,7 +610,7 @@ Public Class ClsOS
|
||||
Public Function AddOrdenesServicios(CveCliente As Integer, CveSubProyecto As Integer, PersonaSolicito As String, FechaRecepcion As Date, Descripcion As String, CveUsuarioRecibio As Integer, CveEstatusOrdenServicio As Integer,
|
||||
CveUsuario As Integer, CveEmpresa As Integer, CveCotizacion As Integer, CveVenta As Integer, CveOSPadre As Integer, CveOSTipo As Integer, Optional CveClienteSucursal As Integer = -1,
|
||||
Optional Direccion As String = "-1", Optional Telefono As String = "", Optional CveModeloAuto As Integer = -1, Optional Año As String = "-1", Optional Correo As String = "",
|
||||
Optional Condiciones As String = "") As Boolean
|
||||
Optional Condiciones As String = "", Optional CveMedico As Integer = -1, Optional CveProcedimiento As Integer = -1, Optional CveTipoVenta As Integer = -1) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
DataAdapter("PA_OS_OrdenesServiciosAdd")
|
||||
@@ -628,6 +637,9 @@ Public Class ClsOS
|
||||
.Add("@Año", SqlDbType.VarChar).Value = Año
|
||||
.Add("@Correo", SqlDbType.VarChar).Value = Correo
|
||||
.Add("@Condiciones", SqlDbType.VarChar).Value = Condiciones
|
||||
.Add("@CveMedico", SqlDbType.Int).Value = CveMedico
|
||||
.Add("@CveProcedimiento", SqlDbType.Int).Value = CveProcedimiento
|
||||
.Add("@CveTipoVenta", SqlDbType.Int).Value = CveTipoVenta
|
||||
|
||||
.Add("@CveOS", SqlDbType.Int).Direction = ParameterDirection.Output
|
||||
.Add("@vFolio", SqlDbType.Int).Direction = ParameterDirection.Output
|
||||
@@ -672,7 +684,8 @@ Public Class ClsOS
|
||||
End Function
|
||||
Public Function UpdateOrdenesServicios(PersonaSolicito As String, FechaRecepcion As String, Descripcion As String, CveUsuarioRecibio As Integer, CveEstatusOrdenServicio As Integer, CveOS As Integer, CveUsuarioModifico As Integer,
|
||||
CveOSTipo As Integer, Optional CveClienteSucursal As Integer = -1, Optional Direccion As String = "-1", Optional Telefono As String = "", Optional CveModeloAuto As Integer = -1,
|
||||
Optional Año As String = "-1", Optional CveSubProyecto As Integer = -1, Optional Correo As String = "-1", Optional Condiciones As String = "") As Boolean
|
||||
Optional Año As String = "-1", Optional CveSubProyecto As Integer = -1, Optional Correo As String = "-1", Optional Condiciones As String = "",
|
||||
Optional CveMedico As Integer = -1, Optional CveProcedimiento As Integer = -1, Optional CveTipoVenta As Integer = -1) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
DataAdapter("PA_OS_OrdenesServiciosUpdate")
|
||||
@@ -695,6 +708,9 @@ Public Class ClsOS
|
||||
.Add("@Año", SqlDbType.VarChar).Value = Año
|
||||
.Add("@Correo", SqlDbType.VarChar).Value = Correo
|
||||
.Add("@Condiciones", SqlDbType.VarChar).Value = Condiciones
|
||||
.Add("@CveMedico", SqlDbType.Int).Value = CveMedico
|
||||
.Add("@CveProcedimiento", SqlDbType.Int).Value = CveProcedimiento
|
||||
.Add("@CveTipoVenta", SqlDbType.Int).Value = CveTipoVenta
|
||||
|
||||
End With
|
||||
|
||||
|
||||
@@ -2123,6 +2123,60 @@ Public Class ClsPaginas
|
||||
HttpContext.Current.Application(AppNombre) = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Property GlobalDTTipoVenta(Optional CveEmpresa As Integer = -1) As DataTable
|
||||
Get
|
||||
Dim AppNombre As String = $"GlobalDTTipoVenta"
|
||||
'sino existe, recarga los datos
|
||||
If Application(AppNombre) Is Nothing Then
|
||||
Dim ObjVentas As New ClsVentas
|
||||
If ObjVentas.GetTipoVenta() Then Application(AppNombre) = ObjVentas.DtResultados
|
||||
ObjVentas.Dispose()
|
||||
End If
|
||||
GlobalDTTipoVenta = DirectCast(Application(AppNombre), DataTable)
|
||||
End Get
|
||||
Set(value As DataTable)
|
||||
Dim AppNombre As String = $"GlobalDTTipoVenta"
|
||||
Application(AppNombre) = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Property GlobalDTMedicos(CveEmpresa As Integer) As DataTable
|
||||
Get
|
||||
Dim AppNombre As String = $"GlobalDTAgentes-{CveEmpresa}"
|
||||
'sino existe, recarga los datos
|
||||
If Application(AppNombre) Is Nothing Then
|
||||
Dim ObjVentas As New ClsVentas
|
||||
If ObjVentas.GetMedicos(-1, CveEmpresa, -1) Then Application(AppNombre) = ObjVentas.DtResultados
|
||||
ObjVentas.Dispose()
|
||||
End If
|
||||
GlobalDTMedicos = DirectCast(Application(AppNombre), DataTable)
|
||||
End Get
|
||||
Set(value As DataTable)
|
||||
Dim AppNombre As String = $"GlobalDTAgentes-{CveEmpresa}"
|
||||
Application(AppNombre) = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
|
||||
|
||||
Property GlobalDTProcedimientos(CveEmpresa As Integer) As DataTable
|
||||
Get
|
||||
Dim AppNombre As String = $"GlobalDTProcedimientos-{CveEmpresa}"
|
||||
'sino existe, recarga los datos
|
||||
If Application(AppNombre) Is Nothing Then
|
||||
Dim ObjVentas As New ClsVentas
|
||||
If ObjVentas.GetProcedimientos(-1, CveEmpresa, -1) Then Application(AppNombre) = ObjVentas.DtResultados
|
||||
ObjVentas.Dispose()
|
||||
End If
|
||||
GlobalDTProcedimientos = DirectCast(Application(AppNombre), DataTable)
|
||||
End Get
|
||||
Set(value As DataTable)
|
||||
Dim AppNombre As String = $"GlobalDTProcedimientos-{CveEmpresa}"
|
||||
Application(AppNombre) = value
|
||||
End Set
|
||||
End Property
|
||||
Public Shared Property GlobalDTClientesCorporativo(CveEmpresa As Integer) As DataTable
|
||||
Get
|
||||
Dim AppNombre As String = $"GlobalDTClientesCorporativo-{CveEmpresa}"
|
||||
@@ -9342,8 +9396,9 @@ Public Class ClsPaginas
|
||||
PaginaDict.Add("/Ventas/RepLineasAdicionales.aspx?OP=OP".ToUpper(), 1332)
|
||||
PaginaDict.Add("/Ventas/FacturacionAcarreos.aspx".ToUpper(), 784)
|
||||
PaginaDict.Add("/Ventas/RepIndicadoresPorProyecto.aspx".ToUpper(), 617)
|
||||
PaginaDict.Add("/Ventas/CatAgentes.aspx".ToUpper(), 1343)
|
||||
PaginaDict.Add("/Ventas/CatMedicos.aspx".ToUpper(), 1343)
|
||||
PaginaDict.Add("/Ventas/CatProcedimientos.aspx".ToUpper(), 1344)
|
||||
PaginaDict.Add("/Ventas/VentasMedicas.aspx".ToUpper(), 1345)
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -418,7 +418,9 @@ Public Class ClsVentas
|
||||
Optional CveTipoAmortizacionAnticipo As Integer = -1, Optional CveVentaRelacion As Integer = -1, Optional ImporteRelacion As Decimal = -1, Optional CveEmpresaCRM As Integer = -1, Optional EsInterno As Integer = -1, Optional CveAcercamientoCRM As Integer = -1,
|
||||
Optional DiasCredito As Integer = 0, Optional EsDiasCreditoFijo As Boolean = False, Optional AnticipoEspecial As Boolean = False, Optional Kilometraje As Double = 0, Optional EsAmortizacion As Boolean = False, Optional CveTipoRetencion As Integer = 0,
|
||||
Optional CorreoNotificacion As String = "", Optional FormaPaqueteria As Integer = 1, Optional FacturarSucursal As Boolean = False, Optional VentaDesglosaIEPS As Boolean = False, Optional ServicioDomicilio As Boolean = False, Optional RFCReceptor As String = "", Optional Adjunto As String = "-1",
|
||||
Optional DevolucionImportePagado As Decimal = 0, Optional EsGarantia As Boolean = False, Optional CveLineaAdicional As Integer = -1, Optional DescripcionVenta As String = "") As Boolean
|
||||
Optional DevolucionImportePagado As Decimal = 0, Optional EsGarantia As Boolean = False, Optional CveLineaAdicional As Integer = -1, Optional DescripcionVenta As String = "",
|
||||
Optional CveMedico As Integer = -1, Optional CveProcedimiento As Integer = -1, Optional CveTipoVenta As Integer = -1
|
||||
) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
DataAdapter("PA_VentasAdd")
|
||||
@@ -518,6 +520,11 @@ Public Class ClsVentas
|
||||
.Add("@EsGarantia", SqlDbType.Bit).Value = EsGarantia
|
||||
.Add("@CveLineaAdicional", SqlDbType.Int).Value = CveLineaAdicional
|
||||
.Add("@DescripcionVenta", SqlDbType.VarChar).Value = DescripcionVenta
|
||||
|
||||
.Add("@CveMedico", SqlDbType.Int).Value = CveMedico
|
||||
.Add("@CveProcedimiento", SqlDbType.Int).Value = CveProcedimiento
|
||||
.Add("@CveTipoVenta", SqlDbType.Int).Value = CveTipoVenta
|
||||
|
||||
.Add("@RETURN_VALUE", SqlDbType.Int).Direction = ParameterDirection.ReturnValue
|
||||
End With
|
||||
'SqlTypes.SqlDateTime.Null
|
||||
@@ -5939,6 +5946,204 @@ Public Class ClsVentas
|
||||
|
||||
|
||||
|
||||
#Region "TIPO VENTA"
|
||||
|
||||
Public Function GetTipoVenta() As Boolean
|
||||
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_Vta_TipoVentaGet")
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
Retorno = True
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al obtener los Tipos de Venta.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||
End Try
|
||||
Return Retorno
|
||||
|
||||
End Function
|
||||
|
||||
#End Region
|
||||
|
||||
#Region "AGENTES"
|
||||
|
||||
Public Function GetMedicos(CveMedico As Integer, CveEmpresa As Integer, Estatus As Integer) As Boolean
|
||||
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_Vta_MedicosGet")
|
||||
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CveMedico", SqlDbType.Int).Value = CveMedico
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
.Add("@Estatus", SqlDbType.Int).Value = Estatus
|
||||
End With
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
Retorno = True
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al obtener los Medicos.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||
End Try
|
||||
Return Retorno
|
||||
|
||||
End Function
|
||||
|
||||
|
||||
|
||||
|
||||
Public Function AddMedico(Medico As String, CedulaProfesional As String, FechaNacimiento As Date, Notas As String, DiasAtencion As String, Horario As String, Lugar As String, Estatus As Boolean, CveUsuario As Integer, CveEmpresa As Integer) As Boolean
|
||||
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_Vta_MedicosAdd")
|
||||
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CedulaProfesional", SqlDbType.VarChar).Value = CedulaProfesional
|
||||
.Add("@Medico", SqlDbType.VarChar).Value = Medico
|
||||
.Add("@FechaNacimiento", SqlDbType.Date).Value = FechaNacimiento
|
||||
.Add("@Notas", SqlDbType.VarChar).Value = Notas
|
||||
.Add("@DiasAtencion", SqlDbType.VarChar).Value = DiasAtencion
|
||||
.Add("@Horario", SqlDbType.VarChar).Value = Horario
|
||||
.Add("@Lugar", SqlDbType.VarChar).Value = Lugar
|
||||
.Add("@Estatus", SqlDbType.Bit).Value = Estatus
|
||||
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
End With
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
Retorno = True
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al guardar el Medico.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||
End Try
|
||||
Return Retorno
|
||||
|
||||
End Function
|
||||
|
||||
Public Function UpdateMedico(CveMedico As Integer, Medico As String, CedulaProfesional As String, FechaNacimiento As Date, Notas As String, DiasAtencion As String, Horario As String, Lugar As String, Estatus As Boolean, CveUsuario As Integer, CveEmpresa As Integer) As Boolean
|
||||
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_Vta_MedicosUpdate")
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CveMedico", SqlDbType.Int).Value = CveMedico
|
||||
.Add("@Medico", SqlDbType.VarChar).Value = Medico
|
||||
.Add("@CedulaProfesional", SqlDbType.VarChar).Value = CedulaProfesional
|
||||
.Add("@FechaNacimiento", SqlDbType.Date).Value = FechaNacimiento
|
||||
.Add("@Notas", SqlDbType.VarChar).Value = Notas
|
||||
.Add("@DiasAtencion", SqlDbType.VarChar).Value = DiasAtencion
|
||||
.Add("@Horario", SqlDbType.VarChar).Value = Horario
|
||||
.Add("@Lugar", SqlDbType.VarChar).Value = Lugar
|
||||
.Add("@Estatus", SqlDbType.Bit).Value = Estatus
|
||||
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
End With
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
Retorno = True
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al actualizar el Medico.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||
End Try
|
||||
Return Retorno
|
||||
|
||||
End Function
|
||||
|
||||
Public Function RemoveMedico(CveMedico As Integer, CveEmpresa As Integer) As Boolean
|
||||
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_Vta_MedicosRemove")
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CveMedico", SqlDbType.Int).Value = CveMedico
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
End With
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
Retorno = True
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al eliminar el Medico.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||
End Try
|
||||
Return Retorno
|
||||
|
||||
End Function
|
||||
|
||||
#End Region
|
||||
#Region "PRODEDIMIENTOS"
|
||||
|
||||
Public Function GetProcedimientos(CveProcedimiento As Integer, CveEmpresa As Integer, Estatus As Integer) As Boolean
|
||||
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_Vta_ProcedimientosGet")
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CveProcedimiento", SqlDbType.Int).Value = CveProcedimiento
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
.Add("@Estatus", SqlDbType.Int).Value = Estatus
|
||||
End With
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
Retorno = True
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al obtener los Procedimientos .", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||
End Try
|
||||
Return Retorno
|
||||
|
||||
End Function
|
||||
|
||||
Public Function AddProcedimiento(Procedimiento As String, Estatus As Boolean, CveUsuario As Integer, CveEmpresa As Integer) As Boolean
|
||||
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_Vta_ProcedimientosAdd")
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@Procedimiento", SqlDbType.VarChar).Value = Procedimiento
|
||||
.Add("@Estatus", SqlDbType.Int).Value = Estatus
|
||||
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
End With
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
Retorno = True
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al guardar el Procedimiento.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||
End Try
|
||||
Return Retorno
|
||||
|
||||
End Function
|
||||
|
||||
Public Function UpdateProcedimiento(CveProcedimiento As Integer, Procedimiento As String, Estatus As Boolean, CveUsuario As Integer, CveEmpresa As Integer) As Boolean
|
||||
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_Vta_ProcedimientosUpdate")
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CveProcedimiento", SqlDbType.Int).Value = CveProcedimiento
|
||||
.Add("@Procedimiento", SqlDbType.VarChar).Value = Procedimiento
|
||||
.Add("@Estatus", SqlDbType.Int).Value = Estatus
|
||||
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
End With
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
Retorno = True
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al actualizar el Procedimiento.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||
End Try
|
||||
Return Retorno
|
||||
|
||||
End Function
|
||||
|
||||
Public Function RemoveProcedimiento(CveProcedimiento As Integer, CveEmpresa As Integer) As Boolean
|
||||
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_Vta_ProcedimientosRemove")
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CveProcedimiento", SqlDbType.Int).Value = CveProcedimiento
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
End With
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
Retorno = True
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al eliminar el Procedimiento.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||
End Try
|
||||
Return Retorno
|
||||
|
||||
End Function
|
||||
|
||||
#End Region
|
||||
|
||||
#Region "IDisposable Support"
|
||||
|
||||
|
||||
|
||||
Binary file not shown.
@@ -441,6 +441,56 @@
|
||||
<label style="color:#888888" for="<%= DdlPS.ClientID.ToString()%>">Producto Servicio:</label>
|
||||
<ADS:Dropdownlost runat="server" ID="DdlPS" CssStyle="width:100%" CssClassDdl="form-control select2me" DataTextField="PSCodigo" DataValueField="CvePS" />
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="row" runat="server" id="DVAgenteProcedimiento" visible="false">
|
||||
|
||||
<div class="form-group col-md-6 form-md-line-input input-iconright">
|
||||
<asp:DropDownList ID="DdlMedico" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" CausesValidation="true" DataTextField="Medico" DataValueField="CveMedico">
|
||||
<asp:ListItem Value="-1">Seleccione uno</asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
<%--<asp:RequiredFieldValidator ID="RfvDdlAgente" CssClass="help-block errorimput" runat="server" ControlToValidate="DdlAgente"
|
||||
ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Agente''</b> es necesario." InitialValue="-1" ValidationGroup="VGAcercamiento"></asp:RequiredFieldValidator>--%>
|
||||
<label for="<%= DdlMedico.ClientID.ToString()%>"><span style="color: #F3565D">*</span> Agente:</label>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-6 form-md-line-input input-iconright">
|
||||
<asp:DropDownList ID="DdlProcedimiento" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" CausesValidation="true" DataTextField="Procedimiento" DataValueField="CveProcedimiento">
|
||||
<asp:ListItem Value="-1">Seleccione uno</asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
<label for="<%=DdlProcedimiento.ClientID.ToString()%>">Procedimiento:</label>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="row" runat="server" id="DVTipoVenta" visible="false">
|
||||
|
||||
<div class="form-group col-md-6 form-md-line-input input-iconright">
|
||||
<asp:DropDownList ID="DdlTipoVenta" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" CausesValidation="true" DataTextField="TipoVenta" DataValueField="CveTipoVenta">
|
||||
<asp:ListItem Value="-1">Seleccione uno</asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
<label for="<%= DdlTipoVenta.ClientID.ToString()%>"><span style="color: #F3565D">*</span> Tipo De Venta:</label>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-6 form-md-line-input input-iconright">
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -316,12 +316,26 @@ public partial class CRM_Acercamiento : ClsPaginas
|
||||
{
|
||||
if (!IsPostBack)
|
||||
{
|
||||
CargaAgentes();
|
||||
CargaProcedimientos();
|
||||
CargaTiposVenta();
|
||||
|
||||
InicializaDatos();
|
||||
CargaDatos();
|
||||
CargaCotizaciones();
|
||||
CargaGastos();
|
||||
CargaRechazosMotivos();
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
if (UsuarioActual.Empresa.Funcionalidad(590).ToString().ToEntero() == 1)
|
||||
{
|
||||
DVTipoVenta.Visible = true;
|
||||
DVAgenteProcedimiento.Visible = true;
|
||||
}
|
||||
|
||||
if (UsuarioActual.CveEmpresa == 72)
|
||||
{
|
||||
TabDatosTecnicos.Visible = false;
|
||||
@@ -448,6 +462,9 @@ public partial class CRM_Acercamiento : ClsPaginas
|
||||
DVEmpresaLnk.Visible = true;
|
||||
}
|
||||
|
||||
DdlMedico.SelectedValueExist(objAcercamiento.Result[0].CveMedico.ToString());
|
||||
DdlProcedimiento.SelectedValueExist(objAcercamiento.Result[0].CveProcedimiento.ToString());
|
||||
DdlTipoVenta.SelectedValueExist(objAcercamiento.Result[0].CveTipoVenta.ToString());
|
||||
|
||||
}
|
||||
|
||||
@@ -592,6 +609,25 @@ public partial class CRM_Acercamiento : ClsPaginas
|
||||
DdlMedioCaptacion.DataBind();
|
||||
}
|
||||
|
||||
private void CargaProcedimientos()
|
||||
{
|
||||
DdlProcedimiento.DataSource = get_GlobalDTProcedimientos(UsuarioActual.CveEmpresa).FiltraParametros(" Estatus = 'true' ");
|
||||
DdlProcedimiento.DataBind();
|
||||
}
|
||||
|
||||
private void CargaAgentes()
|
||||
{
|
||||
DdlMedico.DataSource = get_GlobalDTMedicos(UsuarioActual.CveEmpresa).FiltraParametros(" Estatus = 'true' ");
|
||||
DdlMedico.DataBind();
|
||||
}
|
||||
|
||||
private void CargaTiposVenta()
|
||||
{
|
||||
DdlTipoVenta.DataSource = get_GlobalDTTipoVenta(UsuarioActual.CveEmpresa).FiltraParametros(" Estatus = 'true' ");
|
||||
DdlTipoVenta.DataBind();
|
||||
}
|
||||
|
||||
|
||||
protected void CargaRechazosMotivos()
|
||||
{
|
||||
ICRMService cRMService = new CRMService(System.Configuration.ConfigurationManager.ConnectionStrings["Conexion"].ConnectionString);
|
||||
@@ -849,6 +885,9 @@ public partial class CRM_Acercamiento : ClsPaginas
|
||||
AcercaminetoModel.CvePS = DdlPS.SelectedValue.ToEntero();
|
||||
AcercaminetoModel.CveRechazoMotivo = CveRechazoMotivo;
|
||||
AcercaminetoModel.EnPausa = ChkePausa.Checked;
|
||||
AcercaminetoModel.CveMedico = DdlMedico.SelectedValue.ToEntero();
|
||||
AcercaminetoModel.CveProcedimiento = DdlProcedimiento.SelectedValue.ToEntero();
|
||||
AcercaminetoModel.CveTipoVenta = DdlTipoVenta.SelectedValue.ToEntero();
|
||||
|
||||
|
||||
if (cRMService.AcercamientoUpdate(AcercaminetoModel))
|
||||
@@ -933,6 +972,10 @@ public partial class CRM_Acercamiento : ClsPaginas
|
||||
AcercaminetoModel.CvePS = DdlPS.SelectedValue.ToEntero();
|
||||
AcercaminetoModel.CveRechazoMotivo = CveRechazoMotivo;
|
||||
|
||||
AcercaminetoModel.CveMedico = DdlMedico.SelectedValue.ToEntero();
|
||||
AcercaminetoModel.CveProcedimiento = DdlProcedimiento.SelectedValue.ToEntero();
|
||||
AcercaminetoModel.CveTipoVenta = DdlTipoVenta.SelectedValue.ToEntero();
|
||||
|
||||
if (cRMService.AcercamientoUpdate(AcercaminetoModel))
|
||||
{
|
||||
CveEtapaActual = CveEtapaProcesoActualActualizar;
|
||||
|
||||
@@ -729,6 +729,7 @@
|
||||
</div>
|
||||
|
||||
<div class="modal-body">
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtAcercamiento" onkeyup="CompletaDescripcion(this);" MaxLength="100" CssClass="form-control" runat="server" CausesValidation="true"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVAcercamiento" runat="server" CssClass="help-block errorimput" ControlToValidate="TxtAcercamiento" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br /> El campo <b>''Acercamiento''</b> es necesario, por favor ingréselo." ValidationGroup="VGAcercamiento"></asp:RequiredFieldValidator>
|
||||
@@ -852,6 +853,45 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row" runat="server" id="DVAgenteProcedimiento" visible="false">
|
||||
|
||||
<div class="form-group col-md-6 form-md-line-input input-iconright">
|
||||
<asp:DropDownList ID="DdlMedico" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" CausesValidation="true" DataTextField="Medico" DataValueField="CveMedico" Width="100%">
|
||||
<asp:ListItem Value="-1">Seleccione uno</asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
<%--<asp:RequiredFieldValidator ID="RfvDdlAgente" CssClass="help-block errorimput" runat="server" ControlToValidate="DdlAgente"
|
||||
ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Agente''</b> es necesario." InitialValue="-1" ValidationGroup="VGAcercamiento"></asp:RequiredFieldValidator>--%>
|
||||
<label for="<%= DdlMedico.ClientID.ToString()%>"><span style="color: #F3565D">*</span> Medico:</label>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-6 form-md-line-input input-iconright">
|
||||
<asp:DropDownList ID="DdlProcedimiento" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" CausesValidation="true" DataTextField="Procedimiento" DataValueField="CveProcedimiento" Width="100%">
|
||||
<asp:ListItem Value="-1">Seleccione uno</asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
<label for="<%=DdlProcedimiento.ClientID.ToString()%>">Procedimiento:</label>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="row" runat="server" id="DVTipoVenta" visible="false">
|
||||
|
||||
<div class="form-group col-md-6 form-md-line-input input-iconright">
|
||||
<asp:DropDownList ID="DdlTipoVenta" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" CausesValidation="true" DataTextField="TipoVenta" DataValueField="CveTipoVenta" Width="100%">
|
||||
<asp:ListItem Value="-1">Seleccione uno</asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
<label for="<%= DdlTipoVenta.ClientID.ToString()%>"><span style="color: #F3565D">*</span> Tipo De Venta:</label>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-6 form-md-line-input input-iconright">
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="modal-footer">
|
||||
|
||||
@@ -292,6 +292,9 @@ public partial class CRM_EmpresaCRM : ClsPaginas
|
||||
CargarTiposEventos();
|
||||
LimitaFechasAcercamiento();
|
||||
CargaDatos();
|
||||
CargaAgentes();
|
||||
CargaProcedimientos();
|
||||
CargaTiposVenta();
|
||||
|
||||
//if( Request["CveEmpresaCRM"] != null)
|
||||
//{
|
||||
@@ -307,9 +310,34 @@ public partial class CRM_EmpresaCRM : ClsPaginas
|
||||
DdlPS.setEsWebService(true);
|
||||
DdlPS.SelectedText = "Seleccione";
|
||||
DdlPS.SelectedValue = "-1";
|
||||
|
||||
|
||||
if(UsuarioActual.Empresa.Funcionalidad(590).ToString().ToEntero() == 1)
|
||||
{
|
||||
DVAgenteProcedimiento.Visible = true;
|
||||
DVTipoVenta.Visible = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void CargaTiposVenta()
|
||||
{
|
||||
DdlTipoVenta.DataSource = get_GlobalDTTipoVenta(UsuarioActual.CveEmpresa).FiltraParametros(" Estatus = 'true' ");
|
||||
DdlTipoVenta.DataBind();
|
||||
}
|
||||
|
||||
private void CargaProcedimientos()
|
||||
{
|
||||
DdlProcedimiento.DataSource = get_GlobalDTProcedimientos(UsuarioActual.CveEmpresa).FiltraParametros(" Estatus = 'true' ");
|
||||
DdlProcedimiento.DataBind();
|
||||
}
|
||||
|
||||
private void CargaAgentes()
|
||||
{
|
||||
DdlMedico.DataSource = get_GlobalDTMedicos(UsuarioActual.CveEmpresa).FiltraParametros(" Estatus = 'true' ");
|
||||
DdlMedico.DataBind();
|
||||
}
|
||||
|
||||
#region "GUARDAR EMPRESA"
|
||||
|
||||
protected void BtnGuardarEmpresa_Click(object sender, EventArgs e)
|
||||
@@ -1714,6 +1742,10 @@ public partial class CRM_EmpresaCRM : ClsPaginas
|
||||
DdlMedioCaptacionAcercamiento.SelectedValueExist("-1");
|
||||
DdlProbabilidadAcercamiento.SelectedValueExist("-1");
|
||||
DdlPrioridadAcercamiento.SelectedValueExist("1");
|
||||
|
||||
DdlMedico.SelectedValueExist("-1");
|
||||
DdlProcedimiento.SelectedValueExist("-1");
|
||||
DdlTipoVenta.SelectedValueExist("-1");
|
||||
}
|
||||
|
||||
|
||||
@@ -1808,7 +1840,10 @@ public partial class CRM_EmpresaCRM : ClsPaginas
|
||||
Prioridad = Prioridad,
|
||||
CveEmpresa = UsuarioActual.CveEmpresa,
|
||||
CveUsuarioIng = CveUsuarioIng,
|
||||
CvePS = DdlPS.SelectedValue.ToEntero()
|
||||
CvePS = DdlPS.SelectedValue.ToEntero(),
|
||||
CveMedico = DdlMedico.SelectedValue.ToEntero(),
|
||||
CveProcedimiento = DdlProcedimiento.SelectedValue.ToEntero(),
|
||||
CveTipoVenta = DdlTipoVenta.SelectedValue.ToEntero()
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -382,7 +382,7 @@
|
||||
</FilterValues>
|
||||
</Filter>
|
||||
</Filters>
|
||||
<Top>2.6512cm</Top>
|
||||
<Top>2.36545cm</Top>
|
||||
<Left>0.31432cm</Left>
|
||||
<Height>1.65cm</Height>
|
||||
<Width>10.42504cm</Width>
|
||||
@@ -703,7 +703,7 @@
|
||||
</FilterValues>
|
||||
</Filter>
|
||||
</Filters>
|
||||
<Top>4.74417cm</Top>
|
||||
<Top>4.45842cm</Top>
|
||||
<Left>0.31432cm</Left>
|
||||
<Height>1.65cm</Height>
|
||||
<Width>10.42504cm</Width>
|
||||
@@ -1028,7 +1028,7 @@
|
||||
</FilterValues>
|
||||
</Filter>
|
||||
</Filters>
|
||||
<Top>2.6512cm</Top>
|
||||
<Top>2.36545cm</Top>
|
||||
<Left>10.77464cm</Left>
|
||||
<Height>1.65cm</Height>
|
||||
<Width>9.69396cm</Width>
|
||||
@@ -1347,7 +1347,7 @@
|
||||
</FilterValues>
|
||||
</Filter>
|
||||
</Filters>
|
||||
<Top>4.74417cm</Top>
|
||||
<Top>4.45842cm</Top>
|
||||
<Left>10.77464cm</Left>
|
||||
<Height>1.65cm</Height>
|
||||
<Width>9.69396cm</Width>
|
||||
@@ -1379,7 +1379,7 @@
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox28</rd:DefaultName>
|
||||
<Top>1.91009cm</Top>
|
||||
<Top>1.62434cm</Top>
|
||||
<Left>0.31432cm</Left>
|
||||
<Height>0.6cm</Height>
|
||||
<Width>10.46032cm</Width>
|
||||
@@ -1413,7 +1413,7 @@
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox28</rd:DefaultName>
|
||||
<Top>1.91009cm</Top>
|
||||
<Top>1.62434cm</Top>
|
||||
<Left>10.77464cm</Left>
|
||||
<Height>0.6cm</Height>
|
||||
<Width>9.69395cm</Width>
|
||||
@@ -1741,7 +1741,7 @@
|
||||
</FilterValues>
|
||||
</Filter>
|
||||
</Filters>
|
||||
<Top>8.30193cm</Top>
|
||||
<Top>8.01618cm</Top>
|
||||
<Left>10.77464cm</Left>
|
||||
<Height>1.65cm</Height>
|
||||
<Width>9.69396cm</Width>
|
||||
@@ -1774,7 +1774,7 @@
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox28</rd:DefaultName>
|
||||
<Top>7.52554cm</Top>
|
||||
<Top>7.23979cm</Top>
|
||||
<Left>10.77464cm</Left>
|
||||
<Height>0.6cm</Height>
|
||||
<Width>9.69395cm</Width>
|
||||
@@ -1811,7 +1811,7 @@
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox45</rd:DefaultName>
|
||||
<Top>10.22837cm</Top>
|
||||
<Top>9.94262cm</Top>
|
||||
<Left>10.77464cm</Left>
|
||||
<Height>0.6cm</Height>
|
||||
<Width>4.89717cm</Width>
|
||||
@@ -1848,7 +1848,7 @@
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox45</rd:DefaultName>
|
||||
<Top>10.22837cm</Top>
|
||||
<Top>9.94262cm</Top>
|
||||
<Left>18.55801cm</Left>
|
||||
<Height>0.6cm</Height>
|
||||
<Width>1.91058cm</Width>
|
||||
@@ -1888,7 +1888,7 @@
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox45</rd:DefaultName>
|
||||
<Top>10.22837cm</Top>
|
||||
<Top>9.94262cm</Top>
|
||||
<Left>15.67181cm</Left>
|
||||
<Height>0.6cm</Height>
|
||||
<Width>2.88621cm</Width>
|
||||
@@ -1925,7 +1925,7 @@
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox45</rd:DefaultName>
|
||||
<Top>11.12267cm</Top>
|
||||
<Top>10.83692cm</Top>
|
||||
<Left>10.77464cm</Left>
|
||||
<Height>0.6cm</Height>
|
||||
<Width>4.89717cm</Width>
|
||||
@@ -1962,7 +1962,7 @@
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox45</rd:DefaultName>
|
||||
<Top>11.12267cm</Top>
|
||||
<Top>10.83692cm</Top>
|
||||
<Left>18.55801cm</Left>
|
||||
<Height>0.6cm</Height>
|
||||
<Width>1.91058cm</Width>
|
||||
@@ -2002,7 +2002,7 @@
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox45</rd:DefaultName>
|
||||
<Top>11.12267cm</Top>
|
||||
<Top>10.83692cm</Top>
|
||||
<Left>15.67181cm</Left>
|
||||
<Height>0.6cm</Height>
|
||||
<Width>2.88621cm</Width>
|
||||
@@ -2039,7 +2039,7 @@
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox45</rd:DefaultName>
|
||||
<Top>6.57056cm</Top>
|
||||
<Top>6.28481cm</Top>
|
||||
<Left>10.77464cm</Left>
|
||||
<Height>0.6cm</Height>
|
||||
<Width>5.21467cm</Width>
|
||||
@@ -2076,7 +2076,7 @@
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox45</rd:DefaultName>
|
||||
<Top>6.53528cm</Top>
|
||||
<Top>6.24953cm</Top>
|
||||
<Left>18.55801cm</Left>
|
||||
<Height>0.63528cm</Height>
|
||||
<Width>1.91058cm</Width>
|
||||
@@ -2116,7 +2116,7 @@
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox45</rd:DefaultName>
|
||||
<Top>6.57056cm</Top>
|
||||
<Top>6.28481cm</Top>
|
||||
<Left>15.98931cm</Left>
|
||||
<Height>0.6cm</Height>
|
||||
<Width>2.56871cm</Width>
|
||||
@@ -2151,7 +2151,7 @@
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox73</rd:DefaultName>
|
||||
<Top>11.81312cm</Top>
|
||||
<Top>11.52737cm</Top>
|
||||
<Left>10.77464cm</Left>
|
||||
<Height>0.6cm</Height>
|
||||
<Width>9.69395cm</Width>
|
||||
@@ -2172,7 +2172,7 @@
|
||||
<Sizing>FitProportional</Sizing>
|
||||
<Top>0.03141cm</Top>
|
||||
<Left>0.31432cm</Left>
|
||||
<Height>1.5cm</Height>
|
||||
<Height>1.46783cm</Height>
|
||||
<Width>5.36361cm</Width>
|
||||
<ZIndex>18</ZIndex>
|
||||
<Style>
|
||||
@@ -2202,8 +2202,8 @@
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox1</rd:DefaultName>
|
||||
<Top>0.03141cm</Top>
|
||||
<Left>5.67793cm</Left>
|
||||
<Height>0.81167cm</Height>
|
||||
<Left>5.71321cm</Left>
|
||||
<Height>0.69144cm</Height>
|
||||
<Width>10.31137cm</Width>
|
||||
<ZIndex>19</ZIndex>
|
||||
<Style>
|
||||
@@ -2243,7 +2243,7 @@
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox5</rd:DefaultName>
|
||||
<Top>0.89924cm</Top>
|
||||
<Top>0.80399cm</Top>
|
||||
<Left>5.67793cm</Left>
|
||||
<Height>0.6cm</Height>
|
||||
<Width>10.31137cm</Width>
|
||||
@@ -2279,8 +2279,8 @@
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox8</rd:DefaultName>
|
||||
<Top>0.07056cm</Top>
|
||||
<Left>15.98931cm</Left>
|
||||
<Height>0.81167cm</Height>
|
||||
<Left>16.02458cm</Left>
|
||||
<Height>0.65229cm</Height>
|
||||
<Width>4.47928cm</Width>
|
||||
<ZIndex>21</ZIndex>
|
||||
<Style>
|
||||
@@ -2595,7 +2595,7 @@
|
||||
</FilterValues>
|
||||
</Filter>
|
||||
</Filters>
|
||||
<Top>6.92554cm</Top>
|
||||
<Top>6.63979cm</Top>
|
||||
<Left>0.31432cm</Left>
|
||||
<Height>1.65cm</Height>
|
||||
<Width>10.42504cm</Width>
|
||||
@@ -2630,7 +2630,7 @@
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox45</rd:DefaultName>
|
||||
<Top>11.12267cm</Top>
|
||||
<Top>10.83692cm</Top>
|
||||
<Left>0.31432cm</Left>
|
||||
<Height>0.6cm</Height>
|
||||
<Width>5.36361cm</Width>
|
||||
@@ -2667,7 +2667,7 @@
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox45</rd:DefaultName>
|
||||
<Top>11.12267cm</Top>
|
||||
<Top>10.83692cm</Top>
|
||||
<Left>8.54379cm</Left>
|
||||
<Height>0.6cm</Height>
|
||||
<Width>2.19558cm</Width>
|
||||
@@ -2707,7 +2707,7 @@
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox45</rd:DefaultName>
|
||||
<Top>11.12267cm</Top>
|
||||
<Top>10.83692cm</Top>
|
||||
<Left>5.67793cm</Left>
|
||||
<Height>0.6cm</Height>
|
||||
<Width>2.86585cm</Width>
|
||||
@@ -2723,10 +2723,10 @@
|
||||
</Style>
|
||||
</Textbox>
|
||||
</ReportItems>
|
||||
<Height>4.88706in</Height>
|
||||
<Height>4.77456in</Height>
|
||||
<Style />
|
||||
</Body>
|
||||
<Width>8.0585in</Width>
|
||||
<Width>8.07238in</Width>
|
||||
<Page>
|
||||
<PageHeader>
|
||||
<Height>0.74083cm</Height>
|
||||
@@ -2761,7 +2761,7 @@
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox5</rd:DefaultName>
|
||||
<Left>3.454cm</Left>
|
||||
<Height>0.6cm</Height>
|
||||
<Height>0.56444cm</Height>
|
||||
<Width>12.91455cm</Width>
|
||||
<Visibility>
|
||||
<Hidden>= (Globals.PageNumber=1)</Hidden>
|
||||
@@ -3047,7 +3047,7 @@
|
||||
Fields!ImporteActual.Value, 0), "DataSet1")</Value>
|
||||
</Variable>
|
||||
<Variable Name="TotalPasivoAnterior">
|
||||
<Value>=Sum(Microsoft.VisualBasic.Interaction.iif(Fields!Sup.Value = "PASIVO CIRCULANTE" OR Fields!Sup.Value = "PASIVO NO CIRCULANTE" , Fields!ImporteAnterior.Value, 0),"DataSet1")</Value>
|
||||
<Value>=Sum(Microsoft.VisualBasic.Interaction.iif(Fields!Sup.Value = "PASIVO CIRCULANTE" OR Fields!Sup.Value = "PASIVO NO CIRCULANTE" , Cint(Fields!ImporteAnterior.Value), 0),"DataSet1")</Value>
|
||||
<Writable>true</Writable>
|
||||
</Variable>
|
||||
<Variable Name="TotalPatrimonioCActual">
|
||||
@@ -3062,7 +3062,7 @@ OR Fields!Sup.Value = "Capital",
|
||||
Fields!ImporteActual.Value, 0),"DataSet1")</Value>
|
||||
</Variable>
|
||||
<Variable Name="TotalPatrimonioCAnterior">
|
||||
<Value>=Sum(Microsoft.VisualBasic.Interaction.iif(Fields!Sup.Value = "CAPITAL" OR Fields!Sup.Value = "CAPITAL CONTABLE" , Fields!ImporteAnterior.Value, 0),"DataSet1")</Value>
|
||||
<Value>=Sum(Microsoft.VisualBasic.Interaction.iif(Fields!Sup.Value = "CAPITAL" OR Fields!Sup.Value = "CAPITAL CONTABLE" , Cint(Fields!ImporteAnterior.Value), 0),"DataSet1")</Value>
|
||||
<Writable>true</Writable>
|
||||
</Variable>
|
||||
<Variable Name="TotalPatrimonioHAnterior">
|
||||
|
||||
@@ -742,7 +742,6 @@
|
||||
</TablixRowHierarchy>
|
||||
<RepeatColumnHeaders>true</RepeatColumnHeaders>
|
||||
<DataSetName>DataSet1</DataSetName>
|
||||
<Left>0cm</Left>
|
||||
<Height>0.90896cm</Height>
|
||||
<Width>19.90464cm</Width>
|
||||
<Style>
|
||||
@@ -900,7 +899,6 @@
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox13</rd:DefaultName>
|
||||
<Top>0cm</Top>
|
||||
<Left>17.43784cm</Left>
|
||||
<Height>2.14051cm</Height>
|
||||
<Width>2.33715cm</Width>
|
||||
@@ -943,7 +941,6 @@
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Parametros</rd:DefaultName>
|
||||
<Top>2.16641cm</Top>
|
||||
<Left>0cm</Left>
|
||||
<Height>0.6cm</Height>
|
||||
<Width>19.77499cm</Width>
|
||||
<ZIndex>3</ZIndex>
|
||||
@@ -961,8 +958,6 @@
|
||||
<Source>Embedded</Source>
|
||||
<Value>ID2</Value>
|
||||
<Sizing>FitProportional</Sizing>
|
||||
<Top>0cm</Top>
|
||||
<Left>0cm</Left>
|
||||
<Height>2.413cm</Height>
|
||||
<Width>2.75323cm</Width>
|
||||
<ZIndex>4</ZIndex>
|
||||
@@ -1123,10 +1118,10 @@
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>=Parameters!FechaImpresion.Value</Value>
|
||||
<Value>=Now()</Value>
|
||||
<Style>
|
||||
<FontSize>9pt</FontSize>
|
||||
<Format>D</Format>
|
||||
<Format>dd/MM/yyyy HH:mm:ss tt</Format>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
|
||||
@@ -130,7 +130,7 @@
|
||||
</div>
|
||||
|
||||
<div class="col-md-2">
|
||||
<b>Centro de Costo:</b>
|
||||
<asp:Label ID="LblSubProyecto" runat="server">Sub Proyecto</asp:Label>:
|
||||
</div>
|
||||
<div class="col-md-3" style="margin-top: 5px;text-align:left">
|
||||
<asp:DropDownList ID="DdlSubProyecto" AppendDataBoundItems="true" AutoPostBack="true" CssClass="form-control input-sm select2me" runat="server" DataTextField="SubProyecto" DataValueField="CveSubProyecto" Width="100%" Height="30px">
|
||||
@@ -140,9 +140,11 @@
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-2">
|
||||
<b>Descripción:</b>
|
||||
</div>
|
||||
|
||||
<div class="col-md-4">
|
||||
<asp:TextBox ID="TxtDescripcion" runat="server" MaxLength="500" Rows="3" TextMode="MultiLine" CssClass="form-control" />
|
||||
</div>
|
||||
@@ -150,6 +152,7 @@
|
||||
<div class="col-md-2">
|
||||
<b>Tipo de Orden:</b>
|
||||
</div>
|
||||
|
||||
<div class="col-md-3" style="margin-top: 5px;text-align:left">
|
||||
<asp:DropDownList ID="DdlTipoOrdenOS" CssClass="form-control input-sm select2me" runat="server" DataTextField="OrdenServicioTipo" DataValueField="CveOrdenServicioTipo" Width="100%" Height="30px">
|
||||
</asp:DropDownList>
|
||||
@@ -179,24 +182,71 @@
|
||||
|
||||
</div>
|
||||
|
||||
<div class="row" id="DVDatosAdicionalesAcum2" runat="server" visible="false">
|
||||
<div class="col-md-2" style="margin-top: 5px" >
|
||||
<div class="row" id="DVDatosAdicionalesAcum2" runat="server" visible="false">
|
||||
|
||||
<div class="col-md-2" style="margin-top: 5px">
|
||||
<b>Modelo:</b>
|
||||
</div>
|
||||
<div class="col-md-4" style="margin-top: 5px;text-align:left">
|
||||
<asp:DropDownList ID="DdlModeloAuto" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" CausesValidation="true" DataTextField="ModeloMarca" DataValueField="CveModeloAuto"> </asp:DropDownList>
|
||||
|
||||
<div class="col-md-4" style="margin-top: 5px; text-align: left">
|
||||
<asp:DropDownList ID="DdlModeloAuto" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" CausesValidation="true" DataTextField="ModeloMarca" DataValueField="CveModeloAuto"></asp:DropDownList>
|
||||
</div>
|
||||
|
||||
<div class="col-md-2" style="margin-top: 5px" >
|
||||
<div class="col-md-2" style="margin-top: 5px">
|
||||
<b>Año:</b>
|
||||
</div>
|
||||
<div class="col-md-4" style="margin-top: 5px" >
|
||||
|
||||
<div class="col-md-4" style="margin-top: 5px">
|
||||
<asp:TextBox ID="TxtAnio" CssClass="form-control" runat="server" MaxLength="4"></asp:TextBox>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="row" id="DVAgenteProcedimiento" runat="server" visible="false">
|
||||
|
||||
<div class="col-md-2" style="margin-top: 5px">
|
||||
<b>Agente:</b>
|
||||
</div>
|
||||
|
||||
<div class="col-md-4" style="margin-top: 5px; text-align: left">
|
||||
<asp:DropDownList ID="DdlMedico" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" CausesValidation="true" DataTextField="Medico" DataValueField="CveMedico">
|
||||
<asp:ListItem Value="-1">Seleccione uno</asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
|
||||
<div class="col-md-2" style="margin-top: 5px">
|
||||
<b>Procedimiento:</b>
|
||||
</div>
|
||||
|
||||
<div class="col-md-3" style="margin-top: 5px; text-align: left">
|
||||
<asp:DropDownList ID="DdlProcedimiento" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" CausesValidation="true" DataTextField="Procedimiento" DataValueField="CveProcedimiento">
|
||||
<asp:ListItem Value="-1">Seleccione uno</asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="row" id="DVTipoVenta" runat="server" visible="false">
|
||||
|
||||
<div class="col-md-2" style="margin-top: 5px">
|
||||
<b>Tipo de Venta:</b>
|
||||
</div>
|
||||
|
||||
<div class="col-md-4" style="margin-top: 5px; text-align: left">
|
||||
<asp:DropDownList ID="DdlTipoVenta" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" CausesValidation="true" DataTextField="TipoVenta" DataValueField="CveTipoVenta">
|
||||
<asp:ListItem Value="-1">Seleccione uno</asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
|
||||
<div class="col-md-6" style="margin-top: 5px">
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
|
||||
@@ -273,6 +273,7 @@ Partial Class OS_OrdenesServicios
|
||||
End Property
|
||||
#End Region
|
||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||
|
||||
If Not IsPostBack Then
|
||||
'DATOS CLIENTE
|
||||
CveCliente = 0
|
||||
@@ -303,6 +304,10 @@ Partial Class OS_OrdenesServicios
|
||||
CreaDTPS()
|
||||
CreaDtMaterialesDetalle()
|
||||
CreaDtSolicitarMateriales()
|
||||
CargaAgentes()
|
||||
CargaProcedimientos()
|
||||
CargaTiposVenta()
|
||||
|
||||
CveSub = -1
|
||||
|
||||
'Carga cliente
|
||||
@@ -399,12 +404,11 @@ Partial Class OS_OrdenesServicios
|
||||
DdlPsModalFinalizar.setEsWebService(UsuarioActual.Empresa.Funcionalidad(105) = "1")
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(105) = "1" Then
|
||||
'DdlPS.ddlWS.Attributes.Add("data-cveclasificacion", DdlClasificacion.SelectedValue)
|
||||
DdlPsModalFinalizar.SelectedText = ""
|
||||
DdlPsModalFinalizar.SelectedValue = "-1"
|
||||
Else
|
||||
DdlPS.ddl.Items.Clear()
|
||||
'DdlPS.ddl.DataSource = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa, CveClasificacion:=DdlClasificacion.SelectedValue.ToEntero)
|
||||
|
||||
DdlPsModalFinalizar.ddl.DataSource = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa)
|
||||
DdlPsModalFinalizar.ddl.DataBind()
|
||||
DdlPsModalFinalizar.ddl.Items.Insert(0, New ListItem("Seleccione el Producto", "-1"))
|
||||
@@ -414,10 +418,31 @@ Partial Class OS_OrdenesServicios
|
||||
|
||||
End If
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(590).ToEntero = 1 Then
|
||||
DVAgenteProcedimiento.Visible = True
|
||||
DVTipoVenta.Visible = True
|
||||
DVTipoVenta.Visible = True
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub CargaTiposVenta()
|
||||
DdlTipoVenta.DataSource = GlobalDTTipoVenta().FiltraParametros("Estatus = 'True' ")
|
||||
DdlTipoVenta.DataBind()
|
||||
End Sub
|
||||
|
||||
Private Sub CargaProcedimientos()
|
||||
DdlMedico.DataSource = GlobalDTMedicos(UsuarioActual.CveEmpresa).FiltraParametros("Estatus = 'True' ")
|
||||
DdlMedico.DataBind()
|
||||
End Sub
|
||||
|
||||
Private Sub CargaAgentes()
|
||||
DdlProcedimiento.DataSource = GlobalDTProcedimientos(UsuarioActual.CveEmpresa).FiltraParametros("Estatus = 'True' ")
|
||||
DdlProcedimiento.DataBind()
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
#Region "DDL'S "
|
||||
@@ -450,13 +475,50 @@ Partial Class OS_OrdenesServicios
|
||||
TmpDT.AcceptChanges()
|
||||
End Sub
|
||||
Protected Sub DdlEstatusOS_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlEstatusOS.SelectedIndexChanged
|
||||
Dim tipoDeEstatusSeleccionado As String = EstatusOSDelUsuario.FiltroPrimero(String.Format("CveEstatusOrdenServicio = {0}", DdlEstatusOS.SelectedValue)).Item("TipoEstatusTexto").ToString
|
||||
|
||||
Select Case tipoDeEstatusSeleccionado
|
||||
Case "Inicial"
|
||||
'Dim tipoDeEstatusSeleccionado As String = EstatusOSDelUsuario.FiltroPrimero(String.Format("CveEstatusOrdenServicio = {0}", DdlEstatusOS.SelectedValue)).Item("TipoEstatusTexto").ToString
|
||||
|
||||
|
||||
|
||||
'Select Case tipoDeEstatusSeleccionado
|
||||
' Case "Inicial"
|
||||
' 'Proceso
|
||||
|
||||
' Case "Terminado"
|
||||
' 'Terminada
|
||||
' 'Checar que todos los detalles esten terminados para poder cambiar a terminada
|
||||
' If TmpDT.COUNT("Estatus", "Estatus = 'False'").ToEntero > 0 Then
|
||||
' Alert("No se puede cambiar a Terminada, aún tiene Detalles de Orden de Servicio por Atender", TipoMensaje.MsgAdvertencia)
|
||||
|
||||
' 'Regresar a estatus Atendiendo
|
||||
' 'DdlEstatusOS.SelectedValue = "2"
|
||||
' End If
|
||||
' ' Case 4
|
||||
' ' 'Cancelada
|
||||
' ' Case 5
|
||||
' ' 'Entregada
|
||||
' ' Guardar(True)
|
||||
' Case "Cancelada"
|
||||
' Dim CanceladoOrdenMinimo As String = EstatusOSDelUsuario.FiltroPrimeroValor("CveEstatusOrdenServicio", "TipoEstatus = 5", "Orden ASC").ToString
|
||||
' DdlEstatusOS.SelectedValue = CanceladoOrdenMinimo
|
||||
|
||||
' 'DdlEstatusOS.SelectedIndex = CanceladoOrdenMinimo
|
||||
'End Select
|
||||
|
||||
''CargaEstatusOS(DdlEstatusOS.SelectedValue.ToEntero)
|
||||
'PermisosSegunEstatus()
|
||||
|
||||
'GvPS.DataSource = TmpDT
|
||||
'GvPS.DataBind()
|
||||
|
||||
|
||||
|
||||
Dim tmpTipoEstatus As Integer = GlobalDTEstatusOrdenServicios(UsuarioActual.CveEmpresa).FiltroPrimeroValor("TipoEstatus", $" CveEstatusOrdenServicio = {DdlEstatusOS.SelectedValue}").ToEntero
|
||||
Select Case tmpTipoEstatus
|
||||
Case 1, 2, 3
|
||||
'Proceso
|
||||
|
||||
Case "Terminado"
|
||||
Case 4
|
||||
'Terminada
|
||||
'Checar que todos los detalles esten terminados para poder cambiar a terminada
|
||||
If TmpDT.COUNT("Estatus", "Estatus = 'False'").ToEntero > 0 Then
|
||||
@@ -470,35 +532,34 @@ Partial Class OS_OrdenesServicios
|
||||
' Case 5
|
||||
' 'Entregada
|
||||
' Guardar(True)
|
||||
Case "Cancelada"
|
||||
Case 5
|
||||
Dim CanceladoOrdenMinimo As String = EstatusOSDelUsuario.FiltroPrimeroValor("CveEstatusOrdenServicio", "TipoEstatus = 5", "Orden ASC").ToString
|
||||
DdlEstatusOS.SelectedValue = CanceladoOrdenMinimo
|
||||
|
||||
'DdlEstatusOS.SelectedIndex = CanceladoOrdenMinimo
|
||||
End Select
|
||||
|
||||
''CargaEstatusOS(DdlEstatusOS.SelectedValue.ToEntero)
|
||||
'PermisosSegunEstatus()
|
||||
|
||||
'GvPS.DataSource = TmpDT
|
||||
'GvPS.DataBind()
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
#Region "C A R G A S"
|
||||
Private Sub CargaSubProyecto(Optional CveSubProyecto As Integer = -1)
|
||||
Dim ObjOS As New ClsOS
|
||||
If ObjOS.GetSubProyectosEstatusInicial(UsuarioActual.CveUsuario, 1, UsuarioActual.CveEmpresa) Then
|
||||
DdlSubProyecto.Items.Clear()
|
||||
DdlSubProyecto.SelectedValue = Nothing
|
||||
DdlSubProyecto.DataSource = ObjOS.DtResultados.FiltraParametros("", "", {"CveSubProyecto", "SubProyecto"})
|
||||
|
||||
If CveSubProyecto > 0 Then DdlSubProyecto.SelectedValueExist(CveSubProyecto)
|
||||
DdlEstatusOS.DataSource = ObjOS.DtResultados.FiltraParametros(String.Format("CveSubProyecto = {0}", CveSubProyecto), "", {"CveEstatusOrdenServicio", "EstatusOrdenServicio"})
|
||||
End If
|
||||
ObjOS.Dispose()
|
||||
DdlSubProyecto.DataBind()
|
||||
DdlEstatusOS.DataBind()
|
||||
'Dim ObjOS As New ClsOS
|
||||
'If ObjOS.GetSubProyectosEstatusInicial(UsuarioActual.CveUsuario, 1, UsuarioActual.CveEmpresa) Then
|
||||
' DdlSubProyecto.Items.Clear()
|
||||
' DdlSubProyecto.SelectedValue = Nothing
|
||||
' DdlSubProyecto.DataSource = ObjOS.DtResultados.FiltraParametros("", "", {"CveSubProyecto", "SubProyecto"})
|
||||
|
||||
' If CveSubProyecto > 0 Then DdlSubProyecto.SelectedValueExist(CveSubProyecto)
|
||||
' DdlEstatusOS.DataSource = ObjOS.DtResultados.FiltraParametros(String.Format("CveSubProyecto = {0}", CveSubProyecto), "", {"CveEstatusOrdenServicio", "EstatusOrdenServicio"})
|
||||
'End If
|
||||
'ObjOS.Dispose()
|
||||
'DdlSubProyecto.DataBind()
|
||||
'DdlEstatusOS.DataBind()
|
||||
|
||||
CargarCentrosDeCosto(Nothing, DdlSubProyecto, Nothing, LblSubProyecto, AplicaTodos:="Seleccione Uno")
|
||||
|
||||
End Sub
|
||||
Private Sub CargaTiposOrden()
|
||||
Dim ObjOS As New ClsOS
|
||||
@@ -529,7 +590,7 @@ Partial Class OS_OrdenesServicios
|
||||
TxtSolicito.Text = ObjOS.PersonaSolicito
|
||||
CveOsDetalle = ObjOS.CveOSDetalle
|
||||
|
||||
TxtFechaRecibido.Text = ObjOS.FechaRecepcion.ToString
|
||||
TxtFechaRecibido.Text = ObjOS.FechaRecepcion.ToString("dd/MM/yyyy")
|
||||
CveFolio = ObjOS.Folio
|
||||
LblFolio.Text = ObjOS.Folio.ToString
|
||||
|
||||
@@ -542,16 +603,19 @@ Partial Class OS_OrdenesServicios
|
||||
TipoEstatus = GlobalDTEstatusOrdenServicios(UsuarioActual.CveEmpresa).FiltroPrimeroValor("TipoEstatus", String.Format("CveEstatusOrdenServicio = {0}", ObjOS.CveEstatusOrdenServicio), "CveEstatusOrdenServicio ASC").ToEntero
|
||||
SeFacturara = GlobalDTTipoOrdenServicios(UsuarioActual.CveEmpresa).FiltroPrimeroValor("SeFacturara", String.Format("CveOrdenServicioTipo = {0}", ObjOS.CveOSTipo))
|
||||
CveTecnico = ObjOS.CveUsuarioAtendio
|
||||
CargarEstatusDelUsuario()
|
||||
Dim validacionTieneEstatus As Integer = EstatusOSDelUsuario.FiltraParametros(String.Format("CveEstatusOrdenServicio = {0}", ObjOS.CveEstatusOrdenServicio)).Rows.Count
|
||||
If validacionTieneEstatus > 0 Then
|
||||
DdlEstatusOS.Items.Clear()
|
||||
DdlEstatusOS.DataSource = EstatusOSDelUsuario
|
||||
DdlEstatusOS.DataBind()
|
||||
Else
|
||||
CargaEstatusOS()
|
||||
DdlEstatusOS.Enabled = False
|
||||
End If
|
||||
CargarEstatusDelUsuario(TipoEstatus)
|
||||
|
||||
'Dim validacionTieneEstatus As Integer = EstatusOSDelUsuario.FiltraParametros(String.Format("CveEstatusOrdenServicio = {0}", ObjOS.CveEstatusOrdenServicio)).Rows.Count
|
||||
|
||||
'If validacionTieneEstatus > 0 Then
|
||||
' DdlEstatusOS.Items.Clear()
|
||||
' DdlEstatusOS.DataSource = EstatusOSDelUsuario
|
||||
' DdlEstatusOS.DataBind()
|
||||
'Else
|
||||
CargaEstatusOS()
|
||||
'DdlEstatusOS.Enabled = False
|
||||
'End If
|
||||
|
||||
DdlEstatusOS.SelectedValue = ObjOS.CveEstatusOrdenServicio.ToString
|
||||
|
||||
'If TipoEstatus = 2 Then
|
||||
@@ -594,6 +658,11 @@ Partial Class OS_OrdenesServicios
|
||||
DdlModeloAuto.SelectedValueExist(ObjOS.CveModeloAuto)
|
||||
TxtAnio.Text = ObjOS.Año
|
||||
|
||||
|
||||
DdlMedico.SelectedValueExist(ObjOS.CveMedico)
|
||||
DdlProcedimiento.SelectedValueExist(ObjOS.CveProcedimiento)
|
||||
DdlTipoVenta.SelectedValueExist(ObjOS.CveTipoVenta)
|
||||
|
||||
CargaEventoBitacora()
|
||||
CargaHistorial()
|
||||
Else
|
||||
@@ -1016,17 +1085,53 @@ Partial Class OS_OrdenesServicios
|
||||
GvPS.DataBind()
|
||||
End Sub
|
||||
|
||||
Private Sub CargarEstatusDelUsuario()
|
||||
Dim ObjEstatusPermisos As New ClsOS
|
||||
If ObjEstatusPermisos.GetEstatusUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveSubProyecto:=DdlSubProyecto.SelectedValue.ToEntero) Then
|
||||
EstatusOSDelUsuario = ObjEstatusPermisos.DtResultados
|
||||
Dim PermisoEstatus As New DataTable
|
||||
PermisoEstatus = ObjEstatusPermisos.DtResultados.FiltraParametros("TipoEstatus = 1")
|
||||
If PermisoEstatus.Rows.Count = 0 Then
|
||||
UpGuardar.Visible = False
|
||||
End If
|
||||
Private Sub CargarEstatusDelUsuario(tipoEstatus As Integer)
|
||||
|
||||
'Dim ObjEstatusPermisos As New ClsOS
|
||||
|
||||
'If ObjEstatusPermisos.GetEstatusUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveSubProyecto:=DdlSubProyecto.SelectedValue.ToEntero) Then
|
||||
' EstatusOSDelUsuario = ObjEstatusPermisos.DtResultados
|
||||
' Dim PermisoEstatus As New DataTable
|
||||
' PermisoEstatus = ObjEstatusPermisos.DtResultados.FiltraParametros("TipoEstatus = 1")
|
||||
' If PermisoEstatus.Rows.Count = 0 Then
|
||||
' UpGuardar.Visible = False
|
||||
' End If
|
||||
'End If
|
||||
|
||||
'ObjEstatusPermisos.Dispose()
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
'OS Estatus Inicial
|
||||
If tipoEstatus = 1 And UsuarioActual.TienePermisoProceso(366) Then
|
||||
Exit Sub
|
||||
End If
|
||||
ObjEstatusPermisos.Dispose()
|
||||
|
||||
'OS Estatus Asignación
|
||||
If tipoEstatus = 2 And UsuarioActual.TienePermisoProceso(367) Then
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
'OS Estatus Proceso
|
||||
If tipoEstatus = 3 And UsuarioActual.TienePermisoProceso(368) Then
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
'OS Estatus Terminado
|
||||
If tipoEstatus = 4 And UsuarioActual.TienePermisoProceso(369) Then
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
'OS Estatus Cancelada
|
||||
If tipoEstatus = 5 And UsuarioActual.TienePermisoProceso(370) Then
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
UpGuardar.Visible = False
|
||||
|
||||
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
@@ -1106,7 +1211,8 @@ Partial Class OS_OrdenesServicios
|
||||
Dim bandera As Integer = DdlEstatusOS.SelectedValue.ToEntero
|
||||
If Not ObjOrdenServicio.AddOrdenesServicios(CveCliente, DdlSubProyecto.SelectedValue.ToEntero, TxtSolicito.Text, TxtFechaRecibido.Text.ToDateTime, TxtDescripcion.Text, UsuarioActual.CveUsuario, EstatusOrdenServicio,
|
||||
UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveCotizacion, -1, -1, DdlTipoOrdenOS.SelectedValue.ToEntero, CveClienteSucursal:=DdlSucursalCliente.SelectedValue.ToEntero,
|
||||
Direccion:=TxtDireccion.Text, Telefono:=TxtTelefono.Text, CveModeloAuto:=DdlModeloAuto.SelectedValue.ToEntero, Año:=TxtAnio.Text) Then
|
||||
Direccion:=TxtDireccion.Text, Telefono:=TxtTelefono.Text, CveModeloAuto:=DdlModeloAuto.SelectedValue.ToEntero, Año:=TxtAnio.Text, CveMedico:=DdlMedico.SelectedValue.ToEntero,
|
||||
CveProcedimiento:=DdlProcedimiento.SelectedValue.ToEntero, CveTipoVenta:=DdlTipoVenta.SelectedValue.ToEntero) Then
|
||||
Errores = True
|
||||
End If
|
||||
CargaCliente(CveCliente)
|
||||
@@ -1205,7 +1311,8 @@ Partial Class OS_OrdenesServicios
|
||||
If CveTecnico = UsuarioActual.CveUsuario Then
|
||||
If ObjOrdenServicio.UpdateOrdenesServicios(TxtSolicito.Text, TxtFechaRecibido.Text, TxtDescripcion.Text, UsuarioActual.CveUsuario, DdlEstatusOS.SelectedValue.ToEntero, CveOS, UsuarioActual.CveUsuario,
|
||||
DdlTipoOrdenOS.SelectedValue.ToEntero, CveClienteSucursal:=DdlSucursalCliente.SelectedValue.ToEntero, Direccion:=TxtDireccion.Text, Telefono:=TxtTelefono.Text,
|
||||
CveModeloAuto:=DdlModeloAuto.SelectedValue.ToEntero, Año:=TxtAnio.Text) Then
|
||||
CveModeloAuto:=DdlModeloAuto.SelectedValue.ToEntero, Año:=TxtAnio.Text, CveMedico:=DdlMedico.SelectedValue.ToEntero,
|
||||
CveProcedimiento:=DdlProcedimiento.SelectedValue.ToEntero, CveTipoVenta:=DdlTipoVenta.SelectedValue.ToEntero) Then
|
||||
For Each Row As DataRow In TmpDT.Rows
|
||||
If Not Errores Then
|
||||
Dim CvePS As Integer = Row("CvePS").ToString.ToEntero
|
||||
|
||||
@@ -112,7 +112,7 @@
|
||||
<div class="row">
|
||||
<label class="col-md-1">Cliente: </label>
|
||||
<div class="col-md-2">
|
||||
<ADS:Dropdownlost CssClassDdl="select2me" ID="DdlClientes" Width="100%" data-metodo="getcliente" runat="server" DataTextField="NombreComercial" DataValueField="CveCliente" CssStyle="width: 100%;"></ADS:Dropdownlost>
|
||||
<ADS:Dropdownlost CssClassDdl="select2me" ID="DdlClientes" Width="100%" data-metodo="getcliente" runat="server" DataTextField="NombreComercial" DataValueField="CveCliente" CssStyle="width: 100%;"></ADS:Dropdownlost>
|
||||
</div>
|
||||
|
||||
<label class="col-md-1 ">Centro de Costo:</label>
|
||||
@@ -279,14 +279,14 @@
|
||||
<asp:Literal ID="LtlFechaRecepcion" runat="server" Text='<%# Eval("FechaRecepcion", "{0:d}")%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Left">
|
||||
<%-- <asp:TemplateField ItemStyle-HorizontalAlign="Left">
|
||||
<HeaderTemplate>
|
||||
Estatus
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlEstatusOrdenServicio" runat="server" Text='<%# Eval("EstatusOrdenServicio")%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</asp:TemplateField>--%>
|
||||
|
||||
<asp:TemplateField Visible="false" ItemStyle-HorizontalAlign="Center">
|
||||
<HeaderTemplate>Fecha Cita</HeaderTemplate>
|
||||
|
||||
@@ -71,8 +71,9 @@ Partial Class OS_RepOrdenesServicios
|
||||
|
||||
End If
|
||||
|
||||
Dim CveCliente As Integer = If(DdlClientes.SelectedValue.ToEntero <= 0, -1, DdlClientes.SelectedValue.ToEntero)
|
||||
|
||||
If ObjOrdenesServicios.GetRepOrdenesServicio(FechaI, FechaF, FechaTerminado, DdlClientes.SelectedValue.ToEntero, DdlSubProyecto.SelectedValue.ToEntero, DdlUsuarioRecibio.SelectedValue.ToEntero,
|
||||
If ObjOrdenesServicios.GetRepOrdenesServicio(FechaI, FechaF, FechaTerminado, CveCliente, DdlSubProyecto.SelectedValue.ToEntero, DdlUsuarioRecibio.SelectedValue.ToEntero,
|
||||
DdlTecnico.SelectedValue.ToEntero, DdlEstatusOS.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, Opcion:=Opcion, CveUsuarioAsignado:=CveUsuarioAsignado) Then
|
||||
Dim Filtro As String = ""
|
||||
Select Case DdlFacturado.SelectedValue
|
||||
|
||||
@@ -1249,7 +1249,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-7">
|
||||
<div class="portlet light xspadding bordered ">
|
||||
<div class="portlet light xspadding bordered" style="display:none!important">
|
||||
<div class="portlet-title">
|
||||
<div class="caption font-green">
|
||||
<i class="icon-pin font-green"></i>
|
||||
|
||||
@@ -1,398 +0,0 @@
|
||||
<%@ Page Title="Vendedores de Producto o Servicios" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="CatAgentes.aspx.vb" Inherits="Ventas_CatAgentes" %>
|
||||
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
||||
<link href="/Metronic/assets/global/plugins/datatables/plugins/bootstrap/dataTables.bootstrap.css" rel="stylesheet" />
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
||||
<style>
|
||||
body {
|
||||
font-size: 11px;
|
||||
}
|
||||
</style>
|
||||
|
||||
<style>
|
||||
.Widthall {
|
||||
width: 100% !important;
|
||||
}
|
||||
|
||||
.dataTables_scrollHeadInner {
|
||||
width: 100% !important;
|
||||
background-color: #dddddd;
|
||||
padding-left: 0px !important;
|
||||
}
|
||||
|
||||
.dataTables_scrollFoot {
|
||||
display: none;
|
||||
position: static;
|
||||
}
|
||||
|
||||
.table-scrollable {
|
||||
margin: 0px !important;
|
||||
}
|
||||
|
||||
.dataTables_scroll {
|
||||
margin-bottom: 0px;
|
||||
}
|
||||
|
||||
.table.dataTable {
|
||||
margin-top: 0px !important;
|
||||
}
|
||||
|
||||
.dataTables_scrollBody table th {
|
||||
padding: 0px !important;
|
||||
padding-right: 4px !important;
|
||||
padding-left: 4px !important;
|
||||
}
|
||||
|
||||
.sinlink td a {
|
||||
pointer-events: none;
|
||||
cursor: default;
|
||||
color: black;
|
||||
font-size: small;
|
||||
}
|
||||
|
||||
.white a {
|
||||
color: white !important;
|
||||
}
|
||||
</style>
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="HB" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="E" runat="Server">
|
||||
Catálogo de Vendedores
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
|
||||
<asp:UpdatePanel runat="server" ID="UpAgregar">
|
||||
<ContentTemplate>
|
||||
<li>
|
||||
<asp:LinkButton runat="server" ID="BtnAgregarModal" OnClick="BtnAgregarSucursalModal_Click" data-toggle="tooltip" data-placement="left" title="Agregar un Vendedor." Text="<i class='fa fa-plus'></i> Agregar Vendedor"></asp:LinkButton>
|
||||
</li>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
|
||||
<div class="row" style="margin-left: 0px; margin-top: 5px; margin-bottom: 5px; text-align: right; margin-right: 5px;" align="left">
|
||||
<input type="text" id="TxtBusqueda" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GVDatos.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
|
||||
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvDatos.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
||||
</div>
|
||||
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" data-sort="12" DataKeyNames="CveVendedor, CveEsquemaComision, Codigo, Telefono, Celular, Vendedor, Correo, Estatus, CveSuperior, VendedorTipo, TituloDocumentos,CveSubProyecto" EmptyDataText="No se encontraron Vendedores Registrados" ToolTip="Listado de Vendedores" CssClass="table table-striped table-advance table-hover Widthall ScrollAD" GridLines="None">
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderText="Sucursal">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlSubProyecto" runat="server" Text='<%# Eval("SubProyecto") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<%--<EditItemTemplate>
|
||||
<asp:DropDownList ID="DdlSubProyecto" CssClass="form-control input-small select2me" runat="server" DataValueField="CveSubProyecto" DataTextField="Sucursal" Class="table-group-action-input form-control input-inline input-small input-sm" Style="width: 110px !important;"></asp:DropDownList>
|
||||
</EditItemTemplate>--%>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Código">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlCodigo" runat="server" Text='<%# Eval("Codigo")%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<EditItemTemplate>
|
||||
<asp:TextBox ID="TxtCodigo" CssClass="form-control tt-input" runat="server" CausesValidation="true" MaxLength="30" Text='<%# Eval("Codigo") %>' ValidationGroup="GrpGV" Width="50px"></asp:TextBox>
|
||||
</EditItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="Vendedor">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlVendedor" runat="server" Text='<%# Eval("Vendedor", "{0}")%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<EditItemTemplate>
|
||||
<asp:TextBox ID="TxtVendedor" CssClass="form-control tt-input" runat="server" CausesValidation="true" MaxLength="50" Text='<%# Eval("Vendedor") %>' ValidationGroup="GrpGV" Width="110px"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVVendedor" runat="server" ControlToValidate="TxtVendedor" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Vendedor''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGV"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCVendedor" runat="server" HighlightCssClass="vco" TargetControlID="RFVVendedor" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</EditItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="Correo">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlCorreo" runat="server" Text='<%# Eval("Correo", "{0}")%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="Teléfono">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlTelefono" runat="server" Text='<%# Eval("Telefono", "{0}")%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<EditItemTemplate>
|
||||
|
||||
<asp:TextBox ID="txtTelefono" CssClass="form-control tt-input" runat="server" CausesValidation="true" MaxLength="50" Text='<%# Eval("Telefono") %>' ValidationGroup="GrpGV" Width="90px"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVTelefono" runat="server" ControlToValidate="TxtTelefono" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Telefono''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGV"></asp:RequiredFieldValidator>
|
||||
|
||||
<ajax:ValidatorCalloutExtender ID="VCTelefono" runat="server" HighlightCssClass="vco" TargetControlID="RFVTelefono" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
|
||||
</EditItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="TituloDocumentos">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlTituloDocumentos" runat="server" Text='<%# Eval("TituloDocumentos", "{0}")%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<EditItemTemplate>
|
||||
<asp:TextBox ID="TxtTituloDocumentos" CssClass="form-control tt-input" runat="server" CausesValidation="true" MaxLength="150" Text='<%# Eval("TituloDocumentos") %>' ValidationGroup="GrpGV" Width="110px"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVTituloDocumentos" runat="server" ControlToValidate="TxtTituloDocumentos" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Titulo de Documentos''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGV"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCVTitiloDocumentos" runat="server" HighlightCssClass="vco" TargetControlID="RFVTituloDocumentos" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</EditItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="Celular">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlCelular" runat="server" Text='<%# Eval("Celular", "{0}")%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<EditItemTemplate>
|
||||
|
||||
<asp:TextBox ID="txtCelular" CssClass="form-control tt-input" runat="server" CausesValidation="true" MaxLength="50" Text='<%# Eval("Telefono") %>' ValidationGroup="GrpGV" Width="90px"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVCel" runat="server" ControlToValidate="txtCelular" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Celular''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGV"></asp:RequiredFieldValidator>
|
||||
|
||||
<ajax:ValidatorCalloutExtender ID="VCCelular" runat="server" HighlightCssClass="vco" TargetControlID="RFVCel" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
|
||||
</EditItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
|
||||
<asp:TemplateField HeaderText="Estatus" ItemStyle-HorizontalAlign="Center">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LtlEstatus" runat="server" Text='<%# Eval("Estatus") %>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
<EditItemTemplate>
|
||||
<asp:CheckBox ID="ChkEstatus" runat="server" Checked='<%# If (Eval("Estatus").ToString = "Activo", True, False) %>' />
|
||||
</EditItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Esquema Comisión">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlEsquemaComision" runat="server" Text='<%# Eval("EsquemaComision")%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<EditItemTemplate>
|
||||
<asp:DropDownList ID="DdlEsquemaComision" runat="server" CssClass="form-control input-sm select2me" DataValueField="CveEsquemaComision" DataTextField="EsquemaComision" Class="table-group-action-input form-control input-inline input-small input-sm" Style="width: 80px !important;" AutoPostBack="true"></asp:DropDownList>
|
||||
<asp:RangeValidator ID="RVEsquemaComision" runat="server" ControlToValidate="DdlEsquemaComision" Display="None" Type="Integer" MinimumValue="1" MaximumValue="2147483647" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Sucursal''</b> es necesario, por favor seleccione uno." ValidationGroup="GrpGuardar"></asp:RangeValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCEEsquemaComision" runat="server" HighlightCssClass="vco" TargetControlID="RVEsquemaComision" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</td>
|
||||
</EditItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Fecha" ItemStyle-HorizontalAlign="Center">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlFecha" runat="server" Text='<%# Eval("FechaIng", "{0:d}") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="Usuario">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlUsuario" runat="server" Text='<%# Eval("Usuario") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="Usuario Vinculado" Visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlUsuarioVinculado" runat="server" Text='<%# Eval("UsuarioVinculado") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
|
||||
<asp:TemplateField HeaderText="Tipo Vendedor">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlTipoVendedor" runat="server" Text='<%# Eval("TituloTipoVendedor", "{0}")%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
|
||||
<asp:TemplateField HeaderText="Superior">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlSupervisor" runat="server" Text='<%# Eval("NombreSuperior", "{0}")%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<EditItemTemplate>
|
||||
<asp:DropDownList ID="DdlSupervisor" runat="server" CssClass="form-control input-sm select2me" DataValueField="CveVendedor" DataTextField="Vendedor" Class="table-group-action-input form-control input-inline input-small input-sm" Width="140px" AutoPostBack="true"></asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RFVSupervisor" runat="server" ControlToValidate="DdlSupervisor" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Supervisor''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGV"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCVSupervisor" runat="server" HighlightCssClass="vco" TargetControlID="RFVSupervisor" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</EditItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
|
||||
<%-- <asp:TemplateField HeaderText="Es Supervisor" ItemStyle-HorizontalAlign="Center">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LtlEsSupervisor" runat="server" Text='<%# Eval("EsSupervisor") %>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
<EditItemTemplate>
|
||||
<asp:CheckBox ID="ChkEsSupervisor" runat="server" Checked='<%# If(Eval("Supervisor").ToString = "SI", True, False) %>' />
|
||||
</EditItemTemplate>
|
||||
</asp:TemplateField>--%>
|
||||
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="center">
|
||||
<EditItemTemplate>
|
||||
<asp:LinkButton ID="imgU" runat="server" AlternateText="Actualizar" CausesValidation="True" CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-check'></i>" ValidationGroup="GrpGV" />
|
||||
<asp:LinkButton ID="imgC" runat="server" AlternateText="Cancelar" CausesValidation="False" CommandName="Cancel" CssClass="btn btn-circle btn-sm red" Text="<i class='fa fa-times'></i>" />
|
||||
</EditItemTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="imgE" runat="server" AlternateText="Editar" OnClick="Edit_Click" CausesValidation="False" CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-pencil'></i>" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="imgD" runat="server" AlternateText="Eliminar" CausesValidation="False" CommandName="Delete" CssClass="btn btn-circle btn-sm red" Text="<i class='icon-trash'></i>" data-toggle="confirmation" data-popout="true" data-original-title="Confirmar" data-btn-ok-label="si" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
|
||||
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
<div id="divAgregarSucursal" class="modal ADS fade" role="dialog">
|
||||
<div class="modal-dialog" style="width: 450px;">
|
||||
<asp:UpdatePanel runat="server" class="modal-content" ID="UpModal" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="modal-header ">
|
||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||
<h4 class="modal-title">
|
||||
<asp:Literal ID="LtlTituloModal" runat="server">Agregar Vendedor</asp:Literal></h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:DropDownList ID="DdlSubProyecto" runat="server" CssClass="form-control input-sm select2me" DataValueField="CveSubProyecto" DataTextField="SubProyecto" Class="table-group-action-input form-control input-inline input-small input-sm" Width="140px" AutoPostBack="true"></asp:DropDownList>
|
||||
<label for="<%= DdlSubProyecto.ClientID.ToString()%>">Sucursal:</label>
|
||||
</div>
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtCodigo" CssClass="form-control " runat="server" MaxLength="50" CausesValidation="true"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="TxtCodigo" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Código''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardarRegistro"></asp:RequiredFieldValidator>
|
||||
<label for="<%= TxtCodigo.ClientID.ToString()%>">Código:</label>
|
||||
</div>
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtVendedor" CssClass="form-control " runat="server" MaxLength="50" CausesValidation="true"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="TxtVendedor" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Vendedor''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardarRegistro"></asp:RequiredFieldValidator>
|
||||
<label for="<%= TxtVendedor.ClientID.ToString()%>">Vendedor:</label>
|
||||
</div>
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtCorreo" CssClass="form-control " runat="server" MaxLength="50" CausesValidation="true"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVCorreo2" runat="server" ControlToValidate="TxtCorreo" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Correo''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardarRegistro"></asp:RequiredFieldValidator>
|
||||
<label for="<%= TxtCorreo.ClientID.ToString()%>">Correo:</label>
|
||||
</div>
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="txtTelefono" CssClass="form-control " runat="server" MaxLength="50" CausesValidation="true"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFTelefono" runat="server" ControlToValidate="txtTelefono" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Teléfono''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardarRegistro"></asp:RequiredFieldValidator>
|
||||
<label for="<%= txtTelefono.ClientID.ToString()%>">Teléfono:</label>
|
||||
</div>
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtTituloDocumentos" CssClass="form-control " runat="server" MaxLength="150" CausesValidation="true"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVTituloDocumentos" runat="server" ControlToValidate="TxtTituloDocumentos" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Titulo de Documentos''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardarRegistro"></asp:RequiredFieldValidator>
|
||||
<label for="<%= txtTelefono.ClientID.ToString()%>">Titulo de Documentos:</label>
|
||||
</div>
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtCelular" CssClass="form-control " runat="server" MaxLength="50" CausesValidation="true"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVCel" runat="server" ControlToValidate="TxtCelular" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Celular''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardarRegistro"></asp:RequiredFieldValidator>
|
||||
<label for="<%= TxtCelular.ClientID.ToString()%>">Celular:</label>
|
||||
</div>
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:CheckBox ID="ChkEstatus" runat="server" CssClass="form-control" CausesValidation="true" Checked="true"></asp:CheckBox>
|
||||
<label for="<%= ChkEstatus.ClientID.ToString()%>">Estatus:</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-5">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:DropDownList ID="DDlPuestoVendedor" runat="server" CssClass="form-control input-sm select2me" AutoPostBack="true" Class="table-group-action-input form-control input-inline input-small input-sm" Width="140px">
|
||||
<asp:ListItem Text="Vendedor" Value="1"></asp:ListItem>
|
||||
<asp:ListItem Text="Coordinador" Value="2"></asp:ListItem>
|
||||
<asp:ListItem Text="Asistente" Value="3"></asp:ListItem>
|
||||
<asp:ListItem Text="Vendedor PV" Value="4"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
<label for="<%= DDlPuestoVendedor.ClientID.ToString()%>">Puesto:</label>
|
||||
</div>
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright" runat="server" id="DivSupervisor">
|
||||
<asp:DropDownList ID="DdlSuperior" runat="server" CssClass="form-control input-sm select2me" DataValueField="CveVendedor" DataTextField="Vendedor" Class="table-group-action-input form-control input-inline input-small input-sm" Width="140px" AutoPostBack="true"></asp:DropDownList>
|
||||
<label for="<%= DdlSuperior.ClientID.ToString()%>">Superior:</label>
|
||||
</div>
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:DropDownList ID="DdlEsquemaComision" runat="server" CssClass="form-control input-sm select2me" DataValueField="CveEsquemaComision" DataTextField="EsquemaComision" Class="table-group-action-input form-control input-inline input-small input-sm" Width="140px"></asp:DropDownList>
|
||||
<label for="<%= DdlEsquemaComision.ClientID.ToString()%>">Esquema Comisión:</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-7">
|
||||
<div class="form-group form-md-line-input input-iconright" runat="server" id="DivTraspasar">
|
||||
<asp:DropDownList ID="DdlVendedores" runat="server" CssClass="form-control input-sm select2me" DataValueField="CveVendedor" DataTextField="Vendedor" Class="table-group-action-input form-control input-inline input-small input-sm" Width="89%"></asp:DropDownList>
|
||||
<asp:LinkButton ID="BtnTraspasarClientes" runat="server" Width="10%" CssClass="btn btn-primary btn-sm" Style="margin-top:10px;" Text="<i class='fa fa-check'></i>">
|
||||
</asp:LinkButton>
|
||||
<label for="<%= DdlVendedores.ClientID.ToString()%>">Traspasar clientes de:</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="modal-footer">
|
||||
<asp:Button ID="LbAgregar" runat="server" class="btn btn-success" Text="Agregar" ValidationGroup="GrpGuardarRegistro" />
|
||||
<button id="BtnCancelarSucursal" runat="server" type="button" class="btn default" data-dismiss="modal">Cancelar</button>
|
||||
</div>
|
||||
<asp:HiddenField ID="HdnModalidad" runat="server" Value="I" ClientIDMode="Static" />
|
||||
<asp:HiddenField ID="HdnID" runat="server" Value="-1" ClientIDMode="Static" />
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
||||
|
||||
<script type="text/javascript">
|
||||
function showDivEC() {
|
||||
$('#divAgregarSucursal').modal('show');
|
||||
}
|
||||
function hideDivEC() {
|
||||
$('#divAgregarSucursal').modal('hide');
|
||||
}
|
||||
|
||||
|
||||
function ShowDivRegistro() {
|
||||
$('#divAgregarSucursal').modal();
|
||||
}
|
||||
function HideDivRegistro() {
|
||||
$('#divAgregarSucursal').modal('hide');
|
||||
}
|
||||
|
||||
function SetValue(Hidden, Value) {
|
||||
document.getElementById(Hidden).value = Value;
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<script src="/Metronic/assets/global/scripts/datatable.js"></script>
|
||||
<script src="/Metronic/assets/global/plugins/datatables/all.min.js"></script>
|
||||
<script type="text/javascript">
|
||||
|
||||
function OrdenarGV() {
|
||||
var Tam = TamañoVentana();
|
||||
var Alto = Tam.height - 270;
|
||||
if (Alto < 100) {
|
||||
Alto = 100;
|
||||
}
|
||||
$('#C_GvDatos').DataTable({
|
||||
scrollY: Alto + 'px',
|
||||
scrollCollapse: true,
|
||||
paging: false,
|
||||
searching: false,
|
||||
info: false
|
||||
});
|
||||
$('#C_GvDatos').parent().parent().children().first().css("position", "static");
|
||||
}
|
||||
</script>
|
||||
</asp:Content>
|
||||
@@ -1,253 +0,0 @@
|
||||
Option Explicit On
|
||||
Option Strict On
|
||||
|
||||
Imports System.Data
|
||||
Imports Extensiones
|
||||
|
||||
Partial Class Ventas_CatAgentes
|
||||
Inherits ClsPaginas
|
||||
|
||||
Private Property DtVendedores As DataTable
|
||||
Get
|
||||
Return CType(ViewState("DtVendedores"), DataTable)
|
||||
End Get
|
||||
Set(value As DataTable)
|
||||
ViewState("DtVendedores") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||
If Not Page.IsPostBack Then
|
||||
CargaValoresIniciales()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
#Region " CARGA VALORES INICIALES "
|
||||
Private Sub CargaValoresIniciales()
|
||||
ViewState("Orden") = ""
|
||||
CargaSubProyectos()
|
||||
CargaDatos()
|
||||
End Sub
|
||||
Public Sub CargaSubProyectos()
|
||||
DdlSubProyecto.DataSource = GlobalDTSubProyectos(-1, CveEmpresa:=UsuarioActual.CveEmpresa).FiltraParametros(String.Format("CveEmpresa = {0}", UsuarioActual.CveEmpresa))
|
||||
DdlSubProyecto.DataBind()
|
||||
DdlSubProyecto.Items.Insert(0, New ListItem("Todas", "-1"))
|
||||
End Sub
|
||||
#End Region
|
||||
Public Sub CargaDatos()
|
||||
Dim ObjVendedores As New ClsVtaVendedores
|
||||
Dim ObjComisiones As New ClsEsquemasComisiones
|
||||
If ObjVendedores.GetVendedores(UsuarioActual.CveEmpresa) Then
|
||||
GvDatos.DataSource = ObjVendedores.DtResultados '.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
|
||||
DtVendedores = ObjVendedores.DtResultados
|
||||
|
||||
DdlSuperior.Items.Clear()
|
||||
DdlSuperior.DataSource = DtVendedores.FiltraParametros("VendedorTipo = 2")
|
||||
DdlVendedores.DataSource = DtVendedores
|
||||
DdlSuperior.DataBind()
|
||||
ObjVendedores.Dispose()
|
||||
GvDatos.DataBind()
|
||||
Else
|
||||
Me.GvDatos.DataSource = Nothing
|
||||
End If
|
||||
If ObjComisiones.GetEsquemaComisiones(-1, "-1", -1, UsuarioActual.CveEmpresa) Then
|
||||
DdlEsquemaComision.DataSource = ObjComisiones.DtResultados
|
||||
Else
|
||||
Alert("Ocurrio un Error al cargar los esquemas de comisiones", TipoMensaje.MsgError)
|
||||
DdlEsquemaComision.DataSource = Nothing
|
||||
End If
|
||||
ObjComisiones.Dispose()
|
||||
DdlEsquemaComision.DataBind()
|
||||
End Sub
|
||||
|
||||
Protected Sub LbAgregar_Click(sender As Object, e As System.EventArgs) Handles LbAgregar.Click
|
||||
|
||||
Dim ObjVendedores As New ClsVtaVendedores
|
||||
Dim TieneError = False
|
||||
|
||||
If HdnModalidad.Value = "I" Then
|
||||
If ObjVendedores.AddVendedores(TxtVendedor.Text.Trim, TxtCorreo.Text.Trim, txtTelefono.Text.Trim, TxtCelular.Text.Trim, ChkEstatus.Checked,
|
||||
DDlPuestoVendedor.SelectedValue.ToEntero, DdlSuperior.SelectedValue.ToEntero, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, TxtTituloDocumentos.Text, DdlSubProyecto.SelectedValue.ToEntero, TxtCodigo.Text.Trim, DdlEsquemaComision.SelectedValue.ToEntero) Then
|
||||
Alert("El nuevo Vendedor se guardó correctamente.", TipoMensaje.MsgInformacion)
|
||||
TxtCodigo.Text = ""
|
||||
TxtVendedor.Text = ""
|
||||
TxtCorreo.Text = ""
|
||||
txtTelefono.Text = ""
|
||||
TxtCelular.Text = ""
|
||||
Else
|
||||
TieneError = True
|
||||
Alert("Error al agregar vendedor", TipoMensaje.MsgError)
|
||||
End If
|
||||
Else
|
||||
If HdnID.Value.ToEntero <> -1 Then
|
||||
If ObjVendedores.UpdateVendedor(TxtCodigo.Text, TxtVendedor.Text, TxtCorreo.Text.Trim, txtTelefono.Text, TxtCelular.Text, ChkEstatus.Checked,
|
||||
DDlPuestoVendedor.SelectedValue.ToEntero, DdlSuperior.SelectedValue.ToEntero,
|
||||
HdnID.Value.ToEntero, TxtTituloDocumentos.Text, DdlSubProyecto.SelectedValue.ToEntero, DdlEsquemaComision.SelectedValue.ToEntero) Then
|
||||
GvDatos.EditIndex = -1
|
||||
Alert("Los cambios se guardaron correctamente.", TipoMensaje.MsgInformacion)
|
||||
Else
|
||||
TieneError = True
|
||||
Alert("Error al actualizar los cambios.", TipoMensaje.MsgError)
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
ObjVendedores.Dispose()
|
||||
CargaDatos()
|
||||
CargaGlobal()
|
||||
OcultaDiv()
|
||||
UpDatos.Update()
|
||||
End Sub
|
||||
|
||||
#Region "G V D A T O S"
|
||||
Protected Sub GvDatos_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvDatos.RowDataBound
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
If Not (e.Row.RowState = DataControlRowState.Edit OrElse e.Row.RowState = 5) Then
|
||||
If e.Row.DBCampo("Estatus") = "Activo" Then
|
||||
e.Row.FCLabel("LtlEstatus").ForeColor = Drawing.Color.Green
|
||||
Else
|
||||
e.Row.FCLabel("LtlEstatus").ForeColor = Drawing.Color.Red
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Protected Sub GvDatos_RowDeleting(sender As Object, e As System.Web.UI.WebControls.GridViewDeleteEventArgs) Handles GvDatos.RowDeleting
|
||||
Dim ObjVendedores As New ClsVtaVendedores
|
||||
Dim TieneError = False
|
||||
|
||||
If ObjVendedores.RemoveVendedor(GvDatos.DataKeys(e.RowIndex).Value.ToString.ToEntero) Then
|
||||
GvDatos.EditIndex = -1
|
||||
Alert("EL Vendedor se eliminó correctamente.", TipoMensaje.MsgInformacion)
|
||||
Else
|
||||
TieneError = True
|
||||
Alert("Error al eliminar Vendedor", TipoMensaje.MsgError)
|
||||
End If
|
||||
|
||||
ObjVendedores.Dispose()
|
||||
CargaDatos()
|
||||
|
||||
If Not TieneError Then
|
||||
CargaGlobal()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
#Region "CARGA GLOBAL"
|
||||
Private Sub CargaGlobal()
|
||||
GlobalDTVendedores(UsuarioActual.CveEmpresa) = Nothing
|
||||
'Dim ObjVendedores As New ClsVtaVendedores
|
||||
'If ObjVendedores.GetVendedores(UsuarioActual.CveEmpresa) Then
|
||||
' GlobalDTVendedores(-1) = ObjVendedores.DtResultados
|
||||
'End If
|
||||
'ObjVendedores.Dispose()
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
Private Sub OcultaDiv()
|
||||
ScriptManager.RegisterStartupScript(Me, Me.GetType, "Llave", "HideDivRegistro();", True)
|
||||
End Sub
|
||||
|
||||
Public Sub BtnAgregarSucursalModal_Click(sender As Object, e As EventArgs)
|
||||
LbAgregar.Text = "Agregar"
|
||||
LtlTituloModal.Text = "Agregar Vendedor"
|
||||
DdlSubProyecto.SelectedIndex = 0
|
||||
DdlSuperior.Items.Clear()
|
||||
DdlSuperior.DataSource = DtVendedores.FiltraParametros("VendedorTipo = 2")
|
||||
DdlSuperior.DataBind()
|
||||
DivSupervisor.Visible = True
|
||||
DDlPuestoVendedor.SelectedIndex = 0
|
||||
TxtCodigo.Text = ""
|
||||
txtTelefono.Text = ""
|
||||
TxtVendedor.Text = ""
|
||||
TxtCelular.Text = ""
|
||||
TxtTituloDocumentos.Text = ""
|
||||
TxtCorreo.Text = ""
|
||||
ChkEstatus.Checked = True
|
||||
UpModal.Update()
|
||||
HdnModalidad.Value = "I"
|
||||
RegistraScript(String.Format("$('#{0}').modal();", "divAgregarSucursal"))
|
||||
End Sub
|
||||
|
||||
Public Sub Edit_Click(sender As Object, e As EventArgs)
|
||||
Dim ObjVendedores As New ClsVtaVendedores
|
||||
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
|
||||
HdnModalidad.Value = "U"
|
||||
|
||||
|
||||
HdnID.Value = GvRow.DataKey("CveVendedor")
|
||||
DdlSubProyecto.SelectedValueExist(GvRow.DataKey("CveSubProyecto"))
|
||||
DdlEsquemaComision.SelectedValueExist(GvRow.DataKey("CveEsquemaComision"))
|
||||
TxtCodigo.Text = GvRow.DataKey("Codigo")
|
||||
txtTelefono.Text = GvRow.DataKey("Telefono")
|
||||
TxtTituloDocumentos.Text = GvRow.DataKey("TituloDocumentos")
|
||||
TxtVendedor.Text = GvRow.DataKey("Vendedor")
|
||||
TxtCorreo.Text = GvRow.DataKey("Correo")
|
||||
TxtCelular.Text = GvRow.DataKey("Celular")
|
||||
ChkEstatus.Checked = If(GvRow.DataKey("Estatus") = "Activo", True, False)
|
||||
DDlPuestoVendedor.SelectedValueExist(GvRow.DataKey("VendedorTipo"))
|
||||
ValidaVendedores()
|
||||
DdlSuperior.SelectedValueExist(GvRow.DataKey("CveSuperior"))
|
||||
LbAgregar.Text = "Actualizar"
|
||||
LtlTituloModal.Text = String.Format("{0}{1}", "Actualizar Vendedor: ", TxtVendedor.Text)
|
||||
|
||||
If ObjVendedores.GetVendedores(UsuarioActual.CveEmpresa) Then
|
||||
DdlVendedores.Items.Clear()
|
||||
DdlVendedores.DataSource = DtVendedores.FiltraParametros($"CveVendedor <> {GvRow.DataKey("CveVendedor")}")
|
||||
DdlVendedores.DataBind()
|
||||
End If
|
||||
|
||||
UpModal.Update()
|
||||
RegistraScript(String.Format("$('#{0}').modal();", "divAgregarSucursal"))
|
||||
ObjVendedores.Dispose()
|
||||
End Sub
|
||||
|
||||
Private Sub DDlPuestoVendedor_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DDlPuestoVendedor.SelectedIndexChanged
|
||||
ValidaVendedores()
|
||||
End Sub
|
||||
|
||||
Private Sub ValidaVendedores()
|
||||
If DDlPuestoVendedor.SelectedValue = "1" Then
|
||||
DdlSuperior.Items.Clear()
|
||||
DdlSuperior.DataSource = DtVendedores.FiltraParametros("VendedorTipo = 2")
|
||||
DdlSuperior.DataBind()
|
||||
DivSupervisor.Visible = True
|
||||
ElseIf DDlPuestoVendedor.SelectedValue = "3" Then
|
||||
DdlSuperior.Items.Clear()
|
||||
DdlSuperior.DataSource = DtVendedores.FiltraParametros("VendedorTipo = 1")
|
||||
DdlSuperior.DataBind()
|
||||
DivSupervisor.Visible = True
|
||||
ElseIf DDlPuestoVendedor.SelectedValue = "2" Then
|
||||
DdlSuperior.Items.Clear()
|
||||
DivSupervisor.Visible = False
|
||||
End If
|
||||
UpModal.Update()
|
||||
End Sub
|
||||
|
||||
Private Sub BtnTraspasarClientes_Click(sender As Object, e As EventArgs) Handles BtnTraspasarClientes.Click
|
||||
Dim ObjVendedores As New ClsVtaVendedores
|
||||
Dim TieneError = False
|
||||
|
||||
ObjVendedores.IniciaTransacSQL()
|
||||
|
||||
If Not ObjVendedores.TraspasarClientesVendedor(HdnID.Value.ToEntero, DdlVendedores.SelectedValue.ToEntero, UsuarioActual.CveEmpresa) Then
|
||||
TieneError = True
|
||||
End If
|
||||
|
||||
If Not TieneError Then
|
||||
ObjVendedores.Commit()
|
||||
Alert("Se han traspasado los clientes al nuevo vendedor", TipoMensaje.MsgInformacion)
|
||||
Else
|
||||
ObjVendedores.RollBack()
|
||||
Alert("Ocurrió un error al traspasar los clientes al nuevo vendedor", TipoMensaje.MsgError)
|
||||
End If
|
||||
|
||||
RegistraScript(String.Format("$('#{0}').modal('hide');", "divAgregarSucursal"))
|
||||
ObjVendedores.Dispose()
|
||||
CargaDatos()
|
||||
CargaGlobal()
|
||||
UpDatos.Update()
|
||||
End Sub
|
||||
End Class
|
||||
223
Ventas/CatMedicos.aspx
Normal file
223
Ventas/CatMedicos.aspx
Normal file
@@ -0,0 +1,223 @@
|
||||
<%@ Page Title="Catálogo de Medicos" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="CatMedicos.aspx.vb" Inherits="Ventas_CatMedicos" %>
|
||||
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
||||
<link href="/Metronic/assets/global/plugins/datatables/plugins/bootstrap/dataTables.bootstrap.css" rel="stylesheet" />
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
||||
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="HB" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="E" runat="Server">
|
||||
Catálogo de Medicos
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
|
||||
<asp:UpdatePanel runat="server" ID="UpAgregar">
|
||||
<ContentTemplate>
|
||||
<li>
|
||||
<asp:LinkButton runat="server" ID="LnkAgregarMedico" OnClick="LnkAgregarMedico_Click" data-toggle="tooltip" data-placement="left" title="Agregar Medico" Text="<i class='fa fa-plus'></i> Agregar Medico"></asp:LinkButton>
|
||||
</li>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
|
||||
<div class="row" style="margin-left: 0px; margin-top: 5px; margin-bottom: 5px; text-align: right; margin-right: 5px;" align="left">
|
||||
<input type="text" id="TxtBusqueda" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvDatos.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
|
||||
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvDatos.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
||||
</div>
|
||||
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
|
||||
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False"
|
||||
DataKeyNames="CveMedico, Medico, CedulaProfesional, FechaNacimiento, Notas, DiasAtencion, Horario, Lugar, Estatus, CveUsuario, FechaIng, CveEmpresa"
|
||||
EmptyDataText="No se encontraron Medicos Registrados" ToolTip="Listado de Medicos" CssClass="table table-striped table-advance table-hover Widthall ScrollAD" GridLines="None">
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderText="Medico" ItemStyle-HorizontalAlign="Left" >
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlMedico" runat="server" Text='<%# Eval("Medico") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="Cedula Profesional" ItemStyle-HorizontalAlign="Left" >
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlCedulaProfesional" runat="server" Text='<%# Eval("CedulaProfesional") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="Fecha Nacimiento" ItemStyle-HorizontalAlign="Center">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlFechaNacimiento" runat="server" Text='<%# Eval("FechaNacimiento", "{0:d}") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="Notas" ItemStyle-HorizontalAlign="Left">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlNotas" runat="server" Text='<%# Eval("Notas") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="Dias Atención" ItemStyle-HorizontalAlign="Left">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlDiasAtencion" runat="server" Text='<%# Eval("DiasAtencion") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="Horario" ItemStyle-HorizontalAlign="Left">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlHorario" runat="server" Text='<%# Eval("Horario") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="Lugar" ItemStyle-HorizontalAlign="Left">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlLugar" runat="server" Text='<%# Eval("Lugar") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="Estatus" ItemStyle-HorizontalAlign="Center">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlEstatus" runat="server" Text='<%# Eval("EstatusStr") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
|
||||
<asp:TemplateField HeaderText="Fecha Ing." ItemStyle-HorizontalAlign="Center">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlFechaIng" runat="server" Text='<%# Eval("FechaIng", "{0:d}") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="Usuario" ItemStyle-HorizontalAlign="Center">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlUsuario" runat="server" Text='<%# Eval("Usuario") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="center" HeaderText="Opciones" ItemStyle-Width="100px">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="imgE" runat="server" AlternateText="Editar" OnClick="Edit_Click" CausesValidation="False" CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-pencil'></i>" />
|
||||
<asp:LinkButton ID="LnkEliminar" OnClick="LnkEliminar_Click" runat="server" Visible="true" AlternateText="Reasignar" CausesValidation="False" CssClass="btn btn-circle btn-sm red" Text="<i title='Reasignar' class='icon-trash' title='Eliminar' ></i>" data-toggle="confirmation" data-popout="true" data-original-title="Confirmar" data-btn-ok-label="si" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
<div id="DVAgregarMedico" class="modal ADS fade" role="dialog">
|
||||
<div class="modal-dialog" style="width: 450px;">
|
||||
<asp:UpdatePanel runat="server" class="modal-content" ID="UpModal" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="modal-header ">
|
||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||
<h4 class="modal-title">
|
||||
<asp:Literal ID="LtlTituloModal" runat="server">Agregar Vendedor</asp:Literal></h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtMedico" CssClass="form-control " runat="server" MaxLength="250" CausesValidation="true"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RfvTxtMedico" runat="server" ControlToValidate="TxtMedico" CssClass="help-block errorimput"
|
||||
ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Medico''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardarRegistro"></asp:RequiredFieldValidator>
|
||||
<label for="<%= TxtMedico.ClientID.ToString()%>">Medico:</label>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtCedulaProfecional" CssClass="form-control " runat="server" MaxLength="50" CausesValidation="true"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RfvTxtCedulaProfecional" runat="server" ControlToValidate="TxtCedulaProfecional" CssClass="help-block errorimput"
|
||||
ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cédula Profecional''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardarRegistro"></asp:RequiredFieldValidator>
|
||||
<label for="<%= TxtCedulaProfecional.ClientID.ToString()%>">Cédula Profesional:</label>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group form-md-line-input input-iconright date date-picker date date-picker" style="min-width: 135px; margin-top:-10px !important;">
|
||||
<label for="<%= TxtFechaNacimiento.ClientID.ToString()%>" style="color: #888888;">Fecha de Nacimiento: </label>
|
||||
|
||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 120px !important; padding: 0px;">
|
||||
<asp:TextBox ID="TxtFechaNacimiento" CssClass="form-control" MaxLength="20" runat="server" Width="100px" Height="28px"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="LnkFechaNacimiento" class="btn default" Text="<i class='fa fa-calendar'></i>" runat="server" ></asp:LinkButton>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<ajax:MaskedEditExtender ID="MEEFechaNacimiento" runat="server" TargetControlID="TxtFechaNacimiento" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender runat="server" ID="CalendarExtender1" TargetControlID="TxtFechaNacimiento" PopupButtonID="LnkFechaNacimiento" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
<asp:RequiredFieldValidator ID="rfvFechaNacimiento" runat="server" ControlToValidate="TxtFechaNacimiento" Display="None" ErrorMessage="El campo <b>''Fecha de Nacimiento''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="GrpGuardarRegistro"></asp:RequiredFieldValidator>
|
||||
<asp:CompareValidator ID="cvFechaNacimiento" runat="server" ControlToValidate="TxtFechaNacimiento" Display="None" ErrorMessage="El campo <b>''Fecha de Nacimiento''</b> no tienes el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="GrpGuardarRegistro"></asp:CompareValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender3" runat="server" HighlightCssClass="vco" TargetControlID="rfvFechaNacimiento" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender4" runat="server" HighlightCssClass="vco" TargetControlID="cvFechaNacimiento" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<br />
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtNotas" CssClass="form-control " runat="server" MaxLength="250" CausesValidation="true"></asp:TextBox>
|
||||
<label for="<%= TxtNotas.ClientID.ToString()%>">Notas:</label>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtDiasAtencion" CssClass="form-control " runat="server" MaxLength="250" CausesValidation="true"></asp:TextBox>
|
||||
<label for="<%= TxtDiasAtencion.ClientID.ToString()%>">Días de Atención:</label>
|
||||
</div>
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtHorario" CssClass="form-control " runat="server" MaxLength="250" CausesValidation="true"></asp:TextBox>
|
||||
<label for="<%= TxtHorario.ClientID.ToString()%>">Horario:</label>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtLugar" CssClass="form-control " runat="server" MaxLength="250" CausesValidation="true"></asp:TextBox>
|
||||
<label for="<%= TxtLugar.ClientID.ToString()%>">Lugar:</label>
|
||||
</div>
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright" id="DVEstatus" runat="server" >
|
||||
<asp:CheckBox ID="ChkEstatus" CssClass="form-control make-switchsd" data-size="small" runat="server" style="margin-top:7px" ></asp:CheckBox>
|
||||
<label for="<%= ChkEstatus.ClientID.ToString()%>">Activo:</label>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="modal-footer">
|
||||
<asp:Button ID="LbAgregar" runat="server" class="btn btn-success" Text="Agregar" ValidationGroup="GrpGuardarRegistro" />
|
||||
<button id="BtnCancelarSucursal" runat="server" type="button" class="btn default" data-dismiss="modal">Cancelar</button>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
||||
|
||||
|
||||
|
||||
</asp:Content>
|
||||
163
Ventas/CatMedicos.aspx.vb
Normal file
163
Ventas/CatMedicos.aspx.vb
Normal file
@@ -0,0 +1,163 @@
|
||||
Option Explicit On
|
||||
Option Strict On
|
||||
|
||||
Imports Extensiones
|
||||
|
||||
|
||||
Partial Class Ventas_CatMedicos
|
||||
Inherits ClsPaginas
|
||||
|
||||
Public Property CveMedico As Integer
|
||||
Get
|
||||
If ViewState("CveMedico") Is Nothing Then
|
||||
ViewState("CveMedico") = -1
|
||||
End If
|
||||
Return ViewState("CveMedico").ToString.ToEntero
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
ViewState("CveMedico") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||
If Not Page.IsPostBack Then
|
||||
CargaDatos()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
|
||||
Public Sub CargaDatos()
|
||||
|
||||
|
||||
Dim ObjVentas As New ClsVentas
|
||||
|
||||
If ObjVentas.GetMedicos(-1, UsuarioActual.CveEmpresa, -1) Then
|
||||
GvDatos.DataSource = ObjVentas.DtResultados
|
||||
Else
|
||||
GvDatos.DataSource = Nothing
|
||||
End If
|
||||
|
||||
ObjVentas.Dispose()
|
||||
|
||||
GvDatos.DataBind()
|
||||
|
||||
UpDatos.Update()
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Sub LbAgregar_Click(sender As Object, e As System.EventArgs) Handles LbAgregar.Click
|
||||
Dim ProcesoOK = False
|
||||
Dim ObjVentas As New ClsVentas
|
||||
|
||||
|
||||
If CveMedico > 0 Then
|
||||
If ObjVentas.UpdateMedico(CveMedico, TxtMedico.Text.Trim, TxtCedulaProfecional.Text.Trim, TxtFechaNacimiento.Text.ToDate, TxtNotas.Text.Trim, TxtDiasAtencion.Text.Trim, TxtHorario.Text.Trim, TxtLugar.Text.Trim, ChkEstatus.Checked, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
|
||||
ProcesoOK = True
|
||||
End If
|
||||
Else
|
||||
If ObjVentas.AddMedico(TxtMedico.Text.Trim, TxtCedulaProfecional.Text.Trim, TxtFechaNacimiento.Text.ToDate, TxtNotas.Text.Trim, TxtDiasAtencion.Text.Trim, TxtHorario.Text.Trim, TxtLugar.Text.Trim, ChkEstatus.Checked, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
|
||||
ProcesoOK = True
|
||||
End If
|
||||
End If
|
||||
|
||||
ObjVentas.Dispose()
|
||||
|
||||
If ProcesoOK Then
|
||||
Alert($"Medico {If(CveMedico > 0, "Actualizado", "Guardado")} Correctamente.")
|
||||
RegistraScript("$('#DVAgregarMedico').modal('hide');")
|
||||
CargaDatos()
|
||||
CargaGlobal()
|
||||
UpDatos.Update()
|
||||
End If
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
#Region "G V D A T O S"
|
||||
|
||||
|
||||
Protected Sub LnkEliminar_Click(sender As Object, e As EventArgs)
|
||||
|
||||
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
|
||||
|
||||
CveMedico = GvRow.DataKey("CveMedico").ToEntero
|
||||
|
||||
Dim ObjVentas As New ClsVentas
|
||||
Dim ProcesoOK = False
|
||||
|
||||
If ObjVentas.RemoveMedico(CveMedico, UsuarioActual.CveEmpresa) Then
|
||||
ProcesoOK = True
|
||||
End If
|
||||
|
||||
ObjVentas.Dispose()
|
||||
|
||||
|
||||
If ProcesoOK Then
|
||||
Alert("Medico eliminando correctamente.")
|
||||
|
||||
CargaDatos()
|
||||
CargaGlobal()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
#Region "CARGA GLOBAL"
|
||||
Private Sub CargaGlobal()
|
||||
GlobalDTMedicos(UsuarioActual.CveEmpresa) = Nothing
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
|
||||
|
||||
Public Sub LnkAgregarMedico_Click(sender As Object, e As EventArgs)
|
||||
|
||||
LbAgregar.Text = "Agregar"
|
||||
LtlTituloModal.Text = "Agregar Medico"
|
||||
|
||||
TxtMedico.Text = ""
|
||||
TxtCedulaProfecional.Text = ""
|
||||
TxtFechaNacimiento.Text = ""
|
||||
TxtNotas.Text = ""
|
||||
TxtDiasAtencion.Text = ""
|
||||
TxtHorario.Text = ""
|
||||
TxtLugar.Text = ""
|
||||
|
||||
DVEstatus.Visible = False
|
||||
ChkEstatus.Checked = True
|
||||
|
||||
UpModal.Update()
|
||||
|
||||
CveMedico = -1
|
||||
|
||||
RegistraScript("$('#DVAgregarMedico').modal();")
|
||||
End Sub
|
||||
|
||||
Public Sub Edit_Click(sender As Object, e As EventArgs)
|
||||
|
||||
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
|
||||
|
||||
CveMedico = GvRow.DataKey("CveMedico").ToEntero
|
||||
|
||||
TxtMedico.Text = GvRow.DataKey("Medico")
|
||||
TxtCedulaProfecional.Text = GvRow.DataKey("CedulaProfesional")
|
||||
TxtFechaNacimiento.Text = GvRow.DataKey("FechaNacimiento").ToDate().ToString("dd/MM/yyyy")
|
||||
TxtNotas.Text = GvRow.DataKey("Notas")
|
||||
TxtDiasAtencion.Text = GvRow.DataKey("DiasAtencion")
|
||||
TxtHorario.Text = GvRow.DataKey("Horario")
|
||||
TxtLugar.Text = GvRow.DataKey("Lugar")
|
||||
ChkEstatus.Checked = Boolean.Parse(GvRow.DataKey("Estatus"))
|
||||
|
||||
DVEstatus.Visible = True
|
||||
LbAgregar.Text = "Actualizar"
|
||||
LtlTituloModal.Text = $"Actualizar Medico {TxtCedulaProfecional.Text}"
|
||||
|
||||
UpModal.Update()
|
||||
RegistraScript("$('#DVAgregarMedico').modal();")
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
End Class
|
||||
@@ -1,73 +1,23 @@
|
||||
<%@ Page Title="Vendedores de Producto o Servicios" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="CatProcedimientos.aspx.vb" Inherits="Ventas_CatProcedimientos" %>
|
||||
<%@ Page Title="Catálogo de Procedimientos" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="CatProcedimientos.aspx.vb" Inherits="Ventas_CatProcedimientos" %>
|
||||
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
||||
<link href="/Metronic/assets/global/plugins/datatables/plugins/bootstrap/dataTables.bootstrap.css" rel="stylesheet" />
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
||||
<style>
|
||||
body {
|
||||
font-size: 11px;
|
||||
}
|
||||
</style>
|
||||
|
||||
<style>
|
||||
.Widthall {
|
||||
width: 100% !important;
|
||||
}
|
||||
|
||||
.dataTables_scrollHeadInner {
|
||||
width: 100% !important;
|
||||
background-color: #dddddd;
|
||||
padding-left: 0px !important;
|
||||
}
|
||||
|
||||
.dataTables_scrollFoot {
|
||||
display: none;
|
||||
position: static;
|
||||
}
|
||||
|
||||
.table-scrollable {
|
||||
margin: 0px !important;
|
||||
}
|
||||
|
||||
.dataTables_scroll {
|
||||
margin-bottom: 0px;
|
||||
}
|
||||
|
||||
.table.dataTable {
|
||||
margin-top: 0px !important;
|
||||
}
|
||||
|
||||
.dataTables_scrollBody table th {
|
||||
padding: 0px !important;
|
||||
padding-right: 4px !important;
|
||||
padding-left: 4px !important;
|
||||
}
|
||||
|
||||
.sinlink td a {
|
||||
pointer-events: none;
|
||||
cursor: default;
|
||||
color: black;
|
||||
font-size: small;
|
||||
}
|
||||
|
||||
.white a {
|
||||
color: white !important;
|
||||
}
|
||||
</style>
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="HB" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="E" runat="Server">
|
||||
Catálogo de Vendedores
|
||||
Catálogo de Procedimientos
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
|
||||
<asp:UpdatePanel runat="server" ID="UpAgregar">
|
||||
<ContentTemplate>
|
||||
<li>
|
||||
<asp:LinkButton runat="server" ID="BtnAgregarModal" OnClick="BtnAgregarSucursalModal_Click" data-toggle="tooltip" data-placement="left" title="Agregar un Vendedor." Text="<i class='fa fa-plus'></i> Agregar Vendedor"></asp:LinkButton>
|
||||
<asp:LinkButton runat="server" ID="LnkAgregarProcedimiento" OnClick="LnkAgregarProcedimiento_Click" data-toggle="tooltip" data-placement="left" title="Agregar Procedimiento" Text="<i class='fa fa-plus'></i> Agregar Procedimiento"></asp:LinkButton>
|
||||
</li>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
@@ -75,176 +25,66 @@
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
|
||||
<div class="row" style="margin-left: 0px; margin-top: 5px; margin-bottom: 5px; text-align: right; margin-right: 5px;" align="left">
|
||||
<input type="text" id="TxtBusqueda" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GVDatos.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
|
||||
<input type="text" id="TxtBusqueda" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvDatos.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
|
||||
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvDatos.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
||||
</div>
|
||||
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" data-sort="12" DataKeyNames="CveVendedor, CveEsquemaComision, Codigo, Telefono, Celular, Vendedor, Correo, Estatus, CveSuperior, VendedorTipo, TituloDocumentos,CveSubProyecto" EmptyDataText="No se encontraron Vendedores Registrados" ToolTip="Listado de Vendedores" CssClass="table table-striped table-advance table-hover Widthall ScrollAD" GridLines="None">
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
|
||||
<div style="max-width:800px">
|
||||
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False"
|
||||
DataKeyNames="CveProcedimiento, Procedimiento, Estatus, FechaIng, CveUsuario, CveEmpresa, Usuario, EstatusStr"
|
||||
EmptyDataText="No se encontraron Procedimientos Registrados" ToolTip="Listado de Procedimientos" CssClass="table table-striped table-advance table-hover Widthall ScrollAD" GridLines="None">
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderText="Sucursal">
|
||||
<asp:TemplateField HeaderText="Procedimiento" ItemStyle-HorizontalAlign="Left" >
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlSubProyecto" runat="server" Text='<%# Eval("SubProyecto") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<%--<EditItemTemplate>
|
||||
<asp:DropDownList ID="DdlSubProyecto" CssClass="form-control input-small select2me" runat="server" DataValueField="CveSubProyecto" DataTextField="Sucursal" Class="table-group-action-input form-control input-inline input-small input-sm" Style="width: 110px !important;"></asp:DropDownList>
|
||||
</EditItemTemplate>--%>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Código">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlCodigo" runat="server" Text='<%# Eval("Codigo")%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<EditItemTemplate>
|
||||
<asp:TextBox ID="TxtCodigo" CssClass="form-control tt-input" runat="server" CausesValidation="true" MaxLength="30" Text='<%# Eval("Codigo") %>' ValidationGroup="GrpGV" Width="50px"></asp:TextBox>
|
||||
</EditItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="Vendedor">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlVendedor" runat="server" Text='<%# Eval("Vendedor", "{0}")%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<EditItemTemplate>
|
||||
<asp:TextBox ID="TxtVendedor" CssClass="form-control tt-input" runat="server" CausesValidation="true" MaxLength="50" Text='<%# Eval("Vendedor") %>' ValidationGroup="GrpGV" Width="110px"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVVendedor" runat="server" ControlToValidate="TxtVendedor" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Vendedor''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGV"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCVendedor" runat="server" HighlightCssClass="vco" TargetControlID="RFVVendedor" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</EditItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="Correo">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlCorreo" runat="server" Text='<%# Eval("Correo", "{0}")%>'></asp:Literal>
|
||||
<asp:Literal ID="LtlProcedimiento" runat="server" Text='<%# Eval("Procedimiento") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="Teléfono">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlTelefono" runat="server" Text='<%# Eval("Telefono", "{0}")%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<EditItemTemplate>
|
||||
|
||||
<asp:TextBox ID="txtTelefono" CssClass="form-control tt-input" runat="server" CausesValidation="true" MaxLength="50" Text='<%# Eval("Telefono") %>' ValidationGroup="GrpGV" Width="90px"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVTelefono" runat="server" ControlToValidate="TxtTelefono" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Telefono''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGV"></asp:RequiredFieldValidator>
|
||||
|
||||
<ajax:ValidatorCalloutExtender ID="VCTelefono" runat="server" HighlightCssClass="vco" TargetControlID="RFVTelefono" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
|
||||
</EditItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="TituloDocumentos">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlTituloDocumentos" runat="server" Text='<%# Eval("TituloDocumentos", "{0}")%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<EditItemTemplate>
|
||||
<asp:TextBox ID="TxtTituloDocumentos" CssClass="form-control tt-input" runat="server" CausesValidation="true" MaxLength="150" Text='<%# Eval("TituloDocumentos") %>' ValidationGroup="GrpGV" Width="110px"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVTituloDocumentos" runat="server" ControlToValidate="TxtTituloDocumentos" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Titulo de Documentos''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGV"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCVTitiloDocumentos" runat="server" HighlightCssClass="vco" TargetControlID="RFVTituloDocumentos" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</EditItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="Celular">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlCelular" runat="server" Text='<%# Eval("Celular", "{0}")%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<EditItemTemplate>
|
||||
|
||||
<asp:TextBox ID="txtCelular" CssClass="form-control tt-input" runat="server" CausesValidation="true" MaxLength="50" Text='<%# Eval("Telefono") %>' ValidationGroup="GrpGV" Width="90px"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVCel" runat="server" ControlToValidate="txtCelular" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Celular''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGV"></asp:RequiredFieldValidator>
|
||||
|
||||
<ajax:ValidatorCalloutExtender ID="VCCelular" runat="server" HighlightCssClass="vco" TargetControlID="RFVCel" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
|
||||
</EditItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
|
||||
<asp:TemplateField HeaderText="Estatus" ItemStyle-HorizontalAlign="Center">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LtlEstatus" runat="server" Text='<%# Eval("Estatus") %>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
<EditItemTemplate>
|
||||
<asp:CheckBox ID="ChkEstatus" runat="server" Checked='<%# If (Eval("Estatus").ToString = "Activo", True, False) %>' />
|
||||
</EditItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Esquema Comisión">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlEsquemaComision" runat="server" Text='<%# Eval("EsquemaComision")%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<EditItemTemplate>
|
||||
<asp:DropDownList ID="DdlEsquemaComision" runat="server" CssClass="form-control input-sm select2me" DataValueField="CveEsquemaComision" DataTextField="EsquemaComision" Class="table-group-action-input form-control input-inline input-small input-sm" Style="width: 80px !important;" AutoPostBack="true"></asp:DropDownList>
|
||||
<asp:RangeValidator ID="RVEsquemaComision" runat="server" ControlToValidate="DdlEsquemaComision" Display="None" Type="Integer" MinimumValue="1" MaximumValue="2147483647" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Sucursal''</b> es necesario, por favor seleccione uno." ValidationGroup="GrpGuardar"></asp:RangeValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCEEsquemaComision" runat="server" HighlightCssClass="vco" TargetControlID="RVEsquemaComision" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</td>
|
||||
</EditItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Fecha" ItemStyle-HorizontalAlign="Center">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlFecha" runat="server" Text='<%# Eval("FechaIng", "{0:d}") %>'></asp:Literal>
|
||||
<asp:Literal ID="LtlEstatus" runat="server" Text='<%# Eval("EstatusStr") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="Usuario">
|
||||
<asp:TemplateField HeaderText="Fecha Ing." ItemStyle-HorizontalAlign="Center">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlFechaIng" runat="server" Text='<%# Eval("FechaIng", "{0:d}") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="Usuario" ItemStyle-HorizontalAlign="Center">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlUsuario" runat="server" Text='<%# Eval("Usuario") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="Usuario Vinculado" Visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlUsuarioVinculado" runat="server" Text='<%# Eval("UsuarioVinculado") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
|
||||
<asp:TemplateField HeaderText="Tipo Vendedor">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlTipoVendedor" runat="server" Text='<%# Eval("TituloTipoVendedor", "{0}")%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
|
||||
<asp:TemplateField HeaderText="Superior">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlSupervisor" runat="server" Text='<%# Eval("NombreSuperior", "{0}")%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<EditItemTemplate>
|
||||
<asp:DropDownList ID="DdlSupervisor" runat="server" CssClass="form-control input-sm select2me" DataValueField="CveVendedor" DataTextField="Vendedor" Class="table-group-action-input form-control input-inline input-small input-sm" Width="140px" AutoPostBack="true"></asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RFVSupervisor" runat="server" ControlToValidate="DdlSupervisor" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Supervisor''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGV"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCVSupervisor" runat="server" HighlightCssClass="vco" TargetControlID="RFVSupervisor" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</EditItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
|
||||
<%-- <asp:TemplateField HeaderText="Es Supervisor" ItemStyle-HorizontalAlign="Center">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LtlEsSupervisor" runat="server" Text='<%# Eval("EsSupervisor") %>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
<EditItemTemplate>
|
||||
<asp:CheckBox ID="ChkEsSupervisor" runat="server" Checked='<%# If(Eval("Supervisor").ToString = "SI", True, False) %>' />
|
||||
</EditItemTemplate>
|
||||
</asp:TemplateField>--%>
|
||||
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="center">
|
||||
<EditItemTemplate>
|
||||
<asp:LinkButton ID="imgU" runat="server" AlternateText="Actualizar" CausesValidation="True" CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-check'></i>" ValidationGroup="GrpGV" />
|
||||
<asp:LinkButton ID="imgC" runat="server" AlternateText="Cancelar" CausesValidation="False" CommandName="Cancel" CssClass="btn btn-circle btn-sm red" Text="<i class='fa fa-times'></i>" />
|
||||
</EditItemTemplate>
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="center" HeaderText="Opciones" ItemStyle-Width="100px">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="imgE" runat="server" AlternateText="Editar" OnClick="Edit_Click" CausesValidation="False" CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-pencil'></i>" />
|
||||
<asp:LinkButton ID="LnkEliminar" OnClick="LnkEliminar_Click" runat="server" Visible="true" AlternateText="Reasignar" CausesValidation="False" CssClass="btn btn-circle btn-sm red" Text="<i title='Reasignar' class='icon-trash' title='Eliminar' ></i>" data-toggle="confirmation" data-popout="true" data-original-title="Confirmar" data-btn-ok-label="si" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="imgD" runat="server" AlternateText="Eliminar" CausesValidation="False" CommandName="Delete" CssClass="btn btn-circle btn-sm red" Text="<i class='icon-trash'></i>" data-toggle="confirmation" data-popout="true" data-original-title="Confirmar" data-btn-ok-label="si" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
|
||||
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
<div id="divAgregarSucursal" class="modal ADS fade" role="dialog">
|
||||
<div id="DVAgregarProcedimiento" class="modal ADS fade" role="dialog">
|
||||
<div class="modal-dialog" style="width: 450px;">
|
||||
<asp:UpdatePanel runat="server" class="modal-content" ID="UpModal" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
@@ -256,84 +96,23 @@
|
||||
<div class="modal-body">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:DropDownList ID="DdlSubProyecto" runat="server" CssClass="form-control input-sm select2me" DataValueField="CveSubProyecto" DataTextField="SubProyecto" Class="table-group-action-input form-control input-inline input-small input-sm" Width="140px" AutoPostBack="true"></asp:DropDownList>
|
||||
<label for="<%= DdlSubProyecto.ClientID.ToString()%>">Sucursal:</label>
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtProcedimiento" CssClass="form-control " runat="server" MaxLength="50" CausesValidation="true"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RfvTxtAgente" runat="server" ControlToValidate="TxtProcedimiento" CssClass="help-block errorimput"
|
||||
ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Procedimiento''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardarRegistro"></asp:RequiredFieldValidator>
|
||||
<label for="<%= TxtProcedimiento.ClientID.ToString()%>">Procedimiento:</label>
|
||||
<i></i>
|
||||
</div>
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtCodigo" CssClass="form-control " runat="server" MaxLength="50" CausesValidation="true"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="TxtCodigo" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Código''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardarRegistro"></asp:RequiredFieldValidator>
|
||||
<label for="<%= TxtCodigo.ClientID.ToString()%>">Código:</label>
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright" id="DVEstatus" runat="server">
|
||||
<asp:CheckBox ID="ChkEstatus" CssClass="form-control make-switchsd" data-size="small" runat="server" style="margin-top:7px" ></asp:CheckBox>
|
||||
<label for="<%= ChkEstatus.ClientID.ToString()%>">Activo:</label>
|
||||
</div>
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtVendedor" CssClass="form-control " runat="server" MaxLength="50" CausesValidation="true"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="TxtVendedor" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Vendedor''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardarRegistro"></asp:RequiredFieldValidator>
|
||||
<label for="<%= TxtVendedor.ClientID.ToString()%>">Vendedor:</label>
|
||||
</div>
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtCorreo" CssClass="form-control " runat="server" MaxLength="50" CausesValidation="true"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVCorreo2" runat="server" ControlToValidate="TxtCorreo" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Correo''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardarRegistro"></asp:RequiredFieldValidator>
|
||||
<label for="<%= TxtCorreo.ClientID.ToString()%>">Correo:</label>
|
||||
</div>
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="txtTelefono" CssClass="form-control " runat="server" MaxLength="50" CausesValidation="true"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFTelefono" runat="server" ControlToValidate="txtTelefono" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Teléfono''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardarRegistro"></asp:RequiredFieldValidator>
|
||||
<label for="<%= txtTelefono.ClientID.ToString()%>">Teléfono:</label>
|
||||
</div>
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtTituloDocumentos" CssClass="form-control " runat="server" MaxLength="150" CausesValidation="true"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVTituloDocumentos" runat="server" ControlToValidate="TxtTituloDocumentos" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Titulo de Documentos''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardarRegistro"></asp:RequiredFieldValidator>
|
||||
<label for="<%= txtTelefono.ClientID.ToString()%>">Titulo de Documentos:</label>
|
||||
</div>
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtCelular" CssClass="form-control " runat="server" MaxLength="50" CausesValidation="true"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVCel" runat="server" ControlToValidate="TxtCelular" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Celular''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardarRegistro"></asp:RequiredFieldValidator>
|
||||
<label for="<%= TxtCelular.ClientID.ToString()%>">Celular:</label>
|
||||
</div>
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:CheckBox ID="ChkEstatus" runat="server" CssClass="form-control" CausesValidation="true" Checked="true"></asp:CheckBox>
|
||||
<label for="<%= ChkEstatus.ClientID.ToString()%>">Estatus:</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-5">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:DropDownList ID="DDlPuestoVendedor" runat="server" CssClass="form-control input-sm select2me" AutoPostBack="true" Class="table-group-action-input form-control input-inline input-small input-sm" Width="140px">
|
||||
<asp:ListItem Text="Vendedor" Value="1"></asp:ListItem>
|
||||
<asp:ListItem Text="Coordinador" Value="2"></asp:ListItem>
|
||||
<asp:ListItem Text="Asistente" Value="3"></asp:ListItem>
|
||||
<asp:ListItem Text="Vendedor PV" Value="4"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
<label for="<%= DDlPuestoVendedor.ClientID.ToString()%>">Puesto:</label>
|
||||
</div>
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright" runat="server" id="DivSupervisor">
|
||||
<asp:DropDownList ID="DdlSuperior" runat="server" CssClass="form-control input-sm select2me" DataValueField="CveVendedor" DataTextField="Vendedor" Class="table-group-action-input form-control input-inline input-small input-sm" Width="140px" AutoPostBack="true"></asp:DropDownList>
|
||||
<label for="<%= DdlSuperior.ClientID.ToString()%>">Superior:</label>
|
||||
</div>
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:DropDownList ID="DdlEsquemaComision" runat="server" CssClass="form-control input-sm select2me" DataValueField="CveEsquemaComision" DataTextField="EsquemaComision" Class="table-group-action-input form-control input-inline input-small input-sm" Width="140px"></asp:DropDownList>
|
||||
<label for="<%= DdlEsquemaComision.ClientID.ToString()%>">Esquema Comisión:</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-7">
|
||||
<div class="form-group form-md-line-input input-iconright" runat="server" id="DivTraspasar">
|
||||
<asp:DropDownList ID="DdlVendedores" runat="server" CssClass="form-control input-sm select2me" DataValueField="CveVendedor" DataTextField="Vendedor" Class="table-group-action-input form-control input-inline input-small input-sm" Width="89%"></asp:DropDownList>
|
||||
<asp:LinkButton ID="BtnTraspasarClientes" runat="server" Width="10%" CssClass="btn btn-primary btn-sm" Style="margin-top:10px;" Text="<i class='fa fa-check'></i>">
|
||||
</asp:LinkButton>
|
||||
<label for="<%= DdlVendedores.ClientID.ToString()%>">Traspasar clientes de:</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -342,8 +121,6 @@
|
||||
<asp:Button ID="LbAgregar" runat="server" class="btn btn-success" Text="Agregar" ValidationGroup="GrpGuardarRegistro" />
|
||||
<button id="BtnCancelarSucursal" runat="server" type="button" class="btn default" data-dismiss="modal">Cancelar</button>
|
||||
</div>
|
||||
<asp:HiddenField ID="HdnModalidad" runat="server" Value="I" ClientIDMode="Static" />
|
||||
<asp:HiddenField ID="HdnID" runat="server" Value="-1" ClientIDMode="Static" />
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
@@ -353,46 +130,6 @@
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
||||
|
||||
<script type="text/javascript">
|
||||
function showDivEC() {
|
||||
$('#divAgregarSucursal').modal('show');
|
||||
}
|
||||
function hideDivEC() {
|
||||
$('#divAgregarSucursal').modal('hide');
|
||||
}
|
||||
|
||||
|
||||
function ShowDivRegistro() {
|
||||
$('#divAgregarSucursal').modal();
|
||||
}
|
||||
function HideDivRegistro() {
|
||||
$('#divAgregarSucursal').modal('hide');
|
||||
}
|
||||
|
||||
function SetValue(Hidden, Value) {
|
||||
document.getElementById(Hidden).value = Value;
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<script src="/Metronic/assets/global/scripts/datatable.js"></script>
|
||||
<script src="/Metronic/assets/global/plugins/datatables/all.min.js"></script>
|
||||
<script type="text/javascript">
|
||||
|
||||
function OrdenarGV() {
|
||||
var Tam = TamañoVentana();
|
||||
var Alto = Tam.height - 270;
|
||||
if (Alto < 100) {
|
||||
Alto = 100;
|
||||
}
|
||||
$('#C_GvDatos').DataTable({
|
||||
scrollY: Alto + 'px',
|
||||
scrollCollapse: true,
|
||||
paging: false,
|
||||
searching: false,
|
||||
info: false
|
||||
});
|
||||
$('#C_GvDatos').parent().parent().children().first().css("position", "static");
|
||||
}
|
||||
</script>
|
||||
</asp:Content>
|
||||
|
||||
@@ -7,127 +7,96 @@ Imports Extensiones
|
||||
Partial Class Ventas_CatProcedimientos
|
||||
Inherits ClsPaginas
|
||||
|
||||
Private Property DtVendedores As DataTable
|
||||
|
||||
Public Property CveProcedimiento As Integer
|
||||
Get
|
||||
Return CType(ViewState("DtVendedores"), DataTable)
|
||||
If ViewState("CveProcedimiento") Is Nothing Then
|
||||
ViewState("CveProcedimiento") = -1
|
||||
End If
|
||||
Return ViewState("CveProcedimiento").ToString.ToEntero
|
||||
End Get
|
||||
Set(value As DataTable)
|
||||
ViewState("DtVendedores") = value
|
||||
Set(value As Integer)
|
||||
ViewState("CveProcedimiento") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||
If Not Page.IsPostBack Then
|
||||
CargaValoresIniciales()
|
||||
CargaDatos()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
#Region " CARGA VALORES INICIALES "
|
||||
Private Sub CargaValoresIniciales()
|
||||
ViewState("Orden") = ""
|
||||
CargaSubProyectos()
|
||||
CargaDatos()
|
||||
End Sub
|
||||
Public Sub CargaSubProyectos()
|
||||
DdlSubProyecto.DataSource = GlobalDTSubProyectos(-1, CveEmpresa:=UsuarioActual.CveEmpresa).FiltraParametros(String.Format("CveEmpresa = {0}", UsuarioActual.CveEmpresa))
|
||||
DdlSubProyecto.DataBind()
|
||||
DdlSubProyecto.Items.Insert(0, New ListItem("Todas", "-1"))
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
Public Sub CargaDatos()
|
||||
Dim ObjVendedores As New ClsVtaVendedores
|
||||
Dim ObjComisiones As New ClsEsquemasComisiones
|
||||
If ObjVendedores.GetVendedores(UsuarioActual.CveEmpresa) Then
|
||||
GvDatos.DataSource = ObjVendedores.DtResultados '.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
|
||||
DtVendedores = ObjVendedores.DtResultados
|
||||
|
||||
DdlSuperior.Items.Clear()
|
||||
DdlSuperior.DataSource = DtVendedores.FiltraParametros("VendedorTipo = 2")
|
||||
DdlVendedores.DataSource = DtVendedores
|
||||
DdlSuperior.DataBind()
|
||||
ObjVendedores.Dispose()
|
||||
GvDatos.DataBind()
|
||||
|
||||
Dim ObjVentas As New ClsVentas
|
||||
|
||||
If ObjVentas.GetProcedimientos(-1, UsuarioActual.CveEmpresa, -1) Then
|
||||
GvDatos.DataSource = ObjVentas.DtResultados
|
||||
Else
|
||||
Me.GvDatos.DataSource = Nothing
|
||||
GvDatos.DataSource = Nothing
|
||||
End If
|
||||
If ObjComisiones.GetEsquemaComisiones(-1, "-1", -1, UsuarioActual.CveEmpresa) Then
|
||||
DdlEsquemaComision.DataSource = ObjComisiones.DtResultados
|
||||
Else
|
||||
Alert("Ocurrio un Error al cargar los esquemas de comisiones", TipoMensaje.MsgError)
|
||||
DdlEsquemaComision.DataSource = Nothing
|
||||
End If
|
||||
ObjComisiones.Dispose()
|
||||
DdlEsquemaComision.DataBind()
|
||||
|
||||
ObjVentas.Dispose()
|
||||
|
||||
GvDatos.DataBind()
|
||||
|
||||
UpDatos.Update()
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Sub LbAgregar_Click(sender As Object, e As System.EventArgs) Handles LbAgregar.Click
|
||||
Dim ProcesoOK = False
|
||||
Dim ObjVentas As New ClsVentas
|
||||
|
||||
Dim ObjVendedores As New ClsVtaVendedores
|
||||
Dim TieneError = False
|
||||
|
||||
If HdnModalidad.Value = "I" Then
|
||||
If ObjVendedores.AddVendedores(TxtVendedor.Text.Trim, TxtCorreo.Text.Trim, txtTelefono.Text.Trim, TxtCelular.Text.Trim, ChkEstatus.Checked,
|
||||
DDlPuestoVendedor.SelectedValue.ToEntero, DdlSuperior.SelectedValue.ToEntero, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, TxtTituloDocumentos.Text, DdlSubProyecto.SelectedValue.ToEntero, TxtCodigo.Text.Trim, DdlEsquemaComision.SelectedValue.ToEntero) Then
|
||||
Alert("El nuevo Vendedor se guardó correctamente.", TipoMensaje.MsgInformacion)
|
||||
TxtCodigo.Text = ""
|
||||
TxtVendedor.Text = ""
|
||||
TxtCorreo.Text = ""
|
||||
txtTelefono.Text = ""
|
||||
TxtCelular.Text = ""
|
||||
Else
|
||||
TieneError = True
|
||||
Alert("Error al agregar vendedor", TipoMensaje.MsgError)
|
||||
If CveProcedimiento > 0 Then
|
||||
If ObjVentas.UpdateProcedimiento(CveProcedimiento, TxtProcedimiento.Text.Trim, ChkEstatus.Checked, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
|
||||
ProcesoOK = True
|
||||
End If
|
||||
Else
|
||||
If HdnID.Value.ToEntero <> -1 Then
|
||||
If ObjVendedores.UpdateVendedor(TxtCodigo.Text, TxtVendedor.Text, TxtCorreo.Text.Trim, txtTelefono.Text, TxtCelular.Text, ChkEstatus.Checked,
|
||||
DDlPuestoVendedor.SelectedValue.ToEntero, DdlSuperior.SelectedValue.ToEntero,
|
||||
HdnID.Value.ToEntero, TxtTituloDocumentos.Text, DdlSubProyecto.SelectedValue.ToEntero, DdlEsquemaComision.SelectedValue.ToEntero) Then
|
||||
GvDatos.EditIndex = -1
|
||||
Alert("Los cambios se guardaron correctamente.", TipoMensaje.MsgInformacion)
|
||||
Else
|
||||
TieneError = True
|
||||
Alert("Error al actualizar los cambios.", TipoMensaje.MsgError)
|
||||
End If
|
||||
If ObjVentas.AddProcedimiento(TxtProcedimiento.Text.Trim, ChkEstatus.Checked, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
|
||||
ProcesoOK = True
|
||||
End If
|
||||
End If
|
||||
|
||||
ObjVendedores.Dispose()
|
||||
CargaDatos()
|
||||
CargaGlobal()
|
||||
OcultaDiv()
|
||||
UpDatos.Update()
|
||||
ObjVentas.Dispose()
|
||||
|
||||
If ProcesoOK Then
|
||||
Alert($"Procedimiento {If(CveProcedimiento > 0, "Actualizado", "Guardado")} Correctamente.")
|
||||
RegistraScript("$('#DVAgregarProcedimiento').modal('hide');")
|
||||
CargaDatos()
|
||||
CargaGlobal()
|
||||
UpDatos.Update()
|
||||
End If
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
#Region "G V D A T O S"
|
||||
Protected Sub GvDatos_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvDatos.RowDataBound
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
If Not (e.Row.RowState = DataControlRowState.Edit OrElse e.Row.RowState = 5) Then
|
||||
If e.Row.DBCampo("Estatus") = "Activo" Then
|
||||
e.Row.FCLabel("LtlEstatus").ForeColor = Drawing.Color.Green
|
||||
Else
|
||||
e.Row.FCLabel("LtlEstatus").ForeColor = Drawing.Color.Red
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Protected Sub GvDatos_RowDeleting(sender As Object, e As System.Web.UI.WebControls.GridViewDeleteEventArgs) Handles GvDatos.RowDeleting
|
||||
Dim ObjVendedores As New ClsVtaVendedores
|
||||
Dim TieneError = False
|
||||
|
||||
If ObjVendedores.RemoveVendedor(GvDatos.DataKeys(e.RowIndex).Value.ToString.ToEntero) Then
|
||||
GvDatos.EditIndex = -1
|
||||
Alert("EL Vendedor se eliminó correctamente.", TipoMensaje.MsgInformacion)
|
||||
Else
|
||||
TieneError = True
|
||||
Alert("Error al eliminar Vendedor", TipoMensaje.MsgError)
|
||||
Protected Sub LnkEliminar_Click(sender As Object, e As EventArgs)
|
||||
|
||||
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
|
||||
|
||||
CveProcedimiento = GvRow.DataKey("CveProcedimiento").ToEntero
|
||||
|
||||
Dim ObjVentas As New ClsVentas
|
||||
Dim ProcesoOK = False
|
||||
|
||||
If ObjVentas.RemoveProcedimiento(CveProcedimiento, UsuarioActual.CveEmpresa) Then
|
||||
ProcesoOK = True
|
||||
End If
|
||||
|
||||
ObjVendedores.Dispose()
|
||||
CargaDatos()
|
||||
ObjVentas.Dispose()
|
||||
|
||||
If Not TieneError Then
|
||||
|
||||
If ProcesoOK Then
|
||||
Alert("Procedimiento eliminando correctamente.")
|
||||
|
||||
CargaDatos()
|
||||
CargaGlobal()
|
||||
End If
|
||||
End Sub
|
||||
@@ -137,117 +106,48 @@ Partial Class Ventas_CatProcedimientos
|
||||
|
||||
#Region "CARGA GLOBAL"
|
||||
Private Sub CargaGlobal()
|
||||
GlobalDTVendedores(UsuarioActual.CveEmpresa) = Nothing
|
||||
'Dim ObjVendedores As New ClsVtaVendedores
|
||||
'If ObjVendedores.GetVendedores(UsuarioActual.CveEmpresa) Then
|
||||
' GlobalDTVendedores(-1) = ObjVendedores.DtResultados
|
||||
'End If
|
||||
'ObjVendedores.Dispose()
|
||||
GlobalDTProcedimientos(UsuarioActual.CveEmpresa) = Nothing
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
Private Sub OcultaDiv()
|
||||
ScriptManager.RegisterStartupScript(Me, Me.GetType, "Llave", "HideDivRegistro();", True)
|
||||
End Sub
|
||||
|
||||
Public Sub BtnAgregarSucursalModal_Click(sender As Object, e As EventArgs)
|
||||
|
||||
Public Sub LnkAgregarProcedimiento_Click(sender As Object, e As EventArgs)
|
||||
|
||||
LbAgregar.Text = "Agregar"
|
||||
LtlTituloModal.Text = "Agregar Vendedor"
|
||||
DdlSubProyecto.SelectedIndex = 0
|
||||
DdlSuperior.Items.Clear()
|
||||
DdlSuperior.DataSource = DtVendedores.FiltraParametros("VendedorTipo = 2")
|
||||
DdlSuperior.DataBind()
|
||||
DivSupervisor.Visible = True
|
||||
DDlPuestoVendedor.SelectedIndex = 0
|
||||
TxtCodigo.Text = ""
|
||||
txtTelefono.Text = ""
|
||||
TxtVendedor.Text = ""
|
||||
TxtCelular.Text = ""
|
||||
TxtTituloDocumentos.Text = ""
|
||||
TxtCorreo.Text = ""
|
||||
LtlTituloModal.Text = "Agregar Procedimiento"
|
||||
|
||||
TxtProcedimiento.Text = ""
|
||||
|
||||
DVEstatus.Visible = False
|
||||
ChkEstatus.Checked = True
|
||||
|
||||
UpModal.Update()
|
||||
HdnModalidad.Value = "I"
|
||||
RegistraScript(String.Format("$('#{0}').modal();", "divAgregarSucursal"))
|
||||
|
||||
CveProcedimiento = -1
|
||||
|
||||
RegistraScript("$('#DVAgregarProcedimiento').modal();")
|
||||
End Sub
|
||||
|
||||
Public Sub Edit_Click(sender As Object, e As EventArgs)
|
||||
Dim ObjVendedores As New ClsVtaVendedores
|
||||
|
||||
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
|
||||
HdnModalidad.Value = "U"
|
||||
|
||||
CveProcedimiento = GvRow.DataKey("CveProcedimiento").ToEntero
|
||||
|
||||
HdnID.Value = GvRow.DataKey("CveVendedor")
|
||||
DdlSubProyecto.SelectedValueExist(GvRow.DataKey("CveSubProyecto"))
|
||||
DdlEsquemaComision.SelectedValueExist(GvRow.DataKey("CveEsquemaComision"))
|
||||
TxtCodigo.Text = GvRow.DataKey("Codigo")
|
||||
txtTelefono.Text = GvRow.DataKey("Telefono")
|
||||
TxtTituloDocumentos.Text = GvRow.DataKey("TituloDocumentos")
|
||||
TxtVendedor.Text = GvRow.DataKey("Vendedor")
|
||||
TxtCorreo.Text = GvRow.DataKey("Correo")
|
||||
TxtCelular.Text = GvRow.DataKey("Celular")
|
||||
ChkEstatus.Checked = If(GvRow.DataKey("Estatus") = "Activo", True, False)
|
||||
DDlPuestoVendedor.SelectedValueExist(GvRow.DataKey("VendedorTipo"))
|
||||
ValidaVendedores()
|
||||
DdlSuperior.SelectedValueExist(GvRow.DataKey("CveSuperior"))
|
||||
TxtProcedimiento.Text = GvRow.DataKey("Procedimiento")
|
||||
|
||||
ChkEstatus.Checked = Boolean.Parse(GvRow.DataKey("Estatus"))
|
||||
|
||||
DVEstatus.Visible = True
|
||||
LbAgregar.Text = "Actualizar"
|
||||
LtlTituloModal.Text = String.Format("{0}{1}", "Actualizar Vendedor: ", TxtVendedor.Text)
|
||||
|
||||
If ObjVendedores.GetVendedores(UsuarioActual.CveEmpresa) Then
|
||||
DdlVendedores.Items.Clear()
|
||||
DdlVendedores.DataSource = DtVendedores.FiltraParametros($"CveVendedor <> {GvRow.DataKey("CveVendedor")}")
|
||||
DdlVendedores.DataBind()
|
||||
End If
|
||||
LtlTituloModal.Text = $"Actualizar Procedimiento {TxtProcedimiento.Text}"
|
||||
|
||||
UpModal.Update()
|
||||
RegistraScript(String.Format("$('#{0}').modal();", "divAgregarSucursal"))
|
||||
ObjVendedores.Dispose()
|
||||
RegistraScript("$('#DVAgregarProcedimiento').modal();")
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub DDlPuestoVendedor_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DDlPuestoVendedor.SelectedIndexChanged
|
||||
ValidaVendedores()
|
||||
End Sub
|
||||
|
||||
Private Sub ValidaVendedores()
|
||||
If DDlPuestoVendedor.SelectedValue = "1" Then
|
||||
DdlSuperior.Items.Clear()
|
||||
DdlSuperior.DataSource = DtVendedores.FiltraParametros("VendedorTipo = 2")
|
||||
DdlSuperior.DataBind()
|
||||
DivSupervisor.Visible = True
|
||||
ElseIf DDlPuestoVendedor.SelectedValue = "3" Then
|
||||
DdlSuperior.Items.Clear()
|
||||
DdlSuperior.DataSource = DtVendedores.FiltraParametros("VendedorTipo = 1")
|
||||
DdlSuperior.DataBind()
|
||||
DivSupervisor.Visible = True
|
||||
ElseIf DDlPuestoVendedor.SelectedValue = "2" Then
|
||||
DdlSuperior.Items.Clear()
|
||||
DivSupervisor.Visible = False
|
||||
End If
|
||||
UpModal.Update()
|
||||
End Sub
|
||||
|
||||
Private Sub BtnTraspasarClientes_Click(sender As Object, e As EventArgs) Handles BtnTraspasarClientes.Click
|
||||
Dim ObjVendedores As New ClsVtaVendedores
|
||||
Dim TieneError = False
|
||||
|
||||
ObjVendedores.IniciaTransacSQL()
|
||||
|
||||
If Not ObjVendedores.TraspasarClientesVendedor(HdnID.Value.ToEntero, DdlVendedores.SelectedValue.ToEntero, UsuarioActual.CveEmpresa) Then
|
||||
TieneError = True
|
||||
End If
|
||||
|
||||
If Not TieneError Then
|
||||
ObjVendedores.Commit()
|
||||
Alert("Se han traspasado los clientes al nuevo vendedor", TipoMensaje.MsgInformacion)
|
||||
Else
|
||||
ObjVendedores.RollBack()
|
||||
Alert("Ocurrió un error al traspasar los clientes al nuevo vendedor", TipoMensaje.MsgError)
|
||||
End If
|
||||
|
||||
RegistraScript(String.Format("$('#{0}').modal('hide');", "divAgregarSucursal"))
|
||||
ObjVendedores.Dispose()
|
||||
CargaDatos()
|
||||
CargaGlobal()
|
||||
UpDatos.Update()
|
||||
End Sub
|
||||
End Class
|
||||
@@ -239,6 +239,15 @@ Partial Class ProductosyServicios
|
||||
ChkFechaIndeterminadaRSCO.Checked = False
|
||||
End If
|
||||
|
||||
If UsuarioActual.CveEmpresa.Contiene(119) Then
|
||||
DdlIVA.Items.Insert(0, New ListItem("Seleccione", "-2"))
|
||||
If CvePS > 0 Then
|
||||
DdlIVA.SelectedValueExist(-2)
|
||||
End If
|
||||
Else
|
||||
DdlIVA.SelectedValueExist(-1)
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
If Request("Ret") IsNot Nothing AndAlso Request("Ret").ToString <> "" Then
|
||||
@@ -328,14 +337,7 @@ Partial Class ProductosyServicios
|
||||
DdlSATPS.SelectedText = DrSAT("SATClaveProductoServicio").ToString()
|
||||
End If
|
||||
|
||||
If UsuarioActual.CveEmpresa.Contiene(119) Then
|
||||
DdlIVA.Items.Insert(0, New ListItem("Seleccione Uno", "-2"))
|
||||
If CvePS > 0 Then
|
||||
DdlIVA.SelectedValueExist(-2)
|
||||
End If
|
||||
Else
|
||||
DdlIVA.SelectedValueExist(-1)
|
||||
End If
|
||||
|
||||
|
||||
End If
|
||||
End Sub
|
||||
@@ -924,8 +926,18 @@ Partial Class ProductosyServicios
|
||||
DdlIVA.Visible = False
|
||||
DdlIVA.Visible = False
|
||||
End If
|
||||
|
||||
DdlIVA.SelectedValueExist(ObjProductosServicios.IVA.ToString)
|
||||
|
||||
If UsuarioActual.CveEmpresa.Contiene(119) Then
|
||||
DdlIVA.Items.Insert(0, New ListItem("Seleccione", "-2"))
|
||||
If ObjProductosServicios.DtResultados.Rows(0)("IVACatPS").ToString = "" Then
|
||||
DdlIVA.SelectedValueExist(-2)
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
|
||||
|
||||
LblCostoPromedio.Text = ObjProductosServicios.DtResultados.Rows(0)("CostoPromedio").ToString.FormatoNumero
|
||||
LblUltimoCosto.Text = ObjProductosServicios.DtResultados.Rows(0)("UltimoCosto").ToString.FormatoNumero
|
||||
|
||||
3165
Ventas/VentasMedicas.aspx
Normal file
3165
Ventas/VentasMedicas.aspx
Normal file
File diff suppressed because it is too large
Load Diff
14331
Ventas/VentasMedicas.aspx.vb
Normal file
14331
Ventas/VentasMedicas.aspx.vb
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user