SMS - 2024.01.25
This commit is contained in:
@@ -51,20 +51,16 @@ Partial Class Ventas_CatMedicos
|
||||
|
||||
If Not Page.IsPostBack Then
|
||||
|
||||
If Request("EsFrame") IsNot Nothing AndAlso Request("EsFrame").ToEntero = 1 Then
|
||||
EsFrame = True
|
||||
End If
|
||||
|
||||
|
||||
CargaCombos()
|
||||
CargaEspecialidad()
|
||||
CargaSubEspecialidad(-1)
|
||||
'CargaEspecialidad()
|
||||
'CargaSubEspecialidad(-1)
|
||||
|
||||
|
||||
CargaDatos()
|
||||
BtnConsultar_Click(Nothing, Nothing)
|
||||
|
||||
If EsFrame Then
|
||||
LnkAgregarMedico_Click(Nothing, Nothing)
|
||||
Else
|
||||
CargaDatos()
|
||||
BtnConsultar_Click(Nothing, Nothing)
|
||||
End If
|
||||
|
||||
|
||||
End If
|
||||
@@ -95,41 +91,41 @@ Partial Class Ventas_CatMedicos
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Sub LbAgregar_Click(sender As Object, e As System.EventArgs) Handles LbAgregar.Click
|
||||
'Protected Sub LbAgregar_Click(sender As Object, e As System.EventArgs) Handles LbAgregar.Click
|
||||
|
||||
Dim ProcesoOK = False
|
||||
Dim ObjVentas As New ClsVentas
|
||||
' Dim ProcesoOK = False
|
||||
' Dim ObjVentas As New ClsVentas
|
||||
|
||||
|
||||
Dim Telefono As String = If(TxtTelefono.Text = "(___) ___-____", "", TxtTelefono.Text)
|
||||
Dim Celular As String = If(TxtCelular.Text = "(___) ___-____", "", TxtCelular.Text)
|
||||
' 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
|
||||
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) > 0 Then
|
||||
ProcesoOK = True
|
||||
End If
|
||||
End If
|
||||
' 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
|
||||
' 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) > 0 Then
|
||||
' ProcesoOK = True
|
||||
' End If
|
||||
' End If
|
||||
|
||||
ObjVentas.Dispose()
|
||||
' ObjVentas.Dispose()
|
||||
|
||||
If ProcesoOK Then
|
||||
Alert($"Medico {If(CveMedico > 0, "Actualizado", "Guardado")} Correctamente.")
|
||||
RegistraScript("$('#DVAgregarMedico').modal('hide');")
|
||||
CargaDatos()
|
||||
CargaGlobal()
|
||||
UpDatos.Update()
|
||||
End If
|
||||
' If ProcesoOK Then
|
||||
' Alert($"Medico {If(CveMedico > 0, "Actualizado", "Guardado")} Correctamente.")
|
||||
' RegistraScript("$('#DVAgregarMedico').modal('hide');")
|
||||
' CargaDatos()
|
||||
' CargaGlobal()
|
||||
' UpDatos.Update()
|
||||
' End If
|
||||
|
||||
|
||||
|
||||
|
||||
End Sub
|
||||
'End Sub
|
||||
|
||||
#Region "G V D A T O S"
|
||||
|
||||
@@ -171,36 +167,10 @@ Partial Class Ventas_CatMedicos
|
||||
|
||||
Public Sub LnkAgregarMedico_Click(sender As Object, e As EventArgs)
|
||||
|
||||
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
|
||||
|
||||
RegistraScript("$('#DVAgregarMedico').modal();")
|
||||
AddMedicoControl.CveMedico = -1
|
||||
AddMedicoControl.LimpiarControles()
|
||||
UpModalAddMedico.Update()
|
||||
RegistraScript("$('#DvModalAddMedico').modal();")
|
||||
End Sub
|
||||
|
||||
Public Sub Edit_Click(sender As Object, e As EventArgs)
|
||||
@@ -209,34 +179,41 @@ Partial Class Ventas_CatMedicos
|
||||
|
||||
CveMedico = GvRow.DataKey("CveMedico").ToEntero
|
||||
|
||||
TxtMedico.Text = GvRow.DataKey("Medico")
|
||||
TxtCedulaProfecional.Text = GvRow.DataKey("CedulaProfesional")
|
||||
TxtFechaNacimiento.Text = GvRow.DataKey("FechaNacimiento").ToDate().ToString("dd/MM/yyyy")
|
||||
TxtNotas.Text = GvRow.DataKey("Notas")
|
||||
TxtDiasAtencion.Text = GvRow.DataKey("DiasAtencion")
|
||||
TxtHorario.Text = GvRow.DataKey("Horario")
|
||||
TxtLugar.Text = GvRow.DataKey("Lugar")
|
||||
TxtConsultorio.Text = GvRow.DataKey("Consultorio")
|
||||
ChkEstatus.Checked = Boolean.Parse(GvRow.DataKey("Estatus"))
|
||||
TxtMail.Text = GvRow.DataKey("Mail")
|
||||
TxtTelefono.Text = GvRow.DataKey("Telefono")
|
||||
TxtCelular.Text = GvRow.DataKey("Celular")
|
||||
DdlEspecialidad.SelectedValueExist(-1)
|
||||
DdlEspecialidad.SelectedValueExist(GvRow.DataKey("CveMedicoEspecialidad").ToEntero)
|
||||
CargaSubEspecialidad(GvRow.DataKey("CveMedicoEspecialidad").ToEntero)
|
||||
DdlSubEspecialidad.SelectedValueExist(GvRow.DataKey("CveMedicoSubEspecialidad").ToEntero)
|
||||
TxtTorre.Text = GvRow.DataKey("Torre")
|
||||
AddMedicoControl.PreparaEdicion(CveMedico, GvRow.DataKey("Medico"), GvRow.DataKey("CedulaProfesional"), GvRow.DataKey("FechaNacimiento").ToDate(), GvRow.DataKey("Notas"), GvRow.DataKey("DiasAtencion"),
|
||||
GvRow.DataKey("Horario"), GvRow.DataKey("Lugar"), GvRow.DataKey("Consultorio"), Boolean.Parse(GvRow.DataKey("Estatus")), GvRow.DataKey("Mail"), GvRow.DataKey("Telefono"),
|
||||
GvRow.DataKey("Celular"), GvRow.DataKey("CveMedicoEspecialidad").ToEntero, GvRow.DataKey("CveMedicoSubEspecialidad").ToEntero, GvRow.DataKey("Torre"),
|
||||
GvRow.DataKey("FechaIng").ToDateTime, GvRow.DataKey("Usuario"))
|
||||
|
||||
DVUsuarioFechaIng.Visible = True
|
||||
TxtFechaIng.Text = GvRow.DataKey("FechaIng").ToDateTime.ToString("dd/MM/yyyy hh:mm:ss tt")
|
||||
TxtUsuario.Text = GvRow.DataKey("Usuario")
|
||||
|
||||
DVEstatus.Visible = True
|
||||
LbAgregar.Text = "Actualizar"
|
||||
LtlTituloModal.Text = $"Actualizar Médico {TxtCedulaProfecional.Text}"
|
||||
'TxtMedico.Text = GvRow.DataKey("Medico")
|
||||
'TxtCedulaProfecional.Text = GvRow.DataKey("CedulaProfesional")
|
||||
'TxtFechaNacimiento.Text = GvRow.DataKey("FechaNacimiento").ToDate().ToString("dd/MM/yyyy")
|
||||
'TxtNotas.Text = GvRow.DataKey("Notas")
|
||||
'TxtDiasAtencion.Text = GvRow.DataKey("DiasAtencion")
|
||||
'TxtHorario.Text = GvRow.DataKey("Horario")
|
||||
'TxtLugar.Text = GvRow.DataKey("Lugar")
|
||||
'TxtConsultorio.Text = GvRow.DataKey("Consultorio")
|
||||
'ChkEstatus.Checked = Boolean.Parse(GvRow.DataKey("Estatus"))
|
||||
'TxtMail.Text = GvRow.DataKey("Mail")
|
||||
'TxtTelefono.Text = GvRow.DataKey("Telefono")
|
||||
'TxtCelular.Text = GvRow.DataKey("Celular")
|
||||
'DdlEspecialidad.SelectedValueExist(-1)
|
||||
'DdlEspecialidad.SelectedValueExist(GvRow.DataKey("CveMedicoEspecialidad").ToEntero)
|
||||
'CargaSubEspecialidad(GvRow.DataKey("CveMedicoEspecialidad").ToEntero)
|
||||
'DdlSubEspecialidad.SelectedValueExist(GvRow.DataKey("CveMedicoSubEspecialidad").ToEntero)
|
||||
'TxtTorre.Text = GvRow.DataKey("Torre")
|
||||
|
||||
UpModal.Update()
|
||||
RegistraScript("$('#DVAgregarMedico').modal();")
|
||||
'DVUsuarioFechaIng.Visible = True
|
||||
'TxtFechaIng.Text = GvRow.DataKey("FechaIng").ToDateTime.ToString("dd/MM/yyyy hh:mm:ss tt")
|
||||
'TxtUsuario.Text = GvRow.DataKey("Usuario")
|
||||
|
||||
'DVEstatus.Visible = True
|
||||
'LbAgregar.Text = "Actualizar"
|
||||
'LtlTituloModal.Text = $"Actualizar Médico {TxtCedulaProfecional.Text}"
|
||||
|
||||
'UpModal.Update()
|
||||
UpModalAddMedico.Update()
|
||||
RegistraScript("$('#DvModalAddMedico').modal();")
|
||||
|
||||
End Sub
|
||||
|
||||
@@ -402,7 +379,7 @@ Partial Class Ventas_CatMedicos
|
||||
ObjVentas.Dispose()
|
||||
|
||||
If ProcesoOK Then
|
||||
CargaEspecialidad()
|
||||
'CargaEspecialidad()
|
||||
Alert($"Especialidad {If(CveMedicoEspecialidad > 0, "actualizada", "agregada")} correctamente.")
|
||||
RegistraScript("$('#DVAgregarEspecialidad').modal('hide');")
|
||||
End If
|
||||
@@ -415,47 +392,47 @@ Partial Class Ventas_CatMedicos
|
||||
UpModalEspecialidad.Update()
|
||||
End Sub
|
||||
|
||||
Sub CargaEspecialidad()
|
||||
Dim ObjVentas As New ClsVentas
|
||||
'Sub CargaEspecialidad()
|
||||
' Dim ObjVentas As New ClsVentas
|
||||
|
||||
If ObjVentas.GetMedicosEspecialidades(-1, UsuarioActual.CveEmpresa, -1) Then
|
||||
'GvEspecialidad.DataSource = ObjVentas.DtResultados
|
||||
DdlEspecialidad.DataSource = ObjVentas.DtResultados
|
||||
Else
|
||||
'GvEspecialidad.DataSource = Nothing
|
||||
End If
|
||||
' If ObjVentas.GetMedicosEspecialidades(-1, UsuarioActual.CveEmpresa, -1) Then
|
||||
' 'GvEspecialidad.DataSource = ObjVentas.DtResultados
|
||||
' DdlEspecialidad.DataSource = ObjVentas.DtResultados
|
||||
' Else
|
||||
' 'GvEspecialidad.DataSource = Nothing
|
||||
' End If
|
||||
|
||||
ObjVentas.Dispose()
|
||||
' ObjVentas.Dispose()
|
||||
|
||||
'GvEspecialidad.DataBind()
|
||||
' 'GvEspecialidad.DataBind()
|
||||
|
||||
DdlEspecialidad.DataBind()
|
||||
DdlEspecialidad.Items.Insert(0, New ListItem("Seleccione uno", "-1"))
|
||||
' DdlEspecialidad.DataBind()
|
||||
' DdlEspecialidad.Items.Insert(0, New ListItem("Seleccione uno", "-1"))
|
||||
|
||||
UpModal.Update()
|
||||
'UpEspecialidad.Update()
|
||||
' UpModal.Update()
|
||||
' 'UpEspecialidad.Update()
|
||||
|
||||
End Sub
|
||||
'End Sub
|
||||
|
||||
|
||||
Sub CargaSubEspecialidad(CveMedicoEspecialidad As Integer)
|
||||
Dim ObjVentas As New ClsVentas
|
||||
'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
|
||||
' 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()
|
||||
' ObjVentas.Dispose()
|
||||
|
||||
DdlSubEspecialidad.DataBind()
|
||||
DdlSubEspecialidad.Items.Insert(0, New ListItem("Seleccione uno", "-1"))
|
||||
UpModal.Update()
|
||||
' DdlSubEspecialidad.DataBind()
|
||||
' DdlSubEspecialidad.Items.Insert(0, New ListItem("Seleccione uno", "-1"))
|
||||
' UpModal.Update()
|
||||
|
||||
End Sub
|
||||
'End Sub
|
||||
|
||||
Protected Sub LnkEditarEspecialidad_Click(sender As Object, e As EventArgs)
|
||||
|
||||
@@ -491,7 +468,7 @@ Partial Class Ventas_CatMedicos
|
||||
ObjVentas.Dispose()
|
||||
|
||||
If ProcesoOK Then
|
||||
CargaEspecialidad()
|
||||
'CargaEspecialidad()
|
||||
Alert("Especialidad eliminada correctamente")
|
||||
End If
|
||||
|
||||
@@ -502,14 +479,14 @@ Partial Class Ventas_CatMedicos
|
||||
|
||||
|
||||
|
||||
Protected Sub DdlEspecialidad_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||
CargaSubEspecialidad(DdlEspecialidad.SelectedValue.ToEntero)
|
||||
'Protected Sub DdlEspecialidad_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||
' CargaSubEspecialidad(DdlEspecialidad.SelectedValue.ToEntero)
|
||||
'End Sub
|
||||
|
||||
|
||||
Protected Sub BtnRecargaMedicos_Click(sender As Object, e As EventArgs)
|
||||
CargaDatos()
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
End Class
|
||||
|
||||
Reference in New Issue
Block a user