diff --git a/App_Code/ClsOIEventos.vb b/App_Code/ClsOIEventos.vb index 73f8c4b6f..adbc2cd08 100644 --- a/App_Code/ClsOIEventos.vb +++ b/App_Code/ClsOIEventos.vb @@ -184,9 +184,9 @@ Public Class ClsOIEventos #Region "oieventos2.0" - Public Function GetOI_Eventos2(cveEvento As Int32, CveEmpresa As Integer) As Boolean + Public Function GetEventos2(cveEvento As Int32, CveEmpresa As Integer) As Boolean Dim retorno As Boolean = False - DataAdapter("PA_GetOI_Eventos2", CommandType.StoredProcedure) + DataAdapter("PA_OI_Eventos2Get", CommandType.StoredProcedure) With SqlAdapter.SelectCommand.Parameters .Add("@CveEvento", SqlDbType.Int).Value = cveEvento .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa @@ -205,7 +205,7 @@ Public Class ClsOIEventos 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 Dim retorno As Boolean = False - DataAdapter("PA_AddOI_Eventos2", CommandType.StoredProcedure) + DataAdapter("PA_OI_Eventos2Add", CommandType.StoredProcedure) With SqlAdapter.SelectCommand.Parameters .Add("@CveEvento", SqlDbType.Int).Direction = ParameterDirection.Output .Add("@Folio", SqlDbType.Int).Direction = ParameterDirection.Output diff --git a/App_Code/ClsPaginas.vb b/App_Code/ClsPaginas.vb index 624b4cb6d..f833f851d 100644 --- a/App_Code/ClsPaginas.vb +++ b/App_Code/ClsPaginas.vb @@ -34,6 +34,18 @@ Public Class ClsPaginas Public Shared Property EmpresaNotificaciones() As Empresa + + + Public ReadOnly Property EsProduccion As Boolean + Get + If IsNothing(System.Configuration.ConfigurationManager.AppSettings("EsProduccion")) Then + Return False + Else + Return (System.Configuration.ConfigurationManager.AppSettings("EsProduccion").ToString() = "1") + End If + End Get + End Property + #Region "Propiedades" Public Shared ReadOnly Property UrlSitio As String @@ -3978,6 +3990,7 @@ Public Class ClsPaginas PaginaDict.Add("/Ventas/RepTopClientesVentas.aspx".ToUpper(), 755) PaginaDict.Add("/OI/Circular.aspx".ToUpper(), 756) PaginaDict.Add("/OI/CircularDetalle.aspx".ToUpper(), 757) + PaginaDict.Add("/OI/CircularDetalleB.aspx".ToUpper(), 757) #End Region @@ -5147,80 +5160,111 @@ Public Class ClsPaginas 'limpio ReportViwer Dim sw As New System.Diagnostics.Stopwatch() sw.Start() - Dim bdir As String = AppDomain.CurrentDomain.BaseDirectory - RutaReporte.Replace("/", "\") - If Not RutaReporte.ToUpper().StartsWith(bdir.ToUpper()) Then - RutaReporte = String.Format("{0}{1}", bdir, RutaReporte) - End If - Dim CveUsuario As Integer = 0 - Dim CveEmpresa As Integer = 0 - If Context.Session("UsuarioSIG") IsNot Nothing Then - CveUsuario = UsuarioActual.CveUsuario - CveEmpresa = UsuarioActual.CveEmpresa - - End If Dim Bytes As Byte() = Nothing - Dim wsreport As New WSRDLC.WebServiceSoapClient - Dim params As New List(Of WSRDLC.ReportParameter) - Dim ds As New DataSet - For Each rpds As ReportDataSource In DataSource - Dim dt As DataTable = DirectCast(rpds.Value, Data.DataTable) - If dt Is Nothing Then - dt = New DataTable() - Else - dt = dt.Copy() + If EsProduccion Then + + Dim bdir As String = AppDomain.CurrentDomain.BaseDirectory + RutaReporte.Replace("/", "\") + If Not RutaReporte.ToUpper().StartsWith(bdir.ToUpper()) Then + RutaReporte = String.Format("{0}{1}", bdir, RutaReporte) End If - dt.TableName = rpds.Name - ds.Tables.Add(dt) - Next - For Each rpds As ReportParameter In Parametros - Dim param As New WSRDLC.ReportParameter - param.Name = rpds.Name - param.Values = {rpds.Values(0)} - params.Add(param) - Next - Bytes = wsreport.StreamPDFBytes(RutaReporte, ds, params.ToArray(), NombreArchivo, Formato, CveEmpresa, CveUsuario) - 'Dim ruta = wsreport.StreamPDF(RutaReporte, ds, params.ToArray(), NombreArchivo, Formato, CveEmpresa, CveUsuario) - 'If File.Exists(ruta) Then - ' Bytes = File.ReadAllBytes(ruta) - ' File.Delete(ruta) - 'End If - 'Dim setup As AppDomainSetup = New AppDomainSetup - 'With setup - ' .ApplicationBase = Environment.CurrentDirectory - ' .LoaderOptimization = LoaderOptimization.MultiDomainHost - 'End With - 'setup.SetCompatibilitySwitches({"NetFx40_LegacySecurityPolicy"}) - 'Dim _casPolicyEnabledDomain As AppDomain = AppDomain.CreateDomain("Full Trust", Nothing, setup) - 'Dim fllreport As ADSReportLib.FullTrustReportviewer = Nothing - 'Try + Dim CveUsuario As Integer = 0 + Dim CveEmpresa As Integer = 0 + If Context.Session("UsuarioSIG") IsNot Nothing Then + CveUsuario = UsuarioActual.CveUsuario + CveEmpresa = UsuarioActual.CveEmpresa + End If + Dim wsreport As New WSRDLC.WebServiceSoapClient + Dim params As New List(Of WSRDLC.ReportParameter) + Dim ds As New DataSet + For Each rpds As ReportDataSource In DataSource + Dim dt As DataTable = DirectCast(rpds.Value, Data.DataTable) + If dt Is Nothing Then + dt = New DataTable() + Else + dt = dt.Copy() + End If + dt.TableName = rpds.Name + ds.Tables.Add(dt) + Next + For Each rpds As ReportParameter In Parametros + Dim param As New WSRDLC.ReportParameter + param.Name = rpds.Name + param.Values = {rpds.Values(0)} + params.Add(param) + Next + Bytes = wsreport.StreamPDFBytes(RutaReporte, ds, params.ToArray(), NombreArchivo, Formato, CveEmpresa, CveUsuario) + Else + If IsNothing(MR) Then MR = New ReportViewer + Try + ' MasterReporteador.LocalReport.DataSources.Clear() + For Each RDS As ReportDataSource In DataSource + MR.LocalReport.DataSources.Add(RDS) + Next - ' fllreport = CType(_casPolicyEnabledDomain.CreateInstanceFromAndUnwrap(GetType(ADSReportLib.FullTrustReportviewer).Assembly.CodeBase, GetType(ADSReportLib.FullTrustReportviewer).FullName), ADSReportLib.FullTrustReportviewer) + MR.LocalReport.ReportPath = RutaReporte + MR.ProcessingMode = ProcessingMode.Local + MR.LocalReport.EnableExternalImages = True + MR.LocalReport.SetParameters(Parametros) + MR.LocalReport.Refresh() + Dim Warnings As Warning() = Nothing + Dim StreamIds As String() = Nothing + Dim MimeType As String = Nothing + Dim Encoding As String = Nothing + Dim Extension As String = Nothing + Bytes = MR.LocalReport.Render(Formato, Nothing, MimeType, Encoding, Extension, StreamIds, Warnings) + Catch ex As Microsoft.Reporting.WebForms.ScriptManagerNotFoundException + GuardaLog($"Error: { If(ex.InnerException.Message IsNot Nothing, ex.InnerException.Message, ex.Message) } | Descripcion: {If(ex.InnerException IsNot Nothing AndAlso ex.InnerException.InnerException IsNot Nothing AndAlso ex.InnerException.InnerException.Message IsNot Nothing, ex.InnerException.InnerException.Message, If(ex.InnerException IsNot Nothing AndAlso ex.InnerException.Message IsNot Nothing, ex.InnerException.Message, "Sin descripcion"))} - Ruta {RutaReporte}") + 'HAY QUE VALIDAR QUE LOS OBJETOS QUE SE USAN PARA GUARDAR LOG EXISTEN!!! IPP 14 AGOSTO 2017 + 'GuardaLog($"Error: {ex.InnerException.Message} | Descripcion: {If(ex.InnerException.InnerException IsNot Nothing, ex.InnerException.InnerException.Message, "Sin descripcion")} - Ruta {RutaReporte}") + Catch ex As Exception + GuardaLog($"Error: { If(ex.InnerException.Message IsNot Nothing, ex.InnerException.Message, ex.Message) } | Descripcion: {If(ex.InnerException IsNot Nothing AndAlso ex.InnerException.InnerException IsNot Nothing AndAlso ex.InnerException.InnerException.Message IsNot Nothing, ex.InnerException.InnerException.Message, If(ex.InnerException IsNot Nothing AndAlso ex.InnerException.Message IsNot Nothing, ex.InnerException.Message, "Sin descripcion"))} - Ruta {RutaReporte}") + 'HAY QUE VALIDAR QUE LOS OBJETOS QUE SE USAN PARA GUARDAR LOG EXISTEN!!! IPP 14 AGOSTO 2017 + 'GuardaLog($"Error {ex.InnerException.Message} | Descripcion: {If(ex.InnerException.InnerException IsNot Nothing, ex.InnerException.InnerException.Message, "Sin descripcion")} - Ruta {RutaReporte}") + End Try + MR.Dispose() + 'Dim ruta = wsreport.StreamPDF(RutaReporte, ds, params.ToArray(), NombreArchivo, Formato, CveEmpresa, CveUsuario) + 'If File.Exists(ruta) Then + ' Bytes = File.ReadAllBytes(ruta) + ' File.Delete(ruta) + 'End If + 'Dim setup As AppDomainSetup = New AppDomainSetup + 'With setup + ' .ApplicationBase = Environment.CurrentDirectory + ' .LoaderOptimization = LoaderOptimization.MultiDomainHost + 'End With + 'setup.SetCompatibilitySwitches({"NetFx40_LegacySecurityPolicy"}) + 'Dim _casPolicyEnabledDomain As AppDomain = AppDomain.CreateDomain("Full Trust", Nothing, setup) + 'Dim fllreport As ADSReportLib.FullTrustReportviewer = Nothing + 'Try - ' fllreport.Initialize("DisplayName", RutaReporte, Parametros.AsEnumerable(), New List(Of String()), True) - ' For Each RDS As ReportDataSource In DataSource - ' fllreport.AddDataSources(RDS.Name, DirectCast(RDS.Value, DataTable)) - ' Next - ' Dim Warnings As Warning() = Nothing - ' Dim StreamIds As String() = Nothing - ' Dim MimeType As String = Nothing - ' Dim Encoding As String = Nothing - ' Dim Extension As String = Nothing - ' Bytes = fllreport.Render(Formato, Nothing, MimeType, Encoding, Extension, StreamIds) - ' fllreport = Nothing - 'Catch ex As Microsoft.Reporting.WebForms.ScriptManagerNotFoundException - ' GuardaLog($"Error: { If(ex.InnerException.Message IsNot Nothing, ex.InnerException.Message, ex.Message) } | Descripcion: {If(ex.InnerException IsNot Nothing AndAlso ex.InnerException.InnerException IsNot Nothing AndAlso ex.InnerException.InnerException.Message IsNot Nothing, ex.InnerException.InnerException.Message, If(ex.InnerException IsNot Nothing AndAlso ex.InnerException.Message IsNot Nothing, ex.InnerException.Message, "Sin descripcion"))} - Ruta {RutaReporte}") - ' 'HAY QUE VALIDAR QUE LOS OBJETOS QUE SE USAN PARA GUARDAR LOG EXISTEN!!! IPP 14 AGOSTO 2017 - ' 'GuardaLog($"Error: {ex.InnerException.Message} | Descripcion: {If(ex.InnerException.InnerException IsNot Nothing, ex.InnerException.InnerException.Message, "Sin descripcion")} - Ruta {RutaReporte}") - 'Catch ex As Exception - ' GuardaLog($"Error: { If(ex.InnerException.Message IsNot Nothing, ex.InnerException.Message, ex.Message) } | Descripcion: {If(ex.InnerException IsNot Nothing AndAlso ex.InnerException.InnerException IsNot Nothing AndAlso ex.InnerException.InnerException.Message IsNot Nothing, ex.InnerException.InnerException.Message, If(ex.InnerException IsNot Nothing AndAlso ex.InnerException.Message IsNot Nothing, ex.InnerException.Message, "Sin descripcion"))} - Ruta {RutaReporte}") - ' 'HAY QUE VALIDAR QUE LOS OBJETOS QUE SE USAN PARA GUARDAR LOG EXISTEN!!! IPP 14 AGOSTO 2017 - ' 'GuardaLog($"Error {ex.InnerException.Message} | Descripcion: {If(ex.InnerException.InnerException IsNot Nothing, ex.InnerException.InnerException.Message, "Sin descripcion")} - Ruta {RutaReporte}") - 'Finally - ' AppDomain.Unload(_casPolicyEnabledDomain) - 'End Try - 'If fllreport IsNot Nothing Then fllreport.liberarecursos() + ' fllreport = CType(_casPolicyEnabledDomain.CreateInstanceFromAndUnwrap(GetType(ADSReportLib.FullTrustReportviewer).Assembly.CodeBase, GetType(ADSReportLib.FullTrustReportviewer).FullName), ADSReportLib.FullTrustReportviewer) + ' fllreport.Initialize("DisplayName", RutaReporte, Parametros.AsEnumerable(), New List(Of String()), True) + ' For Each RDS As ReportDataSource In DataSource + ' fllreport.AddDataSources(RDS.Name, DirectCast(RDS.Value, DataTable)) + ' Next + ' Dim Warnings As Warning() = Nothing + ' Dim StreamIds As String() = Nothing + ' Dim MimeType As String = Nothing + ' Dim Encoding As String = Nothing + ' Dim Extension As String = Nothing + ' Bytes = fllreport.Render(Formato, Nothing, MimeType, Encoding, Extension, StreamIds) + ' fllreport = Nothing + 'Catch ex As Microsoft.Reporting.WebForms.ScriptManagerNotFoundException + ' GuardaLog($"Error: { If(ex.InnerException.Message IsNot Nothing, ex.InnerException.Message, ex.Message) } | Descripcion: {If(ex.InnerException IsNot Nothing AndAlso ex.InnerException.InnerException IsNot Nothing AndAlso ex.InnerException.InnerException.Message IsNot Nothing, ex.InnerException.InnerException.Message, If(ex.InnerException IsNot Nothing AndAlso ex.InnerException.Message IsNot Nothing, ex.InnerException.Message, "Sin descripcion"))} - Ruta {RutaReporte}") + ' 'HAY QUE VALIDAR QUE LOS OBJETOS QUE SE USAN PARA GUARDAR LOG EXISTEN!!! IPP 14 AGOSTO 2017 + ' 'GuardaLog($"Error: {ex.InnerException.Message} | Descripcion: {If(ex.InnerException.InnerException IsNot Nothing, ex.InnerException.InnerException.Message, "Sin descripcion")} - Ruta {RutaReporte}") + 'Catch ex As Exception + ' GuardaLog($"Error: { If(ex.InnerException.Message IsNot Nothing, ex.InnerException.Message, ex.Message) } | Descripcion: {If(ex.InnerException IsNot Nothing AndAlso ex.InnerException.InnerException IsNot Nothing AndAlso ex.InnerException.InnerException.Message IsNot Nothing, ex.InnerException.InnerException.Message, If(ex.InnerException IsNot Nothing AndAlso ex.InnerException.Message IsNot Nothing, ex.InnerException.Message, "Sin descripcion"))} - Ruta {RutaReporte}") + ' 'HAY QUE VALIDAR QUE LOS OBJETOS QUE SE USAN PARA GUARDAR LOG EXISTEN!!! IPP 14 AGOSTO 2017 + ' 'GuardaLog($"Error {ex.InnerException.Message} | Descripcion: {If(ex.InnerException.InnerException IsNot Nothing, ex.InnerException.InnerException.Message, "Sin descripcion")} - Ruta {RutaReporte}") + 'Finally + ' AppDomain.Unload(_casPolicyEnabledDomain) + 'End Try + 'If fllreport IsNot Nothing Then fllreport.liberarecursos() + + End If sw.Stop() If sw.Elapsed.TotalSeconds > 1 Then GuardaLog($"Reporte:{RutaReporte} | Tiempo Renderizado Milisegundos: {sw.ElapsedMilliseconds},Total Segundos: {sw.Elapsed.TotalSeconds} ") diff --git a/OI/CircularDetalle.aspx.vb b/OI/CircularDetalle.aspx.vb index d5e97c8ab..f443ccf6b 100644 --- a/OI/CircularDetalle.aspx.vb +++ b/OI/CircularDetalle.aspx.vb @@ -34,7 +34,7 @@ Partial Class OI_CircularDetalle End Sub Private Sub CargarCve() - Dim PreCveCircular As String = Request.Params("CveCircular").ToString + Dim PreCveCircular As String = Request.Params("CveCircular").ToString() If IsNumeric(PreCveCircular) Then CveCircular = PreCveCircular.ToEntero End If diff --git a/OI/CircularDetalleB.aspx b/OI/CircularDetalleB.aspx new file mode 100644 index 000000000..72ad20ed5 --- /dev/null +++ b/OI/CircularDetalleB.aspx @@ -0,0 +1,246 @@ +<%@ Page Title="" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true" CodeFile="CircularDetalleB.aspx.cs" Inherits="OI_CircularDetalleB" %> + + + + + + + + Circular + + + + + + + + + + + + + +
+
+

