diff --git a/App_Code/CalendarEvent.vb b/App_Code/CalendarEvent.vb index 983cc8a96..9f32f75d6 100644 --- a/App_Code/CalendarEvent.vb +++ b/App_Code/CalendarEvent.vb @@ -29,5 +29,16 @@ Public Class CalendarEvent Public Property CveEmpresaCRM As String Public Property CveContactoCRM As String Public Property CveAcercamientoCRM As String + Public Property NombreCliente As String + Public Property NombreProveedor As String + Public Property NomprePersonal As String + Public Property NombreAcercamiento As String + Public Property CvePersonal As Integer + Public Property CveCliente As Integer + Public Property CveProveedor As Integer + + + + End Class diff --git a/App_Code/ClsCRM.vb b/App_Code/ClsCRM.vb index 1fb7574c9..50c928d51 100644 --- a/App_Code/ClsCRM.vb +++ b/App_Code/ClsCRM.vb @@ -358,7 +358,7 @@ Public Class ClsCRM Return Retorno End Function - Public Function AddEtapaProceso(EtapaProceso As String, Descripcion As String, CveTipoEtapa As Integer, Orden As Integer, CveTipoProceso As Integer, CveEmpresa As Integer, CveUsuarioIng As Integer) As Boolean + Public Function AddEtapaProceso(EtapaProceso As String, Descripcion As String, CveTipoEtapa As Integer, Orden As Integer, CveTipoProceso As Integer, CveEmpresa As Integer, CveUsuarioIng As Integer, Optional EsCotizacion As Boolean = False) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_CRM_EtapaProcesoAdd") With SqlAdapter.SelectCommand.Parameters @@ -371,17 +371,26 @@ Public Class ClsCRM .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa .Add("@CveUsuarioIng", SqlDbType.Int).Value = CveUsuarioIng + .Add("@EsCotizacion", SqlDbType.Bit).Value = EsCotizacion End With Try SqlAdapter.Fill(Data) Retorno = True Catch ex As Exception - OnError("Ocurrió un error al agregar la Etapa al Proceso.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + + If ex.Message.Contains("Ya existe una cotización en el proceso") Then + Alert("Ya existe una cotización en el proceso", TipoMensaje.MsgAdvertencia) + Else + OnError("Ocurrió un error al agregar la Etapa al Proceso.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + End If + + + End Try Return Retorno End Function - Public Function UpdateEtapaProceso(EtapaProceso As String, Descripcion As String, CveEstatus As Boolean, CveTipoEtapa As Integer, Orden As Integer, CveEtapaProceso As Integer) As Boolean + Public Function UpdateEtapaProceso(EtapaProceso As String, Descripcion As String, CveEstatus As Boolean, CveTipoEtapa As Integer, Orden As Integer, CveEtapaProceso As Integer, Optional EsCotizacion As Boolean = False) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_CRM_EtapaProcesoUpdate") With SqlAdapter.SelectCommand.Parameters @@ -393,12 +402,19 @@ Public Class ClsCRM .Add("@Orden", SqlDbType.Int).Value = Orden .Add("@CveEtapaProceso", SqlDbType.Int).Value = CveEtapaProceso + .Add("@EsCotizacion", SqlDbType.Bit).Value = EsCotizacion End With Try SqlAdapter.Fill(Data) Retorno = True Catch ex As Exception - OnError("Ocurrió un error al actualizar la Etapa del Proceso.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + + If ex.Message.Contains("Ya existe una cotización en el proceso") Then + Alert("Ya existe una cotización en el proceso", TipoMensaje.MsgAdvertencia) + Else + OnError("Ocurrió un error al actualizar la Etapa del Proceso.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + End If + End Try Return Retorno End Function @@ -812,6 +828,26 @@ Public Class ClsCRM Return Retorno End Function + + Public Function UpdateAcercamientoCotizacion(cveAcercamiento As Integer, Importe As Decimal, CveEmpresa As Integer) As Boolean + + Dim Retorno As Boolean = False + DataAdapter("PA_CRM_AcercamientoCotizacionUpdate") + With SqlAdapter.SelectCommand.Parameters + .Add("@CveAcercamiento", SqlDbType.Int).Value = cveAcercamiento + .Add("@Importe", SqlDbType.Money).Value = Importe + .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa + End With + Try + SqlAdapter.Fill(Data) + Retorno = True + Catch ex As Exception + OnError("Ocurrió un error al actualizar el Acercamiento.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + End Try + Return Retorno + + End Function + Public Function RemoveAcercamiento(CveAcercamiento As Integer, CveEmpresa As Integer) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_CRM_AcercamientoRemove") @@ -1129,6 +1165,41 @@ Public Class ClsCRM End Try Return retorno End Function + + + + + + + + + Public Function RepAgendasBitacoras(CveEmpresa As Integer, CveVendedor As Integer, CveTipoProceso As Integer, FechaInicio As Date, FechaFin As Date) As Boolean + Dim retorno As Boolean = False + DataAdapter("PA_CRM_RepAgendasBitacoras", CommandType.StoredProcedure) + With SqlAdapter.SelectCommand.Parameters + + .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa + .Add("@CveVendedor", SqlDbType.Int).Value = CveVendedor + .Add("@CveTipoProceso", SqlDbType.Int).Value = CveTipoProceso + .Add("@FechaInicio", SqlDbType.Date).Value = FechaInicio + .Add("@FechaFin", SqlDbType.Date).Value = FechaFin + + + End With + Try + SqlAdapter.Fill(Data) + retorno = True + Catch ex As Exception + OnError("Ocurrió un error al obtener el Reporte de Agendas Bitácoras.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + End Try + Return retorno + End Function + + + + + + #End Region #Region "Asignar Vendedor a Prospectos" @@ -1266,5 +1337,7 @@ Public Class ClsCRM End Try Return Retorno End Function + + #End Region End Class diff --git a/App_Code/ClsPaginas.vb b/App_Code/ClsPaginas.vb index 92608d0ba..c3e21f987 100644 --- a/App_Code/ClsPaginas.vb +++ b/App_Code/ClsPaginas.vb @@ -4919,6 +4919,7 @@ Public Class ClsPaginas 'PaginaDict.Add("/CRM/Acercamiento.aspx".ToUpper(), 1308) PaginaDict.Add("/CRM/Acercamiento.aspx".ToUpper(), 1305) PaginaDict.Add("/CRM/RepAcercamientos.aspx".ToUpper(), 1311) + PaginaDict.Add("/CRM/RepAgendasBitacoras.aspx".ToUpper(), 1333) PaginaDict.Add("/CRM/PopUpBuscarAcercamiento.aspx".ToUpper(), 1312) PaginaDict.Add("/CRM/RepAcercamientosProcesos.aspx".ToUpper(), 1313) PaginaDict.Add("/CRM/RepAcercamientosRechazos.aspx".ToUpper(), 1314) diff --git a/Ashx/CargaEventos.ashx b/Ashx/CargaEventos.ashx index f70089d3d..4c6b6c44b 100644 --- a/Ashx/CargaEventos.ashx +++ b/Ashx/CargaEventos.ashx @@ -133,6 +133,17 @@ Public Class CargaEventos : Implements IHttpHandler, IRequiresSessionState cevent.CveContactoCRM = dr("CveContactoCRM").ToString cevent.CveAcercamientoCRM = dr("CveAcercamientoCRM").ToString + cevent.CvePersonal = dr("CvePersonal").ToString.ToEntero + cevent.CveCliente = dr("CveCliente").ToString.ToEntero + cevent.CveProveedor = dr("CveProveedor").ToString.ToEntero + + + + cevent.NombreCliente = dr("NombreCliente").ToString + cevent.NombreProveedor = dr("NombreProveedor").ToString + cevent.NomprePersonal = dr("NomprePersonal").ToString + + cevent.NombreAcercamiento = dr("NombreAcercamiento").ToString '11/05/2018 - Evento Gasto Recurrente cevent.CveTipoEvento = dr("CveTipoEvento").ToString.ToEntero diff --git a/Bin/ADSNetLibrary.dll b/Bin/ADSNetLibrary.dll index 6f63611e6..91c5f029d 100644 Binary files a/Bin/ADSNetLibrary.dll and b/Bin/ADSNetLibrary.dll differ diff --git a/CRM/Acercamiento.aspx b/CRM/Acercamiento.aspx index 098d2817c..249a0a419 100644 --- a/CRM/Acercamiento.aspx +++ b/CRM/Acercamiento.aspx @@ -417,14 +417,20 @@ -