diff --git a/App_Code/ClsOIEventos.vb b/App_Code/ClsOIEventos.vb index adbc2cd08..d717980dc 100644 --- a/App_Code/ClsOIEventos.vb +++ b/App_Code/ClsOIEventos.vb @@ -180,10 +180,377 @@ Public Class ClsOIEventos Public Sub Commit() SqlTransacc.Commit() End Sub +#Region "Correo" + Private Function GetDominio() As String + Return HttpContext.Current.Request.Url.ToString().Replace(HttpContext.Current.Request.Url.PathAndQuery, "") + End Function + Private Function MailgetBodyNuevatarea(Folio As Integer, Link As String, Asunto As String, Descripcion As String, Fechai As String, Fechaf As String, Prioridad As String, Tema As String) As String + Dim strSQL As New StringBuilder + strSQL.AppendLine("
") + strSQL.AppendLine("
") + strSQL.AppendLine("
SIG Notificaciones
") + strSQL.AppendLine("

") + strSQL.AppendLine(" NUEVA TAREA ASIGNADA") + strSQL.AppendLine("
Folio : @Folio@
") + strSQL.AppendLine("
") + strSQL.AppendLine(" ") + strSQL.AppendLine(" ") + strSQL.AppendLine(" ") + strSQL.AppendLine(" ") + strSQL.AppendLine(" ") + strSQL.AppendLine(" ") + strSQL.AppendLine(" ") + strSQL.AppendLine(" ") + strSQL.AppendLine(" ") + strSQL.AppendLine(" ") + strSQL.AppendLine(" ") + strSQL.AppendLine(" ") + strSQL.AppendLine(" ") + strSQL.AppendLine(" ") + strSQL.AppendLine(" ") + strSQL.AppendLine(" ") + strSQL.AppendLine(" ") + strSQL.AppendLine(" ") + strSQL.AppendLine(" ") + strSQL.AppendLine(" ") + strSQL.AppendLine(" ") + strSQL.AppendLine(" ") + strSQL.AppendLine(" ") + strSQL.AppendLine(" ") + strSQL.AppendLine(" ") + strSQL.AppendLine("
Asunto
@Asunto@
Descripción
@Descripcion@
Fecha Inicio
@Fechai@
Fecha Fin
@Fechaf@
Prioridad
@Prioridad@
Tema
@Tema@
") + strSQL.AppendLine("
") + strSQL.AppendLine("
") + strSQL.AppendLine("
SIG Notificaciones
") + strSQL.AppendLine("
") + strSQL.AppendLine("
") + Return strSQL.ToString().Replace("@Folio@", Folio.ToString()).Replace("@Link@", Link).Replace("@Asunto@", Asunto).Replace("@Descripcion@", Descripcion).Replace("@Fechai@", Fechai).Replace("@Fechaf@", Fechaf).Replace("@Prioridad@", Prioridad).Replace("@Tema@", Tema) + End Function + + Private Function MailgetBodyActualizartarea(Folio As Integer, Link As String, Asunto As String, Descripcion As String, Fechai As String, Fechaf As String, Prioridad As String, Tema As String) As String + + Dim strSQL As New StringBuilder + strSQL.AppendLine("
") + strSQL.AppendLine("
") + strSQL.AppendLine("
SIG Notificaciones
") + strSQL.AppendLine("

") + strSQL.AppendLine(" TAREA ACTUALIZADA") + strSQL.AppendLine("
Folio : @Folio@
") + strSQL.AppendLine("
") + strSQL.AppendLine(" ") + strSQL.AppendLine(" ") + strSQL.AppendLine(" ") + strSQL.AppendLine(" ") + strSQL.AppendLine(" ") + strSQL.AppendLine(" ") + strSQL.AppendLine(" ") + strSQL.AppendLine(" ") + strSQL.AppendLine(" ") + strSQL.AppendLine(" ") + strSQL.AppendLine(" ") + strSQL.AppendLine(" ") + strSQL.AppendLine(" ") + strSQL.AppendLine(" ") + strSQL.AppendLine(" ") + strSQL.AppendLine(" ") + strSQL.AppendLine(" ") + strSQL.AppendLine(" ") + strSQL.AppendLine(" ") + strSQL.AppendLine(" ") + strSQL.AppendLine(" ") + strSQL.AppendLine(" ") + strSQL.AppendLine(" ") + strSQL.AppendLine(" ") + strSQL.AppendLine(" ") + strSQL.AppendLine("
Asunto
@Asunto@
Descripción
@Descripcion@
Fecha Inicio
@Fechai@
Fecha Fin
@Fechaf@
Prioridad
@Prioridad@
Tema
@Tema@
") + strSQL.AppendLine("
") + strSQL.AppendLine("
") + strSQL.AppendLine("
SIG Notificaciones
") + strSQL.AppendLine("
") + strSQL.AppendLine("
") + Return strSQL.ToString().Replace("@Folio@", Folio.ToString()).Replace("@Link@", Link).Replace("@Asunto@", Asunto).Replace("@Descripcion@", Descripcion).Replace("@Fechai@", Fechai).Replace("@Fechaf@", Fechaf).Replace("@Prioridad@", Prioridad).Replace("@Tema@", Tema) + End Function + + Private Function MailgetBodyActualizararchivo(Folio As Integer, Link As String, Asunto As String, Descripcion As String, Fechai As String, Fechaf As String, Prioridad As String, Tema As String) As String + + Dim strSQL As New StringBuilder + strSQL.AppendLine("
") + strSQL.AppendLine("
") + strSQL.AppendLine("
SIG Notificaciones
") + strSQL.AppendLine("

