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()
|
||||
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("/", "\")
|
||||
If Not RutaReporte.ToUpper().StartsWith(bdir.ToUpper()) Then
|
||||
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")}"
|
||||
|
||||
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
|
||||
'Alert("No hay permisos para guardar en el Log.", Extensiones.TipoMensaje.MsgError)
|
||||
Exit Sub
|
||||
@@ -185,7 +185,7 @@ Namespace Extensiones
|
||||
Dim strLineaTMP As String
|
||||
strLineaTMP = String.Format("{0} {1}:{2} {3} {0}", Chr(13), DateTime.Now.ToShortDateString, DateTime.Now.ToShortTimeString, pTexto)
|
||||
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
|
||||
Exit Sub
|
||||
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 = String.Format("{0}{1} .. PAC: {2} - Modulo: {3} ..{4}:{5}", Chr(13), Chr(10), CvePAC, Modulo, Str, DateTime.Now.ToShortDateString, DateTime.Now.ToShortTimeString)
|
||||
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
|
||||
'Alert("No hay permisos para guardar en el Log.", Extensiones.TipoMensaje.MsgError)
|
||||
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)
|
||||
|
||||
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
|
||||
Exit Sub
|
||||
End Try
|
||||
@@ -1962,7 +1962,7 @@ Namespace Extensiones
|
||||
RecursivoLimpiaControlesExcel(GridView.Controls)
|
||||
|
||||
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> ")
|
||||
|
||||
page.EnableEventValidation = False
|
||||
@@ -2002,7 +2002,7 @@ Namespace Extensiones
|
||||
Dim Form As HtmlForm = New HtmlForm()
|
||||
|
||||
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> ")
|
||||
RecursivoLimpiaControlesExcel(GridView.Controls)
|
||||
|
||||
@@ -2183,16 +2183,15 @@ Namespace Extensiones
|
||||
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 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)
|
||||
Using webClient As New Net.WebClient()
|
||||
Dim imageBytes = webClient.DownloadData(logouri)
|
||||
Dim stream As New MemoryStream(imageBytes)
|
||||
worksheet.Pictures.Add(stream, ExcelPictureFormat.Png, "A1", AnchoImagen, AlturaImagen, LengthUnit.Pixel)
|
||||
'worksheet.Pictures.Add(stream, GemBox.Spreadsheet.ExcelPictureFormat.Png, "A1", AnchoImagen, AlturaImagen, GemBox.Document.LengthUnit.Pixel)
|
||||
End Using
|
||||
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
|
||||
|
||||
@@ -2210,7 +2209,7 @@ Namespace Extensiones
|
||||
|
||||
Dim style As StringBuilder = New StringBuilder()
|
||||
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> ")
|
||||
'To Export all pages
|
||||
'Gv.AllowPaging = False
|
||||
@@ -3182,7 +3181,7 @@ Namespace Extensiones
|
||||
Public Property descripcion As String
|
||||
Public ReadOnly Property Extencion As String
|
||||
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 Property
|
||||
Public ReadOnly Property filenameO As String
|
||||
@@ -3192,7 +3191,7 @@ Namespace Extensiones
|
||||
End Property
|
||||
Public ReadOnly Property FileUrl As String
|
||||
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 Property
|
||||
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
|
||||
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
|
||||
|
||||
If CveIEDeposito > 0 Then
|
||||
|
||||
@@ -186,9 +186,10 @@ Partial Class PopUpVerFactura
|
||||
|
||||
If Request("REPORTE") IsNot Nothing Then
|
||||
CType(Session("DTPDF"), HtmlTable).ExportToPDF("Reporte")
|
||||
End If
|
||||
|
||||
'OPCIONES
|
||||
End If
|
||||
|
||||
'OPCIONES
|
||||
|
||||
If Request("P") IsNot Nothing AndAlso Decripta((Request("P").ToString)) <> "" Then
|
||||
Dim UrlParametros As Hashtable = Parametros(Decripta((Request("P").ToString)))
|
||||
If UrlParametros("OP") IsNot Nothing AndAlso UrlParametros("OP").ToString <> "" Then
|
||||
@@ -235,10 +236,16 @@ Partial Class PopUpVerFactura
|
||||
UsuarioToken.Empresa = ObjEmpresa.Empresa
|
||||
End If
|
||||
ObjEmpresa.Dispose()
|
||||
End Sub
|
||||
End Sub
|
||||
#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
|
||||
If UrlParametros("OP").ToString = "Fact" Then
|
||||
DescargaFactura(UrlParametros)
|
||||
@@ -518,11 +525,30 @@ Partial Class PopUpVerFactura
|
||||
ImprimirPDF("Empresas/Grales/Formatos/RepCortes.rdlc", lrds, params, "ReporteCortes", Formato)
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
#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)
|
||||
If Parametros("CVEFACTURA") IsNot Nothing AndAlso Parametros("CVEFACTURA").ToString.ToEntero > 0 Then
|
||||
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 ddlProducto2.SelectedValue.ToEntero > 0 Then StrFiltro.AppendFormat(" Producto/Servicio: {0},", ddlProducto2.SelectedText)
|
||||
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
|
||||
Alert("Debe consultar para generar un excel", TipoMensaje.MsgAdvertencia)
|
||||
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
|
||||
Public Overrides Sub VerifyRenderingInServerForm(ByVal control As Control)
|
||||
End Sub
|
||||
|
||||
@@ -185,7 +185,7 @@ public partial class OI_CircularDetalleB : ClsPaginas
|
||||
{
|
||||
Filename = fileItem.filename;
|
||||
}
|
||||
catch (Exception )
|
||||
catch (Exception ex)
|
||||
{
|
||||
ModExtensiones.OnError(this, "Ocurrió un error al obtener al archivo", ex);
|
||||
Filename = "-1";
|
||||
|
||||
@@ -14,6 +14,7 @@ public partial class OI_ConvocatoriaDetalle : ClsPaginas
|
||||
public const string iddivAgregarTema = "divModalAgregartema";
|
||||
public const string iddivAgregarMiembros = "iddivAgregarMiembros";
|
||||
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 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; } }
|
||||
@@ -29,8 +30,13 @@ public partial class OI_ConvocatoriaDetalle : ClsPaginas
|
||||
cargaUsuarios();
|
||||
|
||||
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)
|
||||
{
|
||||
@@ -349,7 +355,7 @@ public partial class OI_ConvocatoriaDetalle : ClsPaginas
|
||||
using (ClsOIEventos objOI = new ClsOIEventos())
|
||||
{
|
||||
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;
|
||||
Folio = objOI.Folio;
|
||||
|
||||
@@ -766,7 +766,12 @@ public partial class OI_MinutaDetalle : ClsPaginas
|
||||
|
||||
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();
|
||||
}
|
||||
else
|
||||
@@ -1160,93 +1165,93 @@ public partial class OI_MinutaDetalle : ClsPaginas
|
||||
{
|
||||
cargarAgenda();
|
||||
}
|
||||
|
||||
bool agendar = false;
|
||||
protected void BtnTerminarYAgendar_Click(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
|
||||
|
||||
string errorMessage = "";
|
||||
//string errorMessage = "";
|
||||
|
||||
|
||||
int cveUsuarioDe = UsuarioActual.CveUsuario;
|
||||
List<int> listaCCP = new List<int>();
|
||||
//int cveUsuarioPara = CveUsuarioPara;
|
||||
//int cveUsuarioDe = UsuarioActual.CveUsuario;
|
||||
//List<int> listaCCP = new List<int>();
|
||||
////int cveUsuarioPara = CveUsuarioPara;
|
||||
|
||||
OITipoEventos cveTipoEvento = OITipoEventos.Agenda;
|
||||
string asunto = TxtAgendaAsunto.Text;
|
||||
string descripcion = string.Format("siguiente reunión Minuta \"{0}\"", TxtAsunto.Text);
|
||||
int prioridad = 1;
|
||||
int cveAgendaTipo = 4;
|
||||
string fechaInicio = "";
|
||||
string fechaFin = "1900/01/01 00:00";
|
||||
if (txtFechaI.Text.ToDateTimeExcat().Year <= 1999)
|
||||
{
|
||||
if (txtFechaI.Text.ToDateTimeExcat("dd/MM/yyyy").Year <= 1999)
|
||||
{
|
||||
errorMessage = "No se ingresó una fecha de inicio valida";
|
||||
//OITipoEventos cveTipoEvento = OITipoEventos.Agenda;
|
||||
//string asunto = TxtAgendaAsunto.Text;
|
||||
//string descripcion = string.Format("siguiente reunión Minuta \"{0}\"", TxtAsunto.Text);
|
||||
//int prioridad = 1;
|
||||
//int cveAgendaTipo = 4;
|
||||
//string fechaInicio = "";
|
||||
//string fechaFin = "1900/01/01 00:00";
|
||||
//if (txtFechaI.Text.ToDateTimeExcat().Year <= 1999)
|
||||
//{
|
||||
// if (txtFechaI.Text.ToDateTimeExcat("dd/MM/yyyy").Year <= 1999)
|
||||
// {
|
||||
// errorMessage = "No se ingresó una fecha de inicio valida";
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
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");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
fechaInicio = txtFechaI.Text.ToDateTimeExcat().ToString("yyyy/MM/dd HH:mm");
|
||||
fechaFin = txtFechaI.Text.ToDateTimeExcat().AddHours(2).ToString("yyyy/MM/dd HH:mm");
|
||||
}
|
||||
int cveRevision = -1;
|
||||
string archivoname = "";
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// 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");
|
||||
// }
|
||||
//}
|
||||
//else
|
||||
//{
|
||||
// fechaInicio = txtFechaI.Text.ToDateTimeExcat().ToString("yyyy/MM/dd HH:mm");
|
||||
// fechaFin = txtFechaI.Text.ToDateTimeExcat().AddHours(2).ToString("yyyy/MM/dd HH:mm");
|
||||
//}
|
||||
//int cveRevision = -1;
|
||||
//string archivoname = "";
|
||||
|
||||
|
||||
|
||||
int cveUsuarioIng = UsuarioActual.CveUsuario;
|
||||
int cveEmpresa = UsuarioActual.CveEmpresa;
|
||||
bool Continuar = true;
|
||||
int Folio = -1;
|
||||
int CveEvento = -1;
|
||||
//int cveUsuarioIng = UsuarioActual.CveUsuario;
|
||||
//int cveEmpresa = UsuarioActual.CveEmpresa;
|
||||
//bool Continuar = true;
|
||||
//int Folio = -1;
|
||||
//int CveEvento = -1;
|
||||
|
||||
if (errorMessage.Length == 0)
|
||||
{
|
||||
//if (errorMessage.Length == 0)
|
||||
//{
|
||||
|
||||
List<string> chkList = new List<string>();
|
||||
using (ClsOIEventos objOI = new ClsOIEventos())
|
||||
{
|
||||
objOI.IniciaTransacSQL();
|
||||
foreach (var cveUsuarioPara in LCveUsuarioCCP)
|
||||
{
|
||||
if (Continuar)
|
||||
{
|
||||
Continuar = objOI.AddOI_Eventos2(cveTipoEvento, asunto, descripcion, prioridad, cveUsuarioDe, cveUsuarioPara, fechaInicio, fechaFin, cveRevision, archivoname, listaCCP, chkList, cveUsuarioIng, cveEmpresa, RCveEvento, null, cveAgendaTipo);
|
||||
CveEvento = objOI.CveEvento;
|
||||
Folio = objOI.Folio;
|
||||
if (CveEvento == 0)
|
||||
{
|
||||
Continuar = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (Continuar)
|
||||
{
|
||||
objOI.Commit();
|
||||
// List<string> chkList = new List<string>();
|
||||
// using (ClsOIEventos objOI = new ClsOIEventos())
|
||||
// {
|
||||
// objOI.IniciaTransacSQL();
|
||||
// foreach (var cveUsuarioPara in LCveUsuarioCCP)
|
||||
// {
|
||||
// if (Continuar)
|
||||
// {
|
||||
// Continuar = objOI.AddOI_Eventos2(cveTipoEvento, asunto, descripcion, prioridad, cveUsuarioDe, cveUsuarioPara, fechaInicio, fechaFin, cveRevision, archivoname, listaCCP, chkList, cveUsuarioIng, cveEmpresa, RCveEvento, null, cveAgendaTipo);
|
||||
// CveEvento = objOI.CveEvento;
|
||||
// Folio = objOI.Folio;
|
||||
// if (CveEvento == 0)
|
||||
// {
|
||||
// Continuar = false;
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// if (Continuar)
|
||||
// {
|
||||
// objOI.Commit();
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
objOI.RollBack();
|
||||
Continuar = false;
|
||||
}
|
||||
}
|
||||
if (Continuar && CveEvento > 0)
|
||||
{
|
||||
|
||||
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));
|
||||
}
|
||||
}
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// objOI.RollBack();
|
||||
// Continuar = false;
|
||||
// }
|
||||
// }
|
||||
//if (Continuar && CveEvento > 0)
|
||||
//{
|
||||
agendar = true;
|
||||
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));
|
||||
// }
|
||||
//}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -20,58 +20,186 @@
|
||||
</asp:Content>
|
||||
<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">
|
||||
<HeaderTemplate>
|
||||
</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">
|
||||
<Columns>
|
||||
<asp:BoundField HeaderText="Fecha" DataField="FechaInicio" />
|
||||
<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>
|
||||
</HeaderTemplate>
|
||||
<ContentTemplate>
|
||||
<ajax:TabPanel ID="TabReuniones" runat="server">
|
||||
<HeaderTemplate>
|
||||
Reuniones
|
||||
</HeaderTemplate>
|
||||
<ContentTemplate>
|
||||
|
||||
<asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="portlet solid grey-cascade portlet-filter">
|
||||
<div class="portlet-title portlet-filterT smalltitle magindate">
|
||||
<div class="tools">
|
||||
<asp:Button ID="Button1" runat="server" Text="Consultar" OnClick="Button1_Click" class="btn btn-primary" />
|
||||
</div>
|
||||
<div class="titlefiltros caption ">
|
||||
<ul class="list-inline text-size-12">
|
||||
<li>Fecha Inicio:</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="TxtCFechaInicio" runat="server" CssClass="form-control" Width="99%" CausesValidation="true" MaxLength="10" Height="24px"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="LnkFechaInicio" class="btn default " Text="<i class='fa fa-calendar'></i>" Height="24px" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
<ajax:MaskedEditExtender ID="MEETxtCFechaInicio" runat="server" TargetControlID="TxtCFechaInicio" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender runat="server" ID="CEETxtCFechaInicio" TargetControlID="TxtCFechaInicio" PopupButtonID="LnkFechaInicio" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
<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>
|
||||
<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>
|
||||
<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"
|
||||
CssClass="table table-striped table-advance table-hover Widthall" GridLines="None">
|
||||
<Columns>
|
||||
<asp:BoundField HeaderText="Fecha" DataField="FechaInicio" />
|
||||
<asp:BoundField HeaderText="Tema" DataField="Revision" />
|
||||
<asp:BoundField HeaderText="Moderador" DataField="UsuarioDe" />
|
||||
<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>
|
||||
<asp:UpdatePanel ID="UPFiltros" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="portlet solid grey-cascade portlet-filter">
|
||||
<div class="portlet-title portlet-filterT smalltitle magindate">
|
||||
<div class="tools">
|
||||
<asp:Button ID="BtnConsultar" runat="server" OnClick="BtnConsultar_Click" Text="Consultar" class="btn btn-primary" />
|
||||
</div>
|
||||
<div class="titlefiltros caption ">
|
||||
<ul class="list-inline text-size-12">
|
||||
<li>Fecha Inicio:</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="TxtFechaI" runat="server" CssClass="form-control" Width="99%" CausesValidation="true" MaxLength="10" Height="24px"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="ImgFechaI" class="btn default " Text="<i class='fa fa-calendar'></i>" Height="24px" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
<ajax:MaskedEditExtender ID="MEEFechaI" runat="server" TargetControlID="TxtFechaI" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<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>
|
||||
</ajax:TabPanel>
|
||||
</ajax:TabContainer>
|
||||
</ContentTemplate>
|
||||
</ajax:TabPanel>
|
||||
</ajax:TabContainer>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content8" ContentPlaceHolderID="JS" runat="Server">
|
||||
</asp:Content>
|
||||
|
||||
@@ -1,14 +1,144 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
using Extensiones;
|
||||
|
||||
public partial class OI_RepReuniones : ClsPaginas
|
||||
{
|
||||
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