Merge branch 'master' of http://oirigoyen@192.168.10.111:8383/SIG.git
This commit is contained in:
@@ -5175,7 +5175,7 @@ Public Class ClsPaginas
|
|||||||
sw.Start()
|
sw.Start()
|
||||||
Dim Bytes As Byte() = Nothing
|
Dim Bytes As Byte() = Nothing
|
||||||
|
|
||||||
Dim bdir As String = ModExtensiones.DirectorioBaseEmpresas
|
Dim bdir As String = If(RutaReporte.Contains("Empresas"), ModExtensiones.DirectorioBaseEmpresas, AppDomain.CurrentDomain.BaseDirectory)
|
||||||
RutaReporte.Replace("/", "\")
|
RutaReporte.Replace("/", "\")
|
||||||
If Not RutaReporte.ToUpper().StartsWith(bdir.ToUpper()) Then
|
If Not RutaReporte.ToUpper().StartsWith(bdir.ToUpper()) Then
|
||||||
RutaReporte = String.Format("{0}{1}", bdir, RutaReporte)
|
RutaReporte = String.Format("{0}{1}", bdir, RutaReporte)
|
||||||
|
|||||||
@@ -140,7 +140,7 @@ Namespace Extensiones
|
|||||||
Dim MensajeFormato = $"{Chr(13)}{Chr(10)}Log: {Mensaje} | Fecha:{Now.ToString("dd/MM/yyyy HH:mm")}"
|
Dim MensajeFormato = $"{Chr(13)}{Chr(10)}Log: {Mensaje} | Fecha:{Now.ToString("dd/MM/yyyy HH:mm")}"
|
||||||
|
|
||||||
Try
|
Try
|
||||||
ArchivoW = New StreamWriter($"{ModExtensiones.DirectorioBaseEmpresas}\Log\{Archivo}.txt", True, System.Text.Encoding.UTF8)
|
ArchivoW = New StreamWriter($"{AppDomain.CurrentDomain.BaseDirectory}\Log\{Archivo}.txt", True, System.Text.Encoding.UTF8)
|
||||||
Catch ex As UnauthorizedAccessException
|
Catch ex As UnauthorizedAccessException
|
||||||
'Alert("No hay permisos para guardar en el Log.", Extensiones.TipoMensaje.MsgError)
|
'Alert("No hay permisos para guardar en el Log.", Extensiones.TipoMensaje.MsgError)
|
||||||
Exit Sub
|
Exit Sub
|
||||||
@@ -185,7 +185,7 @@ Namespace Extensiones
|
|||||||
Dim strLineaTMP As String
|
Dim strLineaTMP As String
|
||||||
strLineaTMP = String.Format("{0} {1}:{2} {3} {0}", Chr(13), DateTime.Now.ToShortDateString, DateTime.Now.ToShortTimeString, pTexto)
|
strLineaTMP = String.Format("{0} {1}:{2} {3} {0}", Chr(13), DateTime.Now.ToShortDateString, DateTime.Now.ToShortTimeString, pTexto)
|
||||||
Try
|
Try
|
||||||
ArchivoW = New StreamWriter(String.Format("{0}\LogMail.txt", ModExtensiones.DirectorioBaseEmpresas), True, System.Text.Encoding.UTF8)
|
ArchivoW = New StreamWriter(String.Format("{0}\LogMail.txt", AppDomain.CurrentDomain.BaseDirectory), True, System.Text.Encoding.UTF8)
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
Exit Sub
|
Exit Sub
|
||||||
End Try
|
End Try
|
||||||
@@ -205,7 +205,7 @@ Namespace Extensiones
|
|||||||
' strLineaTMP = Chr(13) & Chr(10) & Day(Now) & "/" & Month(Now) & "/" & Year(Now) & " " & Hour(Now) & ":" & Minuto & ". " & Str & Chr(13) & Chr(10)
|
' strLineaTMP = Chr(13) & Chr(10) & Day(Now) & "/" & Month(Now) & "/" & Year(Now) & " " & Hour(Now) & ":" & Minuto & ". " & Str & Chr(13) & Chr(10)
|
||||||
strLineaTMP = String.Format("{0}{1} .. PAC: {2} - Modulo: {3} ..{4}:{5}", Chr(13), Chr(10), CvePAC, Modulo, Str, DateTime.Now.ToShortDateString, DateTime.Now.ToShortTimeString)
|
strLineaTMP = String.Format("{0}{1} .. PAC: {2} - Modulo: {3} ..{4}:{5}", Chr(13), Chr(10), CvePAC, Modulo, Str, DateTime.Now.ToShortDateString, DateTime.Now.ToShortTimeString)
|
||||||
Try
|
Try
|
||||||
ArchivoW = New StreamWriter(String.Format("{0}\LogTimbrado.txt", ModExtensiones.DirectorioBaseEmpresas), True, System.Text.Encoding.UTF8)
|
ArchivoW = New StreamWriter(String.Format("{0}\LogTimbrado.txt", AppDomain.CurrentDomain.BaseDirectory), True, System.Text.Encoding.UTF8)
|
||||||
Catch ex As UnauthorizedAccessException
|
Catch ex As UnauthorizedAccessException
|
||||||
'Alert("No hay permisos para guardar en el Log.", Extensiones.TipoMensaje.MsgError)
|
'Alert("No hay permisos para guardar en el Log.", Extensiones.TipoMensaje.MsgError)
|
||||||
Exit Sub
|
Exit Sub
|
||||||
@@ -228,7 +228,7 @@ Namespace Extensiones
|
|||||||
strLineaTMP = String.Format("{0} {1}:{2} {3} {0}", Chr(13), DateTime.Now.ToShortDateString, DateTime.Now.ToShortTimeString, pTexto)
|
strLineaTMP = String.Format("{0} {1}:{2} {3} {0}", Chr(13), DateTime.Now.ToShortDateString, DateTime.Now.ToShortTimeString, pTexto)
|
||||||
|
|
||||||
Try
|
Try
|
||||||
ArchivoW = New StreamWriter(String.Format("{0}\LogCancelacionSAT.txt", ModExtensiones.DirectorioBaseEmpresas), True, System.Text.Encoding.UTF8)
|
ArchivoW = New StreamWriter(String.Format("{0}\LogCancelacionSAT.txt", AppDomain.CurrentDomain.BaseDirectory), True, System.Text.Encoding.UTF8)
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
Exit Sub
|
Exit Sub
|
||||||
End Try
|
End Try
|
||||||
@@ -1962,7 +1962,7 @@ Namespace Extensiones
|
|||||||
RecursivoLimpiaControlesExcel(GridView.Controls)
|
RecursivoLimpiaControlesExcel(GridView.Controls)
|
||||||
|
|
||||||
style.Append("<style> ")
|
style.Append("<style> ")
|
||||||
style.Append(File.ReadAllText(String.Format("{0}/Styles/EstilosExcel.css", ModExtensiones.DirectorioBaseEmpresas)))
|
style.Append(File.ReadAllText(String.Format("{0}/Styles/EstilosExcel.css", AppDomain.CurrentDomain.BaseDirectory)))
|
||||||
style.Append(" </style> ")
|
style.Append(" </style> ")
|
||||||
|
|
||||||
page.EnableEventValidation = False
|
page.EnableEventValidation = False
|
||||||
@@ -2002,7 +2002,7 @@ Namespace Extensiones
|
|||||||
Dim Form As HtmlForm = New HtmlForm()
|
Dim Form As HtmlForm = New HtmlForm()
|
||||||
|
|
||||||
style.Append(" <style> ")
|
style.Append(" <style> ")
|
||||||
style.Append(File.ReadAllText(String.Format("{0}/Styles/EstilosExcel.css", ModExtensiones.DirectorioBaseEmpresas)))
|
style.Append(File.ReadAllText(String.Format("{0}/Styles/EstilosExcel.css", AppDomain.CurrentDomain.BaseDirectory)))
|
||||||
style.Append(" </style> ")
|
style.Append(" </style> ")
|
||||||
RecursivoLimpiaControlesExcel(GridView.Controls)
|
RecursivoLimpiaControlesExcel(GridView.Controls)
|
||||||
|
|
||||||
@@ -2183,16 +2183,15 @@ Namespace Extensiones
|
|||||||
worksheet.Rows(IndexEndTable).Cells(6).Value = "Fecha Impresión"
|
worksheet.Rows(IndexEndTable).Cells(6).Value = "Fecha Impresión"
|
||||||
worksheet.Rows(IndexEndTable + 1).Cells(6).Value = DateTime.Now.ToString("dd/MM/yyyy")
|
worksheet.Rows(IndexEndTable + 1).Cells(6).Value = DateTime.Now.ToString("dd/MM/yyyy")
|
||||||
|
|
||||||
Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", Usuario.Empresa.Ruta))
|
Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", Usuario.Empresa.Ruta))
|
||||||
|
|
||||||
If Imagen.Exists Then
|
If Imagen.Exists Then
|
||||||
Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", HttpContext.Current.Request.Url.Scheme, HttpContext.Current.Request.Url.Host, HttpContext.Current.Request.Url.Port, Usuario.CveEmpresa)
|
Dim Ruta As String = String.Format("{0}/Logo.png", Usuario.Empresa.Ruta)
|
||||||
Using webClient As New Net.WebClient()
|
Using sr As New StreamReader(Ruta)
|
||||||
Dim imageBytes = webClient.DownloadData(logouri)
|
Dim ms As New MemoryStream()
|
||||||
Dim stream As New MemoryStream(imageBytes)
|
sr.BaseStream.CopyTo(ms)
|
||||||
worksheet.Pictures.Add(stream, ExcelPictureFormat.Png, "A1", AnchoImagen, AlturaImagen, LengthUnit.Pixel)
|
worksheet.Pictures.Add(ms, ExcelPictureFormat.Png, "A1", AnchoImagen, AlturaImagen, LengthUnit.Pixel)
|
||||||
'worksheet.Pictures.Add(stream, GemBox.Spreadsheet.ExcelPictureFormat.Png, "A1", AnchoImagen, AlturaImagen, GemBox.Document.LengthUnit.Pixel)
|
End Using
|
||||||
End Using
|
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
@@ -2210,7 +2209,7 @@ Namespace Extensiones
|
|||||||
|
|
||||||
Dim style As StringBuilder = New StringBuilder()
|
Dim style As StringBuilder = New StringBuilder()
|
||||||
style.Append("<style> ")
|
style.Append("<style> ")
|
||||||
style.Append(File.ReadAllText(String.Format("{0}/Styles/EstilosExcel.css", ModExtensiones.DirectorioBaseEmpresas)))
|
style.Append(File.ReadAllText(String.Format("{0}/Styles/EstilosExcel.css", AppDomain.CurrentDomain.BaseDirectory)))
|
||||||
style.Append(" </style> ")
|
style.Append(" </style> ")
|
||||||
'To Export all pages
|
'To Export all pages
|
||||||
'Gv.AllowPaging = False
|
'Gv.AllowPaging = False
|
||||||
@@ -3182,7 +3181,7 @@ Namespace Extensiones
|
|||||||
Public Property descripcion As String
|
Public Property descripcion As String
|
||||||
Public ReadOnly Property Extencion As String
|
Public ReadOnly Property Extencion As String
|
||||||
Get
|
Get
|
||||||
Return IO.Path.GetExtension(String.Format("{0}{1}{2}", ModExtensiones.DirectorioBaseEmpresas, patch, filename)).Replace(".", "")
|
Return IO.Path.GetExtension(String.Format("{0}{1}{2}", If(patch.Contains("Empresas"), ModExtensiones.DirectorioBaseEmpresas, AppDomain.CurrentDomain.BaseDirectory), patch, filename)).Replace(".", "")
|
||||||
End Get
|
End Get
|
||||||
End Property
|
End Property
|
||||||
Public ReadOnly Property filenameO As String
|
Public ReadOnly Property filenameO As String
|
||||||
@@ -3192,7 +3191,7 @@ Namespace Extensiones
|
|||||||
End Property
|
End Property
|
||||||
Public ReadOnly Property FileUrl As String
|
Public ReadOnly Property FileUrl As String
|
||||||
Get
|
Get
|
||||||
Return String.Format("{0}{1}{2}", ModExtensiones.DirectorioBaseEmpresas, patch, filename)
|
Return String.Format("{0}{1}{2}", If(patch.Contains("Empresas"), ModExtensiones.DirectorioBaseEmpresas, AppDomain.CurrentDomain.BaseDirectory), patch, filename)
|
||||||
End Get
|
End Get
|
||||||
End Property
|
End Property
|
||||||
End Class
|
End Class
|
||||||
|
|||||||
64
Ashx/SigFiles.ashx
Normal file
64
Ashx/SigFiles.ashx
Normal file
@@ -0,0 +1,64 @@
|
|||||||
|
<%@ WebHandler Language="C#" Class="SigFiles" %>
|
||||||
|
|
||||||
|
using System;
|
||||||
|
using System.Web;
|
||||||
|
using Extensiones;
|
||||||
|
|
||||||
|
public class SigFiles : IHttpHandler
|
||||||
|
{
|
||||||
|
|
||||||
|
public void ProcessRequest(HttpContext context)
|
||||||
|
{
|
||||||
|
//context.Response.ContentType = "text/plain";
|
||||||
|
//context.Response.Write("Hello World");
|
||||||
|
string path = "";
|
||||||
|
if (context.Request["FileUrl"] != null)
|
||||||
|
{
|
||||||
|
path = string.Format("{0}{1}", ModExtensiones.DirectorioBaseEmpresas, context.Request["FileUrl"]);
|
||||||
|
}
|
||||||
|
if (context.Request["P"] != null)
|
||||||
|
{
|
||||||
|
path = string.Format("{0}{1}", ModExtensiones.DirectorioBaseEmpresas,ModExtensiones.Decripta( context.Request["P"]));
|
||||||
|
}
|
||||||
|
if (path != null && path.Length>0)
|
||||||
|
{
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
if (System.IO.File.Exists(path))
|
||||||
|
{
|
||||||
|
System.IO.FileInfo file = new System.IO.FileInfo(path);
|
||||||
|
string mimeType = "text/plain";
|
||||||
|
try
|
||||||
|
{
|
||||||
|
mimeType = MimeMapping.GetMimeMapping(path);
|
||||||
|
}
|
||||||
|
catch (Exception) { }//si truena no existe el arhivo
|
||||||
|
context.Response.Clear();
|
||||||
|
context.Response.ClearHeaders();
|
||||||
|
context.Response.ClearContent();
|
||||||
|
context.Response.AddHeader("Content-Disposition", $"attachment; filename= {Uri.EscapeDataString(file.Name)}");
|
||||||
|
context.Response.AddHeader("Content-Length", file.Length.ToString());
|
||||||
|
context.Response.ContentType = mimeType;
|
||||||
|
context.Response.Flush();
|
||||||
|
context.Response.TransmitFile(file.FullName);
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
this.GuardaLog(ex.ToString());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
context.Response.End();
|
||||||
|
}
|
||||||
|
|
||||||
|
public bool IsReusable
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -930,7 +930,7 @@ Partial Class Bancos_IE
|
|||||||
|
|
||||||
If ObjIE.Comprobante <> "" Then
|
If ObjIE.Comprobante <> "" Then
|
||||||
HplComprobante.Visible = True
|
HplComprobante.Visible = True
|
||||||
HplComprobante.NavigateUrl = String.Format("/Empresas/{0}/IE/{1}", UsuarioActual.CveEmpresa, ObjIE.Comprobante)
|
HplComprobante.NavigateUrl = String.Format("/Compras/PopUpVerFactura.aspx?P={0}", Encripta($"OP=IEComprobante&Comprobante={ObjIE.Comprobante}"))
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If CveIEDeposito > 0 Then
|
If CveIEDeposito > 0 Then
|
||||||
|
|||||||
@@ -186,9 +186,10 @@ Partial Class PopUpVerFactura
|
|||||||
|
|
||||||
If Request("REPORTE") IsNot Nothing Then
|
If Request("REPORTE") IsNot Nothing Then
|
||||||
CType(Session("DTPDF"), HtmlTable).ExportToPDF("Reporte")
|
CType(Session("DTPDF"), HtmlTable).ExportToPDF("Reporte")
|
||||||
End If
|
End If
|
||||||
|
|
||||||
'OPCIONES
|
'OPCIONES
|
||||||
|
|
||||||
If Request("P") IsNot Nothing AndAlso Decripta((Request("P").ToString)) <> "" Then
|
If Request("P") IsNot Nothing AndAlso Decripta((Request("P").ToString)) <> "" Then
|
||||||
Dim UrlParametros As Hashtable = Parametros(Decripta((Request("P").ToString)))
|
Dim UrlParametros As Hashtable = Parametros(Decripta((Request("P").ToString)))
|
||||||
If UrlParametros("OP") IsNot Nothing AndAlso UrlParametros("OP").ToString <> "" Then
|
If UrlParametros("OP") IsNot Nothing AndAlso UrlParametros("OP").ToString <> "" Then
|
||||||
@@ -235,10 +236,16 @@ Partial Class PopUpVerFactura
|
|||||||
UsuarioToken.Empresa = ObjEmpresa.Empresa
|
UsuarioToken.Empresa = ObjEmpresa.Empresa
|
||||||
End If
|
End If
|
||||||
ObjEmpresa.Dispose()
|
ObjEmpresa.Dispose()
|
||||||
End Sub
|
End Sub
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
|
Private Sub SeleccionaReporte(UrlParametros As Hashtable)
|
||||||
|
|
||||||
|
'DESCARGA COMPROBANTE
|
||||||
|
If UrlParametros("OP").ToString = "IEComprobante" Then
|
||||||
|
DescargaComprobante(UrlParametros)
|
||||||
|
End If
|
||||||
|
|
||||||
Private Sub SeleccionaReporte(UrlParametros As Hashtable)
|
|
||||||
'DESCARGA DOCUMENTO XML O PDF DE LA FACTURA COMPRA
|
'DESCARGA DOCUMENTO XML O PDF DE LA FACTURA COMPRA
|
||||||
If UrlParametros("OP").ToString = "Fact" Then
|
If UrlParametros("OP").ToString = "Fact" Then
|
||||||
DescargaFactura(UrlParametros)
|
DescargaFactura(UrlParametros)
|
||||||
@@ -518,11 +525,30 @@ Partial Class PopUpVerFactura
|
|||||||
ImprimirPDF("Empresas/Grales/Formatos/RepCortes.rdlc", lrds, params, "ReporteCortes", Formato)
|
ImprimirPDF("Empresas/Grales/Formatos/RepCortes.rdlc", lrds, params, "ReporteCortes", Formato)
|
||||||
End If
|
End If
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
#Region " OP = FACTURA - IMPRIME COMPRA"
|
#Region " OP = FACTURA - IMPRIME COMPRA"
|
||||||
|
Private Sub DescargaComprobante(Parametros As Hashtable)
|
||||||
|
If Parametros("COMPROBANTE") IsNot Nothing Then
|
||||||
|
|
||||||
|
Dim Path As String = String.Format("{0}IE\{1}", UsuarioActual.Empresa.Ruta, Parametros("COMPROBANTE"))
|
||||||
|
Dim Archivo As New System.IO.FileInfo(Path)
|
||||||
|
|
||||||
|
If Archivo.Exists Then
|
||||||
|
HttpContext.Current.Response.Clear()
|
||||||
|
HttpContext.Current.Response.ClearContent()
|
||||||
|
HttpContext.Current.Response.ContentType = "application/octet-stream"
|
||||||
|
HttpContext.Current.Response.AppendHeader("Content-disposition", String.Format("attachment; filename={0}", Archivo.Name))
|
||||||
|
HttpContext.Current.Response.AddHeader("Content-Length", Archivo.Length.ToString())
|
||||||
|
HttpContext.Current.Response.TransmitFile(Path)
|
||||||
|
'HttpContext.Current.Response.Flush()
|
||||||
|
HttpContext.Current.Response.End()
|
||||||
|
End If
|
||||||
|
Archivo = Nothing
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
Private Sub DescargaFactura(Parametros As Hashtable)
|
Private Sub DescargaFactura(Parametros As Hashtable)
|
||||||
If Parametros("CVEFACTURA") IsNot Nothing AndAlso Parametros("CVEFACTURA").ToString.ToEntero > 0 Then
|
If Parametros("CVEFACTURA") IsNot Nothing AndAlso Parametros("CVEFACTURA").ToString.ToEntero > 0 Then
|
||||||
Dim Exten As String = If(Parametros("EXT").ToString.ToLower = "xml", "xml", "pdf")
|
Dim Exten As String = If(Parametros("EXT").ToString.ToLower = "xml", "xml", "pdf")
|
||||||
|
|||||||
@@ -246,10 +246,96 @@ Partial Class Inventarios_KardexAlmacen
|
|||||||
If DdlProveedor.SelectedValue.ToEntero > 0 Then StrFiltro.AppendFormat("Proveedor: {0},", DdlProveedor.SelectedText)
|
If DdlProveedor.SelectedValue.ToEntero > 0 Then StrFiltro.AppendFormat("Proveedor: {0},", DdlProveedor.SelectedText)
|
||||||
If ddlProducto2.SelectedValue.ToEntero > 0 Then StrFiltro.AppendFormat(" Producto/Servicio: {0},", ddlProducto2.SelectedText)
|
If ddlProducto2.SelectedValue.ToEntero > 0 Then StrFiltro.AppendFormat(" Producto/Servicio: {0},", ddlProducto2.SelectedText)
|
||||||
If TxtFechaF.Text <> "" Then StrFiltro.AppendFormat(" Fecha Fin: {0}", TxtFechaF.Text)
|
If TxtFechaF.Text <> "" Then StrFiltro.AppendFormat(" Fecha Fin: {0}", TxtFechaF.Text)
|
||||||
GvDatos.ExportToExcelG("ExistenciasHorizontal.xlsx", "Existencias Almacen", UsuarioActual, StrFiltro.ToString, 100, 200)
|
ExportToExcelG(GvDatos, "ExistenciasHorizontal.xlsx", "Existencias Almacen", UsuarioActual, StrFiltro.ToString, 100, 200)
|
||||||
Else
|
Else
|
||||||
Alert("Debe consultar para generar un excel", TipoMensaje.MsgAdvertencia)
|
Alert("Debe consultar para generar un excel", TipoMensaje.MsgAdvertencia)
|
||||||
End If
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Public Sub ExportToExcelG(Gv As GridView, NombreArchivoXLSx As String, Optional Titulo As String = "Reporte", Optional Usuario As Usuario = Nothing, Optional Filtros As String = "", Optional AlturaImagen As Double = 100, Optional AnchoImagen As Double = 100)
|
||||||
|
Dim sw As New StringWriter()
|
||||||
|
Dim htw As New HtmlTextWriter(sw)
|
||||||
|
Gv.RenderControl(htw)
|
||||||
|
GemBox.Spreadsheet.SpreadsheetInfo.SetLicense("ESWN-4QFD-26JF-1SZ8")
|
||||||
|
|
||||||
|
Dim excel As GemBox.Spreadsheet.ExcelFile
|
||||||
|
Dim options = GemBox.Spreadsheet.LoadOptions.HtmlDefault
|
||||||
|
Using htmlStream = New MemoryStream(options.Encoding.GetBytes(sw.ToString()))
|
||||||
|
excel = GemBox.Spreadsheet.ExcelFile.Load(htmlStream, options)
|
||||||
|
If Usuario IsNot Nothing Then
|
||||||
|
Dim TotalRowHeader As Integer = 8
|
||||||
|
Dim TotalRowFooter As Integer = 2
|
||||||
|
|
||||||
|
Dim worksheet = excel.Worksheets(0)
|
||||||
|
worksheet.Rows.InsertEmpty(0, TotalRowHeader)
|
||||||
|
Dim celdasConTexto = worksheet.GetUsedCellRange(True)
|
||||||
|
celdasConTexto.Style.Font.Name = "Calibri Light"
|
||||||
|
|
||||||
|
Dim RangoNombreEmpresa = worksheet.Cells.GetSubrangeAbsolute(1, celdasConTexto.FirstColumnIndex, 1, celdasConTexto.LastColumnIndex)
|
||||||
|
RangoNombreEmpresa.Merged = True
|
||||||
|
RangoNombreEmpresa.Value = Usuario.Empresa.Empresa
|
||||||
|
RangoNombreEmpresa.Style.Font.Size = 18 * 20
|
||||||
|
RangoNombreEmpresa.Style.Font.Name = "Calibri Light"
|
||||||
|
RangoNombreEmpresa.Style.HorizontalAlignment = GemBox.Spreadsheet.HorizontalAlignmentStyle.Center
|
||||||
|
RangoNombreEmpresa.Style.VerticalAlignment = GemBox.Spreadsheet.VerticalAlignmentStyle.Center
|
||||||
|
|
||||||
|
|
||||||
|
Dim RangoFiltros = worksheet.Cells.GetSubrangeAbsolute(6, celdasConTexto.FirstColumnIndex, 6, celdasConTexto.LastColumnIndex)
|
||||||
|
RangoFiltros.Merged = True
|
||||||
|
RangoFiltros.Value = Filtros
|
||||||
|
RangoFiltros.Style.Font.Size = 15 * 20
|
||||||
|
RangoFiltros.Style.Font.Name = "Calibri Light"
|
||||||
|
RangoFiltros.Style.HorizontalAlignment = GemBox.Spreadsheet.HorizontalAlignmentStyle.Left
|
||||||
|
RangoFiltros.Style.VerticalAlignment = GemBox.Spreadsheet.VerticalAlignmentStyle.Center
|
||||||
|
|
||||||
|
|
||||||
|
Dim RangoTitulo = worksheet.Cells.GetSubrangeAbsolute(3, celdasConTexto.FirstColumnIndex, 3, celdasConTexto.LastColumnIndex)
|
||||||
|
RangoTitulo.Merged = True
|
||||||
|
RangoTitulo.Value = Titulo
|
||||||
|
RangoTitulo.Style.Font.Size = 20 * 20
|
||||||
|
RangoTitulo.Style.Font.Name = "Calibri Light"
|
||||||
|
RangoTitulo.Style.HorizontalAlignment = GemBox.Spreadsheet.HorizontalAlignmentStyle.Center
|
||||||
|
RangoTitulo.Style.VerticalAlignment = GemBox.Spreadsheet.VerticalAlignmentStyle.Center
|
||||||
|
|
||||||
|
For i = celdasConTexto.FirstColumnIndex To celdasConTexto.LastColumnIndex
|
||||||
|
worksheet.Rows(8).Cells(i).Style.Font.Size = 12 * 20
|
||||||
|
worksheet.Rows(8).Cells(i).Style.HorizontalAlignment = GemBox.Spreadsheet.HorizontalAlignmentStyle.Center
|
||||||
|
worksheet.Rows(8).Cells(i).Style.VerticalAlignment = GemBox.Spreadsheet.VerticalAlignmentStyle.Center
|
||||||
|
worksheet.Rows(8).Cells(i).Style.FillPattern.SetPattern(GemBox.Spreadsheet.FillPatternStyle.Solid, GemBox.Spreadsheet.SpreadsheetColor.FromArgb(75, 119, 190), GemBox.Spreadsheet.SpreadsheetColor.FromArgb(255, 255, 255))
|
||||||
|
worksheet.Rows(8).Cells(i).Style.Font.Color = GemBox.Spreadsheet.SpreadsheetColor.FromArgb(255, 255, 255)
|
||||||
|
If i > 0 Then
|
||||||
|
Try
|
||||||
|
worksheet.Columns(i).AutoFit(1)
|
||||||
|
Catch ex As Exception
|
||||||
|
End Try
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
|
||||||
|
Dim IndexEndTable As Integer = Gv.Rows.Count + TotalRowHeader + TotalRowFooter
|
||||||
|
|
||||||
|
worksheet.Rows(IndexEndTable).Cells(2).Value = "Usuario Imprimió"
|
||||||
|
worksheet.Rows(IndexEndTable + 1).Cells(2).Value = Usuario.Nombre
|
||||||
|
|
||||||
|
worksheet.Rows(IndexEndTable).Cells(6).Value = "Fecha Impresión"
|
||||||
|
worksheet.Rows(IndexEndTable + 1).Cells(6).Value = DateTime.Now.ToString("dd/MM/yyyy")
|
||||||
|
|
||||||
|
Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", Usuario.Empresa.Ruta))
|
||||||
|
|
||||||
|
If Imagen.Exists Then
|
||||||
|
Dim Ruta As String = String.Format("{0}/Logo.png", Usuario.Empresa.Ruta)
|
||||||
|
Using sr As New StreamReader(Ruta)
|
||||||
|
Dim ms As New MemoryStream()
|
||||||
|
sr.BaseStream.CopyTo(ms)
|
||||||
|
worksheet.Pictures.Add(ms, ExcelPictureFormat.Png, "A1", AnchoImagen, AlturaImagen, LengthUnit.Pixel)
|
||||||
|
End Using
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
End Using
|
||||||
|
htw.Dispose()
|
||||||
|
|
||||||
|
excel.Save(HttpContext.Current.Response, $"{NombreArchivoXLSx}.xlsx")
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
Public Overrides Sub VerifyRenderingInServerForm(ByVal control As Control)
|
Public Overrides Sub VerifyRenderingInServerForm(ByVal control As Control)
|
||||||
End Sub
|
End Sub
|
||||||
|
|||||||
@@ -185,7 +185,7 @@ public partial class OI_CircularDetalleB : ClsPaginas
|
|||||||
{
|
{
|
||||||
Filename = fileItem.filename;
|
Filename = fileItem.filename;
|
||||||
}
|
}
|
||||||
catch (Exception )
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
ModExtensiones.OnError(this, "Ocurrió un error al obtener al archivo", ex);
|
ModExtensiones.OnError(this, "Ocurrió un error al obtener al archivo", ex);
|
||||||
Filename = "-1";
|
Filename = "-1";
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ public partial class OI_ConvocatoriaDetalle : ClsPaginas
|
|||||||
public const string iddivAgregarTema = "divModalAgregartema";
|
public const string iddivAgregarTema = "divModalAgregartema";
|
||||||
public const string iddivAgregarMiembros = "iddivAgregarMiembros";
|
public const string iddivAgregarMiembros = "iddivAgregarMiembros";
|
||||||
public int RCveEvento { get { return ViewState["RCveEvento"] != null ? ViewState["RCveEvento"].ToString().ToEntero() : 0; } set { ViewState["RCveEvento"] = value; } }
|
public int RCveEvento { get { return ViewState["RCveEvento"] != null ? ViewState["RCveEvento"].ToString().ToEntero() : 0; } set { ViewState["RCveEvento"] = value; } }
|
||||||
|
public int RCveEventoPadre { get { return ViewState["RCveEventoPadre"] != null ? ViewState["RCveEventoPadre"].ToString().ToEntero() : 0; } set { ViewState["RCveEventoPadre"] = value; } }
|
||||||
public bool EsNuevo { get { return Convert.ToBoolean(ViewState["EsNuevo"]); } set { ViewState["EsNuevo"] = value; } }
|
public bool EsNuevo { get { return Convert.ToBoolean(ViewState["EsNuevo"]); } set { ViewState["EsNuevo"] = value; } }
|
||||||
public List<int> LCveUsuarioCCP { get { if (ViewState["LCveUsuarioCCP"] == null) { ViewState["LCveUsuarioCCP"] = new List<int>(); } return (List<int>)ViewState["LCveUsuarioCCP"]; } set { ViewState["LCveUsuarioCCP"] = value; } }
|
public List<int> LCveUsuarioCCP { get { if (ViewState["LCveUsuarioCCP"] == null) { ViewState["LCveUsuarioCCP"] = new List<int>(); } return (List<int>)ViewState["LCveUsuarioCCP"]; } set { ViewState["LCveUsuarioCCP"] = value; } }
|
||||||
public List<int> LcveuserVisto { get { if (ViewState["LcveuserVisto"] == null) { ViewState["LcveuserVisto"] = new List<int>(); } return (List<int>)ViewState["LcveuserVisto"]; } set { ViewState["LcveuserVisto"] = value; } }
|
public List<int> LcveuserVisto { get { if (ViewState["LcveuserVisto"] == null) { ViewState["LcveuserVisto"] = new List<int>(); } return (List<int>)ViewState["LcveuserVisto"]; } set { ViewState["LcveuserVisto"] = value; } }
|
||||||
@@ -29,8 +30,13 @@ public partial class OI_ConvocatoriaDetalle : ClsPaginas
|
|||||||
cargaUsuarios();
|
cargaUsuarios();
|
||||||
|
|
||||||
if (Request["CveEvento"] != null)
|
if (Request["CveEvento"] != null)
|
||||||
|
{
|
||||||
|
RCveEvento = Request["CveEvento"].ToString().ToEntero();
|
||||||
|
}
|
||||||
|
if (Request["CveEventoPadre"] != null)
|
||||||
{
|
{
|
||||||
RCveEvento = Request["CveEvento"].ToString().ToEntero();
|
|
||||||
|
RCveEventoPadre = Request["CveEventoPadre"].ToString().ToEntero();
|
||||||
}
|
}
|
||||||
if (RCveEvento > 0)
|
if (RCveEvento > 0)
|
||||||
{
|
{
|
||||||
@@ -349,7 +355,7 @@ public partial class OI_ConvocatoriaDetalle : ClsPaginas
|
|||||||
using (ClsOIEventos objOI = new ClsOIEventos())
|
using (ClsOIEventos objOI = new ClsOIEventos())
|
||||||
{
|
{
|
||||||
objOI.IniciaTransacSQL();
|
objOI.IniciaTransacSQL();
|
||||||
Continuar = objOI.AddOI_Eventos2(cveTipoEvento, asunto, descripcion, prioridad, cveUsuarioDe, cveUsuarioPara, fechaInicio, fechaFin, cveRevision, archivoname, listaCCP, chkList, cveUsuarioIng, cveEmpresa, CorreoExterno: TxtCorreoExterno.Text, Acuerdos: TxtOrdendeldia.Text.Replace("< ", "<"), Lugar: TxtLugar.Text);
|
Continuar = objOI.AddOI_Eventos2(cveTipoEvento, asunto, descripcion, prioridad, cveUsuarioDe, cveUsuarioPara, fechaInicio, fechaFin, cveRevision, archivoname, listaCCP, chkList, cveUsuarioIng, cveEmpresa, CorreoExterno: TxtCorreoExterno.Text, Acuerdos: TxtOrdendeldia.Text.Replace("< ", "<"), Lugar: TxtLugar.Text,CveEventoPadre: (RCveEventoPadre>0? RCveEventoPadre:-1));
|
||||||
|
|
||||||
CveEvento = objOI.CveEvento;
|
CveEvento = objOI.CveEvento;
|
||||||
Folio = objOI.Folio;
|
Folio = objOI.Folio;
|
||||||
|
|||||||
@@ -766,7 +766,12 @@ public partial class OI_MinutaDetalle : ClsPaginas
|
|||||||
|
|
||||||
if (HuboError == false)
|
if (HuboError == false)
|
||||||
{
|
{
|
||||||
Alert("La minuta se termino con exito.", ModExtensiones.TipoMensaje.MsgInformacion);
|
string script = "";
|
||||||
|
if (agendar)
|
||||||
|
{
|
||||||
|
script = string.Format("location.replace(\"/OI/ConvocatoriaDetalle.aspx?CveEventoPadre={0}\");",RCveEvento );
|
||||||
|
}
|
||||||
|
Alert("La minuta se termino con exito.", ModExtensiones.TipoMensaje.MsgInformacion,script);
|
||||||
objOI.Commit();
|
objOI.Commit();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -1160,93 +1165,93 @@ public partial class OI_MinutaDetalle : ClsPaginas
|
|||||||
{
|
{
|
||||||
cargarAgenda();
|
cargarAgenda();
|
||||||
}
|
}
|
||||||
|
bool agendar = false;
|
||||||
protected void BtnTerminarYAgendar_Click(object sender, EventArgs e)
|
protected void BtnTerminarYAgendar_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
string errorMessage = "";
|
//string errorMessage = "";
|
||||||
|
|
||||||
|
|
||||||
int cveUsuarioDe = UsuarioActual.CveUsuario;
|
//int cveUsuarioDe = UsuarioActual.CveUsuario;
|
||||||
List<int> listaCCP = new List<int>();
|
//List<int> listaCCP = new List<int>();
|
||||||
//int cveUsuarioPara = CveUsuarioPara;
|
////int cveUsuarioPara = CveUsuarioPara;
|
||||||
|
|
||||||
OITipoEventos cveTipoEvento = OITipoEventos.Agenda;
|
//OITipoEventos cveTipoEvento = OITipoEventos.Agenda;
|
||||||
string asunto = TxtAgendaAsunto.Text;
|
//string asunto = TxtAgendaAsunto.Text;
|
||||||
string descripcion = string.Format("siguiente reunión Minuta \"{0}\"", TxtAsunto.Text);
|
//string descripcion = string.Format("siguiente reunión Minuta \"{0}\"", TxtAsunto.Text);
|
||||||
int prioridad = 1;
|
//int prioridad = 1;
|
||||||
int cveAgendaTipo = 4;
|
//int cveAgendaTipo = 4;
|
||||||
string fechaInicio = "";
|
//string fechaInicio = "";
|
||||||
string fechaFin = "1900/01/01 00:00";
|
//string fechaFin = "1900/01/01 00:00";
|
||||||
if (txtFechaI.Text.ToDateTimeExcat().Year <= 1999)
|
//if (txtFechaI.Text.ToDateTimeExcat().Year <= 1999)
|
||||||
{
|
//{
|
||||||
if (txtFechaI.Text.ToDateTimeExcat("dd/MM/yyyy").Year <= 1999)
|
// if (txtFechaI.Text.ToDateTimeExcat("dd/MM/yyyy").Year <= 1999)
|
||||||
{
|
// {
|
||||||
errorMessage = "No se ingresó una fecha de inicio valida";
|
// errorMessage = "No se ingresó una fecha de inicio valida";
|
||||||
|
|
||||||
}
|
// }
|
||||||
else
|
// else
|
||||||
{
|
// {
|
||||||
fechaInicio = txtFechaI.Text.ToDateTimeExcat("dd/MM/yyyy").ToString("yyyy/MM/dd HH:mm");
|
// fechaInicio = txtFechaI.Text.ToDateTimeExcat("dd/MM/yyyy").ToString("yyyy/MM/dd HH:mm");
|
||||||
fechaFin = txtFechaI.Text.ToDateTimeExcat("dd/MM/yyyy").AddHours(2).ToString("yyyy/MM/dd HH:mm");
|
// fechaFin = txtFechaI.Text.ToDateTimeExcat("dd/MM/yyyy").AddHours(2).ToString("yyyy/MM/dd HH:mm");
|
||||||
}
|
// }
|
||||||
}
|
//}
|
||||||
else
|
//else
|
||||||
{
|
//{
|
||||||
fechaInicio = txtFechaI.Text.ToDateTimeExcat().ToString("yyyy/MM/dd HH:mm");
|
// fechaInicio = txtFechaI.Text.ToDateTimeExcat().ToString("yyyy/MM/dd HH:mm");
|
||||||
fechaFin = txtFechaI.Text.ToDateTimeExcat().AddHours(2).ToString("yyyy/MM/dd HH:mm");
|
// fechaFin = txtFechaI.Text.ToDateTimeExcat().AddHours(2).ToString("yyyy/MM/dd HH:mm");
|
||||||
}
|
//}
|
||||||
int cveRevision = -1;
|
//int cveRevision = -1;
|
||||||
string archivoname = "";
|
//string archivoname = "";
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
int cveUsuarioIng = UsuarioActual.CveUsuario;
|
//int cveUsuarioIng = UsuarioActual.CveUsuario;
|
||||||
int cveEmpresa = UsuarioActual.CveEmpresa;
|
//int cveEmpresa = UsuarioActual.CveEmpresa;
|
||||||
bool Continuar = true;
|
//bool Continuar = true;
|
||||||
int Folio = -1;
|
//int Folio = -1;
|
||||||
int CveEvento = -1;
|
//int CveEvento = -1;
|
||||||
|
|
||||||
if (errorMessage.Length == 0)
|
//if (errorMessage.Length == 0)
|
||||||
{
|
//{
|
||||||
|
|
||||||
List<string> chkList = new List<string>();
|
// List<string> chkList = new List<string>();
|
||||||
using (ClsOIEventos objOI = new ClsOIEventos())
|
// using (ClsOIEventos objOI = new ClsOIEventos())
|
||||||
{
|
// {
|
||||||
objOI.IniciaTransacSQL();
|
// objOI.IniciaTransacSQL();
|
||||||
foreach (var cveUsuarioPara in LCveUsuarioCCP)
|
// foreach (var cveUsuarioPara in LCveUsuarioCCP)
|
||||||
{
|
// {
|
||||||
if (Continuar)
|
// if (Continuar)
|
||||||
{
|
// {
|
||||||
Continuar = objOI.AddOI_Eventos2(cveTipoEvento, asunto, descripcion, prioridad, cveUsuarioDe, cveUsuarioPara, fechaInicio, fechaFin, cveRevision, archivoname, listaCCP, chkList, cveUsuarioIng, cveEmpresa, RCveEvento, null, cveAgendaTipo);
|
// Continuar = objOI.AddOI_Eventos2(cveTipoEvento, asunto, descripcion, prioridad, cveUsuarioDe, cveUsuarioPara, fechaInicio, fechaFin, cveRevision, archivoname, listaCCP, chkList, cveUsuarioIng, cveEmpresa, RCveEvento, null, cveAgendaTipo);
|
||||||
CveEvento = objOI.CveEvento;
|
// CveEvento = objOI.CveEvento;
|
||||||
Folio = objOI.Folio;
|
// Folio = objOI.Folio;
|
||||||
if (CveEvento == 0)
|
// if (CveEvento == 0)
|
||||||
{
|
// {
|
||||||
Continuar = false;
|
// Continuar = false;
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
if (Continuar)
|
// if (Continuar)
|
||||||
{
|
// {
|
||||||
objOI.Commit();
|
// objOI.Commit();
|
||||||
|
|
||||||
}
|
// }
|
||||||
else
|
// else
|
||||||
{
|
// {
|
||||||
objOI.RollBack();
|
// objOI.RollBack();
|
||||||
Continuar = false;
|
// Continuar = false;
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
if (Continuar && CveEvento > 0)
|
//if (Continuar && CveEvento > 0)
|
||||||
{
|
//{
|
||||||
|
agendar = true;
|
||||||
LnkTerminarMinuta_Click(null, null);
|
LnkTerminarMinuta_Click(null, null);
|
||||||
//this.Alert("Se ha agregadó la nueva agenda", ModExtensiones.TipoMensaje.MsgInformacion, string.Format("window.open(\"/OI/TareaDetalle.aspx?CveEvento={0}\", \"_blank\");", CveEvento));
|
//this.Alert("Se ha agregadó la nueva agenda", ModExtensiones.TipoMensaje.MsgInformacion, string.Format("window.open(\"/OI/TareaDetalle.aspx?CveEvento={0}\", \"_blank\");", CveEvento));
|
||||||
}
|
// }
|
||||||
}
|
//}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -20,58 +20,186 @@
|
|||||||
</asp:Content>
|
</asp:Content>
|
||||||
<asp:Content ID="Content7" ContentPlaceHolderID="C" runat="Server">
|
<asp:Content ID="Content7" ContentPlaceHolderID="C" runat="Server">
|
||||||
|
|
||||||
<ajax:TabContainer ID="TabContenedor" runat="server" Width="100%">
|
<asp:UpdatePanel ID="UpContenido" runat="server" UpdateMode="Conditional">
|
||||||
|
<ContentTemplate>
|
||||||
|
<ajax:TabContainer ID="TabContenedor" runat="server" Width="100%">
|
||||||
|
|
||||||
<ajax:TabPanel ID="TabReuniones" runat="server">
|
<ajax:TabPanel ID="TabReuniones" runat="server">
|
||||||
<HeaderTemplate>
|
<HeaderTemplate>
|
||||||
</HeaderTemplate>
|
Reuniones
|
||||||
<ContentTemplate>
|
</HeaderTemplate>
|
||||||
|
<ContentTemplate>
|
||||||
<asp:GridView ID="GridView1" Width="100%" runat="server" AutoGenerateColumns="False" EmptyDataText="No se encontraron Registros" ShowHeaderWhenEmpty="true"
|
|
||||||
CssClass="table table-striped table-advance table-hover Widthall" GridLines="None">
|
<asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional">
|
||||||
<Columns>
|
<ContentTemplate>
|
||||||
<asp:BoundField HeaderText="Fecha" DataField="FechaInicio" />
|
<div class="portlet solid grey-cascade portlet-filter">
|
||||||
<asp:BoundField HeaderText="Moderador" DataField="UsuarioDe" />
|
<div class="portlet-title portlet-filterT smalltitle magindate">
|
||||||
<asp:BoundField HeaderText="Tema" DataField="Revision" />
|
<div class="tools">
|
||||||
<asp:BoundField HeaderText="Lugar" />
|
<asp:Button ID="Button1" runat="server" Text="Consultar" OnClick="Button1_Click" class="btn btn-primary" />
|
||||||
<asp:TemplateField>
|
</div>
|
||||||
<ItemTemplate>
|
<div class="titlefiltros caption ">
|
||||||
<%--<asp:Literal ID="LtlParticipantes" runat="server" Text='<%# Eval("Lugar")%>'></asp:Literal>--%>
|
<ul class="list-inline text-size-12">
|
||||||
</ItemTemplate>
|
<li>Fecha Inicio:</li>
|
||||||
</asp:TemplateField>
|
<li style="margin-right: 30px">
|
||||||
</Columns>
|
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 100px !important; padding: 0px;">
|
||||||
<AlternatingRowStyle CssClass="TextoAlterno" />
|
<asp:TextBox ID="TxtCFechaInicio" runat="server" CssClass="form-control" Width="99%" CausesValidation="true" MaxLength="10" Height="24px"></asp:TextBox>
|
||||||
<RowStyle CssClass="Texto" />
|
<span class="input-group-btn ">
|
||||||
</asp:GridView>
|
<asp:LinkButton ID="LnkFechaInicio" class="btn default " Text="<i class='fa fa-calendar'></i>" Height="24px" runat="server"></asp:LinkButton>
|
||||||
</ContentTemplate>
|
</span>
|
||||||
</ajax:TabPanel>
|
<ajax:MaskedEditExtender ID="MEETxtCFechaInicio" runat="server" TargetControlID="TxtCFechaInicio" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||||
<ajax:TabPanel ID="TabMinutas" runat="server">
|
<ajax:CalendarExtender runat="server" ID="CEETxtCFechaInicio" TargetControlID="TxtCFechaInicio" PopupButtonID="LnkFechaInicio" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||||
<HeaderTemplate>
|
<asp:RequiredFieldValidator ID="RfvTxtCFechaInicio" runat="server" ControlToValidate="TxtCFechaInicio" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''FechaI''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||||
</HeaderTemplate>
|
<asp:CompareValidator ID="CVTxtCFechaInicio" runat="server" ControlToValidate="TxtCFechaInicio" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''FechaI''</b> no tiene el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="GrpGuardar"></asp:CompareValidator>
|
||||||
<ContentTemplate>
|
<ajax:ValidatorCalloutExtender ID="VcoTxtCFechaInicio" runat="server" HighlightCssClass="vco" TargetControlID="RfvTxtCFechaInicio" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||||
|
<ajax:ValidatorCalloutExtender ID="VcoTxtCFechaInicio2" runat="server" HighlightCssClass="vco" TargetControlID="CVTxtCFechaInicio" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
<li>Fecha Fin:</li>
|
||||||
|
<li style="margin-right: 30px">
|
||||||
|
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 100px !important; padding: 0px;">
|
||||||
|
<asp:TextBox ID="TxtCFechaFin" runat="server" CssClass="form-control" Width="99%" CausesValidation="true" MaxLength="10" Height="24px"></asp:TextBox>
|
||||||
|
<span class="input-group-btn ">
|
||||||
|
<asp:LinkButton ID="LnkFechaFin" class="btn default " Text="<i class='fa fa-calendar'></i>" Height="24px" runat="server"></asp:LinkButton>
|
||||||
|
</span>
|
||||||
|
<ajax:MaskedEditExtender ID="MEETxtCFechaFin" runat="server" TargetControlID="TxtCFechaFin" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||||
|
<ajax:CalendarExtender runat="server" ID="CEETxtCFechaFin" TargetControlID="TxtCFechaFin" PopupButtonID="ImgFechaF" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||||
|
<asp:RequiredFieldValidator ID="RfvTxtCFechaFin" runat="server" ControlToValidate="TxtCFechaFin" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''FechaF''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||||
|
<asp:CompareValidator ID="CompareValidator2" runat="server" ControlToValidate="TxtCFechaFin" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''FechaF''</b> no tiene el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="GrpGuardar"></asp:CompareValidator>
|
||||||
|
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender3" runat="server" HighlightCssClass="vco" TargetControlID="RfvTxtCFechaFin" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||||
|
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender4" runat="server" HighlightCssClass="vco" TargetControlID="CompareValidator2" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</ContentTemplate>
|
||||||
|
</asp:UpdatePanel>
|
||||||
|
<asp:GridView ID="GVConvocatoria" Width="100%" runat="server" AutoGenerateColumns="False" EmptyDataText="No se encontraron Registros" ShowHeaderWhenEmpty="true"
|
||||||
|
CssClass="table table-striped table-advance table-hover Widthall" GridLines="None">
|
||||||
|
<Columns>
|
||||||
|
<asp:BoundField HeaderText="Fecha" DataField="FechaInicio" DataFormatString="{0:yyyy/MM/dd HH:mm}" ItemStyle-Width="100" />
|
||||||
|
<asp:TemplateField HeaderText="Asunto">
|
||||||
|
<ItemTemplate>
|
||||||
|
<a href='<%# Eval("CveEvento","/OI/ConvocatoriaDetalle.aspx?CveEvento={0}")%>'> <%#Eval("Asunto")%></a>
|
||||||
|
</ItemTemplate>
|
||||||
|
</asp:TemplateField>
|
||||||
|
<asp:BoundField HeaderText="Moderador" DataField="UsuarioDe" />
|
||||||
|
<asp:BoundField HeaderText="Tema" DataField="Revision" />
|
||||||
|
<asp:BoundField HeaderText="Lugar" />
|
||||||
|
<asp:TemplateField>
|
||||||
|
<ItemTemplate>
|
||||||
|
<%--<asp:Literal ID="LtlParticipantes" runat="server" Text='<%# Eval("Lugar")%>'></asp:Literal>--%>
|
||||||
|
</ItemTemplate>
|
||||||
|
</asp:TemplateField>
|
||||||
|
</Columns>
|
||||||
|
<AlternatingRowStyle CssClass="TextoAlterno" />
|
||||||
|
<RowStyle CssClass="Texto" />
|
||||||
|
</asp:GridView>
|
||||||
|
</ContentTemplate>
|
||||||
|
</ajax:TabPanel>
|
||||||
|
<ajax:TabPanel ID="TabMinutas" runat="server">
|
||||||
|
<HeaderTemplate>
|
||||||
|
Minutas
|
||||||
|
</HeaderTemplate>
|
||||||
|
<ContentTemplate>
|
||||||
|
|
||||||
<asp:GridView ID="GvDatosOIMinutas" Width="100%" runat="server" AutoGenerateColumns="False" EmptyDataText="No se encontraron Registros" ShowHeaderWhenEmpty="true"
|
<asp:UpdatePanel ID="UPFiltros" runat="server" UpdateMode="Conditional">
|
||||||
CssClass="table table-striped table-advance table-hover Widthall" GridLines="None">
|
<ContentTemplate>
|
||||||
<Columns>
|
<div class="portlet solid grey-cascade portlet-filter">
|
||||||
<asp:BoundField HeaderText="Fecha" DataField="FechaInicio" />
|
<div class="portlet-title portlet-filterT smalltitle magindate">
|
||||||
<asp:BoundField HeaderText="Tema" DataField="Revision" />
|
<div class="tools">
|
||||||
<asp:BoundField HeaderText="Moderador" DataField="UsuarioDe" />
|
<asp:Button ID="BtnConsultar" runat="server" OnClick="BtnConsultar_Click" Text="Consultar" class="btn btn-primary" />
|
||||||
<asp:BoundField HeaderText="Estatus" DataField="EventoEstatus" />
|
</div>
|
||||||
<asp:BoundField HeaderText="Participantes" />
|
<div class="titlefiltros caption ">
|
||||||
<asp:TemplateField>
|
<ul class="list-inline text-size-12">
|
||||||
<ItemTemplate>
|
<li>Fecha Inicio:</li>
|
||||||
<%--<asp:Literal ID="LtlParticipantes" runat="server" Text='<%# Eval("Participantes")%>'></asp:Literal>--%>
|
<li style="margin-right: 30px">
|
||||||
</ItemTemplate>
|
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 100px !important; padding: 0px;">
|
||||||
</asp:TemplateField>
|
<asp:TextBox ID="TxtFechaI" runat="server" CssClass="form-control" Width="99%" CausesValidation="true" MaxLength="10" Height="24px"></asp:TextBox>
|
||||||
<asp:BoundField HeaderText="Hora termino" DataField="FechaFin" DataFormatString="{0:HH:mm}" />
|
<span class="input-group-btn ">
|
||||||
</Columns>
|
<asp:LinkButton ID="ImgFechaI" class="btn default " Text="<i class='fa fa-calendar'></i>" Height="24px" runat="server"></asp:LinkButton>
|
||||||
<AlternatingRowStyle CssClass="TextoAlterno" />
|
</span>
|
||||||
<RowStyle CssClass="Texto" />
|
<ajax:MaskedEditExtender ID="MEEFechaI" runat="server" TargetControlID="TxtFechaI" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||||
</asp:GridView>
|
<ajax:CalendarExtender runat="server" ID="CEFechaI" TargetControlID="TxtFechaI" PopupButtonID="ImgFechaI" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||||
|
<asp:RequiredFieldValidator ID="RFVFechaI" runat="server" ControlToValidate="TxtFechaI" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''FechaI''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||||
|
<asp:CompareValidator ID="CVFechaI" runat="server" ControlToValidate="TxtFechaI" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''FechaI''</b> no tiene el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="GrpGuardar"></asp:CompareValidator>
|
||||||
|
<ajax:ValidatorCalloutExtender ID="VCOFechaI1" runat="server" HighlightCssClass="vco" TargetControlID="RFVFechaI" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||||
|
<ajax:ValidatorCalloutExtender ID="VCOFechaI2" runat="server" HighlightCssClass="vco" TargetControlID="CVFechaI" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
<li>Fecha Fin:</li>
|
||||||
|
<li style="margin-right: 30px">
|
||||||
|
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 100px !important; padding: 0px;">
|
||||||
|
<asp:TextBox ID="TxtFechaF" runat="server" CssClass="form-control" Width="99%" CausesValidation="true" MaxLength="10" Height="24px"></asp:TextBox>
|
||||||
|
<span class="input-group-btn ">
|
||||||
|
<asp:LinkButton ID="ImgFechaF" class="btn default " Text="<i class='fa fa-calendar'></i>" Height="24px" runat="server"></asp:LinkButton>
|
||||||
|
</span>
|
||||||
|
<ajax:MaskedEditExtender ID="MEEFechaF" runat="server" TargetControlID="TxtFechaF" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||||
|
<ajax:CalendarExtender runat="server" ID="CEFechaF" TargetControlID="TxtFechaF" PopupButtonID="ImgFechaF" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||||
|
<asp:RequiredFieldValidator ID="RFVFechaF" runat="server" ControlToValidate="TxtFechaF" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''FechaF''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||||
|
<asp:CompareValidator ID="CVFechaF" runat="server" ControlToValidate="TxtFechaF" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''FechaF''</b> no tiene el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="GrpGuardar"></asp:CompareValidator>
|
||||||
|
<ajax:ValidatorCalloutExtender ID="VCOFechaF1" runat="server" HighlightCssClass="vco" TargetControlID="RFVFechaF" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||||
|
<ajax:ValidatorCalloutExtender ID="VCOFechaF2" runat="server" HighlightCssClass="vco" TargetControlID="CVFechaF" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
<li>Estatus:</li>
|
||||||
|
<li>
|
||||||
|
<asp:DropDownList ID="DdlEventoEstatus" runat="server" AppendDataBoundItems="true" DataTextField="EventoEstatus" DataValueField="CveEventoEstatus" Class="table-group-action-input form-control input-inline input-small input-sm" Style="width: 140px !important;" ValidationGroup="GrpGuardar">
|
||||||
|
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
||||||
|
<asp:ListItem Text="Con Pendientes" Value="0"></asp:ListItem>
|
||||||
|
<asp:ListItem Text="Terminadas" Value="1"></asp:ListItem>
|
||||||
|
</asp:DropDownList>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="portlet-body" id="DivResponsable" style="display: none;">
|
||||||
|
<ul class="list-inline text-size-12">
|
||||||
|
<li>Transportista Encargado/Responsable:</li>
|
||||||
|
<li>
|
||||||
|
<asp:DropDownList ID="DdlResponsable" runat="server" DataTextField="Nombre" DataValueField="CveUsuario" CssClass="form-control input-sm" Style="width: 200px !important;"></asp:DropDownList>
|
||||||
|
</li>
|
||||||
|
<li>Almacen Transitorio:</li>
|
||||||
|
<li>
|
||||||
|
<asp:DropDownList ID="DdlAlmacenTransitorio" runat="server" DataTextField="Almacen" DataValueField="CveAlmacen" CssClass="form-control input-sm" Style="width: 150px !important;"></asp:DropDownList>
|
||||||
|
<%-- <asp:RequiredFieldValidator ID="RFVAlmacenTransitorio" runat="server" ControlToValidate="DdlAlmacenTransitorio" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Almacen Transitorio''</b> es necesario, por favor seleccione uno." InitialValue="-1" ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||||
|
<ajax:ValidatorCalloutExtender ID="VCEAlmacenTransitorio" runat="server" HighlightCssClass="vco" TargetControlID="RFVAlmacenTransitorio" Width="350px"></ajax:ValidatorCalloutExtender>--%>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</ContentTemplate>
|
||||||
|
</asp:UpdatePanel>
|
||||||
|
<asp:GridView ID="GvDatosOIMinutas" Width="100%" runat="server" AutoGenerateColumns="False" EmptyDataText="No se encontraron Registros" ShowHeaderWhenEmpty="true"
|
||||||
|
CssClass="table table-striped table-advance table-hover Widthall" GridLines="None">
|
||||||
|
<Columns>
|
||||||
|
<asp:BoundField HeaderText="Fecha" DataField="FechaInicio" DataFormatString="{0:yyyy/MM/dd HH:mm}" />
|
||||||
|
<asp:TemplateField HeaderText="Asunto">
|
||||||
|
<ItemTemplate>
|
||||||
|
<a href='<%# Eval("CveEvento","/OI/MinutaDetalle.aspx?CveEvento={0}")%>'> <%#Eval("Asunto")%></a>
|
||||||
|
</ItemTemplate>
|
||||||
|
</asp:TemplateField>
|
||||||
|
<asp:BoundField HeaderText="Tema" DataField="Revision" />
|
||||||
|
<asp:BoundField HeaderText="Moderador" DataField="Usuario" />
|
||||||
|
<asp:BoundField HeaderText="Estatus" DataField="EventoEstatus" />
|
||||||
|
<asp:BoundField HeaderText="Participantes" />
|
||||||
|
<asp:TemplateField>
|
||||||
|
<ItemTemplate>
|
||||||
|
<%--<asp:Literal ID="LtlParticipantes" runat="server" Text='<%# Eval("Participantes")%>'></asp:Literal>--%>
|
||||||
|
</ItemTemplate>
|
||||||
|
</asp:TemplateField>
|
||||||
|
<asp:BoundField HeaderText="Hora termino" DataField="FechaFin" DataFormatString="{0:HH:mm}" />
|
||||||
|
</Columns>
|
||||||
|
<AlternatingRowStyle CssClass="TextoAlterno" />
|
||||||
|
<RowStyle CssClass="Texto" />
|
||||||
|
</asp:GridView>
|
||||||
|
|
||||||
</ContentTemplate>
|
</ContentTemplate>
|
||||||
</ajax:TabPanel>
|
</ajax:TabPanel>
|
||||||
</ajax:TabContainer>
|
</ajax:TabContainer>
|
||||||
|
</ContentTemplate>
|
||||||
|
</asp:UpdatePanel>
|
||||||
</asp:Content>
|
</asp:Content>
|
||||||
<asp:Content ID="Content8" ContentPlaceHolderID="JS" runat="Server">
|
<asp:Content ID="Content8" ContentPlaceHolderID="JS" runat="Server">
|
||||||
</asp:Content>
|
</asp:Content>
|
||||||
|
|||||||
@@ -1,14 +1,144 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.Data;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Web;
|
using System.Web;
|
||||||
using System.Web.UI;
|
using System.Web.UI;
|
||||||
using System.Web.UI.WebControls;
|
using System.Web.UI.WebControls;
|
||||||
|
using Extensiones;
|
||||||
|
|
||||||
public partial class OI_RepReuniones : ClsPaginas
|
public partial class OI_RepReuniones : ClsPaginas
|
||||||
{
|
{
|
||||||
protected void Page_Load(object sender, EventArgs e)
|
protected void Page_Load(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
|
if (!Page.IsPostBack)
|
||||||
|
{
|
||||||
|
// ORDEN ASIGNADAS
|
||||||
|
ViewState["Orden"] = "";
|
||||||
|
|
||||||
|
CargaFiltros();
|
||||||
|
CargaDatosOIMinutas();
|
||||||
|
CargaDatosReunion();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
private void CargaFiltros()
|
||||||
|
{
|
||||||
|
TxtFechaI.Text = new DateTime(DateTime.Now.Year, DateTime.Now.Month, 1).ToShortDateString();
|
||||||
|
TxtFechaF.Text = DateTime.Now.ToShortDateString();
|
||||||
|
TxtCFechaInicio.Text = TxtFechaI.Text;
|
||||||
|
TxtCFechaFin.Text = TxtFechaF.Text;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void CargaDatosReunion()
|
||||||
|
{
|
||||||
|
GVConvocatoria.DataSource = new DataTable();
|
||||||
|
using (ClsOIEventos ObjProspectos = new ClsOIEventos())
|
||||||
|
{
|
||||||
|
DateTime FechaI, FechaF;
|
||||||
|
FechaI = TxtCFechaInicio.Text.ToDate();
|
||||||
|
FechaF = TxtCFechaFin.Text.ToDate();
|
||||||
|
|
||||||
|
if (ObjProspectos.GetRepEventos(-1, 11, -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))
|
||||||
|
{ GVConvocatoria.DataSource = ObjProspectos.DtResultados.FiltraParametros("","FechaInicio DESC"); }
|
||||||
|
}
|
||||||
|
|
||||||
|
GVConvocatoria.DataBind();
|
||||||
|
UpContenido.Update();
|
||||||
|
}
|
||||||
|
public void CargaDatosOIMinutas()
|
||||||
|
{
|
||||||
|
using (ClsOIEventos ObjProspectos = new ClsOIEventos())
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
|
DateTime FechaI, FechaF;
|
||||||
|
int CveEventoEstatus;
|
||||||
|
FechaI = TxtFechaI.Text.ToDate();
|
||||||
|
FechaF = TxtFechaF.Text.ToDate();
|
||||||
|
if (DdlEventoEstatus.SelectedValue.ToEntero() > 0)
|
||||||
|
CveEventoEstatus = DdlEventoEstatus.SelectedValue.ToEntero();
|
||||||
|
else
|
||||||
|
CveEventoEstatus = -1;
|
||||||
|
|
||||||
|
if (ObjProspectos.GetRepEventos(-1, 5, -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))
|
||||||
|
ViewState["DTOIMinutas"] = ObjProspectos.DtResultados;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
if (ViewState["Orden"].ToString() != string.Empty) { CargaGridOIMinutas(ViewState["Orden"].ToString()); }
|
||||||
|
else { CargaGridOIMinutas(""); }
|
||||||
|
|
||||||
|
UpContenido.Update();
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void GvDatosOIMinutas_RowDataBound(object sender, System.Web.UI.WebControls.GridViewRowEventArgs e)
|
||||||
|
{
|
||||||
|
if (e.Row.RowType == DataControlRowType.DataRow)
|
||||||
|
{
|
||||||
|
// e.Row.Cells(0).Width = Unit.Pixel(100) 'FechaInicio
|
||||||
|
// e.Row.Cells(1).Width = Unit.Pixel(200) 'Asunto
|
||||||
|
// e.Row.Cells(2).Width = Unit.Pixel(550) 'Descripcion
|
||||||
|
// e.Row.Cells(3).Width = Unit.Pixel(70) 'TareasTotal
|
||||||
|
|
||||||
|
//e.Row.FCLiteral("LtlFechaInicio").Text = string.Format("<a class=\"Texto\" href=\"/OI/MinutaDetalle.aspx?CveEvento={0}\">{1}</a>", e.Row.DBCampo("CveEvento"), e.Row.DBCampo("FechaInicio").ToDateTime().ToString("dd/MM/yyyy"));
|
||||||
|
//e.Row.FCLiteral("LtlAsunto").Text = string.Format("<a class=\"Texto\" href=\"/OI/MinutaDetalle.aspx?CveEvento={0}\">{1}</a>", e.Row.DBCampo("CveEvento"), e.Row.DBCampo("Asunto"));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//protected void LbOrden_Click(object sender, EventArgs e)
|
||||||
|
//{
|
||||||
|
// string Orden = "";
|
||||||
|
// string Campo = "";
|
||||||
|
// Literal Literal = null/* TODO Change to default(_) if this is not a reference type */;
|
||||||
|
// const string OrdenInicial = "";
|
||||||
|
// string[] Arg = new string[3];
|
||||||
|
|
||||||
|
// Arg = (LinkButton)sender.CommandArgument().ToString.Split(';');
|
||||||
|
// Campo = Arg[0];
|
||||||
|
// Literal = (Literal)(LinkButton)sender.NamingContainer.FindControl("Img" + Campo.Replace(",", "_"));
|
||||||
|
|
||||||
|
// if (ViewState(string.Format("O{0}", Campo)) != null && ViewState(string.Format("O{0}", Campo)).ToString == string.Format("{0} DESC", Campo))
|
||||||
|
// {
|
||||||
|
// ViewState(string.Format("O{0}", Campo)) = string.Format("{0} ASC", Campo);
|
||||||
|
// Literal.Text = string.Format("<i class='fa fa-sort-asc' style='color:#999' ></i>");
|
||||||
|
// }
|
||||||
|
// else
|
||||||
|
// {
|
||||||
|
// ViewState(string.Format("O{0}", Campo)) = string.Format("{0} DESC", Campo);
|
||||||
|
// Literal.Text = string.Format("<i class='fa fa-sort-desc' style='color:#999' ></i>");
|
||||||
|
// }
|
||||||
|
// Orden = OrdenInicial + ViewState(string.Format("O{0}", Campo)).ToString;
|
||||||
|
// ViewState("Orden") = Orden;
|
||||||
|
// CargaGridOIMinutas(Orden);
|
||||||
|
//}
|
||||||
|
|
||||||
|
private void CargaGridOIMinutas(string Orden)
|
||||||
|
{
|
||||||
|
if (Orden != string.Empty)
|
||||||
|
{
|
||||||
|
DataView DV = new DataView((DataTable)ViewState["DTOIMinutas"], "", Orden, DataViewRowState.CurrentRows);
|
||||||
|
GvDatosOIMinutas.DataSource = DV.ToTable();
|
||||||
|
DV.Dispose();
|
||||||
|
}
|
||||||
|
else { GvDatosOIMinutas.DataSource = (DataTable)ViewState["DTOIMinutas"]; }
|
||||||
|
GvDatosOIMinutas.DataBind();
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void BtnConsultar_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
CargaDatosOIMinutas();
|
||||||
|
UpContenido.Update();
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void Button1_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
CargaDatosReunion();
|
||||||
|
UpContenido.Update();
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user