") + strSQL.AppendLine(" TAREA ACTUALIZADA(Nuevo Archivo)") + strSQL.AppendLine("
Folio : @Folio@
") + strSQL.AppendLine("
") + strSQL.AppendLine(" ") + strSQL.AppendLine(" ") + strSQL.AppendLine(" ") + strSQL.AppendLine(" ") + strSQL.AppendLine(" ") + strSQL.AppendLine(" ") + strSQL.AppendLine(" ") + strSQL.AppendLine(" ") + strSQL.AppendLine(" ") + strSQL.AppendLine(" ") + strSQL.AppendLine(" ") + strSQL.AppendLine(" ") + strSQL.AppendLine(" ") + strSQL.AppendLine(" ") + strSQL.AppendLine(" ") + strSQL.AppendLine(" ") + strSQL.AppendLine(" ") + strSQL.AppendLine(" ") + strSQL.AppendLine(" ") + strSQL.AppendLine(" ") + strSQL.AppendLine(" ") + strSQL.AppendLine(" ") + strSQL.AppendLine(" ") + strSQL.AppendLine(" ") + strSQL.AppendLine(" ") + strSQL.AppendLine("
Asunto
@Asunto@
Descripción
@Descripcion@
Fecha Inicio
@Fechai@
Fecha Fin
@Fechaf@
Prioridad
@Prioridad@
Tema
@Tema@
") + strSQL.AppendLine("
") + strSQL.AppendLine("
") + strSQL.AppendLine("
SIG Notificaciones
") + strSQL.AppendLine("
") + strSQL.AppendLine("
") + Return strSQL.ToString().Replace("@Folio@", Folio.ToString()).Replace("@Link@", Link).Replace("@Asunto@", Asunto).Replace("@Descripcion@", Descripcion).Replace("@Fechai@", Fechai).Replace("@Fechaf@", Fechaf).Replace("@Prioridad@", Prioridad).Replace("@Tema@", Tema) + End Function + + Private Function MailgetBodyActualizarAvance(Folio As Integer, Link As String, Asunto As String, Descripcion As String, Fechai As String, Fechaf As String, Prioridad As String, Tema As String) As String + + Dim strSQL As New StringBuilder + strSQL.AppendLine("
") + strSQL.AppendLine("
") + strSQL.AppendLine("
SIG Notificaciones
") + strSQL.AppendLine("

") + strSQL.AppendLine(" TAREA ACTUALIZADA(Avance)") + strSQL.AppendLine("
Folio : @Folio@
") + strSQL.AppendLine("
") + strSQL.AppendLine(" ") + strSQL.AppendLine(" ") + strSQL.AppendLine(" ") + strSQL.AppendLine(" ") + strSQL.AppendLine(" ") + strSQL.AppendLine(" ") + strSQL.AppendLine(" ") + strSQL.AppendLine(" ") + strSQL.AppendLine(" ") + strSQL.AppendLine(" ") + strSQL.AppendLine(" ") + strSQL.AppendLine(" ") + strSQL.AppendLine(" ") + strSQL.AppendLine(" ") + strSQL.AppendLine(" ") + strSQL.AppendLine(" ") + strSQL.AppendLine(" ") + strSQL.AppendLine(" ") + strSQL.AppendLine(" ") + strSQL.AppendLine(" ") + strSQL.AppendLine(" ") + strSQL.AppendLine(" ") + strSQL.AppendLine(" ") + strSQL.AppendLine(" ") + strSQL.AppendLine(" ") + strSQL.AppendLine("
Asunto
@Asunto@
Descripción
@Descripcion@
Fecha Inicio
@Fechai@
Fecha Fin
@Fechaf@
Prioridad
@Prioridad@
Tema
@Tema@
") + strSQL.AppendLine("
") + strSQL.AppendLine("
") + strSQL.AppendLine("
SIG Notificaciones
") + strSQL.AppendLine("
") + strSQL.AppendLine("
") + Return strSQL.ToString().Replace("@Folio@", Folio.ToString()).Replace("@Link@", Link).Replace("@Asunto@", Asunto).Replace("@Descripcion@", Descripcion).Replace("@Fechai@", Fechai).Replace("@Fechaf@", Fechaf).Replace("@Prioridad@", Prioridad).Replace("@Tema@", Tema) + End Function + + Private Function MailgetBodyTareaComentario(Folio As Integer, Link As String, Asunto As String, Descripcion As String, Fechai As String, Fechaf As String, Prioridad As String, Tema As String) As String + + Dim strSQL As New StringBuilder + strSQL.AppendLine("
") + strSQL.AppendLine("
") + strSQL.AppendLine("
SIG Notificaciones
") + strSQL.AppendLine("

") + strSQL.AppendLine(" NUEVO COMENTARIO EN TAREA") + strSQL.AppendLine("
Folio : @Folio@
") + strSQL.AppendLine("
") + strSQL.AppendLine(" ") + strSQL.AppendLine(" ") + strSQL.AppendLine(" ") + strSQL.AppendLine(" ") + strSQL.AppendLine(" ") + strSQL.AppendLine(" ") + strSQL.AppendLine(" ") + strSQL.AppendLine(" ") + strSQL.AppendLine(" ") + strSQL.AppendLine(" ") + strSQL.AppendLine(" ") + strSQL.AppendLine(" ") + strSQL.AppendLine(" ") + strSQL.AppendLine(" ") + strSQL.AppendLine(" ") + strSQL.AppendLine(" ") + strSQL.AppendLine(" ") + strSQL.AppendLine(" ") + strSQL.AppendLine(" ") + strSQL.AppendLine(" ") + strSQL.AppendLine(" ") + strSQL.AppendLine(" ") + strSQL.AppendLine(" ") + strSQL.AppendLine(" ") + strSQL.AppendLine(" ") + strSQL.AppendLine("
Asunto
@Asunto@
Descripción
@Descripcion@
Fecha Inicio
@Fechai@
Fecha Fin
@Fechaf@
Prioridad
@Prioridad@
Tema
@Tema@
") + strSQL.AppendLine("
") + strSQL.AppendLine("
") + strSQL.AppendLine("
SIG Notificaciones
") + strSQL.AppendLine("
") + strSQL.AppendLine("
") + Return strSQL.ToString().Replace("@Folio@", Folio.ToString()).Replace("@Link@", Link).Replace("@Asunto@", Asunto).Replace("@Descripcion@", Descripcion).Replace("@Fechai@", Fechai).Replace("@Fechaf@", Fechaf).Replace("@Prioridad@", Prioridad).Replace("@Tema@", Tema) + End Function + + Private Function MailgetBodyTareaCheckList(Actividad As String, Folio As Integer, Link As String, Asunto As String, Descripcion As String, Fechai As String, Fechaf As String, Prioridad As String, Tema As String) As String + + Dim strSQL As New StringBuilder + strSQL.AppendLine("
") + strSQL.AppendLine("
") + strSQL.AppendLine("
SIG Notificaciones
") + strSQL.AppendLine("

