diff --git a/App_Code/ClsOS.vb b/App_Code/ClsOS.vb
index 950871f6f..1bd14b0b8 100644
--- a/App_Code/ClsOS.vb
+++ b/App_Code/ClsOS.vb
@@ -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
diff --git a/App_Code/ClsVentas.vb b/App_Code/ClsVentas.vb
index 85ebb2554..d84a4c789 100644
--- a/App_Code/ClsVentas.vb
+++ b/App_Code/ClsVentas.vb
@@ -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
@@ -6096,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
@@ -6119,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
diff --git a/Inventarios/RepNotasSinAlmacen.aspx b/Inventarios/RepNotasSinAlmacen.aspx
index 29512fb09..5970fc15d 100644
--- a/Inventarios/RepNotasSinAlmacen.aspx
+++ b/Inventarios/RepNotasSinAlmacen.aspx
@@ -167,6 +167,7 @@
@@ -191,6 +192,7 @@
+
diff --git a/Inventarios/RepNotasSinAlmacen.aspx.vb b/Inventarios/RepNotasSinAlmacen.aspx.vb
index f9f62dee2..83b2321a0 100644
--- a/Inventarios/RepNotasSinAlmacen.aspx.vb
+++ b/Inventarios/RepNotasSinAlmacen.aspx.vb
@@ -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
diff --git a/OS/OrdenesServicios.aspx.vb b/OS/OrdenesServicios.aspx.vb
index 62bbef2f1..ffb9530fe 100644
--- a/OS/OrdenesServicios.aspx.vb
+++ b/OS/OrdenesServicios.aspx.vb
@@ -3271,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
diff --git a/OS/RepServicioDomicilio.aspx b/OS/RepServicioDomicilio.aspx
index bc80be8ec..e63fc3c5e 100644
--- a/OS/RepServicioDomicilio.aspx
+++ b/OS/RepServicioDomicilio.aspx
@@ -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) {
diff --git a/UserControl/AddMedico.ascx b/UserControl/AddMedico.ascx
new file mode 100644
index 000000000..754c018de
--- /dev/null
+++ b/UserControl/AddMedico.ascx
@@ -0,0 +1,197 @@
+<%@ Control Language="VB" AutoEventWireup="false" CodeFile="AddMedico.ascx.vb" Inherits="UserControl_AddMedico" %>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/UserControl/AddMedico.ascx.vb b/UserControl/AddMedico.ascx.vb
new file mode 100644
index 000000000..9cc57b4d1
--- /dev/null
+++ b/UserControl/AddMedico.ascx.vb
@@ -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
diff --git a/UserControl/AddProcedimiento.ascx b/UserControl/AddProcedimiento.ascx
new file mode 100644
index 000000000..c828b5139
--- /dev/null
+++ b/UserControl/AddProcedimiento.ascx
@@ -0,0 +1,42 @@
+<%@ Control Language="VB" AutoEventWireup="false" CodeFile="AddProcedimiento.ascx.vb" Inherits="UserControl_AddProcedimiento" %>
+
+
diff --git a/UserControl/AddProcedimiento.ascx.vb b/UserControl/AddProcedimiento.ascx.vb
new file mode 100644
index 000000000..37b84465f
--- /dev/null
+++ b/UserControl/AddProcedimiento.ascx.vb
@@ -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
diff --git a/Ventas/CatMedicos.aspx b/Ventas/CatMedicos.aspx
index 7d6d9c0c2..61bf3be6f 100644
--- a/Ventas/CatMedicos.aspx
+++ b/Ventas/CatMedicos.aspx
@@ -312,7 +312,7 @@
-
+ <%--
@@ -372,7 +372,7 @@
-
+ --%>
@@ -383,7 +383,7 @@
-
+
- <%--Cliente--%>
- <%-- --%>
-
-
- <%--Sucursales--%>
- <%-- --%>
+
<%--Medico Procedimiento--%>
-
@@ -8545,8 +8533,44 @@
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -10467,7 +10491,17 @@
}
-
+ function fncRegargaMedicos(CveNuevoMedico) {
+
+ $("#HdnCveMedicoNuevo").val(CveNuevoMedico)
+ $('#BtnRecargaMedicos').click();
+ }
+
+ function fncRegargaProcedimientos(CveProcedimientoNuevo) {
+
+ $("#HdnCveProcedimientoNuevo").val(CveProcedimientoNuevo)
+ $('#BtnRecargaProcedimientos').click();
+ }
diff --git a/Ventas/Ventas.aspx.vb b/Ventas/Ventas.aspx.vb
index 5886d1961..0d3e4cabf 100644
--- a/Ventas/Ventas.aspx.vb
+++ b/Ventas/Ventas.aspx.vb
@@ -36120,7 +36120,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 +36128,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
@@ -36576,6 +36594,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)
@@ -36655,5 +36703,10 @@ Partial Class Ventas
Protected Sub TxtFechaAnticipoCliente_TextChanged(sender As Object, e As EventArgs)
CargaAnticipos(CveCliente)
End Sub
+
+
+
+
+
End Class