-
This commit is contained in:
@@ -2,6 +2,8 @@
|
|||||||
Option Strict On
|
Option Strict On
|
||||||
|
|
||||||
Imports Extensiones
|
Imports Extensiones
|
||||||
|
Imports ADSNetLibrary.SIGAPI.Models.CRM.Request
|
||||||
|
Imports ADSNetLibrary.SIGAPI.Services.CRM
|
||||||
|
|
||||||
Partial Class Ventas_CatMedicos
|
Partial Class Ventas_CatMedicos
|
||||||
Inherits ClsPaginas
|
Inherits ClsPaginas
|
||||||
@@ -18,8 +20,6 @@ Partial Class Ventas_CatMedicos
|
|||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Public Property CveMedicoEspecialidad As Integer
|
Public Property CveMedicoEspecialidad As Integer
|
||||||
Get
|
Get
|
||||||
If ViewState("CveMedicoEspecialidad") Is Nothing Then
|
If ViewState("CveMedicoEspecialidad") Is Nothing Then
|
||||||
@@ -50,24 +50,49 @@ Partial Class Ventas_CatMedicos
|
|||||||
|
|
||||||
If Not Page.IsPostBack Then
|
If Not Page.IsPostBack Then
|
||||||
|
|
||||||
|
If (Request("CveEmpresaCRM") IsNot Nothing) Then
|
||||||
|
' ICRMService CRMService = New CRMService(System.Configuration.ConfigurationManager.ConnectionStrings["Conexion"].ConnectionString)
|
||||||
|
'RequestEmpresasCRM parametros = New RequestEmpresasCRM(UsuarioActual.CveEmpresa, CveEmpresaCRM);
|
||||||
|
'var objServicio = cRMService.GetEmpresasCRM(parametros);
|
||||||
|
'If (objServicio.Result.Count > 0) Then
|
||||||
|
' {
|
||||||
|
' EsEditar = True;
|
||||||
|
' LblEncabezadoEmpresa.Text = String.Format("Consulta de la Empresa: {0}", objServicio.Result[0].Empresa);
|
||||||
|
' TxtNombreEmpresa.Text = objServicio.Result[0].Empresa;
|
||||||
|
' TxtRFC.Text = objServicio.Result[0].RFC;
|
||||||
|
' DdlTipoProceso2.SelectedValueExist(objServicio.Result[0].CveTipoProceso);
|
||||||
|
' CargaMetodosCaptacion();
|
||||||
|
' TxtCorreoEmpresaCRM.Text = objServicio.Result[0].Correo;
|
||||||
|
' DdlMedioCaptacion.SelectedValueExist(objServicio.Result[0].CveMedioCaptacion);
|
||||||
|
' CveEncuestaAplicada = objServicio.Result[0].CveEncuestaAplicada > 0 ? objServicio.Result[0].CveEncuestaAplicada.ToEntero() : -1;
|
||||||
|
' CveVendedor = objServicio.Result[0].CveVendedorAsignado.ToEntero();
|
||||||
|
' CveSubProyecto = objServicio.Result[0].CveSubProyecto.ToEntero();
|
||||||
|
' CveCliente = objServicio.Result[0].CveCliente.ToEntero();
|
||||||
|
' CveGiroClasificacion = objServicio.Result[0].CveGiroClasificacion > 0 ? objServicio.Result[0].CveGiroClasificacion.ToEntero() : -1;
|
||||||
|
|
||||||
|
' If (!(CveCliente > 0)) Then
|
||||||
|
' {
|
||||||
|
' HplCrearCliente.Visible = True;
|
||||||
|
' HplCrearCliente.NavigateUrl = String.Format("/Ventas/Clientes.aspx?CveEmpresaCRM={0}", CveEmpresaCRM);
|
||||||
|
' If (UsuarioActual.Empresa.Funcionalidad(578) == "1") Then
|
||||||
|
' {
|
||||||
|
' HplCrearCliente.Text = "Crear Médico";
|
||||||
|
' HplCrearCliente.NavigateUrl = String.Format("/Ventas/CatMedicos.aspx?CveEmpresaCRM={0}", CveEmpresaCRM);
|
||||||
|
' }
|
||||||
|
' }
|
||||||
|
|
||||||
|
RegistraScript("$('#DvModalAddMedico').modal({ backdrop: 'static', keyboard: false });")
|
||||||
|
End If
|
||||||
|
|
||||||
CargaCombos()
|
CargaCombos()
|
||||||
CargaDatos()
|
CargaDatos()
|
||||||
BtnConsultar_Click(Nothing, Nothing)
|
BtnConsultar_Click(Nothing, Nothing)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
Public Sub CargaDatos()
|
Public Sub CargaDatos()
|
||||||
|
|
||||||
|
|
||||||
Dim ObjVentas As New ClsVentas
|
Dim ObjVentas As New ClsVentas
|
||||||
|
|
||||||
If ObjVentas.GetMedicos(-1, UsuarioActual.CveEmpresa, -1) Then
|
If ObjVentas.GetMedicos(-1, UsuarioActual.CveEmpresa, -1) Then
|
||||||
|
|
||||||
If UsuarioActual.CveVendedor > 0 Then
|
If UsuarioActual.CveVendedor > 0 Then
|
||||||
@@ -75,23 +100,15 @@ Partial Class Ventas_CatMedicos
|
|||||||
Else
|
Else
|
||||||
GvDatos.DataSource = ObjVentas.DtResultados
|
GvDatos.DataSource = ObjVentas.DtResultados
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Else
|
Else
|
||||||
GvDatos.DataSource = Nothing
|
GvDatos.DataSource = Nothing
|
||||||
End If
|
End If
|
||||||
|
|
||||||
ObjVentas.Dispose()
|
ObjVentas.Dispose()
|
||||||
|
|
||||||
GvDatos.DataBind()
|
GvDatos.DataBind()
|
||||||
|
|
||||||
ValidaExcelTab()
|
ValidaExcelTab()
|
||||||
|
|
||||||
UpDatos.Update()
|
UpDatos.Update()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
End Sub
|
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
|
||||||
@@ -166,8 +183,6 @@ Partial Class Ventas_CatMedicos
|
|||||||
End Sub
|
End Sub
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Public Sub LnkAgregarMedico_Click(sender As Object, e As EventArgs)
|
Public Sub LnkAgregarMedico_Click(sender As Object, e As EventArgs)
|
||||||
|
|
||||||
AddMedicoControl.CveMedico = -1
|
AddMedicoControl.CveMedico = -1
|
||||||
@@ -188,8 +203,6 @@ Partial Class Ventas_CatMedicos
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
'TxtMedico.Text = GvRow.DataKey("Medico")
|
'TxtMedico.Text = GvRow.DataKey("Medico")
|
||||||
'TxtCedulaProfecional.Text = GvRow.DataKey("CedulaProfesional")
|
'TxtCedulaProfecional.Text = GvRow.DataKey("CedulaProfesional")
|
||||||
'TxtFechaNacimiento.Text = GvRow.DataKey("FechaNacimiento").ToDate().ToString("dd/MM/yyyy")
|
'TxtFechaNacimiento.Text = GvRow.DataKey("FechaNacimiento").ToDate().ToString("dd/MM/yyyy")
|
||||||
@@ -239,8 +252,6 @@ Partial Class Ventas_CatMedicos
|
|||||||
DdlClientes.ddl.Items.Insert(0, New ListItem("Todos", "-1"))
|
DdlClientes.ddl.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
txtFechaI.Text = NowADS().FirstDayOfMonth.ToShortDateString
|
txtFechaI.Text = NowADS().FirstDayOfMonth.ToShortDateString
|
||||||
txtFechaF.Text = NowADS().ToShortDateString
|
txtFechaF.Text = NowADS().ToShortDateString
|
||||||
|
|
||||||
@@ -254,7 +265,6 @@ Partial Class Ventas_CatMedicos
|
|||||||
|
|
||||||
Protected Sub BtnConsultar_Click(sender As Object, e As EventArgs)
|
Protected Sub BtnConsultar_Click(sender As Object, e As EventArgs)
|
||||||
|
|
||||||
|
|
||||||
Dim objVentas As New ClsVentas
|
Dim objVentas As New ClsVentas
|
||||||
Dim CveVendedor As Integer = If(UsuarioActual.CveVendedor > 0, UsuarioActual.CveVendedor, -1)
|
Dim CveVendedor As Integer = If(UsuarioActual.CveVendedor > 0, UsuarioActual.CveVendedor, -1)
|
||||||
Dim CveCliente As Integer = If(DdlClientes.SelectedValue.ToEntero > 0, DdlClientes.SelectedValue.ToEntero, -1)
|
Dim CveCliente As Integer = If(DdlClientes.SelectedValue.ToEntero > 0, DdlClientes.SelectedValue.ToEntero, -1)
|
||||||
|
|||||||
Reference in New Issue
Block a user