") + strSQL.AppendLine(" TAREA (@Actividad@)") + strSQL.AppendLine("
Folio : @Folio@
") + strSQL.AppendLine("
") + strSQL.AppendLine(" ") + strSQL.AppendLine(" ") + strSQL.AppendLine(" ") + strSQL.AppendLine(" ") + strSQL.AppendLine(" ") + strSQL.AppendLine(" ") + strSQL.AppendLine(" ") + strSQL.AppendLine(" ") + strSQL.AppendLine(" ") + strSQL.AppendLine(" ") + strSQL.AppendLine(" ") + strSQL.AppendLine(" ") + strSQL.AppendLine(" ") + strSQL.AppendLine(" ") + strSQL.AppendLine(" ") + strSQL.AppendLine(" ") + strSQL.AppendLine(" ") + strSQL.AppendLine(" ") + strSQL.AppendLine(" ") + strSQL.AppendLine(" ") + strSQL.AppendLine(" ") + strSQL.AppendLine(" ") + strSQL.AppendLine(" ") + strSQL.AppendLine(" ") + strSQL.AppendLine(" ") + strSQL.AppendLine("
Asunto
@Asunto@
Descripción
@Descripcion@
Fecha Inicio
@Fechai@
Fecha Fin
@Fechaf@
Prioridad
@Prioridad@
Tema
@Tema@
") + strSQL.AppendLine("
") + strSQL.AppendLine("
") + strSQL.AppendLine("
SIG Notificaciones
") + strSQL.AppendLine("
") + strSQL.AppendLine("
") + Return strSQL.ToString().Replace("@Actividad@", Actividad).Replace("@Folio@", Folio.ToString()).Replace("@Link@", Link).Replace("@Asunto@", Asunto).Replace("@Descripcion@", Descripcion).Replace("@Fechai@", Fechai).Replace("@Fechaf@", Fechaf).Replace("@Prioridad@", Prioridad).Replace("@Tema@", Tema) + End Function + + Private Function MailgetBodyActualizarEstado(Estatus As String, Folio As Integer, Link As String, Asunto As String, Descripcion As String, Fechai As String, Fechaf As String, Prioridad As String, Tema As String) As String + + Dim strSQL As New StringBuilder + strSQL.AppendLine("
") + strSQL.AppendLine("
") + strSQL.AppendLine("
SIG Notificaciones
") + strSQL.AppendLine("

