diff --git a/AF/AF.aspx b/AF/AF.aspx index f239e34fc..2234d7bf7 100644 --- a/AF/AF.aspx +++ b/AF/AF.aspx @@ -2448,8 +2448,15 @@ Agregar --%> -
- +
+ +
+ + diff --git a/AF/AF.aspx.vb b/AF/AF.aspx.vb index 7274f3c51..01e24f94b 100644 --- a/AF/AF.aspx.vb +++ b/AF/AF.aspx.vb @@ -395,6 +395,7 @@ Partial Class AF_AF If Request("Opt") IsNot Nothing AndAlso IsNumeric(Request("Opt")) Then Tab.ActiveTabIndex = Request("Opt").ToEntero HlEvento.Visible = True HlEvento.NavigateUrl = String.Format("/OI/PopUpAgenda.aspx?CveTipoEvento=2&CveActivoFijo=" & CveActivoFijo & "&TB_iframe=true&height=370&width=600;") + LtlTareaNueva.Text = String.Format(" Tarea", CveActivoFijo) Else ViewState("CveActivoFijo") = -1 diff --git a/App_Code/CalendarEvent.vb b/App_Code/CalendarEvent.vb index 05748e891..f048b5d51 100644 --- a/App_Code/CalendarEvent.vb +++ b/App_Code/CalendarEvent.vb @@ -45,6 +45,15 @@ Public Class CalendarEvent Public Property CveCompra As Integer Public Property SerieFolioCompra As String + Public Property CveVenta As Integer + Public Property SerieFolioVenta As String + Public Property CveActivoFijo As Integer + Public Property AFCodigo As String + + Public Property CveMovimiento As Integer + Public Property MovimientoFolio As String + Public Property CveIE As Integer + Public Property FolioIE As String End Class diff --git a/App_Code/ClsOIEventos.vb b/App_Code/ClsOIEventos.vb index 56d781b38..6eb47b0ba 100644 --- a/App_Code/ClsOIEventos.vb +++ b/App_Code/ClsOIEventos.vb @@ -964,7 +964,8 @@ Public Class ClsOIEventos Optional CveActivoFijo As Integer = -1, Optional CveIE As Integer = -1, Optional CveProspecto As Integer = -1, Optional CveCliente As Integer = -1, Optional CveOS As Integer = -1, Optional CveOC As Integer = -1, Optional CvePersonal As Integer = -1, Optional CveProveedor As Integer = -1, Optional CveCompra As Integer = -1, Optional CveVenta As Integer = -1, Optional CveContrato As Integer = -1, Optional CveSubProyecto As Integer = -1, - Optional CveMovimientoAlmacen As Integer = -1, Optional CorreoExterno As String = "", Optional CveTableroLista As Integer = -1, Optional Lugar As String = "", Optional Asistencia As String = "", Optional Duracion As String = "") As Boolean + Optional CveMovimientoAlmacen As Integer = -1, Optional CorreoExterno As String = "", Optional CveTableroLista As Integer = -1, Optional Lugar As String = "", + Optional Asistencia As String = "", Optional Duracion As String = "", Optional CveAcercamiento As Integer = -1) As Boolean Dim retorno As Boolean = False Dim xmlMiembros As System.Xml.Linq.XDocument = Nothing @@ -1026,9 +1027,11 @@ Public Class ClsOIEventos .Add("@Asistencia", SqlDbType.VarChar).Value = Asistencia .Add("@Lugar", SqlDbType.VarChar).Value = Lugar .Add("@CveTableroLista", SqlDbType.VarChar).Value = CveTableroLista - - '.Add("@mailPara", SqlDbType.VarChar).Direction = ParameterDirection.Output - '.Add("@mailBody", SqlDbType.Xml).Direction = ParameterDirection.Output + .Add("@CveAcercamiento", SqlDbType.VarChar).Value = CveAcercamiento + + + '.Add("@mailPara", SqlDbType.VarChar).Direction = ParameterDirection.Output + '.Add("@mailBody", SqlDbType.Xml).Direction = ParameterDirection.Output End With Dim separador As String = "" @@ -2488,12 +2491,14 @@ Public Class ClsOIEventos Optional RecurrenciaTipo As Integer = -1, Optional Frecuencia As Integer = -1, Optional DiasSemana As String = "-1", Optional Dia As Integer = -1, Optional Mes As Integer = -1, Optional RecurrenciaFin As String = "-1", Optional CveTipoEvento As Integer = 2, Optional Importe As Double = -1, Optional CveEmpresaCRM As Integer = -1, Optional CveContactoCRM As Integer = -1, Optional CveAcercamientoCRM As Integer = -1, Optional CveTipoProcesoCRM As Integer = -1, Optional CveEtapaProcesoCRM As Integer = -1, - Optional CveSubProyecto As Integer = -1, Optional CveUsuarioPara As Integer = -1, Optional CveCompra As Integer = -1) As Boolean + Optional CveSubProyecto As Integer = -1, Optional CveUsuarioPara As Integer = -1, Optional CveCompra As Integer = -1, Optional CveVenta As Integer = -1, Optional CveMovimiento As Integer = -1) As Boolean Dim Retorno As Boolean = False Retorno = AddEvento(CveTipoEvento, CveAgendaTipo, Asunto, Descripcion, Prioridad, CveUsuarioPara, CveUsuarioIng, FechaInicio, FechaFin, -1, -1, "-1", CveUsuarioIng, CveEmpresa, CveActivoFijo, CveIE, CveProspecto, CveCliente, CveOS, CveOC, CvePersonal, CveProveedor, CveEventoPadre:=CveEventoPadre, RecurrenciaTipo:=RecurrenciaTipo, Frecuencia:=Frecuencia, DiasSemana:=DiasSemana, Dia:=Dia, Mes:=Mes, RecurrenciaFin:=RecurrenciaFin, Importe:=Importe, - CveEmpresaCRM:=CveEmpresaCRM, CveContactoCRM:=CveContactoCRM, CveAcercamientoCRM:=CveAcercamientoCRM, CveTipoProcesoCRM:=CveTipoProcesoCRM, CveEtapaProcesoCRM:=CveEtapaProcesoCRM, CveSubProyecto:=CveSubProyecto, CveCompra:=CveCompra) + CveEmpresaCRM:=CveEmpresaCRM, CveContactoCRM:=CveContactoCRM, CveAcercamientoCRM:=CveAcercamientoCRM, CveTipoProcesoCRM:=CveTipoProcesoCRM, CveEtapaProcesoCRM:=CveEtapaProcesoCRM, CveSubProyecto:=CveSubProyecto, CveCompra:=CveCompra, + CveVenta:=CveVenta, CveMovimientoAlmacen:=CveMovimiento) + Return Retorno End Function diff --git a/Ashx/CargaEventos.ashx b/Ashx/CargaEventos.ashx index 6dfb8875c..60ef44198 100644 --- a/Ashx/CargaEventos.ashx +++ b/Ashx/CargaEventos.ashx @@ -199,6 +199,9 @@ Public Class CargaEventos : Implements IHttpHandler, IRequiresSessionState cevent.CveCompra = dr("CveCompra").ToString.ToEntero cevent.SerieFolioCompra = dr("SerieFolioCompra").ToString + cevent.CveVenta = dr("CveVenta").ToString.ToEntero + cevent.SerieFolioVenta = dr("SerieFolioVenta").ToString + cevent.CveOS = dr("CveOS").ToString.ToEntero cevent.CveOSDetalle = dr("CveOSDetalle").ToString.ToEntero cevent.CveUsuarioAtendio = dr("CveUsuarioAtendio").ToString.ToEntero @@ -206,6 +209,16 @@ Public Class CargaEventos : Implements IHttpHandler, IRequiresSessionState cevent.NombreAcercamiento = dr("NombreAcercamiento").ToString + cevent.CveActivoFijo = dr("CveActivoFijo").ToString.ToEntero + cevent.AFCodigo = dr("AFCodigo").ToString + + cevent.CveMovimiento = dr("CveMovimientoAlmacen").ToString.ToEntero + cevent.MovimientoFolio = dr("MovimientoFolio").ToString + + cevent.CveIE = dr("CveIE").ToString.ToEntero + cevent.FolioIE = dr("FolioIE").ToString + + '11/05/2018 - Evento Gasto Recurrente cevent.CveTipoEvento = dr("CveTipoEvento").ToString.ToEntero If cevent.CveTipoEvento = 10 Then diff --git a/Bancos/IE.aspx b/Bancos/IE.aspx index 6e850972f..6d21f2776 100644 --- a/Bancos/IE.aspx +++ b/Bancos/IE.aspx @@ -1038,6 +1038,13 @@
+
+ + diff --git a/Bancos/IE.aspx.vb b/Bancos/IE.aspx.vb index b57759c83..4a0ce7ee9 100644 --- a/Bancos/IE.aspx.vb +++ b/Bancos/IE.aspx.vb @@ -727,6 +727,7 @@ Partial Class Bancos_IE 'ImgAddObs.Attributes.Add("onclick", "javascript:PosicionaObjeto(this.id,'DivEventoBitacora',null,-250,-250); $('#DivEventoBitacora').show(1000); ") HlEvento.Visible = True HlEvento.NavigateUrl = "/OI/PopUpAgenda.aspx?CveTipoEvento=2&CveIE=" & CveIE & "&TB_iframe=true&height=370&width=600;" + LtlTareaNueva.Text = String.Format(" Tarea", CveIE) CargaOCRelacionadas() diff --git a/Bancos/RepProgramarRecursos.aspx.vb b/Bancos/RepProgramarRecursos.aspx.vb index 07f3fd648..4be5153f5 100644 --- a/Bancos/RepProgramarRecursos.aspx.vb +++ b/Bancos/RepProgramarRecursos.aspx.vb @@ -856,12 +856,17 @@ Partial Class Bancos_RepProgramarRecursos Programo = If(DdlUsuarioProgramo.SelectedValue = "-1", "", $" Autorizado Por: {DdlUsuarioProgramo.SelectedItem.Text}") End If + Dim Imagen As New System.IO.FileInfo($"{UsuarioActual.Empresa.Ruta}/Logo.png") + Dim params As New List(Of ReportParameter) params.Add(New ReportParameter("Empresa", UsuarioActual.Empresa.Empresa)) params.Add(New ReportParameter("Programadas", If(ChkProgramadas.Checked, 1, 0))) params.Add(New ReportParameter("usuarioProgramo", UsuarioProgramo)) - params.Add(New ReportParameter("Agrupador", DdlAgrupador.SelectedValue)) - params.Add(New ReportParameter("LogoUrl", String.Format("{0}/Empresas/{1}/Logo.png", Request.Url.AbsoluteUri.Replace(Request.Url.AbsolutePath, ""), UsuarioActual.CveEmpresa))) + params.Add(New ReportParameter("Agrupador", DdlAgrupador.SelectedValue)) + + 'params.Add(New ReportParameter("LogoUrl", String.Format("{0}/Empresas/{1}/Logo.png", Request.Url.AbsoluteUri.Replace(Request.Url.AbsolutePath, ""), UsuarioActual.CveEmpresa))) + params.Add(New ReportParameter("LogoUrl", If(Imagen.Exists, $"file://{Imagen.FullName}", ""))) + params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)) params.Add(New ReportParameter("FechaImpresion", Now.ToShortDateString)) params.Add(New ReportParameter("AgrupadoPor", $"{Programo}{Proveedor}{Clasificacion}{AplicaNC}{TipoProv}{FechaIn}{FechaFn}{FechaInV}{FechaFnV}{Moneda}{Registro}{Responsable}{Estatus}{Proyecto}{SubProyecto}{Comprobacion}")) diff --git a/CRM/Acercamiento.aspx b/CRM/Acercamiento.aspx index 249a0a419..4a287efb1 100644 --- a/CRM/Acercamiento.aspx +++ b/CRM/Acercamiento.aspx @@ -1029,7 +1029,16 @@
  • +
  • + + +
  • + <%--
    diff --git a/CRM/Acercamiento.aspx.cs b/CRM/Acercamiento.aspx.cs index ceb7351e6..0962862e8 100644 --- a/CRM/Acercamiento.aspx.cs +++ b/CRM/Acercamiento.aspx.cs @@ -346,6 +346,7 @@ public partial class CRM_Acercamiento : ClsPaginas } CargaCheckLis(); + LtlTareaNueva.Text = String.Format(" Tarea", CveAcercamiento); } CargarPS(); //BtnGuardarAcercamiento.Visible = true; diff --git a/Inicio.aspx b/Inicio.aspx index 125ebff4c..14e960aa7 100644 --- a/Inicio.aspx +++ b/Inicio.aspx @@ -362,7 +362,7 @@ - <%--
    +
    @@ -396,7 +396,7 @@   - + @@ -413,7 +413,8 @@ -
    --%> +
    + <%--
    @@ -1427,9 +1428,9 @@ - +
    -
    +
    @@ -1863,7 +1864,7 @@ } else { $("#CheckRecurrencia").prop('checked', false); } - + //ESCONDE O MUESTRA EL DIV DE LAS OPCIONES DE RECURRENCIA if ($get('CheckRecurrencia').checked) { @@ -1873,15 +1874,18 @@ } //LLAMA EL INDEXCHANGED DEL RADIOBUTTONLIST DE LOS TIPOS DE RECURRENCIA - $("#BtnActualizaAdd").click(); + $("#BtnActualizaAdd").click(); + if (isNaN(event.CveAgendaTipo)) { + $("#DVDdlAgedaTipo").css("display", "none"); + } else { + $("#DVDdlAgedaTipo").css("display", "inline"); + } //Muestra nombre de la empresa si esta tarea sea asigno desde EmpresaCRM - if (event.CveEmpresaCRM > 0 || event.CveAcercamientoCRM > 0 || event.CvePersonal > 0 || event.CveCliente > 0 || event.CveProveedor > 0 || event.CveCompra > 0) { + if (event.CveEmpresaCRM > 0 || event.CveAcercamientoCRM > 0 || event.CvePersonal > 0 || event.CveCliente > 0 || event.CveProveedor > 0 || event.CveCompra > 0 || event.CveVenta > 0 || event.CveActivoFijo || event.CveMovimiento || event.CveMovimiento) { $("#<%=LnkTituloLink.ClientID%>").css("display", ""); - - if (event.CveAcercamientoCRM > 0) { $("#<%=LnkTituloLink.ClientID%>").text("Acercamiento/Oportunidad: " + event.NombreAcercamiento); @@ -1913,10 +1917,42 @@ } + if (event.CveVenta > 0) { + $("#<%=LnkTituloLink.ClientID%>").text("Venta: " + event.SerieFolioVenta); + $("#<%=LnkTituloLink.ClientID%>").attr("href", "/Ventas/Ventas.aspx?CveVenta=" + event.CveVenta); + } + + + if (event.CveActivoFijo > 0) { + $("#<%=LnkTituloLink.ClientID%>").text("Activo Fijo: " + event.AFCodigo); + $("#<%=LnkTituloLink.ClientID%>").attr("href", "/AF/AF.aspx?CveActivoFijo=" + event.CveActivoFijo); + } + + if (event.CveMovimiento > 0) { + $("#<%=LnkTituloLink.ClientID%>").text("Movimiento: " + event.MovimientoFolio); + $("#<%=LnkTituloLink.ClientID%>").attr("href", "/Inventarios/EntradasSalidas.aspx?CveMovimiento=" + event.CveMovimiento); + } + + if (event.CveIE > 0) { + $("#<%=LnkTituloLink.ClientID%>").text("Movimiento: " + event.FolioIE); + $("#<%=LnkTituloLink.ClientID%>").attr("href", "/Bancos/IE.aspx?CveIE=" + event.CveIE); + } + - } else { - $("#<%=LnkTituloLink.ClientID%>").css("display", "none") + + } else { + + $("#<%=LnkTituloLink.ClientID%>").css("display", ""); + if (event.CveTipoEvento == 1) { + $("#<%=LnkTituloLink.ClientID%>").text("Tarea: " + event.title); + $("#<%=LnkTituloLink.ClientID%>").attr("href", "/OI/TareaDetalle.aspx?CveTipoEvento=1&CveEvento=" + event.id); + + } else { + $("#<%=LnkTituloLink.ClientID%>").css("display", "none"); + } + + } diff --git a/Inicio.aspx.vb b/Inicio.aspx.vb index 84d0393f9..582cf8afb 100644 --- a/Inicio.aspx.vb +++ b/Inicio.aspx.vb @@ -203,7 +203,7 @@ Partial Class Inicio CargaGraficas() End If - 'CargaTareas() + CargaTareas() If UsuarioActual.CveRol = 1 Then divInd.Visible = True CargaSubProyectos() @@ -242,6 +242,11 @@ Partial Class Inicio IniializaDdlsOpcionesAgenda() + + If UsuarioActual.CveEmpresa.Contiene(13, 83) Then + DVTareas.Visible = True + End If + End If End Sub @@ -548,39 +553,41 @@ Partial Class Inicio End Sub - 'Private Sub CargaTareas() - ' Dim ObjProspectos As New ClsOIEventos + Private Sub CargaTareas() + Dim ObjProspectos As New ClsOIEventos - ' Dim FechaI, FechaF As DateTime - ' Dim CveEventoEstatus As Integer = -1 - ' FechaI = Now.AddDays(-180) - ' FechaF = Now - ' If ObjProspectos.GetRepEventos(-1, 1, -1, "-1", "-1", -1, -1, -1, 1, -1, -1, "-1", -1, -1, -1, -1, -1, -1, -1, -1, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, FechaI, FechaF) Then + Dim FechaI, FechaF As DateTime + Dim CveEventoEstatus As Integer = -1 + FechaI = Now.AddDays(-180) + FechaF = Now + If ObjProspectos.GetRepEventos(-1, 1, -1, "-1", "-1", -1, -1, -1, 1, -1, -1, "-1", -1, -1, -1, -1, -1, -1, -1, -1, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, FechaI, FechaF) Then - ' Dim DT As DataTable = ObjProspectos.DtResultados.Clone + Dim DT As DataTable = ObjProspectos.DtResultados.Clone.FiltraParametros($"CveEmpresa = {UsuarioActual.CveEmpresa}") - ' If ChkOIPorHacer.Checked Then DT.Merge(ObjProspectos.DtResultados.FiltraParametros(String.Format("CveUsuarioPara = {0} ", UsuarioActual.CveUsuario))) - ' If ChkOIAsigne.Checked Then DT.Merge(ObjProspectos.DtResultados.FiltraParametros(String.Format("CveUsuarioDe = {0} ", UsuarioActual.CveUsuario))) + If ChkOIPorHacer.Checked Then DT.Merge(ObjProspectos.DtResultados.FiltraParametros(String.Format("CveUsuarioPara = {0} AND CveEmpresa = {1}", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa))) + If ChkOIAsigne.Checked Then DT.Merge(ObjProspectos.DtResultados.FiltraParametros(String.Format("CveUsuarioDe = {0} AND CveEmpresa = {1} ", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa))) - ' GvT.DataSource = DT - ' End If - ' ObjProspectos.Dispose() - ' GvT.DataBind() - 'End Sub - 'Protected Sub GvT_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvT.RowDataBound - ' If e.Row.RowType = DataControlRowType.DataRow Then - ' Select Case UsuarioActual.CveUsuario.ToString - ' Case e.Row.DBCampo("CveUsuarioPara") - ' 'etiqueta de 'asignado' - ' e.Row.FCLabel("LblTipo").CssClass = "label label-sm label-warning " - ' e.Row.FCLabel("LblTipo").Text = "por hacer " - ' Case e.Row.DBCampo("CveUsuarioDe") - ' e.Row.FCLabel("LblTipo").CssClass = "label label-sm label-success" - ' e.Row.FCLabel("LblTipo").Text = "Asigné" - ' End Select - ' End If - 'End Sub + DT = DT.FiltraParametros("Avance < 100", "", {"Asunto", "CveEvento", "CveUsuarioPara", "CveUsuarioDe"}) + GvT.DataSource = DT + End If + + ObjProspectos.Dispose() + GvT.DataBind() + End Sub + Protected Sub GvT_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvT.RowDataBound + If e.Row.RowType = DataControlRowType.DataRow Then + Select Case UsuarioActual.CveUsuario.ToString + Case e.Row.DBCampo("CveUsuarioPara") + 'etiqueta de 'asignado' + e.Row.FCLabel("LblTipo").CssClass = "label label-sm label-warning " + e.Row.FCLabel("LblTipo").Text = "por hacer " + Case e.Row.DBCampo("CveUsuarioDe") + e.Row.FCLabel("LblTipo").CssClass = "label label-sm label-success" + e.Row.FCLabel("LblTipo").Text = "Asigné" + End Select + End If + End Sub Private Sub MuestraIndicador(DIV As HtmlGenericControl, Color As String, Icono As String, Titulo As String, Comentario As String, Link As String, TitleComentario As String) Dim htmldiv As New StringBuilder htmldiv.AppendFormat("{0}
    ", DIV.InnerHtml, Color, Icono) @@ -1061,9 +1068,9 @@ Partial Class Inicio End Sub #End Region - 'Protected Sub ChkOIAsigne_CheckedChanged(sender As Object, e As EventArgs) Handles ChkOIAsigne.CheckedChanged, ChkOIPorHacer.CheckedChanged - ' CargaTareas() - 'End Sub + Protected Sub ChkOIAsigne_CheckedChanged(sender As Object, e As EventArgs) Handles ChkOIAsigne.CheckedChanged, ChkOIPorHacer.CheckedChanged + CargaTareas() + End Sub Protected Sub DdlFiltroIndicador_SelectedIndexChanged(sender As Object, e As EventArgs) End Sub diff --git a/Inventarios/EntradasSalidas.aspx b/Inventarios/EntradasSalidas.aspx index c802f6cb1..1bcacf197 100644 --- a/Inventarios/EntradasSalidas.aspx +++ b/Inventarios/EntradasSalidas.aspx @@ -921,8 +921,15 @@
    -
    - +
    + +
    + +
    diff --git a/Inventarios/EntradasSalidas.aspx.vb b/Inventarios/EntradasSalidas.aspx.vb index 7a4a76cd2..9cd866b78 100644 --- a/Inventarios/EntradasSalidas.aspx.vb +++ b/Inventarios/EntradasSalidas.aspx.vb @@ -416,6 +416,10 @@ Partial Class Inventarios_EntradasSalidas CargaDatos(Request("CveMovimiento").ToString.ToEntero) 'CargaGvPaqueteria() + + LtlTareaNueva.Text = String.Format(" Tarea", CveMovimiento) + HlEvento.Visible = True + HlEvento.NavigateUrl = "/OI/PopUpAgenda.aspx?CveTipoEvento=2&CveMovimiento=" & CveMovimiento & "&TB_iframe=true&height=370&width=600;" Else AsignacionOpcion() SiguienteFolio() diff --git a/OC/OC.aspx.vb b/OC/OC.aspx.vb index 62ba9c921..5b3cf7b11 100644 --- a/OC/OC.aspx.vb +++ b/OC/OC.aspx.vb @@ -2555,7 +2555,7 @@ Partial Class OC_OC End If - If TipoOC.ToUpper = "REQ" AndAlso CveEstatusFinalOK = CboE.SelectedValue.ToEntero AndAlso DdlProveedores.SelectedValue.ToEntero <= 0 Then + If TipoOC.ToUpper = "REQ" AndAlso PnlProveedor.Visible AndAlso CveEstatusFinalOK = CboE.SelectedValue.ToEntero AndAlso DdlProveedores.SelectedValue.ToEntero <= 0 Then Alert("Debe seleccionar un proveedor.", TipoMensaje.MsgAdvertencia) TieneError = True End If diff --git a/OI/PopUpAgenda.aspx.vb b/OI/PopUpAgenda.aspx.vb index 11d980faf..0b5f58b89 100644 --- a/OI/PopUpAgenda.aspx.vb +++ b/OI/PopUpAgenda.aspx.vb @@ -338,6 +338,14 @@ Partial Class OI_PopUpAgenda CargaCompra(CveCompra:=Request("CveCompra").ToEntero) End If + If Request("CveVenta") IsNot Nothing AndAlso IsNumeric(Request("CveVenta")) AndAlso Request("CveVenta").ToEntero > 0 Then + CargaVenta(CveVenta:=Request("CveVenta").ToEntero) + End If + + If Request("CveMovimiento") IsNot Nothing AndAlso IsNumeric(Request("CveMovimiento")) AndAlso Request("CveMovimiento").ToEntero > 0 Then + CargaMovimiento(CveMovimiento:=Request("CveMovimiento").ToEntero) + End If + If Request("CveEvento") IsNot Nothing AndAlso IsNumeric(Request("CveEvento")) AndAlso Request("CveEvento").ToEntero > 0 Then @@ -640,6 +648,7 @@ Partial Class OI_PopUpAgenda Dim CveEmpresa As Integer = UsuarioActual.CveEmpresa + '----------------------------------------- Dim CveAgendaTipo As Integer = DdlAgendaTipo.SelectedValue.ToEntero Dim Prioridad As Integer @@ -697,6 +706,16 @@ Partial Class OI_PopUpAgenda CveCompra = Request("CveCompra").ToEntero End If + Dim CveVenta As Integer = -1 + If Request("CveVenta") IsNot Nothing AndAlso IsNumeric(Request("CveVenta")) AndAlso Request("CveVenta").ToEntero > 0 Then + CveVenta = Request("CveVenta").ToEntero + End If + + Dim CveMovimiento As Integer = -1 + If Request("CveMovimiento") IsNot Nothing AndAlso IsNumeric(Request("CveMovimiento")) AndAlso Request("CveMovimiento").ToEntero > 0 Then + CveMovimiento = Request("CveMovimiento").ToEntero + End If + '------------------------------------------ 'Recorrro Grid para obtener el usuario PARA For Each RowPara As GridViewRow In GVUsuarios.Rows @@ -723,7 +742,7 @@ Partial Class OI_PopUpAgenda Alert("La Nueva Tarea se guardó correctamente.", TipoMensaje.MsgInformacion) End If ElseIf CveTipoEvento = 2 Then - If ObjEventos.AddEventoAgenda(CveAgendaTipo, Asunto, Descripcion, Prioridad, FechaInicio.ToDateTime, FechaFin.ToDateTime, CveUsuarioIng, CveEmpresa, CveActivoFijo, CveIE, CveProspecto, CveCliente, CveOS, CveOC, CvePersonal, CveProveedor, CveCompra:=CveCompra) Then + If ObjEventos.AddEventoAgenda(CveAgendaTipo, Asunto, Descripcion, Prioridad, FechaInicio.ToDateTime, FechaFin.ToDateTime, CveUsuarioIng, CveEmpresa, CveActivoFijo, CveIE, CveProspecto, CveCliente, CveOS, CveOC, CvePersonal, CveProveedor, CveCompra:=CveCompra, CveVenta:=CveVenta, CveMovimiento:=CveMovimiento) Then Alert("La Nueva Agenda se guardó correctamente.", TipoMensaje.MsgInformacion, "self.parent.tb_remove();self.parent.location.reload();") End If ElseIf CveTipoEvento = 3 Then @@ -1313,6 +1332,29 @@ Partial Class OI_PopUpAgenda objCompra.Dispose() End Sub + Private Sub CargaVenta(CveVenta As Integer) + + Dim objVenta As New ClsVentas + + If objVenta.GetVenta(CveVenta, UsuarioActual.CveEmpresa, VerificaAlmacen:=False) Then + Dim dr As DataRow = objVenta.DtResultados.Rows(0) + LtlAgenda.Text = $" Venta: {dr("SerieFolio").ToString}" + End If + objVenta.Dispose() + + End Sub + + Private Sub CargaMovimiento(CveMovimiento As Integer) + Dim objMovimientos As New ClsInventarios + + If objMovimientos.GetMovimientos(CveMovimiento, -1, -1, UsuarioActual.CveEmpresa) Then + Dim dr As DataRow = objMovimientos.DtResultados.Rows(0) + LtlAgenda.Text = $" Folio: {objMovimientos.Folio.ToString}" + End If + objMovimientos.Dispose() + + End Sub + #End Region End Class diff --git a/OI/Proyecto.aspx b/OI/Proyecto.aspx index 19fdbee92..cb69ff67e 100644 --- a/OI/Proyecto.aspx +++ b/OI/Proyecto.aspx @@ -141,14 +141,63 @@
    -
    + <%--
    Para: +
    --%> + + +
    +
    + + + + + + Para + + + <%----%> + + + + + + + C. C. Para +
    + <%-- + --%> +
    + + + +
    + + Usuario + + + + + + Rol + + + + +
    +
    + +
    + +
    diff --git a/OI/Proyecto.aspx.cs b/OI/Proyecto.aspx.cs index ae7236837..ffa7f1c65 100644 --- a/OI/Proyecto.aspx.cs +++ b/OI/Proyecto.aspx.cs @@ -15,8 +15,10 @@ public partial class OI_Proyecto : ClsPaginas public int RCveEventoB { get { return ViewState["RCveEventoB"] != null ? ViewState["RCveEventoB"].ToString().ToEntero() : 0; } set { ViewState["RCveEventoB"] = value; } } public int Folio { get { return ViewState["Folio"] != null ? ViewState["Folio"].ToString().ToEntero() : 0; } set { ViewState["Folio"] = value; } } public decimal Avance { get { return ViewState["Avance"] != null ? ViewState["Avance"].ToString().ToEntero() : 0; } set { ViewState["Avance"] = value; } } + public int CveUsuarioPara { get { return ViewState["CveUsuarioPara"].ToString().ToEntero(); } set { ViewState["CveUsuarioPara"] = value; } } public int CveUsuarioDe { get { return ViewState["CveUsuarioDe"].ToString().ToEntero(); } set { ViewState["CveUsuarioDe"] = value; } } + public List LCveUsuarioCCP { get { if (ViewState["LCveUsuarioCCP"] == null) { ViewState["LCveUsuarioCCP"] = new List(); } return (List)ViewState["LCveUsuarioCCP"]; } set { ViewState["LCveUsuarioCCP"] = value; } } public List LcveuserVisto { get { if (ViewState["LcveuserVisto"] == null) { ViewState["LcveuserVisto"] = new List(); } return (List)ViewState["LcveuserVisto"]; } set { ViewState["LcveuserVisto"] = value; } } @@ -25,6 +27,9 @@ public partial class OI_Proyecto : ClsPaginas { if (!IsPostBack) { + CveUsuarioPara = 0; + CveUsuarioDe = 0; + if (Request["CveEvento"] != null) { RCveEvento = Request["CveEvento"].ToString().ToEntero(); @@ -34,13 +39,15 @@ public partial class OI_Proyecto : ClsPaginas loadEvento(); } - DdlPara.DataSource = get_GlobalDTUsuarios(CveEmpresa: UsuarioActual.CveEmpresa).FiltraParametros("Estatus =1 ", "Rol ASC"); ; - DdlPara.DataBind(); - DdlPara.Items.Insert(0, new ListItem("Seleccione", "-1")); + //DdlPara.DataSource = get_GlobalDTUsuarios(CveEmpresa: UsuarioActual.CveEmpresa).FiltraParametros("Estatus =1 ", "Rol ASC"); ; + //DdlPara.DataBind(); + //DdlPara.Items.Insert(0, new ListItem("Seleccione", "-1")); DdlTema.DataSource = get_GlobalDTOIRevision(UsuarioActual.CveEmpresa).FiltraParametros(string.Format("CveUsuario = {0}", UsuarioActual.CveUsuario)); DdlTema.DataBind(); DdlTema.Items.Insert(0, new ListItem("Seleccione", "-1")); + + } } @@ -77,6 +84,9 @@ public partial class OI_Proyecto : ClsPaginas protected void LnkNewProyecto_Click(object sender, EventArgs e) { + + SetUsuarios(); + RegistraScript(string.Format("$('#{0}').modal()", iddivAgregarProyecto)); RCveEventoB = RCveEvento; } @@ -87,7 +97,36 @@ public partial class OI_Proyecto : ClsPaginas int cveUsuarioDe = UsuarioActual.CveUsuario; List listaCCP = new List(); - int cveUsuarioPara = DdlPara.SelectedValue.ToEntero(); + int cveUsuarioPara = -1; + + //int cveUsuarioDe = UsuarioActual.CveUsuario; + //List listaCCP = new List(); + //int cveUsuarioPara = -1; + string Nombrepara = ""; + string Nombrede = ""; + foreach (GridViewRow gvRow in GVUsuariosB.Rows) + { + if (gvRow.RowType == DataControlRowType.DataRow) + { + int CveUsuario = gvRow.DataKey("CveUsuario").ToString().ToEntero(); + CheckBox chkpara = gvRow.FCCheckBox("ChkPara"); + CheckBox chkCCpara = gvRow.FCCheckBox("ChkCCP"); + if (CveUsuario == cveUsuarioDe) + { + Nombrede = gvRow.DataKey("Nombre").ToString(); + } + if (chkpara.Checked) + { + cveUsuarioPara = CveUsuario; + Nombrepara = gvRow.DataKey("Nombre").ToString(); + } + if (chkCCpara.Checked) + { + listaCCP.Add(CveUsuario); + //cveUsuarioDe = CveUsuario; + } + } + } OITipoEventos cveTipoEvento = OITipoEventos.Proyecto; string asunto = TxtAsunto.Text; @@ -213,11 +252,107 @@ public partial class OI_Proyecto : ClsPaginas } - protected void BtnopenmodalClickGant_Click(object sender, EventArgs e) { RegistraScript(string.Format("$('#{0}').modal()", iddivAgregarProyecto)); RCveEventoB = txtCveEvento.Text.ToEntero(); } + + + + protected void GVUsuariosB_RowDataBound(object sender, GridViewRowEventArgs e) + { + if (e.Row.RowType == DataControlRowType.DataRow) + { + string CveRol = e.Row.DBCampo("CveRol"); + //string CveSubProyecto = e.Row.DBCampo("CveSubProyecto"); + e.Row.CssClass = "items"; + //e.Row.Attributes.Add("data-rol", CveRol); + //e.Row.Attributes.Add("data-sucursal", CveRol); + } + + } + private void SetUsuarios() + { + + + string[] FiltroAD = { "CveUsuario", "Usuario", "Nombre", "Contraseña", "CveEmpresa", "Rol", "Correo", "Empresa", "CveRol" }; + GVUsuariosB.DataSource = get_GlobalDTUsuarios().FiltraParametros(String.Format("CveEmpresa = {0} AND Estatus =1", UsuarioActual.CveEmpresa), "Nombre ASC", FiltroAD); + GVUsuariosB.DataBind(); + + StringBuilder StrPara = new StringBuilder(); + StringBuilder StrDeUser = new StringBuilder(); + StringBuilder StrCCPara = new StringBuilder(); + + foreach (GridViewRow gvRow in GVUsuariosB.Rows) + { + + if (gvRow.RowType == DataControlRowType.DataRow) + { + int CveUsuario = gvRow.DataKey("CveUsuario").ToString().ToEntero(); + CheckBox chkpara = gvRow.FCCheckBox("ChkPara"); + CheckBox chkCCpara = gvRow.FCCheckBox("ChkCCP"); + chkpara.Checked = false; + chkCCpara.Checked = false; + + if (true) + { + chkpara.Enabled = true; + chkCCpara.Enabled = true; + if (CveUsuario == UsuarioActual.CveUsuario) + { + chkCCpara.Checked = true; + chkCCpara.Enabled = false; + } + } + else + { + + chkpara.Enabled = false; + chkCCpara.Enabled = false; + } + string palomitavisto = ""; + string palomitasinver = ""; + if (CveUsuario == UsuarioActual.CveUsuario || CveUsuario.Contiene(LcveuserVisto.ToArray())) + { + palomitavisto = palomitasinver; + palomitasinver = ""; + } + if ((CveUsuario == CveUsuarioPara) || (CveUsuario == CveUsuarioDe)) + { + if (CveUsuario == CveUsuarioPara) + { + chkpara.Checked = true; + StrPara.AppendFormat("{3}{2}\"{0}\"", gvRow.DataKey("Nombre").ToString(), gvRow.DataKey("Correo").ToString(), palomitavisto, palomitasinver); + } + if (CveUsuario == CveUsuarioDe) + { + chkCCpara.Checked = true; + StrDeUser.AppendFormat("{3}{2}\"{0}\"", gvRow.DataKey("Nombre").ToString(), gvRow.DataKey("Correo").ToString(), palomitavisto, palomitasinver); + } + } + else if (CveUsuario.Contiene(LCveUsuarioCCP.ToArray())) + { + chkCCpara.Checked = true; + StrCCPara.AppendFormat("{3}{2}\"{0}\"; ", gvRow.DataKey("Nombre").ToString(), gvRow.DataKey("Correo").ToString(), palomitavisto, palomitasinver); + } + } + } + //LtlPara.Text = StrPara.ToString(); + //LtlDeUser.Text = StrDeUser.ToString(); + int longitud = StrCCPara.ToString().Length; + if (longitud > 0) + { + //LtlCCPara.Text = string.Format("{0} ", StrCCPara.ToString().Substring(0, longitud - 9)); + + } + else + { + //LtlCCPara.Text = ""; + } + + UpModalProyecto.Update(); + + } } \ No newline at end of file diff --git a/OI/RepProyectos.aspx.cs b/OI/RepProyectos.aspx.cs index eb39fbe13..db1f74b1b 100644 --- a/OI/RepProyectos.aspx.cs +++ b/OI/RepProyectos.aspx.cs @@ -16,7 +16,7 @@ public partial class OI_RepProyectos : ClsPaginas if (!IsPostBack) { - DdlPara.DataSource = get_GlobalDTUsuarios(CveEmpresa: UsuarioActual.CveEmpresa).FiltraParametros("Estatus =1 ", "Rol ASC"); ; + DdlPara.DataSource = get_GlobalDTUsuarios(CveEmpresa: UsuarioActual.CveEmpresa).FiltraParametros("Estatus =1 ", "Nombre ASC"); ; DdlPara.DataBind(); DdlPara.Items.Insert(0, new ListItem("Seleccione uno", "-1")); diff --git a/OI/RepTareas.aspx b/OI/RepTareas.aspx index c0b51ef60..7577af0fb 100644 --- a/OI/RepTareas.aspx +++ b/OI/RepTareas.aspx @@ -12,9 +12,23 @@ -
  • - Nueva Tarea -
  • + + + + + +
  • + Nueva Tarea +
  • +
  • + Excel +
  • + +
    + + + +
    Reporte de Tareas @@ -25,94 +39,89 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - -
    Fecha Inicio de: -
    - - - - -
    - - - - - - -
    Fecha Inicio a: - -
    - - - - -
    - - - - - - -
    Estatus: - + + +
    +
    +
    + +
    +
    + +
    + +
    + Fecha Inicio: +
    +
    +
    + + + + +
    + + + + + + +
    +
    + Fecha Fin: +
    +
    +
    + + + + +
    + + + + + + +
    + +
    Estatus:
    +
    + -
    Tema: - - - - - - - - -
    Fecha Fin de: -
    - - - -
    - - -
    Fecha Fin A: - -
    - - - - +
    Tema:
    +
    + + + +
    - - -
    + +
    - +
    + +
    +
    + +
    + + + + + + + + + + +
    @@ -209,22 +218,11 @@ -
    - - - - - - - <%--Comentado 24 Noviembre, paso a segundo termino--%> - <%----%> - -
    - - - - - - - -
    - + +
    +
    +
    + @@ -240,165 +238,67 @@
    " style="display: inline-block; margin-right: -20px; width: 150px;" /> " style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"> -
    - - - - - - - <%----%> - - <%----%> - - - <%----%> - - - - <%----%> - - -
    - - Folio - - - - - De - - - - - Asunto - - - - - Comentario - - - - - Prioridad - - - - - Tema - - - - - Fecha Inicio - - - - - Fecha Fin - - - - - Orden - - - - - Tema - - - - - Fecha - - - - - Estatus - - - - - Empresa - - -
    +
    + - - - - - - - - - - - - - - - - - - <%-- - - - - --%> - - - - - - <%-- - - - - --%> - - - - - - - - - - - <%-- - - - - --%> - - - - - - - - - - - - - - - - <%-- - - - - --%> - - - - + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    +
    @@ -417,136 +317,77 @@ " style="display: inline-block; margin-right: -20px; width: 150px;" /> " style="margin-top: -3px;" class="btn btn-circle btn-sm label-info">
    - - - - - - - - - <%----%> - - - - - - - -
    - - Folio - - - - - - - - - - - - - - - - - - - - - - - - - Fecha Inicio - - - - - Fecha Fin - - - - - - - - - - - - - - -
    + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - <%-- - - - - --%> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + +
    + @@ -562,126 +403,71 @@
    " style="display: inline-block; margin-right: -20px; width: 150px;" /> " style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"> -
    - - - - - - - - <%-- --%> + - - - - - - - - -
    - - - - - - A Quién - - - - Asunto - - - - Prioridad - - - - Orden - - - - Fecha Inicio - - - - - Fecha Fin - - - - - Tema - - - - Fecha - - - - Estatus - -
    - - + - + + +
    +
    + - + - + - + - + - - <%-- - - - - --%> - + + - + - + - + - + - - - + +
    +
    + + + +
    @@ -691,51 +477,13 @@
    -
    -
    -
    - Vista Previa - - - - -
    -
    -
    + + + + + + +