Para

+
+
+ + Jorge caudillo(jcaudillo@adsistemas.mx); + Julian Moreno(Julianmoreno@adsistemas.mx); + +
+
+ +
+
+

Correos Adicionales:

+
+
+ +
+
+
+
+

Asunto

+
+
+ +
+
+ + +
+
+

Adjuntar Archivos:

+ +
+
+ +
+
+ + + +
+
+ +
+ + + + diff --git a/OI/CircularDetalleB.aspx.cs b/OI/CircularDetalleB.aspx.cs new file mode 100644 index 000000000..3a554f4db --- /dev/null +++ b/OI/CircularDetalleB.aspx.cs @@ -0,0 +1,61 @@ +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_CircularDetalleB : ClsPaginas +{ + public const string iddivAgregarPara = "iddivAgregarPara"; + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + cargarFiltroUsuarios(); + } + } + private void cargarFiltroUsuarios() + { + 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); + GVUsuarios.DataBind(); + UpUsuarios.Update(); + } + + 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); + } + + } + + protected void LnkAgregar_Click(object sender, EventArgs e) + { + this.RegistraScript(string.Format("$('#{0}').modal()", iddivAgregarPara)); + } + + protected void BtnUpPara_Click(object sender, EventArgs e) + { + + } + + protected void BtnUpMiembros_Click(object sender, EventArgs e) + { + + } +} \ No newline at end of file diff --git a/OI/TareaDetalle.aspx b/OI/TareaDetalle.aspx index ff7fe8719..71e087e71 100644 --- a/OI/TareaDetalle.aspx +++ b/OI/TareaDetalle.aspx @@ -4,6 +4,10 @@ @@ -116,6 +130,8 @@ Agregar Tema
  • Agregar Archivo
  • +
  • + Actualizar Usuarios
  • @@ -127,7 +143,6 @@
    -
    @@ -150,6 +165,15 @@
    + +
    +
    +

    De

    +
    +
    + +
    +

    Para

    @@ -159,7 +183,6 @@
    -

    C. C. Para

    @@ -203,7 +226,7 @@
    -
    +
    @@ -211,9 +234,73 @@ Tema:
    +
    + +
    + + + + +
    +
    + + CheckList +
    +
    + +
    +
    +
    +
    +
    +
    + + +
    +
    +
    + + Agregar + <%--Agregar--%> +
    +
    + + + + + + + + + + + <%--
    --%>
    +                                                    
    +                                                         
    +                                                    
    +                                                    <%--
    --%> +
    +
    + + + + + + + + + + +
    +
    +
    +
    +
    +
    @@ -242,12 +329,20 @@
    + +
    + + +
    +
    + + +
    -
    @@ -272,113 +367,31 @@
    - - -
    - - - -
    -
    - - CheckList -
    -
    - -
    -
    -
    -
    -
    -
    - - -
    -
    -
    - - Agregar - <%--Agregar--%> -
    -
    - - - - - - - - - - - <%--
    --%>
    -                                                
    -                                                     
    -                                                
    -                                                <%--
    --%> -
    -
    - - - - - - - - - - -
    -
    -
    -
    -
    -
    -
    Miembros
    +
    -
    -
    - <%--
    -
    -
    - - - Usuario: +
    +
    + +
    + + +
    +
    -
    - -
    -
    - - - - - - - - - - - - - - - -
    Para
    jorge caudillo
    Con copia para
    Julian Moreno
    --%> - - +
    + @@ -391,9 +404,14 @@ - C. C. Para + + C. C. Para +
    + + +
    - +
    @@ -414,6 +432,7 @@
    +
    Guardar
    @@ -514,6 +533,84 @@ + @@ -556,8 +653,8 @@
    @@ -581,8 +678,8 @@
    @@ -604,8 +701,8 @@ @@ -620,6 +717,106 @@