diff --git a/App_Code/ClsVentas.vb b/App_Code/ClsVentas.vb index a89fb0dbc..e88aa9031 100644 --- a/App_Code/ClsVentas.vb +++ b/App_Code/ClsVentas.vb @@ -6117,7 +6117,7 @@ Public Class ClsVentas End Function - Public Function AddMedico(Nombre As String, APaterno As String, AMaterno As String, CedulaProfesional As String, FechaNacimiento As Date, Notas As String, Estatus As Boolean, CveUsuario As Integer, + Public Function AddMedico(Nombre As String, Apellidos As String, CedulaProfesional As String, FechaNacimiento As Date, Notas As String, Estatus As Boolean, CveUsuario As Integer, CveEmpresa As Integer, Telefono As String, Mail As String, CveMedicoEspecialidad As Integer, Celular As String, Optional CveMedicoSubEspecialidad As Integer = -1, Optional CveVendedor As Integer = -1) As Integer Dim Retorno As Boolean = False @@ -6126,16 +6126,10 @@ Public Class ClsVentas With SqlAdapter.SelectCommand.Parameters .Add("@Nombre", SqlDbType.VarChar).Value = Nombre - .Add("@APaterno", SqlDbType.VarChar).Value = APaterno - .Add("@AMaterno", SqlDbType.VarChar).Value = AMaterno - '.Add("@Medico", SqlDbType.VarChar).Value = Medico + .Add("@Apellidos", SqlDbType.VarChar).Value = Apellidos .Add("@CedulaProfesional", SqlDbType.VarChar).Value = CedulaProfesional - '.Add("@Medico", SqlDbType.VarChar).Value = Medico .Add("@FechaNacimiento", SqlDbType.Date).Value = FechaNacimiento .Add("@Notas", SqlDbType.VarChar).Value = Notas - '.Add("@DiasAtencion", SqlDbType.VarChar).Value = DiasAtencion - '.Add("@Horario", SqlDbType.VarChar).Value = Horario - '.Add("@Lugar", SqlDbType.VarChar).Value = Lugar .Add("@Estatus", SqlDbType.Bit).Value = Estatus .Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa @@ -6143,14 +6137,10 @@ Public Class ClsVentas .Add("@Mail", SqlDbType.VarChar).Value = Mail .Add("@CveMedicoEspecialidad", SqlDbType.Int).Value = CveMedicoEspecialidad .Add("@Celular", SqlDbType.VarChar).Value = Celular - '.Add("@Consultorio", SqlDbType.VarChar).Value = Consultorio .Add("@CveMedicoSubEspecialidad", SqlDbType.Int).Value = CveMedicoSubEspecialidad .Add("@CveVendedor", SqlDbType.Int).Value = CveVendedor - '.Add("@Torre", SqlDbType.VarChar).Value = Torre .Add("@CveMedicoNuevo", SqlDbType.Int).Direction = ParameterDirection.Output - - End With Try SqlAdapter.Fill(Data) @@ -6164,7 +6154,7 @@ Public Class ClsVentas End Function - Public Function UpdateMedico(CveMedico As Integer, Nombre As String, APaterno As String, AMaterno As String, CedulaProfesional As String, FechaNacimiento As Date, Notas As String, Estatus As Boolean, CveUsuario As Integer, + Public Function UpdateMedico(CveMedico As Integer, Nombre As String, Apellidos As String, CedulaProfesional As String, FechaNacimiento As Date, Notas As String, Estatus As Boolean, CveUsuario As Integer, CveEmpresa As Integer, Telefono As String, Mail As String, CveMedicoEspecialidad As Integer, Celular As String, Optional CveMedicoSubEspecialidad As Integer = -1, Optional CveVendedor As Integer = -1) As Boolean Dim Retorno As Boolean = False @@ -6172,8 +6162,7 @@ Public Class ClsVentas With SqlAdapter.SelectCommand.Parameters .Add("@CveMedico", SqlDbType.Int).Value = CveMedico .Add("@Nombre", SqlDbType.VarChar).Value = Nombre - .Add("@APaterno", SqlDbType.VarChar).Value = APaterno - .Add("@AMaterno", SqlDbType.VarChar).Value = AMaterno + .Add("@Apellidos", SqlDbType.VarChar).Value = Apellidos '.Add("@Medico", SqlDbType.VarChar).Value = Medico .Add("@CedulaProfesional", SqlDbType.VarChar).Value = CedulaProfesional .Add("@FechaNacimiento", SqlDbType.Date).Value = FechaNacimiento diff --git a/UserControl/AddMedico.ascx b/UserControl/AddMedico.ascx index 80bdcd6e0..500ff0a9c 100644 --- a/UserControl/AddMedico.ascx +++ b/UserControl/AddMedico.ascx @@ -34,20 +34,12 @@
- - + - +
-
-
-
- - - -
-
+
@@ -56,10 +48,10 @@
- - + - +
diff --git a/UserControl/AddMedico.ascx.vb b/UserControl/AddMedico.ascx.vb index 277a05b03..1a0a18012 100644 --- a/UserControl/AddMedico.ascx.vb +++ b/UserControl/AddMedico.ascx.vb @@ -161,9 +161,8 @@ Partial Class UserControl_AddMedico LtlTituloModal.Text = "Agregar Médico" TxtNombre.Text = "" - TxtAPaterno.Text = "" - TxtAMaterno.Text = "" - TxtCedulaProfecional.Text = "" + TxtAPellidos.Text = "" + TxtCedulaProfesional.Text = "" TxtFechaNacimiento.Text = "" TxtNotas.Text = "" TxtMail.Text = "" @@ -209,7 +208,7 @@ Partial Class UserControl_AddMedico End Sub - Public Sub PreparaEdicion(CveMedicoEditar As Integer, Nombre As String, APaterno As String, AMaterno As String, CedulaProfecional As String, FechaNacimiento As Date, Notas As String, Estatus As Boolean, + Public Sub PreparaEdicion(CveMedicoEditar As Integer, Nombre As String, Apellidos As String, CedulaProfesional As String, FechaNacimiento As Date, Notas As String, Estatus As Boolean, Mail As String, Telefono As String, Celular As String, CveMedicoEspecialidad As Integer, CveMedicoSubEspecialidad As Integer, FechaIng As DateTime, Usuario As String, CveVendedor As Integer) CargaCombos() @@ -217,9 +216,8 @@ Partial Class UserControl_AddMedico CveMedico = CveMedicoEditar TxtNombre.Text = Nombre - TxtAPaterno.Text = APaterno - TxtAMaterno.Text = AMaterno - TxtCedulaProfecional.Text = CedulaProfecional + TxtAPellidos.Text = Apellidos + TxtCedulaProfesional.Text = CedulaProfesional TxtFechaNacimiento.Text = FechaNacimiento.ToString("dd/MM/yyyy") TxtNotas.Text = Notas ChkEstatus.Checked = Estatus @@ -238,7 +236,7 @@ Partial Class UserControl_AddMedico DVEstatus.Visible = True LbAgregar.Text = "Actualizar" - LtlTituloModal.Text = $"Actualizar Médico {TxtCedulaProfecional.Text}" + LtlTituloModal.Text = $"Actualizar Médico {TxtCedulaProfesional.Text}" UpModal.Update() @@ -258,13 +256,13 @@ Partial Class UserControl_AddMedico Dim Celular As String = If(TxtCelular.Text = "(___) ___-____", "", TxtCelular.Text) If CveMedico > 0 Then - If ObjVentas.UpdateMedico(CveMedico, TxtNombre.Text.Trim, TxtAPaterno.Text.Trim, TxtAMaterno.Text.Trim, TxtCedulaProfecional.Text.Trim, TxtFechaNacimiento.Text.ToDate, TxtNotas.Text.Trim, ChkEstatus.Checked, + If ObjVentas.UpdateMedico(CveMedico, TxtNombre.Text.Trim, TxtAPellidos.Text.Trim, TxtCedulaProfesional.Text.Trim, TxtFechaNacimiento.Text.ToDate, TxtNotas.Text.Trim, ChkEstatus.Checked, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, Telefono, TxtMail.Text, DdlEspecialidad.SelectedValue.ToEntero, Celular, DdlSubEspecialidad.SelectedValue.ToEntero, DdlVendedor.SelectedValue.ToEntero) Then ProcesoOK = True End If Else - CveMedicoNuevo = ObjVentas.AddMedico(TxtNombre.Text.Trim, TxtAPaterno.Text.Trim, TxtAMaterno.Text.Trim, TxtCedulaProfecional.Text.Trim, TxtFechaNacimiento.Text.ToDate, TxtNotas.Text.Trim, ChkEstatus.Checked, + CveMedicoNuevo = ObjVentas.AddMedico(TxtNombre.Text.Trim, TxtAPellidos.Text.Trim, TxtCedulaProfesional.Text.Trim, TxtFechaNacimiento.Text.ToDate, TxtNotas.Text.Trim, ChkEstatus.Checked, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, Telefono, TxtMail.Text, DdlEspecialidad.SelectedValue.ToEntero, Celular, DdlSubEspecialidad.SelectedValue.ToEntero, DdlVendedor.SelectedValue.ToEntero) If CveMedicoNuevo > 0 Then diff --git a/Ventas/CatMedicos.aspx b/Ventas/CatMedicos.aspx index c9a1ca59d..63fe20e5c 100644 --- a/Ventas/CatMedicos.aspx +++ b/Ventas/CatMedicos.aspx @@ -228,7 +228,7 @@ <%--DataKeyNames="CveMedico,Medico,CedulaProfesional,FechaNacimiento,Notas,DiasAtencion,Horario,Lugar,Estatus,CveUsuario,FechaIng,CveEmpresa,Telefono,Mail,CveMedicoEspecialidad,CveMedicoSubEspecialidad,Celular,Consultorio,Torre,Usuario"--%> @@ -237,26 +237,11 @@ - + - + - - - - - - - - - - - - - - - - + diff --git a/Ventas/CatMedicos.aspx.vb b/Ventas/CatMedicos.aspx.vb index 910d910ce..b1fa46788 100644 --- a/Ventas/CatMedicos.aspx.vb +++ b/Ventas/CatMedicos.aspx.vb @@ -2,7 +2,6 @@ Option Strict On Imports Extensiones -Imports Microsoft.Extensions.Primitives Partial Class Ventas_CatMedicos Inherits ClsPaginas @@ -179,7 +178,7 @@ Partial Class Ventas_CatMedicos CveMedico = GvRow.DataKey("CveMedico").ToEntero - AddMedicoControl.PreparaEdicion(CveMedico, GvRow.DataKey("Nombre"), GvRow.DataKey("APaterno"), GvRow.DataKey("AMaterno"), GvRow.DataKey("CedulaProfesional"), GvRow.DataKey("FechaNacimiento").ToDate(), GvRow.DataKey("Notas"), + AddMedicoControl.PreparaEdicion(CveMedico, GvRow.DataKey("Nombre"), GvRow.DataKey("Apellidos"), GvRow.DataKey("CedulaProfesional"), GvRow.DataKey("FechaNacimiento").ToDate(), GvRow.DataKey("Notas"), Boolean.Parse(GvRow.DataKey("Estatus")), GvRow.DataKey("Mail"), GvRow.DataKey("Telefono"), GvRow.DataKey("Celular"), GvRow.DataKey("CveMedicoEspecialidad").ToEntero, GvRow.DataKey("CveMedicoSubEspecialidad").ToEntero, GvRow.DataKey("FechaIng").ToDateTime, GvRow.DataKey("Usuario"), GvRow.DataKey("CveVendedor").ToEntero)