Merge branch 'master' of http://jperez@192.168.10.111:8383/SIG.git
This commit is contained in:
@@ -1305,7 +1305,7 @@ Public Class ClsOS
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
Public Function UpdateVentaOS(CveVenta As Integer, CveOS As Integer) As Boolean
|
||||
Public Function UpdateVentaOS(CveVenta As Integer, CveOS As Integer, Optional Paciente As String = "-1", Optional Episodio As String = "-1") As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
DataAdapter("PA_OS_UpdateVentaOS")
|
||||
@@ -1313,6 +1313,8 @@ Public Class ClsOS
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CveVenta", SqlDbType.Int).Value = CveVenta
|
||||
.Add("@CveOS", SqlDbType.Int).Value = CveOS
|
||||
.Add("@Paciente", SqlDbType.VarChar).Value = Paciente
|
||||
.Add("@Episodio", SqlDbType.VarChar).Value = Episodio
|
||||
End With
|
||||
|
||||
Try
|
||||
|
||||
@@ -10717,6 +10717,7 @@ Public Class ClsPaginas
|
||||
PaginaDict.Add("/Transportes/RepViajes.aspx".ToUpper(), 599)
|
||||
PaginaDict.Add("/Transportes/RepBoletos.aspx".ToUpper(), 600)
|
||||
PaginaDict.Add("/Transportes/Boletos.aspx".ToUpper(), 601)
|
||||
PaginaDict.Add("/Transportes/RepContratosCalendario.aspx".ToUpper(), 603)
|
||||
#End Region
|
||||
'Antes de aquí.
|
||||
|
||||
|
||||
@@ -59,7 +59,7 @@ Public Class ClsVentas
|
||||
Public Property Neto As Double
|
||||
Public Property PorNeto As Double
|
||||
Public Property CveClasificacionDetalle As Integer
|
||||
|
||||
Public Property CveMedicoNuevo As Integer = -1
|
||||
|
||||
|
||||
#End Region
|
||||
@@ -439,8 +439,7 @@ Public Class ClsVentas
|
||||
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 = "",
|
||||
Optional CveMedico As Integer = -1, Optional CveProcedimiento As Integer = -1, Optional CveTipoVenta As Integer = -1, Optional RequiereOS As Boolean = False,
|
||||
Optional FechaParaSurtir As DateTime = MinFecha
|
||||
) As Boolean
|
||||
Optional FechaParaSurtir As DateTime = MinFecha, Optional Paciente As String = "-1", Optional Episodio As String = "-1") As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
DataAdapter("PA_VentasAdd")
|
||||
@@ -547,6 +546,9 @@ Public Class ClsVentas
|
||||
.Add("@RequiereOS", SqlDbType.Int).Value = RequiereOS
|
||||
.Add("@FechaParaSurtir", SqlDbType.DateTime).Value = If(FechaParaSurtir = MinFecha, Fecha, FechaParaSurtir)
|
||||
|
||||
.Add("@Paciente", SqlDbType.VarChar).Value = Paciente
|
||||
.Add("@Episodio", SqlDbType.VarChar).Value = Episodio
|
||||
|
||||
|
||||
.Add("@RETURN_VALUE", SqlDbType.Int).Direction = ParameterDirection.ReturnValue
|
||||
End With
|
||||
@@ -576,7 +578,8 @@ Public Class ClsVentas
|
||||
Optional AtencionA As String = "", Optional PedidoContrato As String = "", Optional CveFormaPago33 As Integer = -1, Optional CveMetodoPago33 As Integer = -1,
|
||||
Optional CveCliente As Integer = -1, Optional CveClienteSucursal As Integer = -1, Optional OrdenCompra As String = "-1", Optional RetIVA As Decimal = -1,
|
||||
Optional RetISR As Decimal = -1, Optional Kilometraje As Decimal = 0, Optional CveUsoCFDi As Integer = -1, Optional ServicioDomicilio As Boolean = False, Optional CveVendedor As Integer = -1,
|
||||
Optional RequiereOS As Boolean = False, Optional CveMedico As Integer = -1, Optional CveProcedimiento As Integer = -1, Optional FechaParaSurtir As DateTime = MinFecha) As Boolean
|
||||
Optional RequiereOS As Boolean = False, Optional CveMedico As Integer = -1, Optional CveProcedimiento As Integer = -1, Optional FechaParaSurtir As DateTime = MinFecha,
|
||||
Optional Paciente As String = "-1", Optional Episodio As String = "-1") As Boolean
|
||||
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_Vta_VentasUpdate")
|
||||
@@ -613,6 +616,8 @@ Public Class ClsVentas
|
||||
.Add("@CveMedico", SqlDbType.Int).Value = CveMedico
|
||||
.Add("@CveProcedimiento", SqlDbType.Int).Value = CveProcedimiento
|
||||
.Add("@FechaParaSurtir", SqlDbType.DateTime).Value = FechaParaSurtir
|
||||
.Add("@Paciente", SqlDbType.VarChar).Value = Paciente
|
||||
.Add("@Episodio", SqlDbType.VarChar).Value = Episodio
|
||||
End With
|
||||
|
||||
Try
|
||||
@@ -627,7 +632,7 @@ Public Class ClsVentas
|
||||
|
||||
Public Function UpdateObservacionesVenta(CveVenta As Integer, CveEmpresa As Integer, CveVendedor As Integer, Observaciones As String, FormaPaqueteria As Integer, CorreoNotificaciones As String, ObservacionesAlm As String,
|
||||
Pedido As String, OrdenCompra As String, FechaPago As String, CveUsoCFDI As Integer, Optional DescripcionVenta As String = "-1", Optional CveMedico As Integer = -1, Optional CveProcedimiento As Integer = -1,
|
||||
Optional FechaParaSurtir As DateTime = MinFecha) As Boolean
|
||||
Optional FechaParaSurtir As DateTime = MinFecha, Optional Paciente As String = "-1", Optional Episodio As String = "-1") As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_Vta_VentasObservacionesUpdate")
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
@@ -646,6 +651,8 @@ Public Class ClsVentas
|
||||
.Add("@CveMedico", SqlDbType.Int).Value = CveMedico
|
||||
.Add("@CveProcedimiento", SqlDbType.Int).Value = CveProcedimiento
|
||||
.Add("@FechaParaSurtir", SqlDbType.DateTime).Value = FechaParaSurtir
|
||||
.Add("@Paciente", SqlDbType.VarChar).Value = Paciente
|
||||
.Add("@Episodio", SqlDbType.VarChar).Value = Episodio
|
||||
|
||||
End With
|
||||
Try
|
||||
@@ -6020,7 +6027,24 @@ Public Class ClsVentas
|
||||
|
||||
End Function
|
||||
|
||||
Public Function UpdateVentaCorte(CveVenta As Integer, CveEmpresa As Integer, CveCorte As Integer) As Boolean
|
||||
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_Vta_VentaCorteUpdate")
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CveVenta", SqlDbType.Int).Value = CveVenta
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
.Add("@CveCorte", SqlDbType.Int).Value = CveCorte
|
||||
End With
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
Retorno = True
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al eliminar los datos de facturación.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||
End Try
|
||||
Return Retorno
|
||||
|
||||
End Function
|
||||
|
||||
#Region "TIPO VENTA"
|
||||
|
||||
@@ -6072,9 +6096,10 @@ Public Class ClsVentas
|
||||
|
||||
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, Telefono As String, Mail As String, CveMedicoEspecialidad As Integer, Celular As String, Consultorio As String, Optional CveMedicoSubEspecialidad As Integer = -1,
|
||||
Optional Torre As String = "-1") As Boolean
|
||||
Optional Torre As String = "-1") As Integer
|
||||
|
||||
Dim Retorno As Boolean = False
|
||||
CveMedicoNuevo = -1
|
||||
DataAdapter("PA_Vta_MedicosAdd")
|
||||
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
@@ -6095,16 +6120,20 @@ Public Class ClsVentas
|
||||
.Add("@Consultorio", SqlDbType.VarChar).Value = Consultorio
|
||||
.Add("@CveMedicoSubEspecialidad", SqlDbType.Int).Value = CveMedicoSubEspecialidad
|
||||
.Add("@Torre", SqlDbType.VarChar).Value = Torre
|
||||
.Add("@CveMedicoNuevo", SqlDbType.Int).Direction = ParameterDirection.Output
|
||||
|
||||
|
||||
|
||||
End With
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
CveMedicoNuevo = SqlAdapter.SelectCommand.Parameters("@CveMedicoNuevo").Value.ToString.ToEntero
|
||||
Retorno = True
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al guardar el Medico.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||
End Try
|
||||
Return Retorno
|
||||
|
||||
Return CveMedicoNuevo
|
||||
|
||||
End Function
|
||||
|
||||
|
||||
@@ -2156,7 +2156,7 @@ Namespace Modelos
|
||||
CveMetodoPago33:=factura.CveMetodoPago33, CveUsoCFDI:=factura.CveUsoCFDI, OrdenCompra:=factura.OrdenCompra, CveCuentaTerminal:=factura.CveCuentaTerminal, CveTipoRelacion:=factura.CveTipoRelacion, ImpuestoLocal:=TotalImpuestoLocal,
|
||||
CveVentaRelacion:=(If(factura.CveVentaRelacion.ToEntero > 0, factura.CveVentaRelacion, -1)), ImporteRelacion:=(If(factura.ImporteRelacion <> Nothing, factura.ImporteRelacion, -1)),
|
||||
CveTipoAmortizacionAnticipo:=factura.CveTipoAmortizacionAnticipo, CveEmpresaCRM:=CveEmpresaCRM, EsInterno:=EsInterno, ServicioDomicilio:=factura.ServicioDomicilio, RFCReceptor:=RFCReceptor, EsGarantia:=factura.EsGarantia, DescripcionVenta:=factura.DescripcionVenta,
|
||||
CveMedico:=factura.CveMedico, CveProcedimiento:=factura.CveProcedimiento, CveTipoVenta:=factura.CveTipoVenta, FechaParaSurtir:=factura.FechaParaSurtir) Then
|
||||
CveMedico:=factura.CveMedico, CveProcedimiento:=factura.CveProcedimiento, CveTipoVenta:=factura.CveTipoVenta, FechaParaSurtir:=factura.FechaParaSurtir, Paciente:=factura.Paciente, Episodio:=factura.Episodio) Then
|
||||
|
||||
ErrorList.Add("Ocurrió un error al Generar la Venta.<br />Revise su factura y cualquier detalle comuníquese a Soporte Técnico")
|
||||
|
||||
@@ -7657,6 +7657,9 @@ Namespace Modelos
|
||||
Public Property CveProcedimiento As Integer = -1
|
||||
Public Property Procedimiento As String = ""
|
||||
Public Property CveTipoVenta As Integer = -1
|
||||
|
||||
Public Property Paciente As String = ""
|
||||
Public Property Episodio As String = ""
|
||||
#End Region
|
||||
|
||||
End Class
|
||||
|
||||
@@ -45,6 +45,32 @@ Public Class CargaEventos : Implements IHttpHandler, IRequiresSessionState
|
||||
End If
|
||||
|
||||
|
||||
Exit Select
|
||||
Case "contrato_transportes"
|
||||
|
||||
If context.Request("U").ToEntero > 0 Then
|
||||
|
||||
CveUsuario = context.Request("U").ToEntero
|
||||
CveEmpresa = context.Request("E").ToEntero
|
||||
|
||||
Dim CveSubProyecto As Integer = If(context.Request("CveSubProyecto") IsNot Nothing, context.Request("CveSubProyecto").ToEntero, -1)
|
||||
Dim CveUsuarioPara As Integer = If(context.Request("CveUsuarioPara") IsNot Nothing, context.Request("CveUsuarioPara").ToEntero, -1)
|
||||
|
||||
|
||||
FI = context.Request("start").ToDate
|
||||
FF = context.Request("end").ToDate
|
||||
|
||||
If Not GetContratos(context:=context) Then
|
||||
'Convierte el objeto de Eventos en JSON
|
||||
'Dim oSerializer As System.Web.Script.Serialization.JavaScriptSerializer = New System.Web.Script.Serialization.JavaScriptSerializer
|
||||
Dim sJSON As String = Newtonsoft.Json.JsonConvert.SerializeObject(events)
|
||||
|
||||
context.Response.Write(sJSON)
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
|
||||
Exit Select
|
||||
Case Else
|
||||
Exit Select
|
||||
@@ -69,13 +95,6 @@ Public Class CargaEventos : Implements IHttpHandler, IRequiresSessionState
|
||||
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
Public ReadOnly Property IsReusable() As Boolean Implements IHttpHandler.IsReusable
|
||||
@@ -137,11 +156,7 @@ Public Class CargaEventos : Implements IHttpHandler, IRequiresSessionState
|
||||
|
||||
End If
|
||||
|
||||
|
||||
|
||||
|
||||
Dim EsCoordinador As Boolean = False
|
||||
|
||||
Dim usuarioActual_ As Usuario = UsuarioActual(context)
|
||||
If context IsNot Nothing AndAlso CveOS = -2 Then
|
||||
If usuarioActual_.TienePermisoProceso(348) Then
|
||||
@@ -265,7 +280,7 @@ Public Class CargaEventos : Implements IHttpHandler, IRequiresSessionState
|
||||
'AGREGAMOS CUANDO NO ES RECURRENTE
|
||||
Dim tFecha As DateTime = DateAdd(DateInterval.Month, -6, ClsPaginas.NowADS())
|
||||
'SI LA FECHA DEL EVENTO ES MENOR DE 6 MESES DE LA FECHA ACTUAL NO LO AGREGA
|
||||
If dr("FechaFin").ToString.ToDateTime > tFecha Or dr("FechaInicio").ToString.ToDateTime > tFecha Then
|
||||
If dr("FechaFinal").ToString.ToDateTime > tFecha Or dr("FechaInicio").ToString.ToDateTime > tFecha Then
|
||||
events.Add(cevent)
|
||||
End If
|
||||
Else
|
||||
@@ -418,6 +433,172 @@ Public Class CargaEventos : Implements IHttpHandler, IRequiresSessionState
|
||||
Return ErrorEventos
|
||||
End Function
|
||||
|
||||
Private Function GetContratos(Optional context As HttpContext = Nothing) As Boolean
|
||||
Dim ObjContratos As New ClsContratos
|
||||
|
||||
events = New List(Of CalendarEvent)
|
||||
|
||||
Dim DT_SubProyectos As New DataTable
|
||||
Dim DT_EstatusOS As New DataTable
|
||||
Dim usuarioActual_ As Usuario = UsuarioActual(context)
|
||||
Dim ErrorEventos As Boolean = False
|
||||
Dim Colores() As String = {"#006699", "#0099cc", "#0066cc", "#0033cc", "#0000ff", "#3333ff", "#3333ff", "#6600ff", "#9933ff", "#cc00ff", "#cc00cc", "#cc0099", "#cc3399", "#cc6699", "#cc0066", "#009933", "#00cc00", "#00cc66", "#009999", "#669900", "#99cc00", "#cccc00", "#cc9900", "#ff9900", "#006666", "#669999"}
|
||||
|
||||
DT_SubProyectos.Columns.Add("CveSubProyecto", GetType(Integer))
|
||||
DT_SubProyectos.Columns.Add("backgroundColor")
|
||||
DT_EstatusOS.Columns.Add("", GetType(Integer))
|
||||
|
||||
If ObjContratos.GetContratos(-1, usuarioActual_.CveEmpresa, TipoContrato:=2) Then
|
||||
|
||||
If ObjContratos.DtResultados.Rows.Count > 0 Then
|
||||
|
||||
Try
|
||||
For Each dr As DataRow In ObjContratos.DtResultados.Rows
|
||||
Dim cevent As CalendarEvent = New CalendarEvent()
|
||||
|
||||
|
||||
cevent.id = dr("CveContrato").ToString.ToEntero
|
||||
cevent.title = dr("DescripcionContrato").ToString
|
||||
cevent.start = String.Format("{0:s}", dr("FechaInicial").ToString.ToDateTime)
|
||||
cevent.end = String.Format("{0:s}", dr("FechaFinal").ToString.ToDateTime)
|
||||
cevent.allDay = False
|
||||
cevent.CveEventoEstatus = dr("NumeroContrato").ToString.ToEntero
|
||||
|
||||
If Not cevent.recurrenciatipo > 0 Then
|
||||
|
||||
'AGREGAMOS CUANDO NO ES RECURRENTE
|
||||
Dim tFecha As DateTime = DateAdd(DateInterval.Month, -6, ClsPaginas.NowADS())
|
||||
'SI LA FECHA DEL EVENTO ES MENOR DE 6 MESES DE LA FECHA ACTUAL NO LO AGREGA
|
||||
If dr("FechaFinal").ToString.ToDateTime > tFecha Or dr("FechaInicial").ToString.ToDateTime > tFecha Then
|
||||
events.Add(cevent)
|
||||
End If
|
||||
Else
|
||||
|
||||
'EMPIEZA METODO PARA AGREGAR CUANDO SI ES RECURRENTE
|
||||
|
||||
Dim FinRecurrencia As Integer = cevent.recurrenciafin.ToEntero
|
||||
Dim FI As DateTime, FF As DateTime, FT As DateTime
|
||||
Dim DiasSemana As String() = cevent.diassemana.Split(","c)
|
||||
FI = cevent.start.ToDateTime
|
||||
FF = cevent.end.ToDateTime
|
||||
|
||||
'OBTENEMOS LA FECHA TERMINO (FT) DE LA RECURRENCIA
|
||||
Select Case FinRecurrencia
|
||||
Case -1
|
||||
FT = DateAdd(DateInterval.Year, 2, dr("FechaInicial").ToString.ToDateTime)
|
||||
Case Is > 0
|
||||
FinRecurrencia -= 1
|
||||
Select Case cevent.recurrenciatipo
|
||||
Case 1
|
||||
FT = DateAdd(DateInterval.Hour, FinRecurrencia * cevent.frecuencia, dr("FechaInicial").ToString.ToDateTime)
|
||||
Case 2
|
||||
FT = DateAdd(DateInterval.Day, FinRecurrencia * cevent.frecuencia, dr("FechaInicial").ToString.ToDateTime)
|
||||
Case 3
|
||||
FT = DateAdd(DateInterval.WeekOfYear, FinRecurrencia * cevent.frecuencia, dr("FechaInicial").ToString.ToDateTime)
|
||||
FT = DateAdd(DateInterval.Day, (7 - Weekday(FT)).ToString.ToDouble, FT)
|
||||
Case 4
|
||||
FT = DateAdd(DateInterval.Month, FinRecurrencia * cevent.frecuencia, dr("FechaInicial").ToString.ToDateTime)
|
||||
Case 5
|
||||
FT = DateAdd(DateInterval.Year, FinRecurrencia * cevent.frecuencia, dr("FechaInicial").ToString.ToDateTime)
|
||||
End Select
|
||||
End Select
|
||||
|
||||
'SI ES TIPO SEMANAL Y DIASSEMANA TIENE VALORES CHECKEA ESTOS VALORES
|
||||
Do
|
||||
If DiasSemana.Length > 0 AndAlso DiasSemana(0) <> "" Then
|
||||
For Each drDias As String In DiasSemana
|
||||
Dim FIT As Date = FI, FFT As Date = FF
|
||||
|
||||
FIT = DateAdd(DateInterval.Day, (drDias.ToEntero - Weekday(FI)).ToString.ToDouble, FI)
|
||||
FFT = DateAdd(DateInterval.Day, (drDias.ToEntero - Weekday(FF)).ToString.ToDouble, FF)
|
||||
|
||||
cevent = New CalendarEvent()
|
||||
cevent.id = dr("CveContrato").ToString.ToEntero
|
||||
cevent.description = dr("DescripcionContrato").ToString
|
||||
cevent.start = String.Format("{0:s}", dr("FechaInicial").ToString.ToDateTime)
|
||||
cevent.end = String.Format("{0:s}", dr("FechaFinal").ToString.ToDateTime)
|
||||
cevent.allDay = False
|
||||
cevent.CveEventoEstatus = dr("NumeroContrato").ToString.ToEntero
|
||||
|
||||
|
||||
|
||||
'11/05/2018 - Evento Gasto Recurrente
|
||||
cevent.CveTipoEvento = dr("CveTipoEvento").ToString.ToEntero
|
||||
If cevent.CveTipoEvento = 10 Then
|
||||
cevent.Importe = dr("Importe").ToString.ToDouble
|
||||
End If
|
||||
|
||||
If cevent.CveEventoEstatus.ToString.ToEntero = 3 Then
|
||||
cevent.backgroundColor = "#1BBC9B"
|
||||
End If
|
||||
|
||||
'SI LA FECHA DEL EVENTO ES MENOR DE 6 MESES DE LA FECHA ACTUAL Y/0 SI LA FECHA INICIAL DE LA RECURRENCIA ES MENOR A LA FECHA QUE SE CREO EL EVENTO NO LO AGREGA
|
||||
If FIT > DateAdd(DateInterval.Month, -6, ClsPaginas.NowADS()) And FIT >= dr("FechaInicial").ToString.ToDateTime Then
|
||||
events.Add(cevent)
|
||||
End If
|
||||
Next
|
||||
Else
|
||||
cevent = New CalendarEvent()
|
||||
cevent.id = dr("CveContrato").ToString.ToEntero
|
||||
cevent.description = dr("DescripcionContrato").ToString
|
||||
cevent.start = String.Format("{0:s}", dr("FechaInicial").ToString.ToDateTime)
|
||||
cevent.end = String.Format("{0:s}", dr("FechaFinal").ToString.ToDateTime)
|
||||
cevent.allDay = False
|
||||
'cevent.CveEventoEstatus = dr("NumeroContrato").ToString.ToEntero
|
||||
'cevent.CveEventoEstatus = dr("CveEventoEstatus").ToString.ToEntero
|
||||
'cevent.cveagendatipo = dr("CveAgendaTipo").ToString
|
||||
'cevent.prioridad = dr("CvePrioridad").ToString.ToEntero
|
||||
'cevent.backgroundColor = dr("BackGroundColor").ToString
|
||||
|
||||
'cevent.recurrenciatipo = dr("RecurrenciaTipo").ToString.ToEntero
|
||||
'cevent.frecuencia = dr("Frecuencia").ToString.ToEntero
|
||||
'cevent.diassemana = dr("DiasSemana").ToString
|
||||
'cevent.dia = dr("Dia").ToString.ToEntero
|
||||
'cevent.mes = dr("Mes").ToString.ToEntero
|
||||
'cevent.recurrenciafin = dr("RecurrenciaFin").ToString
|
||||
'cevent.CveProspecto = dr("CveProspecto").ToString.ToEntero
|
||||
'cevent.Prospecto = dr("Prospecto").ToString
|
||||
|
||||
'11/05/2018 - Evento Gasto Recurrente
|
||||
|
||||
|
||||
'SI LA FECHA DEL EVENTO ES MENOR DE 6 MESES DE LA FECHA ACTUAL NO LO AGREGA
|
||||
If FI > DateAdd(DateInterval.Month, -6, ClsPaginas.NowADS()) Then
|
||||
events.Add(cevent)
|
||||
End If
|
||||
End If
|
||||
|
||||
Select Case cevent.recurrenciatipo
|
||||
Case 1
|
||||
FI = DateAdd(DateInterval.Hour, cevent.frecuencia, FI)
|
||||
FF = DateAdd(DateInterval.Hour, cevent.frecuencia, FF)
|
||||
Case 2
|
||||
FI = DateAdd(DateInterval.Day, cevent.frecuencia, FI)
|
||||
FF = DateAdd(DateInterval.Day, cevent.frecuencia, FF)
|
||||
Case 3
|
||||
FI = DateAdd(DateInterval.WeekOfYear, cevent.frecuencia, FI)
|
||||
FF = DateAdd(DateInterval.WeekOfYear, cevent.frecuencia, FF)
|
||||
Case 4
|
||||
FI = DateAdd(DateInterval.Month, cevent.frecuencia, FI)
|
||||
FF = DateAdd(DateInterval.Month, cevent.frecuencia, FF)
|
||||
Case 5
|
||||
FI = DateAdd(DateInterval.Year, cevent.frecuencia, FI)
|
||||
FF = DateAdd(DateInterval.Year, cevent.frecuencia, FF)
|
||||
End Select
|
||||
|
||||
Loop Until FI > FT
|
||||
End If
|
||||
Next
|
||||
Catch ex As Exception
|
||||
GuardaLog(ex.ToString())
|
||||
End Try
|
||||
End If
|
||||
|
||||
End If
|
||||
ObjContratos.Dispose()
|
||||
Return ErrorEventos
|
||||
End Function
|
||||
|
||||
ReadOnly Property UsuarioActual(ByVal context As HttpContext) As Usuario
|
||||
Get
|
||||
UsuarioActual = DirectCast(If(context IsNot Nothing, context.Session("UsuarioSIG"), Nothing), Usuario)
|
||||
|
||||
@@ -379,6 +379,7 @@ Public Class E119 : Implements IHttpHandler
|
||||
Dim ObjInventario As New ClsInventarios(ObjClientes.IniciaTransacSQL())
|
||||
Dim CveSubProyecto, CveCliente, CveMoneda, CvePS As Integer
|
||||
Dim Cantidad, PU, Descuento As Decimal
|
||||
Dim CveDireccionEnvio As Integer = 0
|
||||
Dim Obs As String = ""
|
||||
CveSubProyecto = 12659 ' fijo Ecommerce
|
||||
CveCliente = 0
|
||||
@@ -388,8 +389,8 @@ Public Class E119 : Implements IHttpHandler
|
||||
Dim RFC As String = ""
|
||||
Dim NombreCliente As String = ""
|
||||
If JsonRequest("billing") IsNot Nothing Then
|
||||
RFC = JsonRequest("billing").First("first_name").ToString()
|
||||
NombreCliente = JsonRequest("billing").First("first_name").ToString() & " " & JsonRequest("billing").First("last_name").ToString()
|
||||
RFC = JsonRequest("billing")("first_name").ToString()
|
||||
NombreCliente = JsonRequest("billing")("first_name").ToString() & " " & JsonRequest("billing")("last_name").ToString()
|
||||
End If
|
||||
|
||||
'BUSCAR SI ESTÁ REGISTRADO EL CLIENTE
|
||||
@@ -407,16 +408,16 @@ Public Class E119 : Implements IHttpHandler
|
||||
MsgLog.AppendLine("1.5 crear cliente")
|
||||
If JsonRequest("billing") IsNot Nothing Then
|
||||
Dim CveEstado As Integer = -1
|
||||
Dim Direccion As String = If(JsonRequest("billing").First("address_1") Is Nothing, "", JsonRequest("billing").First("address_1").ToString())
|
||||
Dim Direccion As String = If(JsonRequest("billing")("address_1") Is Nothing, "", JsonRequest("billing")("address_1").ToString())
|
||||
Dim NumExt As String = ""
|
||||
Dim NumInt As String = ""
|
||||
Dim Colonia As String = ""
|
||||
Dim Ciudad As String = If(JsonRequest("billing").First("city") Is Nothing, "", JsonRequest("billing").First("city").ToString())
|
||||
Dim Localidad As String = If(JsonRequest("billing").First("city") Is Nothing, "", JsonRequest("billing").First("city").ToString())
|
||||
Dim CP As String = If(JsonRequest("billing").First("postcode") Is Nothing, "", JsonRequest("billing").First("postcode").ToString())
|
||||
Dim Telefono As String = If(JsonRequest("billing").First("phone") Is Nothing, "", JsonRequest("billing").First("phone").ToString())
|
||||
Dim Correo As String = If(JsonRequest("billing").First("email") Is Nothing, "", JsonRequest("billing").First("email").ToString())
|
||||
Dim Estado As String = If(JsonRequest("billing").First("state") Is Nothing, "", JsonRequest("billing").First("state").ToString())
|
||||
Dim Ciudad As String = If(JsonRequest("billing")("city") Is Nothing, "", JsonRequest("billing")("city").ToString())
|
||||
Dim Localidad As String = If(JsonRequest("billing")("city") Is Nothing, "", JsonRequest("billing")("city").ToString())
|
||||
Dim CP As String = If(JsonRequest("billing")("postcode") Is Nothing, "", JsonRequest("billing")("postcode").ToString())
|
||||
Dim Telefono As String = If(JsonRequest("billing")("phone") Is Nothing, "", JsonRequest("billing")("phone").ToString())
|
||||
Dim Correo As String = If(JsonRequest("billing")("email") Is Nothing, "", JsonRequest("billing")("email").ToString())
|
||||
Dim Estado As String = If(JsonRequest("billing")("state") Is Nothing, "", JsonRequest("billing")("state").ToString())
|
||||
If Not String.IsNullOrEmpty(Estado) Then
|
||||
CveEstado = ClsPaginas.GlobalDTGralEstados("MEX").FiltroPrimeroValor("CveEstado", $"NombreEstado = '{Estado.Trim}'").ToEntero()
|
||||
If CveEstado <= 0 Then 'SI NO ENCUENTRA EL ESTADO INGRESA EL DE SONORA
|
||||
@@ -438,13 +439,58 @@ Public Class E119 : Implements IHttpHandler
|
||||
End If
|
||||
|
||||
End If
|
||||
' shiping
|
||||
'shiping_lines/ method_id: free_shipping/local_pickup
|
||||
If JsonRequest("shipping") IsNot Nothing AndAlso Not TieneError Then
|
||||
Dim CveEstado As Integer = -1
|
||||
Dim Direccion As String = If(JsonRequest("shipping")("address_1") Is Nothing, "", JsonRequest("shipping")("address_1").ToString())
|
||||
Dim NumExt As String = ""
|
||||
Dim NumInt As String = ""
|
||||
Dim Colonia As String = ""
|
||||
Dim Ciudad As String = If(JsonRequest("shipping")("city") Is Nothing, "", JsonRequest("shipping")("city").ToString())
|
||||
Dim Localidad As String = If(JsonRequest("shipping")("city") Is Nothing, "", JsonRequest("shipping")("city").ToString())
|
||||
Dim CP As String = If(JsonRequest("shipping")("postcode") Is Nothing, "", JsonRequest("shipping")("postcode").ToString())
|
||||
Dim Telefono As String = If(JsonRequest("shipping")("phone") Is Nothing, "", JsonRequest("shipping")("phone").ToString())
|
||||
Dim Correo As String = If(JsonRequest("shipping")("email") Is Nothing, "", JsonRequest("shipping")("email").ToString())
|
||||
Dim Estado As String = If(JsonRequest("shipping")("state") Is Nothing, "", JsonRequest("shipping")("state").ToString())
|
||||
If Not String.IsNullOrEmpty(Estado) Then
|
||||
CveEstado = ClsPaginas.GlobalDTGralEstados("MEX").FiltroPrimeroValor("CveEstado", $"NombreEstado = '{Estado.Trim}'").ToEntero()
|
||||
If CveEstado <= 0 Then 'SI NO ENCUENTRA EL ESTADO INGRESA EL DE SONORA
|
||||
CveEstado = 26
|
||||
End If
|
||||
Else
|
||||
CveEstado = 26
|
||||
End If
|
||||
|
||||
If ObjClientes.DireccionEnvioGet(-1, CveCliente, -1) Then
|
||||
Dim dtt As DataTable = ObjClientes.DtResultados
|
||||
If dtt IsNot Nothing AndAlso dtt.Rows.Count > 0 Then
|
||||
dtt = dtt.FiltraParametros($"EnvioDireccion = '{Direccion}' and EnvioCP = '{CP}'")
|
||||
If dtt.Rows.Count > 0 Then
|
||||
CveDireccionEnvio = dtt.FiltroPrimeroValor("CveDireccionEnvio").ToEntero
|
||||
End If
|
||||
Else
|
||||
CveDireccionEnvio = ObjClientes.DireccionEnvioAdd(CveCliente, Direccion, NumExt, NumInt, Colonia, Ciudad, Estado, CP, "", 100, 1)
|
||||
End If
|
||||
End If
|
||||
|
||||
Else
|
||||
MsgLog.AppendLine("1.5.9 sin datos cliente")
|
||||
TieneError = True
|
||||
Resp.Mensajes.Add("no existen datos del cliente")
|
||||
End If
|
||||
|
||||
MsgLog.AppendLine("1.6 inicio generar venta")
|
||||
ObjFactura = Modelos.Factura.CrearVentaNueva(Usuario, CveSubProyecto, CveCliente, CveMoneda, "Rem")
|
||||
MsgLog.AppendFormat("1.6.0 objeto creado {0}", If(ObjFactura IsNot Nothing, "si", "no"))
|
||||
|
||||
If JsonRequest("shiping_lines") IsNot Nothing Then
|
||||
' shiping
|
||||
'shiping_lines/ method_id: free_shipping/local_pickup
|
||||
Dim Entrega As String = If(JsonRequest("shiping_lines")("method_id") Is Nothing, "", JsonRequest("shiping_lines")("method_id").ToString())
|
||||
ObjFactura.Alfa1 = Entrega
|
||||
End If
|
||||
|
||||
ObjFactura.CveDireccionEnvio = cvedireccionenvio
|
||||
|
||||
If JsonRequest("line_items") IsNot Nothing Then
|
||||
Dim ListaPS As JArray = JArray.Parse(JsonRequest("line_items").ToString())
|
||||
Dim Consec As Integer = 1
|
||||
@@ -471,6 +517,7 @@ Public Class E119 : Implements IHttpHandler
|
||||
Resp.Mensajes.Add("no existen productos definidos")
|
||||
End If
|
||||
|
||||
|
||||
If ObjFactura IsNot Nothing AndAlso Not TieneError Then
|
||||
MsgLog.AppendLine("1.7 agregar la remision")
|
||||
Resp = ObjFactura.EmitirFactura(False, Transac:=ObjClientes.IniciaTransacSQL())
|
||||
|
||||
@@ -437,7 +437,6 @@
|
||||
<PaddingBottom>2pt</PaddingBottom>
|
||||
</Style>
|
||||
</Textbox>
|
||||
<rd:Selected>true</rd:Selected>
|
||||
</CellContents>
|
||||
</TablixCell>
|
||||
</TablixCells>
|
||||
@@ -791,12 +790,24 @@ CIUDAD DE MEXICO</Value>
|
||||
</TextRuns>
|
||||
<Style />
|
||||
</Paragraph>
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>Telefono +52 551 563 3271 support@smsmedicalsolutions.com</Value>
|
||||
<Style>
|
||||
<FontSize>8pt</FontSize>
|
||||
<FontWeight>Bold</FontWeight>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
<Style />
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox6</rd:DefaultName>
|
||||
<Top>0.80781cm</Top>
|
||||
<Left>4.60107cm</Left>
|
||||
<Height>1.56146cm</Height>
|
||||
<Width>8.54466cm</Width>
|
||||
<Width>10.0923cm</Width>
|
||||
<ZIndex>2</ZIndex>
|
||||
<Style>
|
||||
<Border>
|
||||
|
||||
@@ -645,12 +645,24 @@ CIUDAD DE MEXICO</Value>
|
||||
</TextRuns>
|
||||
<Style />
|
||||
</Paragraph>
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>Telefono +52 551 563 3271 support@smsmedicalsolutions.com</Value>
|
||||
<Style>
|
||||
<FontSize>8pt</FontSize>
|
||||
<FontWeight>Bold</FontWeight>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
<Style />
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox6</rd:DefaultName>
|
||||
<Top>0.93835cm</Top>
|
||||
<Left>4.45623cm</Left>
|
||||
<Left>4.49034cm</Left>
|
||||
<Height>1.56146cm</Height>
|
||||
<Width>8.54466cm</Width>
|
||||
<Width>9.99987cm</Width>
|
||||
<ZIndex>1</ZIndex>
|
||||
<Style>
|
||||
<Border>
|
||||
|
||||
@@ -1529,12 +1529,24 @@ CIUDAD DE MEXICO</Value>
|
||||
</TextRuns>
|
||||
<Style />
|
||||
</Paragraph>
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>Telefono +52 551 563 3271 support@smsmedicalsolutions.com</Value>
|
||||
<Style>
|
||||
<FontSize>8pt</FontSize>
|
||||
<FontWeight>Bold</FontWeight>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
<Style />
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox6</rd:DefaultName>
|
||||
<Top>0.63635cm</Top>
|
||||
<Left>8.55215cm</Left>
|
||||
<Height>1.13405cm</Height>
|
||||
<Width>8.54466cm</Width>
|
||||
<Left>7.67902cm</Left>
|
||||
<Height>1.52889cm</Height>
|
||||
<Width>10.41731cm</Width>
|
||||
<ZIndex>2</ZIndex>
|
||||
<Style>
|
||||
<Border>
|
||||
@@ -2288,6 +2300,7 @@ CIUDAD DE MEXICO</Value>
|
||||
</Style>
|
||||
</Textbox>
|
||||
<Line Name="Line5">
|
||||
<Top>0cm</Top>
|
||||
<Left>0.13678cm</Left>
|
||||
<Height>0cm</Height>
|
||||
<Width>20.28859cm</Width>
|
||||
@@ -2299,6 +2312,7 @@ CIUDAD DE MEXICO</Value>
|
||||
</Style>
|
||||
</Line>
|
||||
<Line Name="Line4">
|
||||
<Top>0cm</Top>
|
||||
<Left>0.13678cm</Left>
|
||||
<Height>0cm</Height>
|
||||
<Width>25.72414cm</Width>
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -3509,7 +3509,7 @@ Partial Class General_SaldosIniciales
|
||||
Dim CveSATRiesgoPuesto As Integer = 1
|
||||
Dim CveJornada As Integer = 1
|
||||
|
||||
If Sexo.ToUpper.Contains("Masculino") Then CveGenero = 1 Else CveGenero = 2
|
||||
If Sexo.ToUpper.Contiene("Masculino", "1: Masculino") Then CveGenero = 1 Else CveGenero = 2
|
||||
If AltaIMSS.ToUpper.Contiene("SI", "1") Then AltaIMSS = "True" Else AltaIMSS = "False"
|
||||
myarraystr = EstadoCivil.Split(":"c)
|
||||
If (myarraystr.Length > 1) Then
|
||||
|
||||
@@ -1,16 +1,10 @@
|
||||
Imports System.Data
|
||||
Imports System.Globalization
|
||||
Imports Extensiones
|
||||
Imports System.Web.Services
|
||||
Imports Newtonsoft.Json
|
||||
Imports System.Drawing
|
||||
Imports ADSNetLibrary.SIGAPI.Models.CRM.Request
|
||||
Imports ADSNetLibrary.SIGAPI.Services.CRM
|
||||
Imports Telerik.Web.UI.Scheduler.Views
|
||||
Imports Microsoft.EntityFrameworkCore.Storage.ValueConversion.Internal
|
||||
|
||||
'Imports System.Reflection
|
||||
'Imports Telerik.Web.UI
|
||||
Imports ADSNetLibrary.SIGAPI.Models.CRM.Response
|
||||
|
||||
Partial Class Inicio
|
||||
Inherits ClsPaginas
|
||||
@@ -31,7 +25,7 @@ Partial Class Inicio
|
||||
theDataSet.ReadXml(theReader)
|
||||
|
||||
If theDataSet.Tables(0).Rows(0)("Uuid").ToString() <> "null" Then
|
||||
Dim sb = New StringBuilder()
|
||||
Dim sb As New StringBuilder()
|
||||
|
||||
For Each item As DataRow In theDataSet.Tables(0).Rows
|
||||
sb.AppendFormat("{0};", item("Uuid").ToString())
|
||||
@@ -161,7 +155,7 @@ Partial Class Inicio
|
||||
If UsuarioActual.Empresa.TipoContabilidad = 2 AndAlso UsuarioActual.Empresa.UsaContabilidad Then
|
||||
Dim ObjPolizas As New ClsContPAQi(UsuarioActual.Empresa)
|
||||
If ObjPolizas.GetPolizasCuadre() And ObjPolizas.DtResultados.Rows.Count > 0 Then
|
||||
Dim ObjNotificacion = ItemNotificaciones(String.Format("Polizas de cuadre {0}", ObjPolizas.DtResultados.Rows.Count), Ico:="icon-calculator", Tipo:="warning", Link:="/Contabilidad/RepPolizasCuadre.aspx")
|
||||
Dim ObjNotificacion As String = ItemNotificaciones(String.Format("Polizas de cuadre {0}", ObjPolizas.DtResultados.Rows.Count), Ico:="icon-calculator", Tipo:="warning", Link:="/Contabilidad/RepPolizasCuadre.aspx")
|
||||
NotificacionesPendientes(ObjNotificacion)
|
||||
End If
|
||||
ObjPolizas.Dispose()
|
||||
@@ -172,7 +166,7 @@ Partial Class Inicio
|
||||
Dim OC As New ClsOC
|
||||
If OC.GetOrdenesPendientes("-1", 0, UsuarioActual.CveEmpresa, -1, -1, -1, UsuarioActual.CveUsuario, -1) Then
|
||||
If (OC.DtResultados.Rows.Count > 0) Then
|
||||
Dim ObjNotificacion = ItemNotificaciones(String.Format("Orden de Compra por atender {0}", OC.DtResultados.Rows.Count), Ico:="fa fa-tags", Tipo:="warning", Link:="/OC/RepOC.aspx")
|
||||
Dim ObjNotificacion As String = ItemNotificaciones(String.Format("Orden de Compra por atender {0}", OC.DtResultados.Rows.Count), Ico:="fa fa-tags", Tipo:="warning", Link:="/OC/RepOC.aspx")
|
||||
NotificacionesPendientes(ObjNotificacion)
|
||||
End If
|
||||
End If
|
||||
@@ -263,7 +257,7 @@ Partial Class Inicio
|
||||
If ObjProveedor.GetEvaluacionesProveedores(-1, -1, UsuarioActual.CveEmpresa) Then
|
||||
If ObjProveedor.DtResultados.COUNT("CveEvaluacionProveedor", $"Evaluado = 0 AND CveUsuario={UsuarioActual.CveUsuario}") > 0 Then
|
||||
Dim Mensaje As String = "Hay evaluaciones pendientes de proveedores. ¿Desea realizarlas ahora?"
|
||||
Dim MsgAccionAceptar = "window.open(""/Compras/EvaluacionProveedor.aspx?CveProveedor=-1"");"
|
||||
Dim MsgAccionAceptar As String = "window.open(""/Compras/EvaluacionProveedor.aspx?CveProveedor=-1"");"
|
||||
|
||||
Alert(Mensaje, TipoMensaje.MsgConfirmacion, JSBtnAceptar:=MsgAccionAceptar, TextoConfirmacion:=" Si ", TextoCancelacion:=" No ")
|
||||
End If
|
||||
@@ -350,7 +344,7 @@ Partial Class Inicio
|
||||
|
||||
Private Sub MuestraPsProximosAVencer()
|
||||
|
||||
Dim ObjInventarios = New ClsInventarios
|
||||
Dim ObjInventarios As New ClsInventarios
|
||||
If ObjInventarios.GetProductosCaducidad(-1, MinFecha, NowADS().AddDays(30), -1, -1, -1, "-1", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, Opcion:=2, CveCompuesto:=-1) Then
|
||||
|
||||
If ObjInventarios.DtResultados.Rows.Count > 0 Then
|
||||
@@ -359,11 +353,9 @@ Partial Class Inicio
|
||||
Else
|
||||
GvModalPSPorCaducar.DataSource = Nothing
|
||||
End If
|
||||
|
||||
Else
|
||||
GvModalPSPorCaducar.DataSource = Nothing
|
||||
End If
|
||||
|
||||
ObjInventarios.Dispose()
|
||||
GvModalPSPorCaducar.DataBind()
|
||||
|
||||
@@ -772,10 +764,8 @@ Partial Class Inicio
|
||||
Private Sub CargaDdlAcercamientoCRM()
|
||||
DdlAcercamientoCRM.Items.Clear()
|
||||
|
||||
Dim cRMService = New CRMService(System.Configuration.ConfigurationManager.ConnectionStrings("Conexion").ConnectionString)
|
||||
|
||||
|
||||
Dim aceramientoGet = New RequestAcercamiento(UsuarioActual.CveEmpresa, CveEmpresaCRM:=DdlEmpresaCRM.SelectedValue.ToEntero)
|
||||
Dim cRMService As New CRMService(System.Configuration.ConfigurationManager.ConnectionStrings("Conexion").ConnectionString)
|
||||
Dim aceramientoGet As New RequestAcercamiento(UsuarioActual.CveEmpresa, CveEmpresaCRM:=DdlEmpresaCRM.SelectedValue.ToEntero)
|
||||
Dim objAcercamiento = cRMService.GetAceracamientoCRM(aceramientoGet)
|
||||
If objAcercamiento.IsSuccess Then
|
||||
DdlAcercamientoCRM.DataSource = objAcercamiento.Result
|
||||
@@ -788,8 +778,8 @@ Partial Class Inicio
|
||||
Private Sub CargaDdlContactoCRM()
|
||||
DdlContactoCRM.Items.Clear()
|
||||
|
||||
Dim cRMService = New CRMService(System.Configuration.ConfigurationManager.ConnectionStrings("Conexion").ConnectionString)
|
||||
Dim contactoEmpresaCRM = New RequestContactoEmpresaCRM(DdlEmpresaCRM.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, -1)
|
||||
Dim cRMService As New CRMService(System.Configuration.ConfigurationManager.ConnectionStrings("Conexion").ConnectionString)
|
||||
Dim contactoEmpresaCRM As New RequestContactoEmpresaCRM(DdlEmpresaCRM.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, -1)
|
||||
Dim objServicio = cRMService.GetContactosEmpresasCRM(contactoEmpresaCRM)
|
||||
|
||||
If objServicio.IsSuccess Then
|
||||
@@ -818,13 +808,13 @@ Partial Class Inicio
|
||||
Protected Sub BtnGuardar_Click(sender As Object, e As EventArgs)
|
||||
Dim ObjEventos As New ClsOIEventos
|
||||
|
||||
Dim FechaInicio = TxtFechaInicioAgenda.Text.ToDateTime()
|
||||
Dim FechaFin = TxtFechaFinAgenda.Text.ToDateTime()
|
||||
Dim validacionesAgendaOpcionesOK = True
|
||||
Dim FechaInicio As DateTime = TxtFechaInicioAgenda.Text.ToDateTime()
|
||||
Dim FechaFin As DateTime = TxtFechaFinAgenda.Text.ToDateTime()
|
||||
Dim validacionesAgendaOpcionesOK As Boolean = True
|
||||
|
||||
RegistraScript("GetView();")
|
||||
|
||||
Dim RecurrenciaTipo = 0, Frecuencia = -1, DiasSemana = "-1", Dias = -1, Mes = -1, RecurrenciaFin = "-1"
|
||||
Dim RecurrenciaTipo As Integer = 0, Frecuencia As Integer = -1, DiasSemana As String = "-1", Dias As Integer = -1, Mes As Integer = -1, RecurrenciaFin As String = "-1"
|
||||
If CheckRecurrencia.Checked Then
|
||||
RecurrenciaTipo = RBLRecurrencia.SelectedValue.ToEntero
|
||||
Frecuencia = TxtFrecuencia.Text.ToEntero
|
||||
@@ -832,7 +822,7 @@ Partial Class Inicio
|
||||
'OBTENEMOS LOS DIAS SELECCIONADOS EN LA OPCION DE RECURRENCIA POR SEMANA
|
||||
Select Case RecurrenciaTipo
|
||||
Case 3
|
||||
Dim StringDias = ""
|
||||
Dim StringDias As String = ""
|
||||
For Each item As ListItem In CheckDiasSemana.Items
|
||||
If item.Selected Then
|
||||
If StringDias.Length > 0 Then
|
||||
@@ -1022,8 +1012,8 @@ Partial Class Inicio
|
||||
Public Shared Function ActualizaEvento(ClsEvent As CalendarEvent) As String
|
||||
Dim ObjEventos As New ClsOIEventos
|
||||
|
||||
Dim FechaInicio = DateTimeOffset.Parse(ClsEvent.start).DateTime
|
||||
Dim FechaFin = DateTimeOffset.Parse(ClsEvent.end).DateTime
|
||||
Dim FechaInicio As DateTime = DateTimeOffset.Parse(ClsEvent.start).DateTime
|
||||
Dim FechaFin As DateTime = DateTimeOffset.Parse(ClsEvent.end).DateTime
|
||||
|
||||
If ObjEventos.UpdateEvento("-1", "-1", -1, -1, -1, FechaInicio, FechaFin, -1, "-1", ClsEvent.id) Then
|
||||
End If
|
||||
@@ -1162,7 +1152,7 @@ Partial Class Inicio
|
||||
If i = index Then
|
||||
serie.name = row(i).ToString()
|
||||
Else
|
||||
Dim actual = row(i).ToString().ToDouble
|
||||
Dim actual As Double = row(i).ToString().ToDouble
|
||||
serie.data.Add(actual)
|
||||
anterior = actual
|
||||
End If
|
||||
@@ -1450,7 +1440,7 @@ Partial Class Inicio
|
||||
If UsuarioActual.CveEmpresa = 140 Then
|
||||
DVDescargasBDH.Visible = True
|
||||
|
||||
Dim TmpDT = New DataTable()
|
||||
Dim TmpDT As New DataTable()
|
||||
|
||||
Dim ObjDoc As New ClsEdocumentacion
|
||||
If ObjDoc.DocumentacionGet(-1, -1, 1, UsuarioActual.Empresa.CveEmpresa, Modulo:=8) Then
|
||||
@@ -1541,8 +1531,8 @@ Partial Class Inicio
|
||||
|
||||
Private Sub CargaDdlEmpresaCRM()
|
||||
|
||||
Dim cRMService = New CRMService(System.Configuration.ConfigurationManager.ConnectionStrings("Conexion").ConnectionString)
|
||||
Dim parametros = New RequestEmpresasCRM(UsuarioActual.CveEmpresa, -1, CveMedioCaptacion:=-1)
|
||||
Dim cRMService As New CRMService(System.Configuration.ConfigurationManager.ConnectionStrings("Conexion").ConnectionString)
|
||||
Dim parametros As New RequestEmpresasCRM(UsuarioActual.CveEmpresa, -1, CveMedioCaptacion:=-1)
|
||||
Dim objServicio = cRMService.GetEmpresasCRM(parametros)
|
||||
|
||||
If objServicio.IsSuccess Then
|
||||
@@ -1554,9 +1544,6 @@ Partial Class Inicio
|
||||
If objServicio.Result.Count > 0 Then
|
||||
DdlEmpresaCRM_SelectedIndexChanged(Nothing, Nothing)
|
||||
End If
|
||||
|
||||
|
||||
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
@@ -421,6 +421,14 @@
|
||||
<asp:Label Text="" ID="LblFolioOrdenCorte" runat="server" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="row" runat="server" id="divOS" visible="false" style="margin-top: 5px;">
|
||||
<label class="col-md-4 truncate">
|
||||
OS:
|
||||
</label>
|
||||
<div class="col-md-8">
|
||||
<asp:HyperLink ID="HplOS" CssClass="Texto" runat="server" Target="_blank"></asp:HyperLink>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
@@ -840,6 +840,12 @@ Partial Class Inventarios_EntradasSalidas
|
||||
LblFolioOrdenCorte.Text = DtMov.Rows(0)("FolioOrdendeCorte").ToString
|
||||
End If
|
||||
|
||||
If DtMov.Rows(0)("CveOS").ToString.ToEntero() > 0 Then
|
||||
divOS.Visible = True
|
||||
HplOS.Text = DtMov.Rows(0)("OSFolio").ToString
|
||||
HplOS.NavigateUrl = $"/OS/OrdenesServicios.aspx?CveOS={DtMov.Rows(0)("CveOS")}"
|
||||
End If
|
||||
|
||||
|
||||
If (DdlAlmacen.Items.FindByValue(Mov.CveAlmacen.ToString()) Is Nothing) Then
|
||||
Dim dr As DataRow = GlobalDTAlmacen(UsuarioActual.CveEmpresa, CveEstatus:=-1).FiltroPrimero(String.Format("CveAlmacen = {0}", Mov.CveAlmacen))
|
||||
|
||||
@@ -167,6 +167,7 @@
|
||||
<ContentTemplate>
|
||||
|
||||
<asp:GridView ID="GvVentas" ClientIDMode="Static" Width="100%" runat="server" GridLines="None" BorderWidth="0" CssClass="table table-striped table-hover Widthall ScrollAD" OnRowDataBound="GvVentas_RowDataBound"
|
||||
DataKeyNames="EsDevolucionVenta"
|
||||
data-sort="true" EmptyDataText="No se encontraron resultados." AutoGenerateColumns="False" >
|
||||
<Columns>
|
||||
<asp:BoundField HeaderText="Tipo Docto" DataField="TipoDocto" ItemStyle-Width="55px" />
|
||||
@@ -191,6 +192,7 @@
|
||||
<ItemTemplate>
|
||||
|
||||
<asp:HyperLink ID="lnkSurtir" NavigateUrl='<%# Eval("CveVenta", "/Inventarios/EntregaAlmacen.aspx?CveVenta={0}") %>' runat="server" CssClass="btn btn-sm blue" Text="Surtir <i class='fa fa-arrow-right' ></i>"></asp:HyperLink>
|
||||
<asp:HyperLink ID="LnkRecibir" Visible="false" NavigateUrl='<%# Eval("CveVenta", "/Inventarios/EntregaAlmacen.aspx?CveVenta={0}") %>' runat="server" CssClass="btn btn-sm yellow-gold" Text="recibir <i class='fa fa-arrow-left' ></i>"></asp:HyperLink>
|
||||
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
@@ -324,6 +324,13 @@ Partial Class RepNotasSinAlmacen
|
||||
e.Row.Cells(2).Text = $"{e.Row.DBCampo("Fecha").ToDateTime.ToString("dd/MM/yyyy")}"
|
||||
End If
|
||||
|
||||
|
||||
|
||||
If e.Row.DataKey("EsDevolucionVenta").ToEntero = 1 Then
|
||||
e.Row.FCHyperLink("lnkSurtir").Visible = False
|
||||
e.Row.FCHyperLink("LnkRecibir").Visible = True
|
||||
End If
|
||||
|
||||
End If
|
||||
End Sub
|
||||
End Class
|
||||
|
||||
@@ -90,7 +90,7 @@
|
||||
</div>
|
||||
|
||||
<div class="copyright">
|
||||
<asp:Literal ID="Ltlcopyright" runat="server">2023 © AD Sistemas.</asp:Literal>
|
||||
<asp:Literal ID="Ltlcopyright" runat="server">2024 © AD Sistemas.</asp:Literal>
|
||||
</div>
|
||||
<%--<div class="col-lg-offset-4 col-md-offset-4 col-sm-offset-3 col-lg-4 col-md-4 col-sm-6 col-xs-12 text-right">
|
||||
<asp:LinkButton ID="linkRegistrar" runat="server" CssClass="restaurar-password" OnClientClick="window.location.href='ActivarUsuario.aspx'">Registrar</asp:LinkButton>
|
||||
|
||||
@@ -1283,7 +1283,28 @@
|
||||
</button>
|
||||
<h4 class="modal-title" >Material Utilizado</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="modal-body">
|
||||
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-6">
|
||||
<div class="form-group form-md-line-input input-iconright" runat="server" visible="false" id="DvTxtPacienteModal" >
|
||||
<asp:TextBox ID="TxtPacienteModal" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="50"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RfvTxtPacienteModal" runat="server" CssClass="help-block errorimput" ControlToValidate="TxtPacienteModal"
|
||||
ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Paciente''</b> es necesario, por favor ingréselo." ValidationGroup="GrpMaterialUtilizado"></asp:RequiredFieldValidator>
|
||||
<label for="<%= TxtPacienteModal.ClientID.ToString()%>">Paciente:</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-6">
|
||||
<div class="form-group form-md-line-input input-iconright" runat="server" visible="false" id="DvTxtEpisodioModal">
|
||||
<asp:TextBox ID="TxtEpisodioModal" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="20"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RfvTxtEpisodioModal" runat="server" CssClass="help-block errorimput" ControlToValidate="TxtEpisodioModal"
|
||||
ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Episodio''</b> es necesario, por favor ingréselo." ValidationGroup="GrpMaterialUtilizado"></asp:RequiredFieldValidator>
|
||||
<label for="<%= TxtEpisodioModal.ClientID.ToString()%>">Episodio:</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
@@ -1342,7 +1363,8 @@
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
|
||||
<asp:LinkButton ID="LnkModalMaterialUtilizado" runat="server" CssClass="btn btn-primary" data-toggle="confirmation" data-popout="true" data-original-title="El material definido es el correcto?" data-btn-ok-label="si" ValidationGroup="GrpDevolucion"
|
||||
<asp:LinkButton ID="LnkModalMaterialUtilizado" runat="server" CssClass="btn btn-primary" data-toggle="confirmation" data-popout="true" data-original-title="El material definido es el correcto?" data-btn-ok-label="si"
|
||||
ValidationGroup="GrpMaterialUtilizado" CausesValidation="true"
|
||||
OnClick="LnkModalMaterialUtilizado_Click" >Guardar</asp:LinkButton>
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">Cancelar</button>
|
||||
|
||||
|
||||
@@ -473,6 +473,9 @@ Partial Class OS_OrdenesServicios
|
||||
|
||||
DVEpisodioPaciente.Visible = True
|
||||
|
||||
DvTxtPacienteModal.Visible = True
|
||||
DvTxtEpisodioModal.Visible = True
|
||||
|
||||
If CveOS > 0 And TipoEstatus >= 3 Then
|
||||
DdlUsuarioAtendio.Enabled = True
|
||||
DVUsuarioAtendio3.Visible = True
|
||||
@@ -682,7 +685,7 @@ Partial Class OS_OrdenesServicios
|
||||
DdlEstatusOS.SelectedValue = ObjOS.CveEstatusOrdenServicio.ToString
|
||||
|
||||
'If TipoEstatus = 2 Then
|
||||
LnkTecnico.Visible = True
|
||||
'LnkTecnico.Visible = True
|
||||
'End If
|
||||
|
||||
If TipoEstatus = 3 Then
|
||||
@@ -3023,6 +3026,12 @@ Partial Class OS_OrdenesServicios
|
||||
LnkModalMaterialUtilizado.Visible = False
|
||||
End If
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(578).ToEntero = 1 Then
|
||||
TxtPacienteModal.Text = TxtPaciente.Text
|
||||
TxtEpisodioModal.Text = TxtIdentificadorCliente.Text
|
||||
|
||||
End If
|
||||
|
||||
UpModalMaterialUtilizado.Update()
|
||||
|
||||
End Sub
|
||||
@@ -3038,6 +3047,21 @@ Partial Class OS_OrdenesServicios
|
||||
|
||||
Protected Sub LnkModalMaterialUtilizado_Click(sender As Object, e As EventArgs)
|
||||
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(578).ToEntero = 1 Then
|
||||
|
||||
If TxtPacienteModal.Text.Trim.Length = 0 Then
|
||||
Alert("Debe de proporcionar el paciente.", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
If TxtEpisodioModal.Text.Trim.Length = 0 Then
|
||||
Alert("Debe de proporcionar el episodio.", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
Dim CveAlmacenActual As Integer = DTSolicitudDev.FiltroPrimeroValor("CveAlmacenActual").ToEntero
|
||||
Dim CveMoneda As Integer = DTSolicitudDev.FiltroPrimeroValor("CveMoneda").ToEntero
|
||||
Dim CveSubProyectoPedido As Integer = DTSolicitudDev.FiltroPrimeroValor("CveSubProyecto").ToEntero
|
||||
@@ -3247,14 +3271,21 @@ Partial Class OS_OrdenesServicios
|
||||
End If
|
||||
|
||||
If ProcesoOK Then
|
||||
|
||||
If Not ObjOS.UpdateVentaOS(Respuesta.CveVenta, CveOS) Then
|
||||
If Not ObjOS.UpdateVentaOS(Respuesta.CveVenta, CveOS, TxtPacienteModal.Text.Trim, TxtEpisodioModal.Text.Trim) Then
|
||||
ProcesoOK = False
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
|
||||
|
||||
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
If ProcesoOK Then
|
||||
If Not ObjOS.UpdateVentaOS(-1, CveOS, TxtPacienteModal.Text.Trim, TxtEpisodioModal.Text.Trim) Then
|
||||
ProcesoOK = False
|
||||
End If
|
||||
End If
|
||||
|
||||
@@ -3307,6 +3338,8 @@ Partial Class OS_OrdenesServicios
|
||||
ObjFactura.FechaParaSurtir = TxtFechaCita.Text.ToDateTime
|
||||
ObjFactura.CveClienteSucursal = DdlSucursalCliente.SelectedValue.ToEntero
|
||||
ObjFactura.CveVentaRelacion = CveVentaPedido
|
||||
ObjFactura.Paciente = TxtPacienteModal.Text.Trim
|
||||
ObjFactura.Episodio = TxtEpisodioModal.Text.Trim
|
||||
|
||||
For Each GvRow As GridViewRow In GvMU.Rows
|
||||
|
||||
|
||||
@@ -842,50 +842,12 @@
|
||||
|
||||
|
||||
function selectDate(start, end, allDay) {
|
||||
<%-- $('#ModalAgenda').modal('show');
|
||||
$("#SpanTituloAgenda").html("Agregar Evento");
|
||||
|
||||
$("#HdnCveEvento").val(-1);
|
||||
|
||||
$("#DdlAgedaTipo").val("-1");
|
||||
$("#DdlPrioridad").val("1");
|
||||
|
||||
$("#TxtAsuntoAgenda").val("");
|
||||
$("#TxtDescripcionAgenda").val("");
|
||||
$("#TxtFechaInicioAgenda").val("" + start.format("DD/MM/YYYY 08:00"));
|
||||
$("#TxtFechaFinAgenda").val("" + start.format("DD/MM/YYYY 09:00"));
|
||||
|
||||
$("#UpRecurrencia").hide();
|
||||
$("#CheckRecurrencia").prop('checked', false);
|
||||
|
||||
$get("HdnDiasSemanaAgendar").value = -1;
|
||||
|
||||
$('#<%=RBLRecurrencia.ClientID %>').find("input[value='1']").prop("checked", true);
|
||||
$('#<%=TrDiasSemanaAdd.ClientID %>').css("display", "none");
|
||||
$("#DivDescripcionUpdate").css("display", "none");
|
||||
$("#<%=TxtDescripcionAgenda.ClientID%>").css("display", "block");
|
||||
$('#<%=LblTextoFrecuencia.ClientID%>').html("Hora(s)");
|
||||
|
||||
$("#TxtFrecuencia").val("1");
|
||||
$("#TxtNumeroOcurrencias").val("");
|
||||
$("#TxtFechaFinRecurrencia").val("");
|
||||
|
||||
$("#ChkGastoRecurrente").prop('checked', false);
|
||||
$("#TxtImporteGastoRecurrente").val("");--%>
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
function updateEvent(event, element) {
|
||||
|
||||
|
||||
|
||||
//$('#ModalAgenda').modal('show');
|
||||
|
||||
|
||||
// $get("HdnDiasSemanaAgendar").value =
|
||||
|
||||
|
||||
|
||||
|
||||
$('#<%=HFCveOS.ClientID%>').val(event.CveOS);
|
||||
@@ -895,89 +857,7 @@
|
||||
$('#<%=HFOCveOIEvento.ClientID%>').val(event.id);
|
||||
|
||||
$('#<%=LnkCommando.ClientID%>').click();
|
||||
|
||||
<%-- $("#DivDescripcionUpdate").css("display", "block");
|
||||
$("#<%=TxtDescripcionAgenda.ClientID%>").css("display", "none");
|
||||
$("#HdnCveEvento").val(event.id);
|
||||
|
||||
$("#TxtNumeroOcurrencias").val('');
|
||||
$("#TxtFechaFinRecurrencia").val('');
|
||||
$("#TxtFrecuencia").val('');
|
||||
|
||||
$("#TxtAsuntoAgenda").val(event.title);
|
||||
//SE MUESTRA EL TEXTO HTML EN EL DIV DE LA DESCRIPCION SIN PERMITIR EDITAR,
|
||||
//SE ASIGNA -1 EN EL TEXBOX PARA QUE NO REALICE CAMBIOS EN BD
|
||||
$("#DivDescripcionUpdate").html(event.description);
|
||||
$("#TxtDescripcionAgenda").val("-1");
|
||||
|
||||
$("#DdlAgedaTipo").val(event.cveagendatipo);
|
||||
$("#DdlPrioridad").val(event.prioridad);
|
||||
$('#LblSubProyecto').text(event.SubProyecto);
|
||||
$('#LblDireccion').text(event.Direccion);
|
||||
|
||||
|
||||
|
||||
$("#TxtFechaInicioAgenda").val("" + event.start.format("DD/MM/YYYY HH:mm"));
|
||||
|
||||
$("#TxtFechaFinAgenda").val("" + event.end.format("DD/MM/YYYY HH:mm"));
|
||||
|
||||
//Identifica el tipo de Fecha Termino de la Recurrencia
|
||||
if (event.recurrenciafin == 0) {
|
||||
$("#TxtFrecuencia").val('0');
|
||||
} else if (!isNaN(event.recurrenciafin)) {
|
||||
$("#RBNumeroOcurrencias").prop('checked', true);
|
||||
$("#TxtNumeroOcurrencias").val(event.recurrenciafin);
|
||||
} else {
|
||||
$("#RBFechaFin").prop('checked', true);
|
||||
$("#TxtFechaFinRecurrencia").val("" + event.recurrenciafin);
|
||||
}
|
||||
|
||||
//GASTO RECURRENTE
|
||||
//Si el evento es tipo 10 = Gasto Mes, activa gasto recurrente
|
||||
if (event.CveTipoEvento == 10) {
|
||||
$("#ChkGastoRecurrente").prop('checked', true);
|
||||
$("#TxtImporteGastoRecurrente").val(event.Importe);
|
||||
} else {
|
||||
$("#ChkGastoRecurrente").prop('checked', false);
|
||||
$("#TxtImporteGastoRecurrente").val('');
|
||||
}
|
||||
|
||||
//Verifica que hay Recurrencia para activar los campos y poner sus valores respectivos
|
||||
if (event.recurrenciatipo > 0) {
|
||||
$("#CheckRecurrencia").prop('checked', true);
|
||||
|
||||
// CHECKEA EL TIPO DE RECURRENCIA QUE TENGA EL EVENTO
|
||||
var text = event.recurrenciatipo;
|
||||
var radio = $("[id*=RBLRecurrencia] label:contains('" + text + "')").closest("td").find("input");
|
||||
radio.attr("checked", "checked");
|
||||
|
||||
// CHECKEA LOS DIAS SELECCIONADOS DE LA RECURRENCIA DE SEMANA
|
||||
$get("HdnDiasSemanaAgendar").value = event.diassemana;
|
||||
|
||||
//LLENA TEXTO DE FRECUENCIA DE RECURRENCIA
|
||||
$("#TxtFrecuencia").val("" + event.frecuencia);
|
||||
} else {
|
||||
$("#CheckRecurrencia").prop('checked', false);
|
||||
}
|
||||
|
||||
|
||||
//ESCONDE O MUESTRA EL DIV DE LAS OPCIONES DE RECURRENCIA
|
||||
if ($get('CheckRecurrencia').checked) {
|
||||
$("#UpRecurrencia").show();
|
||||
} else {
|
||||
$("#UpRecurrencia").hide();
|
||||
}
|
||||
|
||||
//LLAMA EL INDEXCHANGED DEL RADIOBUTTONLIST DE LOS TIPOS DE RECURRENCIA
|
||||
$("#BtnActualizaAdd").click();
|
||||
|
||||
//Muestra nombre de la empresa si esta tarea sea asigno desde EmpresaCRM
|
||||
if (event.EmpresaCRM != "") {
|
||||
$("#<%=LblEmpresaCRM.ClientID%>").css("display", "")
|
||||
$("#<%=LblEmpresaCRM.ClientID%>").text(event.EmpresaCRM);
|
||||
} else {
|
||||
$("#<%=LblEmpresaCRM.ClientID%>").css("display", "none")
|
||||
}--%>
|
||||
|
||||
|
||||
}
|
||||
function RadionButtonSelectedValueSet(name, SelectdValue) {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<%@ Page Language="VB" AutoEventWireup="false" Title="Transportes V&A - Contratos"
|
||||
<%@ Page Language="VB" AutoEventWireup="true" Title="Transportes V&A - Contratos"
|
||||
MasterPageFile="~/Site.master"
|
||||
CodeFile="RepContratos.aspx.vb"
|
||||
Inherits="ListadoContratos" %>
|
||||
@@ -34,21 +34,12 @@
|
||||
</asp:Content>
|
||||
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="HB" runat="Server">
|
||||
<asp:UpdatePanel runat="server">
|
||||
<ContentTemplate>
|
||||
<li>
|
||||
<asp:LinkButton ID="LBAgregarContrato" runat="server"><i class='fa fa-plus'></i>Agregar Contrato</asp:LinkButton>
|
||||
</li>
|
||||
<%-- <li>
|
||||
<asp:HyperLink ID="LBListadoContratos" runat="server" NavigateUrl="RepContratos.aspx"
|
||||
Target="_blank"><i class='fa fa-file'></i>Contratos</asp:HyperLink>
|
||||
</li>
|
||||
<li>
|
||||
<asp:HyperLink ID="LBListadoViajes" runat="server" NavigateUrl="RepViajes.aspx"
|
||||
Target="_blank"><i class='fa fa-road'></i>Viajes</asp:HyperLink>
|
||||
</li>--%>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
<li>
|
||||
<asp:LinkButton ID="LBAgregarContrato" runat="server"><i class='fa fa-plus'></i>Agregar Contrato</asp:LinkButton>
|
||||
</li>
|
||||
<li>
|
||||
<asp:LinkButton ID="LBExcel" runat="server"><i class="fa fa-file-excel-o"></i>Generar Excel</asp:LinkButton>
|
||||
</li>
|
||||
</asp:Content>
|
||||
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="C" runat="Server">
|
||||
@@ -61,71 +52,73 @@
|
||||
</i></a>
|
||||
</div>
|
||||
<contenttemplate>
|
||||
<asp:UpdatePanel ID="UpTitulos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:GridView ID="GvContratos" runat="server" AutoGenerateColumns="false" EmptyDataText="No se Encontró Contrato Registrado"
|
||||
CssClass="table table-striped table-hover Widthall ScrollAD mysmallbtn" GridLines="None"
|
||||
data-sort="true" DataKeyNames="CveContrato, DescripcionContrato, Ubicacion, FechaInicial, FechaFinal, CveCliente, CveTipoAF, Importe, ImporteMin, ImporteMax ">
|
||||
<Columns>
|
||||
|
||||
<asp:GridView ID="GvContratos" runat="server" AutoGenerateColumns="false" EmptyDataText="No se Encontró Contrato Registrado"
|
||||
CssClass="table table-striped table-hover Widthall ScrollAD mysmallbtn" GridLines="None"
|
||||
data-sort="true" DataKeyNames="CveContrato, DescripcionContrato, Ubicacion, FechaInicial, FechaFinal, CveCliente, CveTipoAF, Importe, ImporteMin, ImporteMax ">
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderText="No. Contrato">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlCveContrato" runat="server" Text='<%# Eval("CveContrato") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="No. Contrato">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlCveContrato" runat="server" Text='<%# Eval("CveContrato") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Descripcion">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlDescripcionContrato" runat="server" Text='<%# Eval("DescripcionContrato") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="Descripcion">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlDescripcionContrato" runat="server" Text='<%# Eval("DescripcionContrato") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Center" HeaderText="Ubicación">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtUbicacion" runat="server" Text='<%# Eval("Ubicacion") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Center" HeaderText="Ubicación">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtUbicacion" runat="server" Text='<%# Eval("Ubicacion") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Center" HeaderText="Cliente">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtNombreComercial" runat="server" Text='<%# Eval("NombreComercial") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Center" HeaderText="Cliente">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtNombreComercial" runat="server" Text='<%# Eval("NombreComercial") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Center" ItemStyle-Width="100px">
|
||||
<HeaderTemplate>
|
||||
Fecha<br />
|
||||
Salida
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlFechaIng" runat="server" Text='<%# Eval("FechaInicial", "{0:d}") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Center" ItemStyle-Width="100px">
|
||||
<HeaderTemplate>
|
||||
Fecha<br />
|
||||
Salida
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlFechaIng" runat="server" Text='<%# Eval("FechaInicial", "{0:d}") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Fecha Final" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="100px">
|
||||
<HeaderTemplate>
|
||||
Fecha<br />
|
||||
Regreso
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlFechaFinal" runat="server" Text='<%# Eval("FechaFinal", "{0:d}") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="Fecha Final" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="100px">
|
||||
<HeaderTemplate>
|
||||
Fecha<br />
|
||||
Regreso
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlFechaFinal" runat="server" Text='<%# Eval("FechaFinal", "{0:d}") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Center" HeaderText="Acciones">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="BtnEditar" runat="server" AlternateText="Editar"
|
||||
CssClass="btn btn-circle btn-sm green" OnClick="UpdateContrato" Text="<i class='fa fa-pencil'></i>" />
|
||||
<asp:LinkButton ID="BtnEliminar" runat="server" AlternateText="Eliminar"
|
||||
CssClass="btn btn-circle btn-sm red" OnClick="RemoveContrato" Text="<i class='fa fa-trash'></i>"
|
||||
data-toggle="confirmation" data-popout="true" data-original-title="Confirmar"
|
||||
data-btn-ok-label="si" />
|
||||
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Center" HeaderText="Acciones">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="BtnEditar" runat="server" AlternateText="Editar"
|
||||
CssClass="btn btn-circle btn-sm green" OnClick="UpdateContrato" Text="<i class='fa fa-pencil'></i>" />
|
||||
<asp:LinkButton ID="BtnEliminar" runat="server" AlternateText="Eliminar"
|
||||
CssClass="btn btn-circle btn-sm red" OnClick="RemoveContrato" Text="<i class='fa fa-trash'></i>"
|
||||
data-toggle="confirmation" data-popout="true" data-original-title="Confirmar"
|
||||
data-btn-ok-label="si" />
|
||||
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
|
||||
<asp:UpdatePanel runat="server" ID="UpModal">
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
<asp:UpdatePanel runat="server" ID="UpModal" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div id="ModalAgregar" class="modal ADS fade" role="dialog">
|
||||
<div class="modal-dialog">
|
||||
@@ -213,7 +206,7 @@
|
||||
|
||||
<div class="row margin-bottom-5" id="TrAF" runat="server">
|
||||
<label class="col-md-4 bold">
|
||||
<asp:Label runat="server" Text="Tipo de Unidad:"></asp:Label></label><div
|
||||
<asp:Label runat="server" Text="Transporte:"></asp:Label></label><div
|
||||
class="col-md-8">
|
||||
|
||||
<asp:DropDownList ID="DdlTransporte" AppendDataBoundItems="true" DataTextField="Descripcion"
|
||||
@@ -230,6 +223,24 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row margin-bottom-5" id="TrChofer" runat="server">
|
||||
<label class="col-md-4 bold">
|
||||
<asp:Label runat="server" Text="Chofer:"></asp:Label></label><div
|
||||
class="col-md-8">
|
||||
|
||||
<asp:DropDownList ID="DdlChofer" AppendDataBoundItems="true" DataValueField="CvePersonal"
|
||||
DataTextField="NombreCompleto" Class="table-group-action-input form-control input-inline text-center"
|
||||
Width="200px" runat="server">
|
||||
</asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RFVChofer" runat="server" ControlToValidate="DdlChofer"
|
||||
Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Chofer''</b> es necesario, por favor ingréselo."
|
||||
ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCEChofer" runat="server" HighlightCssClass="vco"
|
||||
TargetControlID="RFVChofer" Width="400px" BehaviorID="_content_VCEChofer">
|
||||
</ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row my-1">
|
||||
<label class="col-md-4 bold">Observaciones:</label>
|
||||
<div class="col-md-8">
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
Option Explicit On
|
||||
Option Strict On
|
||||
Imports Extensiones
|
||||
Imports Extensiones.ModExtensiones
|
||||
|
||||
Partial Class ListadoContratos
|
||||
@@ -15,12 +16,12 @@ Partial Class ListadoContratos
|
||||
End Property
|
||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||
If Not IsPostBack Then
|
||||
DdlClientes.setEsWebService(True)
|
||||
InicializaCombos()
|
||||
CargaDatos()
|
||||
End If
|
||||
End Sub
|
||||
Private Sub InicializaCombos()
|
||||
DdlClientes.setEsWebService(True)
|
||||
'Lista Activos Fijos'
|
||||
Dim ObjAF As New ClsAF()
|
||||
If ObjAF.GetActivosFijos(-1, 13, "-1", "-1", -1, -1, "-1", -1, -1, -1, -1, 1, "-1", -1, -1, -1) Then
|
||||
@@ -31,6 +32,14 @@ Partial Class ListadoContratos
|
||||
End If
|
||||
DdlTransporte.DataBind()
|
||||
ObjAF.Dispose()
|
||||
|
||||
'Lista Chofer'
|
||||
DdlChofer.DataSource = GlobalDTRHPersonal(185)
|
||||
DdlChofer.DataBind()
|
||||
DdlChofer.Items.Insert(0, New ListItem("Seleccione", ""))
|
||||
|
||||
|
||||
UpModal.Update()
|
||||
End Sub
|
||||
Private Sub CargaDatos()
|
||||
Dim ObjContratos As New ClsContratos
|
||||
@@ -39,6 +48,8 @@ Partial Class ListadoContratos
|
||||
End If
|
||||
ObjContratos.Dispose()
|
||||
GvContratos.DataBind()
|
||||
UpTitulos.Update()
|
||||
|
||||
End Sub
|
||||
Protected Sub MostrarModal()
|
||||
TxtDescripcion.Text = ""
|
||||
@@ -160,4 +171,9 @@ Partial Class ListadoContratos
|
||||
ObjContratos.Dispose()
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Sub LBExcel_Click(sender As Object, e As EventArgs) Handles LBExcel.Click
|
||||
GvContratos.ExportToExcel("ReporteCompras" & NowADS().ToShortDateString)
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
|
||||
170
Transportes/RepContratosCalendario.aspx
Normal file
170
Transportes/RepContratosCalendario.aspx
Normal file
@@ -0,0 +1,170 @@
|
||||
<%@ Page Title="Transportes V&A - Calendario" Language="VB" MasterPageFile="~/Site.master"
|
||||
AutoEventWireup="false" CodeFile="RepContratosCalendario.aspx.vb" Inherits="RepContratosCalendario" %>
|
||||
|
||||
<%@ Register Assembly="TimePicker" Namespace="MKB.TimePicker" TagPrefix="cc1" %>
|
||||
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="Css" runat="Server">
|
||||
<style type="text/css">
|
||||
</style>
|
||||
</asp:Content>
|
||||
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="E" runat="Server">
|
||||
Calendario de contratos
|
||||
</asp:Content>
|
||||
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="H" runat="Server">
|
||||
</asp:Content>
|
||||
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="C" runat="Server">
|
||||
<div class="row">
|
||||
<div class="col-md-12 col-sm-12">
|
||||
<div class="portlet light calendar ">
|
||||
<div class="portlet-title ">
|
||||
<div class="caption">
|
||||
<i class="icon-calendar font-green-sharp"></i>
|
||||
<span class="caption-subject font-green-sharp bold uppercase">Contratos</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="portlet-body">
|
||||
<div id="calendar">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</asp:Content>
|
||||
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="JS" runat="Server">
|
||||
<script>
|
||||
var PrimeraCargaCalendario = true;
|
||||
var currentUpdateEvent;
|
||||
var addStartDate;
|
||||
var addEndDate;
|
||||
var globalAllDay;
|
||||
var view = null;
|
||||
var date = null;
|
||||
|
||||
function InitCalendar() {
|
||||
$(document).ready(function () {
|
||||
Calendario();
|
||||
});
|
||||
}
|
||||
|
||||
function selectDate(start, end, allDay) {
|
||||
}
|
||||
|
||||
function updateEvent(event, element) {
|
||||
}
|
||||
|
||||
function RadionButtonSelectedValueSet(name, SelectdValue) {
|
||||
$('input[name="' + name + '"][value="' + SelectdValue + '"]').prop('checked', true);
|
||||
}
|
||||
|
||||
function updateEventOnDropResize(event, allDay) {
|
||||
|
||||
//alert("allday: " + allDay);
|
||||
var eventToUpdate = {
|
||||
id: event.id,
|
||||
start: event.start
|
||||
};
|
||||
|
||||
if (event.end === null) {
|
||||
eventToUpdate.end = eventToUpdate.start;
|
||||
}
|
||||
else {
|
||||
eventToUpdate.end = event.end;
|
||||
}
|
||||
|
||||
// FullCalendar 2.x
|
||||
var endDate;
|
||||
if (!event.allDay) {
|
||||
endDate = new Date(eventToUpdate.end + 60 * 60000);
|
||||
endDate = endDate.toJSON();
|
||||
}
|
||||
else {
|
||||
endDate = eventToUpdate.end.toJSON();
|
||||
}
|
||||
|
||||
eventToUpdate.start = eventToUpdate.start.toJSON();
|
||||
eventToUpdate.end = eventToUpdate.end.toJSON(); //endDate;
|
||||
eventToUpdate.allDay = event.allDay;
|
||||
|
||||
PageMethods.ActualizaEvento(eventToUpdate, UpdateTimeSuccess);
|
||||
}
|
||||
|
||||
function eventDropped(event, dayDelta, minuteDelta, allDay, revertFunc) {
|
||||
if ($(this).data("qtip")) $(this).qtip("destroy");
|
||||
updateEventOnDropResize(event);
|
||||
}
|
||||
|
||||
function eventResized(event, dayDelta, minuteDelta, revertFunc) {
|
||||
if ($(this).data("qtip")) $(this).qtip("destroy");
|
||||
|
||||
updateEventOnDropResize(event);
|
||||
}
|
||||
|
||||
function Calendario() {
|
||||
var date = new Date();
|
||||
var d = date.getDate();
|
||||
var m = date.getMonth();
|
||||
var y = date.getFullYear();
|
||||
var h = {};
|
||||
|
||||
if ($('#calendar').width() <= 400) {
|
||||
$('#calendar').addClass("mobile");
|
||||
h = {
|
||||
left: 'title, prev, next',
|
||||
center: '',
|
||||
right: 'today,month,agendaWeek,agendaDay'
|
||||
};
|
||||
} else {
|
||||
$('#calendar').removeClass("mobile");
|
||||
|
||||
h = {
|
||||
left: 'title',
|
||||
center: '',
|
||||
right: 'prev,next,today,month,agendaWeek,agendaDay'
|
||||
};
|
||||
}
|
||||
|
||||
$('#calendar').fullCalendar('destroy'); // destroy the calendar
|
||||
$('#calendar').fullCalendar({ //re-initialize the calendar
|
||||
header: h,
|
||||
monthNames: ["Enero", "Febrero", "Marzo", "Abril", "Mayo", "Junio", "Julio", "Agosto", "Septiembre", "Octubre", "Noviembre", "Diciembre"],
|
||||
monthNamesShort: ['Ene', 'Feb', 'Mar', 'Abr', 'May', 'Jun', 'Jul', 'Ago', 'Sep', 'Oct', 'Nov', 'Dic'],
|
||||
dayNames: ['Domingo', 'Lunes', 'Martes', 'Miércoles', 'Jueves', 'Viernes', 'Sábado'],
|
||||
dayNamesShort: ['Dom', 'Lun', 'Mar', 'Mié', 'Jue', 'Vie', 'Sáb'],
|
||||
buttonText: {
|
||||
today: 'Hoy',
|
||||
week: 'Semana',
|
||||
month: 'Mes',
|
||||
day: 'Día'
|
||||
},
|
||||
eventClick: updateEvent,
|
||||
selectable: true,
|
||||
selectHelper: true,
|
||||
select: selectDate,
|
||||
editable: true,
|
||||
minTime: "08:00:00",
|
||||
maxTime: "19:00:00",
|
||||
events: {
|
||||
url: '/Ashx/CargaEventos.ashx',
|
||||
type: 'GET',
|
||||
data: {
|
||||
U: ' <%= UsuarioActual.CveUsuario %>',
|
||||
E: '<%= UsuarioActual.CveEmpresa %>',
|
||||
METODO: 'contrato_transportes',
|
||||
CveUsuarioPara: $('#DdlTecnico').val(),
|
||||
CveSubProyecto: $('#DdlSubProyecto').val()
|
||||
}
|
||||
},
|
||||
eventDrop: eventDropped,
|
||||
eventResize: eventResized
|
||||
});
|
||||
clickSemana();
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
</asp:Content>
|
||||
21
Transportes/RepContratosCalendario.aspx.vb
Normal file
21
Transportes/RepContratosCalendario.aspx.vb
Normal file
@@ -0,0 +1,21 @@
|
||||
Option Explicit On
|
||||
Option Strict On
|
||||
|
||||
Partial Class RepContratosCalendario
|
||||
Inherits ClsPaginas
|
||||
|
||||
#Region "PROPIEDADES"
|
||||
|
||||
#End Region
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||
If Not IsPostBack Then
|
||||
InicializaCalendar()
|
||||
End If
|
||||
End Sub
|
||||
Private Sub InicializaCalendar()
|
||||
RegistraScript("InitCalendar();")
|
||||
DirectCast(Master.FindControl("TSM"), ScriptManager).EnablePageMethods = True
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
197
UserControl/AddMedico.ascx
Normal file
197
UserControl/AddMedico.ascx
Normal file
@@ -0,0 +1,197 @@
|
||||
<%@ Control Language="VB" AutoEventWireup="false" CodeFile="AddMedico.ascx.vb" Inherits="UserControl_AddMedico" %>
|
||||
|
||||
<div id="DVAgregarMedico" style="margin-top:-30px!important">
|
||||
<div class="modal-dialog" style="min-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 Médico</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="GrpGuardarMedico"></asp:RequiredFieldValidator>
|
||||
<label for="<%= TxtMedico.ClientID.ToString()%>">Médico:</label>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<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>
|
||||
<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; margin-top: -5px !important;">
|
||||
<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="GrpGuardarMedico"></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="GrpGuardarMedico"></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>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<br />
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtTelefono" CssClass="form-control " runat="server" MaxLength="10" CausesValidation="true"></asp:TextBox>
|
||||
<ajax:MaskedEditExtender ID="MEETelefono" runat="server" TargetControlID="TxtTelefono" ClearMaskOnLostFocus="false" MaskType="Number" Mask="(999) 999-9999" MessageValidatorTip="true" InputDirection="LeftToRight" ErrorTooltipEnabled="True"></ajax:MaskedEditExtender>
|
||||
<label for="<%= TxtTelefono.ClientID.ToString()%>">Teléfono:</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtCelular" CssClass="form-control " runat="server" MaxLength="10" CausesValidation="true"></asp:TextBox>
|
||||
<ajax:MaskedEditExtender ID="MaskedEditExtender1" runat="server" TargetControlID="TxtCelular" ClearMaskOnLostFocus="false" MaskType="Number" Mask="(999) 999-9999" MessageValidatorTip="true" InputDirection="LeftToRight" ErrorTooltipEnabled="True"></ajax:MaskedEditExtender>
|
||||
<label for="<%= TxtCelular.ClientID.ToString()%>">Celular:</label>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtMail" CssClass="form-control " runat="server" MaxLength="300" CausesValidation="true"></asp:TextBox>
|
||||
<ajax:FilteredTextBoxExtender ID="FilTxtMail" runat="server" FilterType="Numbers, LowercaseLetters, UppercaseLetters, Custom" ValidChars=".;@_-ñ" TargetControlID="TxtMail" />
|
||||
<asp:RegularExpressionValidator ID="RETxtMail" runat="server" CssClass="help-block errorimput"
|
||||
ValidationExpression="(([a-zA-Z0-9ñÑ_\-\.]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([a-zA-Z0-9\-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)(\s*;\s*|\s*$))*"
|
||||
ControlToValidate="TxtMail" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Correo''</b> no es válido, por favor ingrése uno correcto." ValidationGroup="GrpGuardarMedico"></asp:RegularExpressionValidator>
|
||||
<label for="<%= TxtMail.ClientID.ToString()%>">Correo:</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:DropDownList ID="DdlEspecialidad" CssClass="form-control select2me" runat="server" DataTextField="Especialidad" Width="100%" DataValueField="CveMedicoEspecialidad" AutoPostBack="true" OnSelectedIndexChanged="DdlEspecialidad_SelectedIndexChanged"></asp:DropDownList>
|
||||
<label for="<%= DdlEspecialidad.ClientID.ToString()%>">Especialidad:</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:DropDownList ID="DdlSubEspecialidad" CssClass="form-control select2me" runat="server" DataTextField="SubEspecialidad" Width="100%" DataValueField="CveMedicoSubEspecialidad"></asp:DropDownList>
|
||||
<label for="<%= DdlEspecialidad.ClientID.ToString()%>">Sub Especialidad:</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<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="row">
|
||||
<div class="col-md-6">
|
||||
<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>
|
||||
<div class="col-md-6">
|
||||
<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>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<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()%>">Hospital:</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtConsultorio" CssClass="form-control " runat="server" MaxLength="50" CausesValidation="true"></asp:TextBox>
|
||||
<label for="<%= TxtConsultorio.ClientID.ToString()%>">Consultorio:</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtTorre" CssClass="form-control " runat="server" MaxLength="50" CausesValidation="true"></asp:TextBox>
|
||||
<label for="<%= TxtTorre.ClientID.ToString()%>">Torre:</label>
|
||||
</div>
|
||||
</div>
|
||||
</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 class="row" runat="server" id="DVUsuarioFechaIng" visible ="false">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtUsuario" CssClass="form-control " runat="server" MaxLength="250" CausesValidation="true" Enabled="false"></asp:TextBox>
|
||||
<label for="<%= TxtUsuario.ClientID.ToString()%>">Usuario:</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group form-md-line-input input-iconright" >
|
||||
<asp:TextBox ID="TxtFechaIng" CssClass="form-control " runat="server" MaxLength="250" CausesValidation="true" Enabled="false"></asp:TextBox>
|
||||
<label for="<%= TxtFechaIng.ClientID.ToString()%>">Fecha Ing.:</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="modal-footer">
|
||||
<asp:Button ID="LbAgregar" runat="server" class="btn btn-success" Text="Agregar" ValidationGroup="GrpGuardarMedico" />
|
||||
<button id="BtnCancelarMedico" runat="server" type="button" class="btn default" data-dismiss="modal" ClientIDMode="Static" >Cancelar</button>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</div>
|
||||
187
UserControl/AddMedico.ascx.vb
Normal file
187
UserControl/AddMedico.ascx.vb
Normal file
@@ -0,0 +1,187 @@
|
||||
Imports Extensiones
|
||||
|
||||
Partial Class UserControl_AddMedico
|
||||
Inherits System.Web.UI.UserControl
|
||||
|
||||
Public ReadOnly Property UsuarioActual As Usuario
|
||||
Get
|
||||
If Context.Session("UsuarioSIG") Is Nothing Then
|
||||
Return Nothing
|
||||
Else
|
||||
Return DirectCast(Context.Session("UsuarioSIG"), Usuario)
|
||||
End If
|
||||
End Get
|
||||
End Property
|
||||
|
||||
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
|
||||
|
||||
Private Sub UserControl_AddMedico_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||
|
||||
If Not Page.IsPostBack Then
|
||||
CargaEspecialidad()
|
||||
CargaSubEspecialidad(-1)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
|
||||
Sub CargaEspecialidad()
|
||||
Dim ObjVentas As New ClsVentas
|
||||
|
||||
If ObjVentas.GetMedicosEspecialidades(-1, UsuarioActual.CveEmpresa, -1) Then
|
||||
DdlEspecialidad.DataSource = ObjVentas.DtResultados
|
||||
Else
|
||||
DdlEspecialidad.DataSource = Nothing
|
||||
End If
|
||||
|
||||
ObjVentas.Dispose()
|
||||
|
||||
DdlEspecialidad.DataBind()
|
||||
DdlEspecialidad.Items.Insert(0, New ListItem("Seleccione uno", "-1"))
|
||||
|
||||
UpModal.Update()
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
Sub CargaSubEspecialidad(CveMedicoEspecialidad As Integer)
|
||||
Dim ObjVentas As New ClsVentas
|
||||
|
||||
If ObjVentas.GetMedicosSubEspecialidades(-1, UsuarioActual.CveEmpresa, -1) Then
|
||||
If CveMedicoEspecialidad > 0 Then
|
||||
DdlSubEspecialidad.DataSource = ObjVentas.DtResultados.FiltraParametros($"CveMedicoEspecialidad = {CveMedicoEspecialidad}")
|
||||
Else
|
||||
DdlSubEspecialidad.DataSource = ObjVentas.DtResultados
|
||||
End If
|
||||
End If
|
||||
|
||||
ObjVentas.Dispose()
|
||||
|
||||
DdlSubEspecialidad.DataBind()
|
||||
DdlSubEspecialidad.Items.Insert(0, New ListItem("Seleccione uno", "-1"))
|
||||
UpModal.Update()
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Sub DdlEspecialidad_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||
CargaSubEspecialidad(DdlEspecialidad.SelectedValue.ToEntero)
|
||||
End Sub
|
||||
|
||||
|
||||
Public Sub LimpiarControles()
|
||||
LbAgregar.Text = "Agregar"
|
||||
LtlTituloModal.Text = "Agregar Médico"
|
||||
|
||||
TxtMedico.Text = ""
|
||||
TxtCedulaProfecional.Text = ""
|
||||
TxtFechaNacimiento.Text = ""
|
||||
TxtNotas.Text = ""
|
||||
TxtDiasAtencion.Text = ""
|
||||
TxtHorario.Text = ""
|
||||
TxtLugar.Text = ""
|
||||
TxtConsultorio.Text = ""
|
||||
TxtMail.Text = ""
|
||||
TxtTelefono.Text = ""
|
||||
TxtCelular.Text = ""
|
||||
DdlEspecialidad.SelectedValueExist(-1)
|
||||
DdlSubEspecialidad.SelectedValueExist(-1)
|
||||
TxtTorre.Text = ""
|
||||
DVUsuarioFechaIng.Visible = False
|
||||
TxtFechaIng.Text = ""
|
||||
TxtUsuario.Text = ""
|
||||
|
||||
|
||||
DVEstatus.Visible = False
|
||||
ChkEstatus.Checked = True
|
||||
|
||||
UpModal.Update()
|
||||
CveMedico = -1
|
||||
End Sub
|
||||
|
||||
Public Sub PreparaEdicion(CveMedicoEditar As Integer, Medico As String, CedulaProfecional As String, FechaNacimiento As Date, Notas As String, DiasAtencion As String, Horario As String, Lugar As String, Consultorio As String, Estatus As Boolean,
|
||||
Mail As String, Telefono As String, Celular As String, CveMedicoEspecialidad As Integer, CveMedicoSubEspecialidad As Integer, Torre As String, FechaIng As DateTime, Usuario As String)
|
||||
|
||||
|
||||
|
||||
CveMedico = CveMedicoEditar
|
||||
|
||||
TxtMedico.Text = Medico
|
||||
TxtCedulaProfecional.Text = CedulaProfecional
|
||||
TxtFechaNacimiento.Text = FechaNacimiento.ToString("dd/MM/yyyy")
|
||||
TxtNotas.Text = Notas
|
||||
TxtDiasAtencion.Text = DiasAtencion
|
||||
TxtHorario.Text = Horario
|
||||
TxtLugar.Text = Lugar
|
||||
TxtConsultorio.Text = Consultorio
|
||||
ChkEstatus.Checked = Estatus
|
||||
TxtMail.Text = Mail
|
||||
TxtTelefono.Text = Telefono
|
||||
TxtCelular.Text = Celular
|
||||
DdlEspecialidad.SelectedValueExist(CveMedicoEspecialidad)
|
||||
CargaSubEspecialidad(CveMedicoEspecialidad)
|
||||
DdlSubEspecialidad.SelectedValueExist(CveMedicoSubEspecialidad)
|
||||
TxtTorre.Text = Torre
|
||||
|
||||
DVUsuarioFechaIng.Visible = True
|
||||
TxtFechaIng.Text = FechaIng.ToString("dd/MM/yyyy hh:mm:ss tt")
|
||||
TxtUsuario.Text = Usuario
|
||||
|
||||
DVEstatus.Visible = True
|
||||
LbAgregar.Text = "Actualizar"
|
||||
LtlTituloModal.Text = $"Actualizar Médico {TxtCedulaProfecional.Text}"
|
||||
|
||||
UpModal.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 CveMedicoNuevo As Integer = -1
|
||||
|
||||
|
||||
Dim Telefono As String = If(TxtTelefono.Text = "(___) ___-____", "", TxtTelefono.Text)
|
||||
Dim Celular As String = If(TxtCelular.Text = "(___) ___-____", "", TxtCelular.Text)
|
||||
|
||||
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, Telefono, TxtMail.Text, DdlEspecialidad.SelectedValue.ToEntero, Celular, TxtConsultorio.Text.Trim, DdlSubEspecialidad.SelectedValue.ToEntero, TxtTorre.Text.Trim) Then
|
||||
ProcesoOK = True
|
||||
End If
|
||||
Else
|
||||
|
||||
CveMedicoNuevo = 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, Telefono, TxtMail.Text, DdlEspecialidad.SelectedValue.ToEntero, Celular, TxtConsultorio.Text.Trim, DdlSubEspecialidad.SelectedValue.ToEntero, TxtTorre.Text.Trim)
|
||||
|
||||
If CveMedicoNuevo > 0 Then
|
||||
ProcesoOK = True
|
||||
End If
|
||||
End If
|
||||
|
||||
ObjVentas.Dispose()
|
||||
|
||||
If ProcesoOK Then
|
||||
ClsPaginas.Alert($"Medico {If(CveMedico > 0, "Actualizado", "Guardado")} Correctamente.")
|
||||
Dim AppNombre As String = $"GlobalDTAgentes-{UsuarioActual.CveEmpresa}"
|
||||
Application(AppNombre) = Nothing
|
||||
RegistraScript($"fncRegargaMedicos({CveMedicoNuevo});")
|
||||
RegistraScript("$('#BtnCancelarMedico').click();")
|
||||
|
||||
End If
|
||||
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
42
UserControl/AddProcedimiento.ascx
Normal file
42
UserControl/AddProcedimiento.ascx
Normal file
@@ -0,0 +1,42 @@
|
||||
<%@ Control Language="VB" AutoEventWireup="false" CodeFile="AddProcedimiento.ascx.vb" Inherits="UserControl_AddProcedimiento" %>
|
||||
|
||||
<div id="DVAgregarProcedimiento" style="margin-top:-30px!important">
|
||||
<div class="modal-dialog" style="min-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 Procedimiento</asp:Literal></h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtProcedimiento" CssClass="form-control" runat="server" MaxLength="150"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVRol" runat="server" ControlToValidate="TxtProcedimiento" Display="None"
|
||||
ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>'Nombre del Procedimiento''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardarProcedimiento"></asp:RequiredFieldValidator>
|
||||
<label for="<%= TxtProcedimiento.ClientID.ToString()%>">Nombre Procedimiento:</label>
|
||||
</div>
|
||||
<div class="form-group form-md-line-input input-iconright" id="Div1" runat="server">
|
||||
<label for="<%= ChkEstatus.ClientID.ToString()%>">Activo:</label>
|
||||
<asp:CheckBox ID="ChkEstatus" runat="server" CssClass="form-control make-switchsd" data-size="small"></asp:CheckBox>
|
||||
</div>
|
||||
<div class="form-group form-md-line-input input-iconright" id="LblFechaAlta" runat="server" visible="false">
|
||||
<label for="<%= LblFecha.ClientID.ToString()%>">Fecha:</label>
|
||||
<asp:Label ID="LblFecha" runat="server"></asp:Label>
|
||||
</div>
|
||||
<div class="form-group form-md-line-input input-iconright" id="LblUsuarioAlta" runat="server" visible="false" >
|
||||
<label for="<%= LblUsuario.ClientID.ToString()%>">Usuario:</label>
|
||||
<asp:Label ID="LblUsuario" runat="server"></asp:Label>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="modal-footer">
|
||||
<asp:Button ID="LbAgregar" runat="server" class="btn btn-success" Text="Agregar" ValidationGroup="GrpGuardarProcedimiento" />
|
||||
<button id="BtnCancelarProcedimiento" runat="server" type="button" class="btn default" data-dismiss="modal" ClientIDMode="Static" >Cancelar</button>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</div>
|
||||
81
UserControl/AddProcedimiento.ascx.vb
Normal file
81
UserControl/AddProcedimiento.ascx.vb
Normal file
@@ -0,0 +1,81 @@
|
||||
Imports Extensiones
|
||||
Partial Class UserControl_AddProcedimiento
|
||||
Inherits System.Web.UI.UserControl
|
||||
|
||||
Public ReadOnly Property UsuarioActual As Usuario
|
||||
Get
|
||||
If Context.Session("UsuarioSIG") Is Nothing Then
|
||||
Return Nothing
|
||||
Else
|
||||
Return DirectCast(Context.Session("UsuarioSIG"), Usuario)
|
||||
End If
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public Property CveProcedimiento As Integer
|
||||
Get
|
||||
If ViewState("CveProcedimiento") Is Nothing Then
|
||||
ViewState("CveProcedimiento") = -1
|
||||
End If
|
||||
Return ViewState("CveProcedimiento").ToString.ToEntero
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
ViewState("CveProcedimiento") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
|
||||
Private Sub UserControl_AddProcedimiento_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||
If Not Page.IsPostBack Then
|
||||
|
||||
End If
|
||||
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 CveProcedimientoNuevo As Integer = -1
|
||||
|
||||
If CveProcedimiento > 0 Then
|
||||
If ObjVentas.UpdateProcedimiento(CveProcedimiento, TxtProcedimiento.Text.Trim, ChkEstatus.Checked, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
|
||||
'Alert($"Procedimiento Actualizado Correctamente.")
|
||||
ProcesoOK = True
|
||||
End If
|
||||
Else
|
||||
|
||||
CveProcedimientoNuevo = ObjVentas.AddProcedimiento(TxtProcedimiento.Text.Trim, ChkEstatus.Checked, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
||||
If CveProcedimientoNuevo > 0 Then
|
||||
ProcesoOK = True
|
||||
'TabProductos.Visible = True
|
||||
'TabVentas.Visible = True
|
||||
'LnkAgregarProducto.Visible = True
|
||||
'UpDatos.Update()
|
||||
'Alert($"Procedimiento Guardado Correctamente.")
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
ObjVentas.Dispose()
|
||||
|
||||
If ProcesoOK Then
|
||||
ClsPaginas.Alert($"Procedimiento {If(CveProcedimiento > 0, "Actualizado", "Guardado")} Correctamente.")
|
||||
Dim AppNombre As String = $"GlobalDTProcedimientos-{UsuarioActual.CveEmpresa}"
|
||||
Application(AppNombre) = Nothing
|
||||
RegistraScript($"fncRegargaProcedimientos({CveProcedimientoNuevo});")
|
||||
RegistraScript("$('#BtnCancelarProcedimiento').click();")
|
||||
|
||||
End If
|
||||
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
Public Sub LimpiarControles()
|
||||
TxtProcedimiento.Text = ""
|
||||
ChkEstatus.Checked = True
|
||||
UpModal.Update()
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
@@ -312,7 +312,7 @@
|
||||
</ajax:TabPanel>
|
||||
|
||||
|
||||
<ajax:TabPanel ID="TabEspeciliadad" runat="server" HeaderText="Especialidades" ClientIDMode="Static" Visible="false">
|
||||
<%-- <ajax:TabPanel ID="TabEspeciliadad" runat="server" HeaderText="Especialidades" ClientIDMode="Static" Visible="false">
|
||||
<ContentTemplate>
|
||||
|
||||
<asp:UpdatePanel ID="UpEspecialidad" runat="server" UpdateMode="Conditional">
|
||||
@@ -372,7 +372,7 @@
|
||||
</asp:UpdatePanel>
|
||||
|
||||
</ContentTemplate>
|
||||
</ajax:TabPanel>
|
||||
</ajax:TabPanel>--%>
|
||||
|
||||
</ajax:TabContainer>
|
||||
</ContentTemplate>
|
||||
@@ -383,7 +383,7 @@
|
||||
|
||||
|
||||
<div id="DVAgregarMedico" class="modal ADS fade" role="dialog">
|
||||
<div class="modal-dialog" style="width: 450px;">
|
||||
<div class="modal-dialog" style="min-width: 450px;">
|
||||
<asp:UpdatePanel runat="server" class="modal-content" ID="UpModal" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="modal-header ">
|
||||
|
||||
@@ -35,16 +35,40 @@ Partial Class Ventas_CatMedicos
|
||||
|
||||
|
||||
|
||||
|
||||
Public Property EsFrame As Boolean
|
||||
Get
|
||||
If ViewState("EsFrame") Is Nothing Then
|
||||
ViewState("EsFrame") = False
|
||||
End If
|
||||
Return Boolean.Parse(ViewState("EsFrame").ToString)
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
ViewState("EsFrame") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||
|
||||
If Not Page.IsPostBack Then
|
||||
|
||||
If Request("EsFrame") IsNot Nothing AndAlso Request("EsFrame").ToEntero = 1 Then
|
||||
EsFrame = True
|
||||
End If
|
||||
|
||||
CargaCombos()
|
||||
CargaDatos()
|
||||
CargaEspecialidad()
|
||||
CargaSubEspecialidad(-1)
|
||||
BtnConsultar_Click(Nothing, Nothing)
|
||||
|
||||
If EsFrame Then
|
||||
LnkAgregarMedico_Click(Nothing, Nothing)
|
||||
Else
|
||||
CargaDatos()
|
||||
BtnConsultar_Click(Nothing, Nothing)
|
||||
End If
|
||||
|
||||
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
@@ -72,6 +96,7 @@ Partial Class Ventas_CatMedicos
|
||||
End Sub
|
||||
|
||||
Protected Sub LbAgregar_Click(sender As Object, e As System.EventArgs) Handles LbAgregar.Click
|
||||
|
||||
Dim ProcesoOK = False
|
||||
Dim ObjVentas As New ClsVentas
|
||||
|
||||
@@ -86,7 +111,7 @@ Partial Class Ventas_CatMedicos
|
||||
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, Telefono, TxtMail.Text, DdlEspecialidad.SelectedValue.ToEntero, Celular, TxtConsultorio.Text.Trim, DdlSubEspecialidad.SelectedValue.ToEntero, TxtTorre.Text.Trim) Then
|
||||
UsuarioActual.CveEmpresa, Telefono, TxtMail.Text, DdlEspecialidad.SelectedValue.ToEntero, Celular, TxtConsultorio.Text.Trim, DdlSubEspecialidad.SelectedValue.ToEntero, TxtTorre.Text.Trim) > 0 Then
|
||||
ProcesoOK = True
|
||||
End If
|
||||
End If
|
||||
@@ -102,6 +127,8 @@ Partial Class Ventas_CatMedicos
|
||||
End If
|
||||
|
||||
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
#Region "G V D A T O S"
|
||||
@@ -284,12 +311,12 @@ Partial Class Ventas_CatMedicos
|
||||
SbFiltros.AppendFormat($"Fecha Inicio: {txtFechaI.Text} Fecha Fin: {txtFechaF.Text}|")
|
||||
GvDatos.ExportToExcelGembox("CatMedicos", UsuarioActual, "Catálogo de Médicos", DatoTituloExtra:=$"", DatosFiltros:=SbFiltros.ToString())
|
||||
GvDatos.Columns(10).Visible = True
|
||||
ElseIf Tabs.ActiveTabIndex = 2 Then
|
||||
GvEspecialidad.Columns(4).Visible = False
|
||||
Dim SbFiltros As New StringBuilder()
|
||||
SbFiltros.AppendFormat($"Fecha Inicio: {txtFechaI.Text} Fecha Fin: {txtFechaF.Text}|")
|
||||
GvEspecialidad.ExportToExcelGembox("CatEspecialidades", UsuarioActual, "Catálogo de Especialidades", DatoTituloExtra:=$"", DatosFiltros:=SbFiltros.ToString())
|
||||
GvEspecialidad.Columns(4).Visible = True
|
||||
'ElseIf Tabs.ActiveTabIndex = 2 Then
|
||||
' GvEspecialidad.Columns(4).Visible = False
|
||||
' Dim SbFiltros As New StringBuilder()
|
||||
' SbFiltros.AppendFormat($"Fecha Inicio: {txtFechaI.Text} Fecha Fin: {txtFechaF.Text}|")
|
||||
' GvEspecialidad.ExportToExcelGembox("CatEspecialidades", UsuarioActual, "Catálogo de Especialidades", DatoTituloExtra:=$"", DatosFiltros:=SbFiltros.ToString())
|
||||
'GvEspecialidad.Columns(4).Visible = True
|
||||
End If
|
||||
|
||||
|
||||
@@ -392,21 +419,21 @@ Partial Class Ventas_CatMedicos
|
||||
Dim ObjVentas As New ClsVentas
|
||||
|
||||
If ObjVentas.GetMedicosEspecialidades(-1, UsuarioActual.CveEmpresa, -1) Then
|
||||
GvEspecialidad.DataSource = ObjVentas.DtResultados
|
||||
'GvEspecialidad.DataSource = ObjVentas.DtResultados
|
||||
DdlEspecialidad.DataSource = ObjVentas.DtResultados
|
||||
Else
|
||||
GvEspecialidad.DataSource = Nothing
|
||||
'GvEspecialidad.DataSource = Nothing
|
||||
End If
|
||||
|
||||
ObjVentas.Dispose()
|
||||
|
||||
GvEspecialidad.DataBind()
|
||||
'GvEspecialidad.DataBind()
|
||||
|
||||
DdlEspecialidad.DataBind()
|
||||
DdlEspecialidad.Items.Insert(0, New ListItem("Seleccione uno", "-1"))
|
||||
|
||||
UpModal.Update()
|
||||
UpEspecialidad.Update()
|
||||
'UpEspecialidad.Update()
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
@@ -294,7 +294,7 @@
|
||||
CssClass="ScrollAD table table-striped table-hover Widthall" data-heighterror="320" data-freezecols="0" data-freezerows="0" GridLines="None"
|
||||
DataKeyNames="CveVenta,TipoDocto,Saldo,DescripcionVenta">
|
||||
<Columns>
|
||||
<asp:BoundField HeaderText="Descripcion" DataField="DescripcionVenta" ItemStyle-HorizontalAlign="Center" />
|
||||
<asp:BoundField HeaderText="Descripción" DataField="DescripcionVenta" ItemStyle-HorizontalAlign="Center" />
|
||||
<asp:BoundField HeaderText="Folio" DataField="SerieFolio" ItemStyle-HorizontalAlign="Center" />
|
||||
<asp:BoundField HeaderText="Fecha/Hora" DataField="Fecha" ItemStyle-HorizontalAlign="Center" />
|
||||
<asp:BoundField HeaderText="Importe" DataField="Saldo" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
||||
|
||||
@@ -1,6 +1,10 @@
|
||||
<%@ Page Title="Ventas - Facturación" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="Ventas.aspx.vb" Inherits="Ventas" EnableEventValidation="false" %>
|
||||
|
||||
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
|
||||
<%@ Register Src="~/UserControl/AddMedico.ascx" TagPrefix="UserControl" TagName="AddMedico" %>
|
||||
<%@ Register Src="~/UserControl/AddProcedimiento.ascx" TagPrefix="UserControl" TagName="AddProcedimiento" %>
|
||||
|
||||
|
||||
<%--Necesario para el modal que no se cierra--%>
|
||||
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
||||
@@ -603,6 +607,20 @@
|
||||
<asp:TextBox ID="TxtFechaOS" type="datetime-local" runat="server" CssClass="make-switchsd" CausesValidation="true" Style="width: 130px"></asp:TextBox>
|
||||
</td>
|
||||
</tr>
|
||||
<tr runat="server" id="TrVentasMedicas3" visible="false">
|
||||
<td runat="server" id="Td6" visible="true">
|
||||
<b>Paciente:</b>
|
||||
</td>
|
||||
<td runat="server">
|
||||
<asp:TextBox ID="TxtPaciente" runat="server" CssClass="make-switchsd" Style="width: 130px" MaxLength="50"></asp:TextBox>
|
||||
</td>
|
||||
<td runat="server" id="Td9" visible="true">
|
||||
<b>Episodio:</b>
|
||||
</td>
|
||||
<td runat="server">
|
||||
<asp:TextBox ID="TxtEpisodio" runat="server" CssClass="make-switchsd" Style="width: 130px" MaxLength="20"></asp:TextBox>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
@@ -8427,36 +8445,14 @@
|
||||
</div>
|
||||
|
||||
|
||||
<%--Cliente--%>
|
||||
<%-- <div runat="server" visible="False" id="DvModalTipoVentaPasoClienteEliminar">
|
||||
<div class="row">
|
||||
<div class="form-group col-md-12 form-md-line-input input-iconright ">
|
||||
<asp:Label runat="server" Style="width: 90%; color: #888888;" AssociatedControlID="DdlClientesWS">Hospital:</asp:Label>
|
||||
<ADS:Dropdownlost CssClassDdl="select2me" ID="DdlClientesWS" Width="100%" data-metodo="getcliente" runat="server" DataTextField="NombreComercial" DataValueField="CveCliente" CssStyle="width: 100%;" Onselectedindexchange="DdlClientesWS_selectedindexchange"></ADS:Dropdownlost>
|
||||
</div>
|
||||
</div>
|
||||
</div>--%>
|
||||
|
||||
|
||||
<%--Sucursales--%>
|
||||
<%-- <div runat="server" visible="False" id="DvModalClientesucursal">
|
||||
<div class="row">
|
||||
|
||||
<div class="form-group col-md-12 form-md-line-input input-iconright ">
|
||||
<asp:DropDownList ID="DdlSucursalClienteModal" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" DataTextField="SucursalCliente" DataValueField="CveClienteSucursal">
|
||||
<asp:ListItem Value="-1">Seleccione uno</asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
<asp:Label runat="server" Style="width: 90%; color: #888888;" AssociatedControlID="DdlSucursalClienteModal">Sucursal:</asp:Label>
|
||||
</div>
|
||||
</div>
|
||||
</div>--%>
|
||||
|
||||
|
||||
|
||||
<%--Medico Procedimiento--%>
|
||||
<div runat="server" visible="False" id="DvModalTipoVentaPasoMedicoProcedimiento">
|
||||
<div class="row">
|
||||
|
||||
<div class="form-group col-md-6 form-md-line-input input-iconright ">
|
||||
<div class="form-group col-md-5 form-md-line-input input-iconright ">
|
||||
<asp:DropDownList ID="DdlMedicoModal" 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>
|
||||
@@ -8465,7 +8461,10 @@
|
||||
<ajax:ValidatorCalloutExtender ID="VCRfvDdlMedicoModal" runat="server" HighlightCssClass="vco" TargetControlID="RfvDdlMedicoModal" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
<asp:Label runat="server" Style="width: 90%; color: #888888;" AssociatedControlID="DdlMedicoModal">Médico:</asp:Label>
|
||||
</div>
|
||||
<div class="form-group col-md-6 form-md-line-input input-iconright ">
|
||||
<div class="form-group col-md-1 form-md-line-input input-iconright ">
|
||||
<asp:LinkButton runat="server" ID="LnkAddMedicoModal" OnClick="LnkAddMedicoModal_Click" CssClass="btn btn-default btn-circle btn-sm" Text="<i class='fa fa-plus' style='color:green'></i>" style="margin-top:8px!important" ></asp:LinkButton>
|
||||
</div>
|
||||
<div class="form-group col-md-5 form-md-line-input input-iconright ">
|
||||
<asp:DropDownList ID="DdlProcedimientoModal" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" CausesValidation="true" DataTextField="Procedimiento" DataValueField="CveProcedimiento"
|
||||
OnSelectedIndexChanged="DdlProcedimientoModal_SelectedIndexChanged" AutoPostBack="true">
|
||||
<asp:ListItem Value="-1">Seleccione uno</asp:ListItem>
|
||||
@@ -8476,6 +8475,9 @@
|
||||
<ajax:ValidatorCalloutExtender ID="VCRfvDdlProcedimientoModal" runat="server" HighlightCssClass="vco" TargetControlID="RfvDdlProcedimientoModal" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
<asp:Label runat="server" Style="width: 90%; color: #888888;" AssociatedControlID="DdlProcedimientoModal">Procedimiento:</asp:Label>
|
||||
</div>
|
||||
<div class="form-group col-md-1 form-md-line-input input-iconright ">
|
||||
<asp:LinkButton runat="server" ID="LnkAddProcedimientoModal" OnClick="LnkAddProcedimientoModal_Click" CssClass="btn btn-default btn-circle btn-sm" Text="<i class='fa fa-plus' style='color:green'></i>" style="margin-top:8px!important"></asp:LinkButton>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
@@ -8531,8 +8533,44 @@
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div id="DvModalAddMedico" class="modal ADS fade" role="dialog">
|
||||
|
||||
<asp:UpdatePanel class="modal-dialog" runat="server" ID="UpModalAddMedico" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
|
||||
<div class="modal-content" style="max-width:600px!important;max-height:505px!important">
|
||||
<UserControl:AddMedico runat="server" ID="AddMedicoControl" />
|
||||
</div>
|
||||
<asp:Button ID="BtnRecargaMedicos" Style="display: none;" ClientIDMode="Static" runat="server" OnClick="BtnRecargaMedicos_Click" />
|
||||
<asp:HiddenField ID="HdnCveMedicoNuevo" runat="server" ClientIDMode="Static" Value="-1" />
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
|
||||
<div id="DvModalAddProcedimiento" class="modal ADS fade" role="dialog">
|
||||
|
||||
<asp:UpdatePanel class="modal-dialog" runat="server" ID="UpModalAddProcedimiento" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="modal-content" style="max-width:600px!important;max-height:505px!important">
|
||||
<UserControl:AddProcedimiento runat="server" ID="AddProcedimientoControl" />
|
||||
</div>
|
||||
<asp:Button ID="BtnRecargaProcedimientos" Style="display: none;" ClientIDMode="Static" runat="server" OnClick="BtnRecargaProcedimientos_Click" />
|
||||
<asp:HiddenField ID="HdnCveProcedimientoNuevo" runat="server" ClientIDMode="Static" Value="-1" />
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
||||
<script src="/Metronic/assets/global/scripts/jquery-sortable.js"></script>
|
||||
@@ -10457,7 +10495,17 @@
|
||||
}
|
||||
|
||||
|
||||
|
||||
function fncRegargaMedicos(CveNuevoMedico) {
|
||||
|
||||
$("#HdnCveMedicoNuevo").val(CveNuevoMedico)
|
||||
$('#BtnRecargaMedicos').click();
|
||||
}
|
||||
|
||||
function fncRegargaProcedimientos(CveProcedimientoNuevo) {
|
||||
|
||||
$("#HdnCveProcedimientoNuevo").val(CveProcedimientoNuevo)
|
||||
$('#BtnRecargaProcedimientos').click();
|
||||
}
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
@@ -5876,13 +5876,21 @@ Partial Class Ventas
|
||||
|
||||
CveTipoVenta = If(DbRowVenta("CveTipoVenta").ToString.ToEntero > 0, DbRowVenta("CveTipoVenta").ToString.ToEntero, -1)
|
||||
|
||||
TrVentasMedicas3.Visible = True
|
||||
|
||||
If DbRowVenta("CveMedico").ToString.ToEntero > 0 AndAlso CveTipoVenta.Contiene(1, 2, 3, 5) Then
|
||||
TrVentasMedicas1.Visible = True
|
||||
|
||||
DdlMedico.SelectedValueExist(DbRowVenta("CveMedico").ToString)
|
||||
DdlProcedimiento.SelectedValueExist(DbRowVenta("CveProcedimiento").ToString)
|
||||
TxtPaciente.Text = DbRowVenta("Paciente").ToString
|
||||
TxtEpisodio.Text = DbRowVenta("Episodio").ToString
|
||||
|
||||
DdlMedico.Enabled = False
|
||||
DdlProcedimiento.Enabled = False
|
||||
TxtPaciente.Enabled = False
|
||||
TxtEpisodio.Enabled = False
|
||||
|
||||
|
||||
If DbRowVenta("FechaParaSurtir").ToString().ToDate() > DateTime.MinValue Then
|
||||
TrVentasMedicas2.Visible = True
|
||||
@@ -13335,7 +13343,8 @@ Partial Class Ventas
|
||||
Kilometraje:=TxtKilometraje.Text.ToDouble, EsAmortizacion:=EsNCAmortizacion, CveTipoRetencion:=factura.CveTipoRetencion, CorreoNotificacion:=TxtCorreoNotificaciones.Text,
|
||||
FormaPaqueteria:=RblPaqueteria.SelectedValue.ToEntero, FacturarSucursal:=factura.FacturarSucursal, VentaDesglosaIEPS:=factura.VentaDesglosaIEPS, RFCReceptor:=RFCReceptor, Adjunto:=Adjunto, DevolucionImportePagado:=factura.DevolucionImportePagado, EsGarantia:=factura.EsGarantia, ServicioDomicilio:=TrServicioDomicilio.Visible,
|
||||
CveLineaAdicional:=DdlLineaAdicional.SelectedValue.ToEntero(), DescripcionVenta:=DescripcionVenta,
|
||||
CveMedico:=CveMedico, CveProcedimiento:=CveProcedimiento, CveTipoVenta:=CveTipoVentaGuardar, RequiereOS:=ChkRequiereTecnico.Checked, FechaParaSurtir:=factura.FechaParaSurtir) Then
|
||||
CveMedico:=CveMedico, CveProcedimiento:=CveProcedimiento, CveTipoVenta:=CveTipoVentaGuardar, RequiereOS:=ChkRequiereTecnico.Checked, FechaParaSurtir:=factura.FechaParaSurtir,
|
||||
Paciente:=TxtPaciente.Text, Episodio:=TxtEpisodio.Text) Then
|
||||
ErrorList.Add("Ocurrió un error al Generar la Venta.<br />Revise su factura y cualquier detalle comuníquese a Soporte Técnico")
|
||||
Else
|
||||
If factura.TipoDocto.Contiene("Dev", "Egs") OrElse DtVentasNC IsNot Nothing OrElse CveEstatusRefacturacion > 0 OrElse CveAnticipoPadre > 0 Then
|
||||
@@ -17615,7 +17624,7 @@ Partial Class Ventas
|
||||
Protected Sub LbAgregar_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles LbAgregar.Click
|
||||
AgregarPS()
|
||||
End Sub
|
||||
Private Function ValidaAgregarPS(CvePS As Integer, CveUM As Integer, PU As Double, CveTipoPS As Integer) As Boolean 'NO TOCAR - IPP
|
||||
Private Function ValidaAgregarPS(CvePS As Integer, CveUM As Integer, PU As Double, CveTipoPS As Integer, Optional CantidadModal As Decimal = 0D, Optional PSValidarModal As String = "") As Boolean 'NO TOCAR - IPP
|
||||
|
||||
'VALIDA PARAMETROS
|
||||
If CvePS <= 0 Or CveUM <= 0 Then
|
||||
@@ -17623,6 +17632,10 @@ Partial Class Ventas
|
||||
Return False
|
||||
End If
|
||||
|
||||
If PSValidarModal.Trim.Length > 0 Then
|
||||
HdnPS.Value = PSValidarModal
|
||||
End If
|
||||
|
||||
If HdnPS.Value = "" Or HdnPS.Value = "-1" Then
|
||||
Alert("Es necesario seleccionar el Producto o Servicio a facturar.", TipoMensaje.MsgAdvertencia)
|
||||
Return False
|
||||
@@ -17703,11 +17716,11 @@ Partial Class Ventas
|
||||
|
||||
End If
|
||||
|
||||
If DdlTipoComprobante.SelectedValue <> "Cot" And ChkSinExistencia.Checked = False Then
|
||||
If DdlTipoComprobante.SelectedValue <> "Cot" And ChkSinExistencia.Checked = False Or UsuarioActual.Empresa.Funcionalidad(578).ToEntero = 1 Then
|
||||
'VALIDA EXISTENCIA
|
||||
If UsuarioActual.CveEmpresa.Contiene({72, 80, 119, 153, 140}) Then
|
||||
If UsuarioActual.CveEmpresa.Contiene({72, 80, 119, 153, 140, 186}) Then
|
||||
If CveVenta <= 0 OrElse Me.EsCreaApartirDe Then
|
||||
If Existencia - TmpDT.SUM("Cantidad", $"CvePS = {CvePS} AND (EntregaDirecta IS NULL OR EntregaDirecta < 1)") < TxtCantidad.Text.ToDouble Then
|
||||
If Existencia - TmpDT.SUM("Cantidad", $"CvePS = {CvePS} AND (EntregaDirecta IS NULL OR EntregaDirecta < 1)") < (If(CantidadModal > 0, CantidadModal, TxtCantidad.Text.ToDouble)) Then
|
||||
Alert("No cuenta con la cantidad suficiente en inventario. Cuenta con " + Existencia.FormatoNumero(2) + ".", TipoMensaje.MsgAdvertencia)
|
||||
Return False
|
||||
End If
|
||||
@@ -17722,7 +17735,7 @@ Partial Class Ventas
|
||||
|
||||
'SUMA LO YA RESTADO EN PENDIENTE POR SURTIR QUE PERTENESCA A LA VENTA.
|
||||
'PARA QUE NO RESTE LA EXISTENCIA 2 VECES Y PUEDAS COMPARAR LO REAL
|
||||
If (Existencia + CantidadVenta) - TmpDT.SUM("Cantidad", $"CvePS = {CvePS} And (EntregaDirecta Is NULL Or EntregaDirecta < 1)") < TxtCantidad.Text.ToDouble Then
|
||||
If (Existencia + CantidadVenta) - TmpDT.SUM("Cantidad", $"CvePS = {CvePS} And (EntregaDirecta Is NULL Or EntregaDirecta < 1)") < (If(CantidadModal > 0, CantidadModal, TxtCantidad.Text.ToDouble)) Then
|
||||
Alert("No cuenta con la cantidad suficiente en inventario. Cuenta con " + Existencia.FormatoNumero(2) + ".", TipoMensaje.MsgAdvertencia)
|
||||
Return False
|
||||
End If
|
||||
@@ -21689,6 +21702,8 @@ Partial Class Ventas
|
||||
TrVentasMedicas1.Visible = True
|
||||
DdlMedico.Enabled = True
|
||||
DdlProcedimiento.Enabled = True
|
||||
TxtPaciente.Enabled = True
|
||||
TxtEpisodio.Enabled = True
|
||||
End If
|
||||
|
||||
|
||||
@@ -21863,7 +21878,8 @@ Partial Class Ventas
|
||||
PedidoContrato:=TxtPedidoContrato.Text, AtencionA:=TxtAtencionA.Text.Trim, CveMetodoPago33:=DdlMetodoPago33.SelectedValue.ToEntero(),
|
||||
CveFormaPago33:=DdlFormaPago33.SelectedValue.ToEntero(), TipoDocto:=DdlTipoComprobante.SelectedValue, CveCliente:=CveCliente, CveClienteSucursal:=CveClienteSucursal,
|
||||
OrdenCompra:=TxtOrdenCompra.Text, RetIVA:=TxtRetIVA.Text.ToDecimal, RetISR:=TxtRetISR.Text.ToDecimal, Kilometraje:=TxtKilometraje.Text.ToDecimal, CveUsoCFDi:=DdlUsoCFDI.SelectedValue.ToEntero(),
|
||||
CveVendedor:=DdlVendedor.SelectedValue.ToEntero(), ServicioDomicilio:=TrServicioDomicilio.Visible, CveMedico:=DdlMedico.SelectedValue.ToEntero, CveProcedimiento:=DdlProcedimiento.SelectedValue.ToEntero, FechaParaSurtir:=FechaParaSurtir) Then
|
||||
CveVendedor:=DdlVendedor.SelectedValue.ToEntero(), ServicioDomicilio:=TrServicioDomicilio.Visible, CveMedico:=DdlMedico.SelectedValue.ToEntero, CveProcedimiento:=DdlProcedimiento.SelectedValue.ToEntero,
|
||||
FechaParaSurtir:=FechaParaSurtir, Paciente:=TxtPaciente.Text, Episodio:=TxtEpisodio.Text) Then
|
||||
OcurrioError = True
|
||||
End If
|
||||
|
||||
@@ -33699,6 +33715,8 @@ Partial Class Ventas
|
||||
TrVentasMedicas1.Visible = True
|
||||
DdlMedico.Enabled = True
|
||||
DdlProcedimiento.Enabled = True
|
||||
TxtPaciente.Enabled = True
|
||||
TxtEpisodio.Enabled = True
|
||||
End If
|
||||
|
||||
If UsuarioActual.TienePermisoProceso(289) Then
|
||||
@@ -33755,7 +33773,8 @@ Partial Class Ventas
|
||||
|
||||
If Not ObjVentas.UpdateObservacionesVenta(Me.CveVenta, UsuarioActual.CveEmpresa, DdlVendedor.SelectedValue.ToEntero(), TxtObsFact.Text, RblPaqueteria.SelectedValue.ToEntero(), TxtCorreoNotificaciones.Text,
|
||||
TxtObsAlmacen.Text, TxtPedidoContrato.Text, TxtOrdenCompra.Text, TxtFechaPago.Text, DdlUsoCFDI.SelectedValue.ToEntero, DescripcionVenta:=TxtDescripcionVenta.Text.Trim,
|
||||
CveMedico:=DdlMedico.SelectedValue.ToEntero, CveProcedimiento:=DdlProcedimiento.SelectedValue.ToEntero, FechaParaSurtir:=FechaParaSurtir) Then
|
||||
CveMedico:=DdlMedico.SelectedValue.ToEntero, CveProcedimiento:=DdlProcedimiento.SelectedValue.ToEntero, FechaParaSurtir:=FechaParaSurtir, Paciente:=TxtPaciente.Text,
|
||||
Episodio:=TxtEpisodio.Text) Then
|
||||
TieneError = True
|
||||
End If
|
||||
|
||||
@@ -36112,6 +36131,7 @@ Partial Class Ventas
|
||||
|
||||
TrVentasMedicas1.Visible = True
|
||||
TrVentasMedicas2.Visible = True
|
||||
TrVentasMedicas3.Visible = True
|
||||
|
||||
For Each item As ListItem In RBLTipoVenta.Items
|
||||
item.Text = $"  {item.Text}"
|
||||
@@ -36120,7 +36140,7 @@ Partial Class Ventas
|
||||
RegistraScript("$('#DvModalTipoVenta').modal({ backdrop: 'static', keyboard: false });")
|
||||
End Sub
|
||||
|
||||
Private Sub CargaProcedimientos()
|
||||
Private Sub CargaProcedimientos(Optional CveProcedimientSeleccion As Integer = -1)
|
||||
DdlProcedimiento.DataSource = GlobalDTProcedimientos(UsuarioActual.CveEmpresa).FiltraParametros("Estatus = 'True' ")
|
||||
DdlProcedimiento.DataBind()
|
||||
|
||||
@@ -36128,17 +36148,35 @@ Partial Class Ventas
|
||||
DdlProcedimientoModal.DataBind()
|
||||
|
||||
|
||||
If CveProcedimientSeleccion > 0 Then
|
||||
DdlProcedimientoModal.SelectedValueExist(CveProcedimientSeleccion)
|
||||
End If
|
||||
|
||||
UpDvModalTipoVenta.Update()
|
||||
UpCliente.Update()
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub CargaMedicos()
|
||||
Private Sub CargaMedicos(Optional CveMedicoSeleccion As Integer = -1)
|
||||
|
||||
DdlMedico.ClearSelection()
|
||||
DdlMedico.SelectedValue = Nothing
|
||||
|
||||
DdlMedicoModal.ClearSelection()
|
||||
DdlMedicoModal.SelectedValue = Nothing
|
||||
|
||||
DdlMedico.DataSource = GlobalDTMedicos(UsuarioActual.CveEmpresa).FiltraParametros("Estatus = 'True' ")
|
||||
DdlMedico.DataBind()
|
||||
|
||||
DdlMedicoModal.DataSource = GlobalDTMedicos(UsuarioActual.CveEmpresa).FiltraParametros("Estatus = 'True' ")
|
||||
DdlMedicoModal.DataBind()
|
||||
|
||||
If CveMedicoSeleccion > 0 Then
|
||||
DdlMedicoModal.SelectedValueExist(CveMedicoSeleccion)
|
||||
End If
|
||||
|
||||
UpDvModalTipoVenta.Update()
|
||||
UpCliente.Update()
|
||||
|
||||
End Sub
|
||||
|
||||
@@ -36192,7 +36230,7 @@ Partial Class Ventas
|
||||
|
||||
|
||||
TdFechaOS1.Visible = ChkRequiereTecnico.Checked
|
||||
TdFechaOS2.Visible = ChkRequiereTecnico.Checked
|
||||
|
||||
|
||||
UpCliente.Update()
|
||||
End Sub
|
||||
@@ -36359,6 +36397,27 @@ Partial Class Ventas
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
|
||||
For Each GvRow As GridViewRow In GvProductosProcedimiento.Rows
|
||||
Dim Cantidad As Decimal = GvRow.FCTextBox("TxtCantidad").Text.ToDecimal
|
||||
Dim CveUnidadMedida As Integer = GvRow.DataKey("CveUnidadMedida").ToEntero
|
||||
Dim Abreviatura As String = GvRow.DataKey("Abreviatura").ToString
|
||||
Dim PU As Decimal = GvRow.DataKey("Precio").ToDecimal
|
||||
Dim CveClasificacion As Integer = GvRow.DataKey("CveClasificacion").ToEntero
|
||||
Dim Clasificacion As String = GvRow.DataKey("Clasificacion").ToString
|
||||
Dim CvePS As Integer = GvRow.DataKey("CvePS").ToEntero
|
||||
Dim CodigoPS As String = GvRow.DataKey("CodigoPS")
|
||||
|
||||
If Cantidad > 0 Then
|
||||
If Not ValidaAgregarPS(CvePS, CveUnidadMedida, PU, 2, Cantidad, CodigoPS) Then
|
||||
Alert("No hay existencia.", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
End If
|
||||
|
||||
Next
|
||||
|
||||
ChkRequiereTecnico.Checked = ChkRequiereTecnicoModal.Checked
|
||||
TxtFechaOS.Text = TxtFechaModal.Text
|
||||
|
||||
@@ -36445,6 +36504,7 @@ Partial Class Ventas
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
|
||||
If CountPsAgregados > 0 Then
|
||||
CalculaTotalesVenta()
|
||||
End If
|
||||
@@ -36512,7 +36572,8 @@ Partial Class Ventas
|
||||
If ObjOrdenServicio.AddOrdenesServicios(CveCliente, DdlSubProyectoDatos.SelectedValue.ToEntero, UsuarioActual.Nombre, TxtFechaOS.Text.Replace(",", "").ToDateTime, $"Venta: {LblSerie.Text}-{TxtFolio.Text}", UsuarioActual.CveUsuario, EstatusOrdenServicio,
|
||||
UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveVentaOS, -1, -1, CveOSTipo, CveClienteSucursal:=DdlSucursalCliente.SelectedValue.ToEntero,
|
||||
Direccion:="", Telefono:="", CveModeloAuto:=-1, Año:="", CveMedico:=DdlMedico.SelectedValue.ToEntero,
|
||||
CveProcedimiento:=DdlProcedimiento.SelectedValue.ToEntero, CveTipoVenta:=RBLTipoVenta.SelectedValue.ToEntero, FechaCita:=TxtFechaOS.Text.Replace(",", "").ToDateTime) Then
|
||||
CveProcedimiento:=DdlProcedimiento.SelectedValue.ToEntero, CveTipoVenta:=RBLTipoVenta.SelectedValue.ToEntero, FechaCita:=TxtFechaOS.Text.Replace(",", "").ToDateTime,
|
||||
Paciente:=TxtPaciente.Text, IdentificadorCliente:=TxtEpisodio.Text) Then
|
||||
CveOSVentaMedica = ObjOrdenServicio.CveOS
|
||||
Else
|
||||
errorList.Add("Se presento un error al guardar la orden de servicio.")
|
||||
@@ -36553,6 +36614,36 @@ Partial Class Ventas
|
||||
|
||||
End Function
|
||||
|
||||
|
||||
Protected Sub LnkAddMedicoModal_Click(sender As Object, e As EventArgs)
|
||||
'iFrameAddMedicoProcedimiento.Attributes.Add("src", "/Ventas/CatMedicos.aspx?EsFrame=1")
|
||||
AddMedicoControl.CveMedico = -1
|
||||
AddMedicoControl.LimpiarControles()
|
||||
UpModalAddMedico.Update()
|
||||
|
||||
RegistraScript("$('#DvModalAddMedico').modal();")
|
||||
End Sub
|
||||
|
||||
Protected Sub LnkAddProcedimientoModal_Click(sender As Object, e As EventArgs)
|
||||
'iFrameAddMedicoProcedimiento.Attributes.Add("src", "/Ventas/CatProcedimientoDetalle.aspx?CveProcedimiento=-1")
|
||||
|
||||
AddProcedimientoControl.CveProcedimiento = -1
|
||||
AddProcedimientoControl.LimpiarControles()
|
||||
UpModalAddProcedimiento.Update()
|
||||
RegistraScript("$('#DvModalAddProcedimiento').modal();")
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Sub BtnRecargaMedicos_Click(sender As Object, e As EventArgs)
|
||||
|
||||
CargaMedicos(HdnCveMedicoNuevo.Value.ToEntero)
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Sub BtnRecargaProcedimientos_Click(sender As Object, e As EventArgs)
|
||||
CargaProcedimientos(HdnCveProcedimientoNuevo.Value.ToEntero)
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
'Protected Sub LnkCancelarSoloCFDI_Click(sender As Object, e As EventArgs)
|
||||
@@ -36632,5 +36723,10 @@ Partial Class Ventas
|
||||
Protected Sub TxtFechaAnticipoCliente_TextChanged(sender As Object, e As EventArgs)
|
||||
CargaAnticipos(CveCliente)
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
End Class
|
||||
|
||||
|
||||
Reference in New Issue
Block a user