") + strSQL.AppendLine(" TAREA NUEVO ESTADO (@Estatus@)") + strSQL.AppendLine("
Folio : @Folio@
") + strSQL.AppendLine("
") + strSQL.AppendLine(" ") + strSQL.AppendLine(" ") + strSQL.AppendLine(" ") + strSQL.AppendLine(" ") + strSQL.AppendLine(" ") + strSQL.AppendLine(" ") + strSQL.AppendLine(" ") + strSQL.AppendLine(" ") + strSQL.AppendLine(" ") + strSQL.AppendLine(" ") + strSQL.AppendLine(" ") + strSQL.AppendLine(" ") + strSQL.AppendLine(" ") + strSQL.AppendLine(" ") + strSQL.AppendLine(" ") + strSQL.AppendLine(" ") + strSQL.AppendLine(" ") + strSQL.AppendLine(" ") + strSQL.AppendLine(" ") + strSQL.AppendLine(" ") + strSQL.AppendLine(" ") + strSQL.AppendLine(" ") + strSQL.AppendLine(" ") + strSQL.AppendLine(" ") + strSQL.AppendLine(" ") + strSQL.AppendLine("
Asunto
@Asunto@
Descripción
@Descripcion@
Fecha Inicio
@Fechai@
Fecha Fin
@Fechaf@
Prioridad
@Prioridad@
Tema
@Tema@
") + strSQL.AppendLine("
") + strSQL.AppendLine("
") + strSQL.AppendLine("
SIG Notificaciones
") + strSQL.AppendLine("
") + strSQL.AppendLine("
") + Return strSQL.ToString().Replace("@Estatus@", Estatus).Replace("@Folio@", Folio.ToString()).Replace("@Link@", Link).Replace("@Asunto@", Asunto).Replace("@Descripcion@", Descripcion).Replace("@Fechai@", Fechai).Replace("@Fechaf@", Fechaf).Replace("@Prioridad@", Prioridad).Replace("@Tema@", Tema) + End Function + +#End Region + + Public Sub EnviarCorreo(ByVal ObjEmpresa As Empresa, Asunto As String, body As String, Para As String, ArrayCC As String) + + Dim a As String = String.Format("{0} -- {1} --- {2}", Asunto, Para, ArrayCC) + a.GuardaLog() + + Dim Mail As New ClsSisMail() + Dim LSRutasMail As New List(Of ClsSisMail.ArchivoMail) + Dim itemMail As New ClsSisMail.ArchivoMail + + 'With itemMail + ' itemMail.ArchivoBinario = ArchivoBinario + ' itemMail.NombreArchivo = NombreArchivo + + 'End With + + 'LSRutasMail.Add(itemMail) + + + Mail.SendMail(ClsPaginas.EmpresaNotificaciones, Para, Asunto, body, ArrayCC, LSRutasMail) + Mail = Nothing + End Sub #Region "oieventos2.0" + Public Function GetEventosUsuario2(CveEvento As Integer, CveEmpresa As Integer) As Boolean + Dim Retorno As Boolean = False + DataAdapter("PA_OI_EventosUsuarios2Get") + + With SqlAdapter.SelectCommand.Parameters + .Add("@CveEvento", SqlDbType.Int).Value = CveEvento + .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa + End With + Try + SqlAdapter.Fill(Data) + Retorno = True + Catch ex As Exception + OnError("Ocurrió un error al obtener el Catálogo de Evento Usuario.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + End Try + Return Retorno + End Function + + Public Function UpUsuarioseventosVisto(CveEvento As Integer, CveUsuario As Integer) As Boolean + Dim Retorno As Boolean = False + DataAdapter("UPDATE OI_EventosUsuarios SET Visto=1 WHERE CveEvento =@CveEvento AND CveUsuario=@CveUsuario", CommandType.Text) + + With SqlAdapter.SelectCommand.Parameters + .Add("@CveEvento", SqlDbType.Int).Value = CveEvento + .Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario + End With + Try + SqlAdapter.Fill(Data) + Retorno = True + Catch ex As Exception + OnError("Ocurrió un error al obtener el Catálogo de Evento Usuario.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + End Try + Return Retorno + End Function Public Function GetEventos2(cveEvento As Int32, CveEmpresa As Integer) As Boolean Dim retorno As Boolean = False DataAdapter("PA_OI_Eventos2Get", CommandType.StoredProcedure) @@ -201,10 +568,28 @@ Public Class ClsOIEventos End Function - Public Function AddOI_Eventos2(cveTipoEvento As OITipoEventos, asunto As String, descripcion As String, prioridad As Int32, cveUsuarioDe As Int32, cveUsuarioPara As Int32, - fechaInicio As String, fechaFin As String, cveRevision As Int32, archivo As String, cveUsuarioIng As Int32, cveEmpresa As Int32) As Boolean + fechaInicio As String, fechaFin As String, cveRevision As Int32, archivo As String, Lmiembros As List(Of Integer), chkList As List(Of String), + cveUsuarioIng As Int32, cveEmpresa As Int32, oempresa As Empresa, Optional CveEventoPadre As Integer = -1) As Boolean Dim retorno As Boolean = False + + Dim xmlMiembros As System.Xml.Linq.XDocument = Nothing + 'xmlMiembros = New System.Xml.Linq.XDocument(New System.Xml.Linq.XElement("CCPara", Lmiembros.Select(x >= New System.Xml.Linq.XElement("CveUsuario", x))) + If Lmiembros IsNot Nothing AndAlso Lmiembros.Count > 0 Then + If Not cveUsuarioPara.Contiene(Lmiembros.ToArray()) Then + Lmiembros.Add(cveUsuarioPara) + End If + If Not cveUsuarioDe.Contiene(Lmiembros.ToArray()) Then + Lmiembros.Add(cveUsuarioDe) + End If + xmlMiembros = New System.Xml.Linq.XDocument(New System.Xml.Linq.XElement("CCPara", Lmiembros.[Select](Function(x) New System.Xml.Linq.XElement("CveUsuario", x)))) + End If + Dim xmlChkList As System.Xml.Linq.XDocument = Nothing + If chkList IsNot Nothing AndAlso chkList.Count > 0 Then + xmlChkList = New System.Xml.Linq.XDocument(New System.Xml.Linq.XElement("CheckList", chkList.[Select](Function(x) New System.Xml.Linq.XElement("Actividad", x)))) + End If + + DataAdapter("PA_OI_Eventos2Add", CommandType.StoredProcedure) With SqlAdapter.SelectCommand.Parameters .Add("@CveEvento", SqlDbType.Int).Direction = ParameterDirection.Output @@ -220,39 +605,163 @@ Public Class ClsOIEventos .Add("@cveRevision", SqlDbType.Int).Value = cveRevision .Add("@archivo", SqlDbType.VarChar).Value = archivo .Add("@cveUsuarioIng", SqlDbType.Int).Value = cveUsuarioIng + .Add("@xmlMiembros", SqlDbType.Xml).Value = If(xmlMiembros Is Nothing, DBNull.Value, DirectCast(xmlMiembros.ToString(), Object)) + .Add("@xmlChkList", SqlDbType.Xml).Value = If(xmlChkList Is Nothing, DBNull.Value, DirectCast(xmlChkList.ToString(), Object)) .Add("@cveEmpresa", SqlDbType.Int).Value = cveEmpresa + .Add("@CveEventoPadre", SqlDbType.Int).Value = CveEventoPadre + '.Add("@mailPara", SqlDbType.VarChar).Direction = ParameterDirection.Output + '.Add("@mailBody", SqlDbType.Xml).Direction = ParameterDirection.Output End With + + Dim separador As String = "" + Dim lPara As New List(Of String) + Dim mailbody As String = "" + Dim mailPara As String = "" + Dim ds As New DataSet() + Dim drow As DataRow = Nothing Try - SqlAdapter.Fill(Data) + + SqlAdapter.Fill(ds) + If ds.Tables.Count > 0 Then + Data = ds.Tables(0) + End If + If ds.Tables.Count > 1 AndAlso ds.Tables(1).Rows.Count > 0 Then + drow = ds.Tables(1).Rows(0) + End If + CveEvento = SqlAdapter.SelectCommand.Parameters("@CveEvento").Value.ToString().ToEntero() Folio = SqlAdapter.SelectCommand.Parameters("@Folio").Value.ToString().ToEntero() + 'mailbody = SqlAdapter.SelectCommand.Parameters("@mailBody").Value.ToString() + 'mailPara = SqlAdapter.SelectCommand.Parameters("@mailPara").Value.ToString() + + If DtResultados.Rows.Count > 0 Then + For Each item As DataRow In DtResultados.Rows + lPara.Add(item("CveUsuario").ToString()) + mailPara = String.Format("{0}{1}{2}", mailPara, separador, item("Correo").ToString()) + separador = "," + Next + End If retorno = True Catch ex As Exception - OnError("Ocurrió un error al obtener el Catálogo de Eventos.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + OnError("Ocurrió un error al agregar el Evento.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + End Try + Try + If retorno AndAlso lPara.Count > 0 AndAlso drow IsNot Nothing Then + Notificaciones.AlertaVentana(String.Format("Folio :{1}", GetDominio(), Folio, CveEvento), lPara, "NUEVA TAREA ASIGNADA") + mailbody = MailgetBodyNuevatarea(Folio, String.Format("{0}OI/TareaDetalle.aspx?CveEvento={1}", GetDominio(), CveEvento), asunto, descripcion, String.Format("{0:dd/MM/yyyy HH:mm}", fechaInicio.ToDateTime()), String.Format("{0:dd/MM/yyyy HH:mm}", fechaFin.ToDateTime()), drow("Prioridad").ToString(), drow("Tema").ToString()) + Dim mailAsunto As String = "Nueva Tarea asignada" ',cveUsuarioPara + Dim mailArrayCC As String = "" + EnviarCorreo(oempresa, mailAsunto, mailbody, mailPara, mailArrayCC) + End If + Catch ex As Exception + End Try Return retorno End Function - Public Function UpdateEstatusEvento2(CveEventoEstatus As Integer, CveComentario As Integer, CveEvento As Integer, CveUsuario As Integer) As Boolean + Public Function UP_Eventos2(CveEvento As Integer, asunto As String, descripcion As String, prioridad As Int32, fechaInicio As String, fechaFin As String, + cveRevision As Int32, cveUsuarioIng As Int32, cveEmpresa As Int32, oempresa As Empresa) As Boolean + Dim retorno As Boolean = False + DataAdapter("PA_OI_Eventos2Up", CommandType.StoredProcedure) + With SqlAdapter.SelectCommand.Parameters + .Add("@CveEvento", SqlDbType.Int).Value = CveEvento + .Add("@asunto", SqlDbType.VarChar).Value = asunto + .Add("@descripcion", SqlDbType.VarChar).Value = descripcion + .Add("@prioridad", SqlDbType.Int).Value = prioridad + .Add("@fechaInicio", SqlDbType.VarChar).Value = fechaInicio + .Add("@fechaFin", SqlDbType.VarChar).Value = fechaFin + .Add("@cveRevision", SqlDbType.Int).Value = cveRevision + .Add("@cveUsuarioIng", SqlDbType.Int).Value = cveUsuarioIng + .Add("@cveEmpresa", SqlDbType.Int).Value = cveEmpresa + End With + + Dim separador As String = "" + Dim lPara As New List(Of String) + Dim mailbody As String = "" + Dim mailPara As String = "" + Dim ds As New DataSet() + Dim drow As DataRow = Nothing + Dim CveUsuarioPara As Integer = 0 + Try + SqlAdapter.Fill(ds) + + If ds.Tables.Count > 0 Then + Data = ds.Tables(0) + End If + If ds.Tables.Count > 1 AndAlso ds.Tables(1).Rows.Count > 0 Then + drow = ds.Tables(1).Rows(0) + End If + If DtResultados.Rows.Count > 0 Then + For Each item As DataRow In DtResultados.Rows + lPara.Add(item("CveUsuario").ToString()) + mailPara = String.Format("{0}{1}{2}", mailPara, separador, item("Correo").ToString()) + separador = "," + Next + End If + retorno = True + Catch ex As Exception + OnError("Ocurrió un error al actualizar el Catálogo de Eventos.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + End Try + + If retorno AndAlso lPara.Count > 0 AndAlso drow IsNot Nothing Then + Notificaciones.AlertaVentana(String.Format("Folio :{1}", GetDominio(), Folio, CveEvento), lPara, "TAREA ACTUALIZADA") + mailbody = MailgetBodyActualizartarea(Folio, String.Format("{0}OI/TareaDetalle.aspx?CveEvento={1}", GetDominio(), CveEvento), asunto, descripcion, String.Format("{0:dd/MM/yyyy HH:mm}", fechaInicio.ToDateTime()), String.Format("{0:dd/MM/yyyy HH:mm}", fechaFin.ToDateTime()), drow("Prioridad").ToString(), drow("Tema").ToString()) + Dim mailAsunto As String = "Tarea Actualizada" ',cveUsuarioPara + Dim mailArrayCC As String = "" + EnviarCorreo(oempresa, mailAsunto, mailbody, mailPara, mailArrayCC) + End If + Return retorno + End Function + + + Public Function UpdateEstatusEvento2(CveEventoEstatus As Integer, CveComentario As Integer, CveEvento As Integer, CveUsuario As Integer, cveEmpresa As Int32, oempresa As Empresa) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_OI_EventosEstatusUpdate2") + Dim separador As String = "" + Dim lPara As New List(Of String) + Dim mailbody As String = "" + Dim mailPara As String = "" + Dim ds As New DataSet() + Dim drow As DataRow = Nothing With SqlAdapter.SelectCommand.Parameters .Add("@pCveEventoEstatus", SqlDbType.Int).Value = CveEventoEstatus .Add("@pCveComentario", SqlDbType.Int).Value = CveComentario .Add("@pCveEvento", SqlDbType.Int).Value = CveEvento .Add("@pCveUsuario", SqlDbType.Int).Value = CveUsuario + .Add("@CveEmpresa", SqlDbType.Int).Value = cveEmpresa End With Try - SqlAdapter.Fill(Data) + SqlAdapter.Fill(ds) + + If ds.Tables.Count > 0 Then + Data = ds.Tables(0) + End If + If ds.Tables.Count > 1 AndAlso ds.Tables(1).Rows.Count > 0 Then + drow = ds.Tables(1).Rows(0) + End If + If DtResultados.Rows.Count > 0 Then + For Each item As DataRow In DtResultados.Rows + lPara.Add(item("CveUsuario").ToString()) + mailPara = String.Format("{0}{1}{2}", mailPara, separador, item("Correo").ToString()) + separador = "," + Next + End If Retorno = True Catch ex As Exception OnError("Ocurrió un error al actualizar el estatus en el Evento.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) End Try + If Retorno AndAlso lPara.Count > 0 AndAlso drow IsNot Nothing Then + Notificaciones.AlertaVentana(String.Format("Folio :{1}", GetDominio(), drow("Folio").ToString().ToEntero(), CveEvento), lPara, String.Format("CAMBIÓ ESTADO EN TAREA A '{0}'", drow("Estatus"))) + mailbody = MailgetBodyActualizarEstado(drow("Estatus").ToString(), drow("Folio").ToString().ToEntero(), String.Format("{0}OI/TareaDetalle.aspx?CveEvento={1}", GetDominio(), CveEvento), drow("Asunto").ToString(), drow("Descripcion").ToString(), String.Format("{0:dd/MM/yyyy HH:mm}", drow("FechaInicio")), String.Format("{0:dd/MM/yyyy HH:mm}", drow("FechaFin")), drow("Prioridad").ToString(), drow("Tema").ToString()) + Dim mailAsunto As String = "Tarea Cambio de estatus" ',cveUsuarioPara + Dim mailArrayCC As String = "" + EnviarCorreo(oempresa, mailAsunto, mailbody, mailPara, mailArrayCC) + End If Return Retorno End Function @@ -289,7 +798,7 @@ Public Class ClsOIEventos End Try Return retorno End Function - Public Function Upcheklist(cveEventoCheckList As Int32, cveEvento As Int32, eventoComentario As String, estatus As Boolean, cveUsuario As Int32) As Boolean + Public Function Upcheklist(cveEventoCheckList As Int32, cveEvento As Int32, eventoComentario As String, estatus As Boolean, cveUsuario As Int32, CveEmpresa As Int32, oempresa As Empresa) As Boolean Dim retorno As Boolean = False DataAdapter("PA_OI_cheklistUp", CommandType.StoredProcedure) With SqlAdapter.SelectCommand.Parameters @@ -298,13 +807,46 @@ Public Class ClsOIEventos .Add("@eventoComentario", SqlDbType.VarChar).Value = eventoComentario .Add("@estatus", SqlDbType.Bit).Value = estatus .Add("@cveUsuario", SqlDbType.Int).Value = cveUsuario + .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa End With + + Dim separador As String = "" + Dim lPara As New List(Of String) + Dim mailbody As String = "" + Dim mailPara As String = "" + Dim ds As New DataSet() + Dim drow As DataRow = Nothing Try - SqlAdapter.Fill(Data) + + SqlAdapter.Fill(ds) + + If ds.Tables.Count > 0 Then + Data = ds.Tables(0) + End If + If ds.Tables.Count > 1 AndAlso ds.Tables(1).Rows.Count > 0 Then + drow = ds.Tables(1).Rows(0) + End If + If DtResultados.Rows.Count > 0 Then + For Each item As DataRow In DtResultados.Rows + lPara.Add(item("CveUsuario").ToString()) + mailPara = String.Format("{0}{1}{2}", mailPara, separador, item("Correo").ToString()) + separador = "," + Next + End If retorno = True Catch ex As Exception OnError("Ocurrió un error al actualizar el checklist.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) End Try + + + + If retorno AndAlso lPara.Count > 0 AndAlso drow IsNot Nothing Then + Notificaciones.AlertaVentana(String.Format("Folio :{1}", GetDominio(), drow("Folio").ToString().ToEntero(), cveEvento), lPara, "TAREA ACTUALIZADA(Nuevo Archivo)") + mailbody = MailgetBodyTareaCheckList(String.Format("Actividad {0}", If(estatus, "Terminada", "Pendiente")), drow("Folio").ToString().ToEntero(), String.Format("{0}OI/TareaDetalle.aspx?CveEvento={1}", GetDominio(), cveEvento), drow("Asunto").ToString(), drow("Descripcion").ToString(), String.Format("{0:dd/MM/yyyy HH:mm}", drow("FechaInicio")), String.Format("{0:dd/MM/yyyy HH:mm}", drow("FechaFin")), drow("Prioridad").ToString(), drow("Tema").ToString()) + Dim mailAsunto As String = String.Format("Actividad {0}", If(estatus, "Terminada", "Pendiente")) + Dim mailArrayCC As String = "" + EnviarCorreo(oempresa, mailAsunto, mailbody, mailPara, mailArrayCC) + End If Return retorno End Function Public Function Removecheklist(cveEventoCheckList As Int32, cveEvento As Int32, cveUsuario As Int32) As Boolean @@ -325,46 +867,164 @@ Public Class ClsOIEventos End Function #End Region - Public Function AddUPEventoArchivo(CveEvento As Integer, Archivo As String, CveUsuario As Integer) As Boolean + Public Function AddUPEventoArchivo(CveEvento As Integer, Archivo As String, CveUsuario As Integer, cveEmpresa As Int32, oempresa As Empresa) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_OI_EventosArchivoAddUP") With SqlAdapter.SelectCommand.Parameters .Add("@CveEvento", SqlDbType.Int).Value = CveEvento .Add("@Archivo", SqlDbType.VarChar).Value = Archivo .Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario + .Add("@CveEmpresa", SqlDbType.Int).Value = cveEmpresa End With + + Dim separador As String = "" + Dim lPara As New List(Of String) + Dim mailbody As String = "" + Dim mailPara As String = "" + Dim ds As New DataSet() + Dim drow As DataRow = Nothing Try - SqlAdapter.Fill(Data) + + SqlAdapter.Fill(ds) + + If ds.Tables.Count > 0 Then + Data = ds.Tables(0) + End If + If ds.Tables.Count > 1 AndAlso ds.Tables(1).Rows.Count > 0 Then + drow = ds.Tables(1).Rows(0) + End If + If DtResultados.Rows.Count > 0 Then + For Each item As DataRow In DtResultados.Rows + lPara.Add(item("CveUsuario").ToString()) + mailPara = String.Format("{0}{1}{2}", mailPara, separador, item("Correo").ToString()) + separador = "," + Next + End If Retorno = True Catch Ex1 As SqlException Retorno = False - Me.OnError("Ocurrió un error al Guardar el comentario del evento.", Ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + Me.OnError("Ocurrió un error al Guardar el archivo del evento.", Ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) Catch ex As Exception Retorno = False - OnError("Ocurrió un error al Guardar el Evento Comentario", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) + OnError("Ocurrió un error al Guardar el archivo Comentario", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) End Try + If Retorno AndAlso lPara.Count > 0 AndAlso drow IsNot Nothing Then + Notificaciones.AlertaVentana(String.Format("Folio :{1}", GetDominio(), drow("Folio").ToString().ToEntero(), CveEvento), lPara, "TAREA ACTUALIZADA(Nuevo Archivo)") + mailbody = MailgetBodyActualizararchivo(drow("Folio").ToString().ToEntero(), String.Format("{0}OI/TareaDetalle.aspx?CveEvento={1}", GetDominio(), CveEvento), drow("Asunto").ToString(), drow("Descripcion").ToString(), String.Format("{0:dd/MM/yyyy HH:mm}", drow("FechaInicio")), String.Format("{0:dd/MM/yyyy HH:mm}", drow("FechaFin")), drow("Prioridad").ToString(), drow("Tema").ToString()) + Dim mailAsunto As String = "Tarea Archivo actualizado" ',cveUsuarioPara + Dim mailArrayCC As String = "" + EnviarCorreo(oempresa, mailAsunto, mailbody, mailPara, mailArrayCC) + End If Return Retorno End Function - Public Function UPEventoAAvance(CveEvento As Integer, Avance As Decimal, CveUsuario As Integer) As Boolean + Public Function UPEventoAAvance(CveEvento As Integer, Avance As Decimal, CveUsuario As Integer, cveEmpresa As Int32, oempresa As Empresa) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_OI_EventosAvanceUP") With SqlAdapter.SelectCommand.Parameters .Add("@CveEvento", SqlDbType.Int).Value = CveEvento .Add("@Avance", SqlDbType.Decimal).Value = Avance .Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario + .Add("@CveEmpresa", SqlDbType.Int).Value = cveEmpresa End With + + Dim separador As String = "" + Dim lPara As New List(Of String) + Dim mailbody As String = "" + Dim mailPara As String = "" + Dim ds As New DataSet() + Dim drow As DataRow = Nothing Try - SqlAdapter.Fill(Data) + SqlAdapter.Fill(ds) + + If ds.Tables.Count > 1 Then + Data = ds.Tables(1) + End If + If ds.Tables.Count > 2 AndAlso ds.Tables(2).Rows.Count > 0 Then + drow = ds.Tables(2).Rows(0) + End If + If DtResultados.Rows.Count > 0 Then + For Each item As DataRow In DtResultados.Rows + lPara.Add(item("CveUsuario").ToString()) + mailPara = String.Format("{0}{1}{2}", mailPara, separador, item("Correo").ToString()) + separador = "," + Next + End If + If ds.Tables.Count > 0 Then + Data = ds.Tables(0) + End If Retorno = True Catch Ex1 As SqlException Retorno = False - Me.OnError("Ocurrió un error al Guardar el comentario del evento.", Ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + Me.OnError("Ocurrió un error al Guardar el Avance del evento.", Ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) Catch ex As Exception Retorno = False + OnError("Ocurrió un error al Guardar el Avance Comentario", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) + End Try + + If Retorno AndAlso lPara.Count > 0 AndAlso drow IsNot Nothing Then + Notificaciones.AlertaVentana(String.Format("Folio :{1}", GetDominio(), drow("Folio").ToString().ToEntero(), CveEvento), lPara, "TAREA ACTUALIZADA(Nuevo Archivo)") + mailbody = MailgetBodyActualizarAvance(drow("Folio").ToString().ToEntero(), String.Format("{0}OI/TareaDetalle.aspx?CveEvento={1}", GetDominio(), CveEvento), drow("Asunto").ToString(), drow("Descripcion").ToString(), String.Format("{0:dd/MM/yyyy HH:mm}", drow("FechaInicio")), String.Format("{0:dd/MM/yyyy HH:mm}", drow("FechaFin")), drow("Prioridad").ToString(), drow("Tema").ToString()) + Dim mailAsunto As String = "Tarea cambio Avance" ',cveUsuarioPara + Dim mailArrayCC As String = "" + EnviarCorreo(oempresa, mailAsunto, mailbody, mailPara, mailArrayCC) + End If + Return Retorno + End Function + + + Public Function AddEventoComentario2(CveEvento As Integer, Comentario As String, Archivo As String, CveUsuario As Integer, CveEmpresa As Integer, oempresa As Empresa) As Integer + Dim Retorno As Integer = -1 + DataAdapter("PA_OI_EventosComentarios2Add") + With SqlAdapter.SelectCommand.Parameters + .Add("@CveEvento", SqlDbType.Int).Value = CveEvento + .Add("@EventoComentario", SqlDbType.VarChar).Value = Comentario + .Add("@Archivo", SqlDbType.VarChar).Value = Archivo + .Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario + .Add("@CveEventoComentario", SqlDbType.Int).Direction = ParameterDirection.Output + .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa + End With + + Dim separador As String = "" + Dim lPara As New List(Of String) + Dim mailbody As String = "" + Dim mailPara As String = "" + Dim ds As New DataSet() + Dim drow As DataRow = Nothing + Try + SqlAdapter.Fill(Data) + CveEventoComentario = SqlAdapter.SelectCommand.Parameters("@CveEventoComentario").Value.ToString.ToEntero + Retorno = CveEventoComentario + + SqlAdapter.Fill(ds) + + If ds.Tables.Count > 0 Then + Data = ds.Tables(0) + End If + If ds.Tables.Count > 1 AndAlso ds.Tables(1).Rows.Count > 0 Then + drow = ds.Tables(1).Rows(0) + End If + If DtResultados.Rows.Count > 0 Then + For Each item As DataRow In DtResultados.Rows + lPara.Add(item("CveUsuario").ToString()) + mailPara = String.Format("{0}{1}{2}", mailPara, separador, item("Correo").ToString()) + separador = "," + Next + End If + Catch Ex1 As SqlException + Me.OnError("Ocurrió un error al Guardar el comentario del evento.", Ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + + Catch ex As Exception OnError("Ocurrió un error al Guardar el Evento Comentario", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) End Try + If Retorno > 0 AndAlso lPara.Count > 0 AndAlso drow IsNot Nothing Then + Notificaciones.AlertaVentana(String.Format("Folio :{1}", GetDominio(), drow("Folio").ToString().ToEntero(), CveEvento), lPara, "TAREA ACTUALIZADA(Nuevo Archivo)") + mailbody = MailgetBodyTareaComentario(drow("Folio").ToString().ToEntero(), String.Format("{0}OI/TareaDetalle.aspx?CveEvento={1}", GetDominio(), CveEvento), drow("Asunto").ToString(), drow("Descripcion").ToString(), String.Format("{0:dd/MM/yyyy HH:mm}", drow("FechaInicio")), String.Format("{0:dd/MM/yyyy HH:mm}", drow("FechaFin")), drow("Prioridad").ToString(), drow("Tema").ToString()) + Dim mailAsunto As String = "Nuevo comentario en tarea" ',cveUsuarioPara + Dim mailArrayCC As String = "" + EnviarCorreo(oempresa, mailAsunto, mailbody, mailPara, mailArrayCC) + End If Return Retorno End Function #End Region @@ -850,6 +1510,33 @@ Public Class ClsOIEventos Return Retorno End Function + Public Function UpEventoMiembros(pCveEvento As Integer, CveUsuarioPara As Integer, Lmiembros As List(Of Integer), CveEmpresa As Integer, CveUsuarioEdito As Integer) As Boolean + Dim Retorno As Boolean = False + Dim xmlMiembros As System.Xml.Linq.XDocument = Nothing + 'xmlMiembros = New System.Xml.Linq.XDocument(New System.Xml.Linq.XElement("CCPara", Lmiembros.Select(x >= New System.Xml.Linq.XElement("CveUsuario", x))) + If Lmiembros IsNot Nothing AndAlso Lmiembros.Count > 0 Then + If Not CveUsuarioPara.Contiene(Lmiembros.ToArray()) Then + Lmiembros.Add(CveUsuarioPara) + End If + xmlMiembros = New System.Xml.Linq.XDocument(New System.Xml.Linq.XElement("CCPara", Lmiembros.[Select](Function(x) New System.Xml.Linq.XElement("CveUsuario", x)))) + End If + DataAdapter("PA_OI_EventosMiembrosUp") + With SqlAdapter.SelectCommand.Parameters + .Add("@CveEvento", SqlDbType.Int).Value = pCveEvento + .Add("@CveUsuarioPara", SqlDbType.Int).Value = CveUsuarioPara + .Add("@xmlMiembros", SqlDbType.Xml).Value = If(xmlMiembros Is Nothing, DBNull.Value, DirectCast(xmlMiembros.ToString(), Object)) + .Add("@CveUsuarioEdito", SqlDbType.Int).Value = CveUsuarioEdito + .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa + End With + Try + SqlAdapter.Fill(Data) + Retorno = True + Catch ex As Exception + OnError("Ocurrió un error al acualizar miembros los miembros del evento", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) + End Try + + Return Retorno + End Function Public Function AddEventoUsuario(pCveEvento As Integer, CveUsuario As Integer) As Boolean Dim Retorno As Boolean = False diff --git a/App_Code/ClsPaginas.vb b/App_Code/ClsPaginas.vb index f833f851d..cffe62b37 100644 --- a/App_Code/ClsPaginas.vb +++ b/App_Code/ClsPaginas.vb @@ -4422,11 +4422,13 @@ Public Class ClsPaginas PaginaDict.Add("/OI/Normatividad.aspx".ToUpper(), 669) PaginaDict.Add("/OI/RepNormatividad.aspx".ToUpper(), 669) PaginaDict.Add("/OI/Minutas.aspx".ToUpper(), -1) + PaginaDict.Add("/OI/MinutaDetalle.aspx".ToUpper(), -1) PaginaDict.Add("/OI/RepDocumentos.aspx".ToUpper(), -1) PaginaDict.Add("/OI/EventoComentario.aspx".ToUpper(), -1) PaginaDict.Add("/OI/RepEventos.aspx".ToUpper(), -1) PaginaDict.Add("/OI/RepTareas.aspx".ToUpper(), 293) + PaginaDict.Add("/OI/RepTareas2.aspx".ToUpper(), 293) PaginaDict.Add("/OI/RepMinutas.aspx".ToUpper(), 338) PaginaDict.Add("/OI/PopUpAgenda.aspx".ToUpper(), -1) PaginaDict.Add("/OI/RepSoporteADS.aspx".ToUpper(), 456) diff --git a/App_Code/ClsSisMail.vb b/App_Code/ClsSisMail.vb index c6be325b7..25d14fd9e 100644 --- a/App_Code/ClsSisMail.vb +++ b/App_Code/ClsSisMail.vb @@ -68,8 +68,8 @@ Public Class ClsSisMail Dim Correo As New System.Net.Mail.MailMessage Dim Mensaje As String = String.Empty - Dim ArrayPara() As String = ObjMail.Para.Split(";"c) - Dim ArrayCCP() As String = ObjMail.CCP.Split(";"c) + Dim ArrayPara() As String = ObjMail.Para.Replace(",", ";").Split(";"c) + Dim ArrayCCP() As String = ObjMail.CCP.Replace(",", ";").Split(";"c) '"sgd.facturacion@adsistemas.mx" If ObjMail.De = String.Empty Then diff --git a/App_Code/Notificaciones.vb b/App_Code/Notificaciones.vb index 998dc6149..8efed087d 100644 --- a/App_Code/Notificaciones.vb +++ b/App_Code/Notificaciones.vb @@ -26,9 +26,17 @@ Public Class Notificaciones End Function + + Public Shared Sub AlertaVentana(Message As String, Para As String, Optional Titulo As String = "", Optional timeoutseconds As Integer = 5, Optional Tipo As TipoNotificacion = TipoNotificacion.AlertaVentanaNoOcultar) + Dim lPara As New List(Of String) + lPara.Add(Para) + AlertaVentana(Message, lPara, Titulo, timeoutseconds, Tipo) + End Sub Public Shared Sub AlertaVentana(Message As String, Para As List(Of String), Optional Titulo As String = "", Optional timeoutseconds As Integer = 5, Optional Tipo As TipoNotificacion = TipoNotificacion.AlertaVentanaNoOcultar) - Dim Clients As Hubs.IHubConnectionContext(Of Object) = GlobalHost.ConnectionManager.GetHubContext(Of Notificaciones)().Clients - Clients.Users(Para).AlertaVentana(Titulo, Message, DirectCast(Tipo, Integer), timeoutseconds) + If (Para IsNot Nothing) AndAlso Para.Count > 0 Then + Dim Clients As Hubs.IHubConnectionContext(Of Object) = GlobalHost.ConnectionManager.GetHubContext(Of Notificaciones)().Clients + Clients.Users(Para).AlertaVentana(Titulo, Message, DirectCast(Tipo, Integer), timeoutseconds) + End If End Sub 'Public Shared Sub AlertaVentana(Message As String, Para As List(Of String), Optional Titulo As String = "", Optional timeoutseconds As Integer = 5, Optional Tipo As TipoNotificacion = TipoNotificacion.AlertaVentanaNoOcultar) diff --git a/Bin/APP_Code_CSharp.dll b/Bin/APP_Code_CSharp.dll index 1f82d6c78..1f9036671 100644 Binary files a/Bin/APP_Code_CSharp.dll and b/Bin/APP_Code_CSharp.dll differ diff --git a/Bin/APP_Code_CSharp.pdb b/Bin/APP_Code_CSharp.pdb index 69feb9bde..3698a8127 100644 Binary files a/Bin/APP_Code_CSharp.pdb and b/Bin/APP_Code_CSharp.pdb differ diff --git a/LogIn.aspx b/LogIn.aspx index 050d12f69..323ad04cf 100644 --- a/LogIn.aspx +++ b/LogIn.aspx @@ -125,13 +125,20 @@ - - <%: Scripts.Render("~/Metronic/assets/global/scripts/JS") %> + - + <%----%> + + diff --git a/OI/MinutaDetalle.aspx.cs b/OI/MinutaDetalle.aspx.cs new file mode 100644 index 000000000..4ae6f4f81 --- /dev/null +++ b/OI/MinutaDetalle.aspx.cs @@ -0,0 +1,40 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Web; +using System.Web.UI; +using System.Web.UI.WebControls; +using Extensiones; + +public partial class OI_MinutaDetalle : ClsPaginas +{ + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + + DdlRoles.DataSource = get_GlobalDTRoles(UsuarioActual.CveEmpresa); + DdlRoles.DataBind(); + DdlRoles.Items.Insert(0, new ListItem("Todos", "-1")); + DdlSucursales.DataSource = get_GlobalDTSubProyectos(-1, -1, UsuarioActual.CveEmpresa); + DdlSucursales.DataBind(); + DdlSucursales.Items.Insert(0, new ListItem("Todos", "-1")); + GVUsuarios.DataSource = get_GlobalDTUsuarios(CveEmpresa: UsuarioActual.CveEmpresa).FiltraParametros("Estatus =1 ", "Rol ASC"); + GVUsuarios.DataBind(); + } + + } + + protected void GVUsuarios_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); + } + + } +} \ No newline at end of file diff --git a/OI/RepTareas2.aspx b/OI/RepTareas2.aspx index b49be0b16..212a12e0c 100644 --- a/OI/RepTareas2.aspx +++ b/OI/RepTareas2.aspx @@ -1,384 +1,80 @@ <%@ Page Title="" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true" CodeFile="RepTareas2.aspx.cs" Inherits="OI_RepTareas2" %> - + - - + - + - + - -
  • - Agregar Tarea -
  • + - + - - - - - -
    +
    Avance: +
    @@ -407,8 +427,8 @@ C. C. Para
    - - + +
    @@ -533,22 +553,22 @@ -