diff --git a/App_Code/ClsOIEventos.vb b/App_Code/ClsOIEventos.vb index 2853c3502..54044a384 100644 --- a/App_Code/ClsOIEventos.vb +++ b/App_Code/ClsOIEventos.vb @@ -1356,6 +1356,109 @@ Public Class ClsOIEventos End Function #End Region +#Region "Circular" + Public Function GetCircular(CveEmpresa As Integer, Optional CveCircular As Integer = -1, Optional FechaI As String = "-1", Optional FechaF As String = "-1") As Boolean + + FechaI = If(FechaI = "-1", Today.AddYears(-1).ToString, FechaI) + FechaF = If(FechaF = "-1", Today.AddYears(1).ToString, FechaF) + + Dim Retorno As Boolean = False + + DataAdapter("PA_OI_CircularesGet") + + With SqlAdapter.SelectCommand.Parameters + .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa + .Add("@CveCircular", SqlDbType.Int).Value = CveCircular + .Add("@FechaI", SqlDbType.DateTime).Value = FechaI + .Add("@FechaF", SqlDbType.DateTime).Value = FechaF + + End With + + Try + SqlAdapter.Fill(Data) + Retorno = True + Catch ex As Exception + OnError("Ocurrió un error al consultar el Circular.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + End Try + + Return Retorno + End Function + + Public Function AddCircular(Asunto As String, Circular As String, CorreosInternos As String, FechaIng As String, CveUsuario As Integer, CveEmpresa As Integer, Optional CorreosExternos As String = "-1") As Boolean + + Dim Retorno As Boolean = False + + DataAdapter("PA_OI_CircularesAdd") + + With SqlAdapter.SelectCommand.Parameters + .Add("@Asunto", SqlDbType.VarChar).Value = Asunto + .Add("@Circular", SqlDbType.VarChar).Value = Circular + .Add("@CorreosInternos", SqlDbType.VarChar).Value = CorreosInternos + .Add("@FechaIng", SqlDbType.DateTime).Value = FechaIng + .Add("@CorreosExternos", SqlDbType.VarChar).Value = CorreosExternos + .Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario + .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa + + End With + + Try + SqlAdapter.Fill(Data) + Retorno = True + Catch ex As Exception + OnError("Ocurrió un error al agregar el Circular.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + End Try + + Return Retorno + End Function + + Public Function UpdateCircular(CveCircular As Integer, Asunto As String, Circular As String, CorreosInternos As String, CorreosExternos As String, CveUsuario As Integer) As Boolean + + Dim Retorno As Boolean = False + + DataAdapter("PA_OI_CircularesUpdate") + + With SqlAdapter.SelectCommand.Parameters + .Add("@CveCircular", SqlDbType.Int).Value = CveCircular + .Add("@Asunto", SqlDbType.VarChar).Value = Asunto + .Add("@Circular", SqlDbType.VarChar).Value = Circular + .Add("@CorreosInternos", SqlDbType.VarChar).Value = CorreosInternos + .Add("@CorreosExternos", SqlDbType.VarChar).Value = CorreosExternos + .Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario + + End With + + Try + SqlAdapter.Fill(Data) + Retorno = True + Catch ex As Exception + OnError("Ocurrió un error al actualizar el Circular.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + End Try + + Return Retorno + End Function + + Public Function DeleteCircular(CveCircular As Integer) As Boolean + + Dim Retorno As Boolean = False + + DataAdapter("PA_OI_CircularesRemove") + + With SqlAdapter.SelectCommand.Parameters + .Add("@CveCircular", SqlDbType.Int).Value = CveCircular + + End With + + Try + SqlAdapter.Fill(Data) + Retorno = True + Catch ex As Exception + OnError("Ocurrió un error al eliminar el Circular.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + End Try + + Return Retorno + End Function +#End Region + ' IDisposable Protected Overridable Sub Dispose(ByVal disposing As Boolean) diff --git a/App_Code/ClsPaginas.vb b/App_Code/ClsPaginas.vb index 76d7411ef..01736af34 100644 --- a/App_Code/ClsPaginas.vb +++ b/App_Code/ClsPaginas.vb @@ -3976,6 +3976,8 @@ Public Class ClsPaginas PaginaDict.Add("/Compras/CatPaqueteriasGuiasTipo.aspx".ToUpper(), 753) PaginaDict.Add("/Compras/RepEvaluacionesProveedores.aspx".ToUpper(), 754) PaginaDict.Add("/Ventas/RepTopClientesVentas.aspx".ToUpper(), 755) + PaginaDict.Add("/OI/Circular.aspx".ToUpper(), 756) + PaginaDict.Add("/OI/CircularDetalle.aspx".ToUpper(), 757) #End Region diff --git a/App_Code/DtDatos.xsd b/App_Code/DtDatos.xsd index 2d4df0230..a4b0800c5 100644 --- a/App_Code/DtDatos.xsd +++ b/App_Code/DtDatos.xsd @@ -233,6 +233,7 @@ + diff --git a/CRM/Acercamiento.aspx.cs b/CRM/Acercamiento.aspx.cs index 3b8469ae4..9bd14d662 100644 --- a/CRM/Acercamiento.aspx.cs +++ b/CRM/Acercamiento.aspx.cs @@ -366,6 +366,7 @@ public partial class CRM_Acercamiento : ClsPaginas } CargaImagenes(); + CargaDdl(); UpEncabezado.Update(); UPAcercamiento.Update(); @@ -398,8 +399,6 @@ public partial class CRM_Acercamiento : ClsPaginas RecuperaCve(); TxtFechaApertura.Text = DateTime.Now.ToShortDateString(); - - CargaDdl(); } protected void RecuperaCve() @@ -420,7 +419,7 @@ public partial class CRM_Acercamiento : ClsPaginas if (ObjCRM.GetProbabilidadAcercamiento(UsuarioActual.CveEmpresa, 1)) { - DdlProbabilidadAcercamiento.DataSource = ObjCRM.DtResultados; + DdlProbabilidadAcercamiento.DataSource = ObjCRM.DtResultados.FiltraParametros(String.Format("CveTipoProceso = {0}", CveTipoProceso)); } if (ObjCRM.GetEmpresasCRM(UsuarioActual.CveEmpresa)) { @@ -434,7 +433,7 @@ public partial class CRM_Acercamiento : ClsPaginas //} if (ObjCRM.GetMedioCaptacion(UsuarioActual.CveEmpresa, 1)) { - DdlMedioCaptacion.DataSource = ObjCRM.DtResultados; + DdlMedioCaptacion.DataSource = ObjCRM.DtResultados.FiltraParametros(String.Format("CveTipoProceso = {0}",CveTipoProceso)); DdlMedioCaptacion.Items.Insert(0, new ListItem("Seleccione ", "-1")); } diff --git a/CRM/CatMediosCaptacion.aspx b/CRM/CatMediosCaptacion.aspx index 40fd45942..60d82a951 100644 --- a/CRM/CatMediosCaptacion.aspx +++ b/CRM/CatMediosCaptacion.aspx @@ -27,7 +27,7 @@ " style="display: inline-block; margin-right: -20px; width: 150px;" /> " style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"> - @@ -52,6 +52,11 @@ + + + + + @@ -87,6 +92,10 @@ +
+
+ +
- @@ -53,6 +53,11 @@
+ + + + + @@ -88,6 +93,10 @@ +
+
+ +