Autoposback false y cambios visuales para paqute egresos
This commit is contained in:
@@ -33,12 +33,12 @@
|
|||||||
<div class="row">
|
<div class="row">
|
||||||
<label class="col-md-1">Ejercicio: </label>
|
<label class="col-md-1">Ejercicio: </label>
|
||||||
<div class="col-md-2">
|
<div class="col-md-2">
|
||||||
<asp:DropDownList ID="DdlEjercicio" runat="server" CssClass="form-control input-sm" DataTextField="Ejercicio" DataValueField="Ejercicio" AutoPostBack="true"></asp:DropDownList>
|
<asp:DropDownList ID="DdlEjercicio" runat="server" CssClass="form-control input-sm" DataTextField="Ejercicio" DataValueField="Ejercicio" AutoPostBack="false"></asp:DropDownList>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<label class="col-md-1">Periodo: </label>
|
<label class="col-md-1">Periodo: </label>
|
||||||
<div class="col-md-2">
|
<div class="col-md-2">
|
||||||
<asp:DropDownList ID="DdlPeriodo" runat="server" CssClass="form-control input-sm" AutoPostBack="true">
|
<asp:DropDownList ID="DdlPeriodo" runat="server" CssClass="form-control input-sm" AutoPostBack="false">
|
||||||
<asp:ListItem Text="Enero" Value="1"></asp:ListItem>
|
<asp:ListItem Text="Enero" Value="1"></asp:ListItem>
|
||||||
<asp:ListItem Text="Febrero" Value="2"></asp:ListItem>
|
<asp:ListItem Text="Febrero" Value="2"></asp:ListItem>
|
||||||
<asp:ListItem Text="Marzo" Value="3"></asp:ListItem>
|
<asp:ListItem Text="Marzo" Value="3"></asp:ListItem>
|
||||||
@@ -56,7 +56,7 @@
|
|||||||
|
|
||||||
<label class="col-md-1">Tipo Póliza: </label>
|
<label class="col-md-1">Tipo Póliza: </label>
|
||||||
<div class="col-md-1">
|
<div class="col-md-1">
|
||||||
<asp:DropDownList ID="DdlTipoPoliza" runat="server" CssClass="form-control input-sm" DataTextField="Ejercicio" DataValueField="Ejercicio" AutoPostBack="true">
|
<asp:DropDownList ID="DdlTipoPoliza" runat="server" CssClass="form-control input-sm" DataTextField="Ejercicio" DataValueField="Ejercicio" AutoPostBack="false">
|
||||||
<asp:ListItem Text="Todas" Value="-1"></asp:ListItem>
|
<asp:ListItem Text="Todas" Value="-1"></asp:ListItem>
|
||||||
<asp:ListItem Text="Ingresos" Value="1"></asp:ListItem>
|
<asp:ListItem Text="Ingresos" Value="1"></asp:ListItem>
|
||||||
<asp:ListItem Text="Egresos" Value="2"></asp:ListItem>
|
<asp:ListItem Text="Egresos" Value="2"></asp:ListItem>
|
||||||
|
|||||||
@@ -189,7 +189,14 @@ Partial Class ContabilidadC_RegPrePoliza
|
|||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
Public Property TipoPoliza As String
|
||||||
|
Get
|
||||||
|
Return CType(ViewState("TipoPoliza"), String)
|
||||||
|
End Get
|
||||||
|
Set(value As String)
|
||||||
|
ViewState("TipoPoliza") = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
|
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||||
@@ -441,6 +448,9 @@ Partial Class ContabilidadC_RegPrePoliza
|
|||||||
TxtFechaDocumento.Text = dr("Fecha")
|
TxtFechaDocumento.Text = dr("Fecha")
|
||||||
TxtConcepto.Text = dr("Concepto")
|
TxtConcepto.Text = dr("Concepto")
|
||||||
DivDatosPoliza.Visible = True
|
DivDatosPoliza.Visible = True
|
||||||
|
TipoPoliza = DdlTipoPoliza.SelectedItem.Text
|
||||||
|
Folio = dr("FolioPoliza").ToString
|
||||||
|
|
||||||
|
|
||||||
If UsuarioActual.CveRol = 1 OrElse UsuarioActual.TienePermisoProceso(221) Then
|
If UsuarioActual.CveRol = 1 OrElse UsuarioActual.TienePermisoProceso(221) Then
|
||||||
DivAgregarConceptos.Visible = True
|
DivAgregarConceptos.Visible = True
|
||||||
@@ -538,7 +548,6 @@ Partial Class ContabilidadC_RegPrePoliza
|
|||||||
LnkImprimirPDF.Visible = True
|
LnkImprimirPDF.Visible = True
|
||||||
LnkComprobante.Visible = True
|
LnkComprobante.Visible = True
|
||||||
CveIE = e.Row.DBCampo("CveIE").ToString.ToEntero
|
CveIE = e.Row.DBCampo("CveIE").ToString.ToEntero
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
'e.Row.FCHyperLink("HlReferencia").NavigateUrl = CveConceptoContable
|
'e.Row.FCHyperLink("HlReferencia").NavigateUrl = CveConceptoContable
|
||||||
@@ -840,6 +849,8 @@ Partial Class ContabilidadC_RegPrePoliza
|
|||||||
dr("MultipleSubProyecto") = drt("MultipleSubProyecto")
|
dr("MultipleSubProyecto") = drt("MultipleSubProyecto")
|
||||||
dr("PorcentajeImpuesto") = drt("PorcentajeImpuesto")
|
dr("PorcentajeImpuesto") = drt("PorcentajeImpuesto")
|
||||||
dr("CveCuenta") = drt("CveCuenta")
|
dr("CveCuenta") = drt("CveCuenta")
|
||||||
|
dr("FolioPoliza") = drt("FolioPoliza")
|
||||||
|
|
||||||
DtMovimientos.Rows.Add(dr)
|
DtMovimientos.Rows.Add(dr)
|
||||||
|
|
||||||
|
|
||||||
@@ -1804,7 +1815,7 @@ Partial Class ContabilidadC_RegPrePoliza
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
If Row("CveConceptoContable").ToString.ToEntero.Contiene(17, 309, 312) Then
|
If Row("CveConceptoContable").ToString.ToEntero.Contiene(17, 309, 312, 308) Then
|
||||||
If ObjCompra.GetCompras(Row("CveCompra").ToString.ToEntero, "-1", "-1", -1, -1, UsuarioActual.CveEmpresa) Then
|
If ObjCompra.GetCompras(Row("CveCompra").ToString.ToEntero, "-1", "-1", -1, -1, UsuarioActual.CveEmpresa) Then
|
||||||
If ObjCompra.DtResultados IsNot Nothing AndAlso ObjCompra.DtResultados.Rows.Count > 0 Then
|
If ObjCompra.DtResultados IsNot Nothing AndAlso ObjCompra.DtResultados.Rows.Count > 0 Then
|
||||||
Dim dr As DataRow = ObjCompra.DtResultados.Rows(0)
|
Dim dr As DataRow = ObjCompra.DtResultados.Rows(0)
|
||||||
@@ -1864,7 +1875,7 @@ Partial Class ContabilidadC_RegPrePoliza
|
|||||||
Dim ruta As String = ""
|
Dim ruta As String = ""
|
||||||
|
|
||||||
params.Add(New ReportParameter("Empresa", UsuarioActual.Empresa.Empresa))
|
params.Add(New ReportParameter("Empresa", UsuarioActual.Empresa.Empresa))
|
||||||
params.Add(New ReportParameter("TipoPoliza", dr("CveTipoPoliza").ToString))
|
params.Add(New ReportParameter("TipoPoliza", dr("TipoPoliza").ToString))
|
||||||
params.Add(New ReportParameter("Finicio", dr("Fecha").ToString.ToDate.ToShortDateString))
|
params.Add(New ReportParameter("Finicio", dr("Fecha").ToString.ToDate.ToShortDateString))
|
||||||
params.Add(New ReportParameter("FFin", dr("Fecha").ToString.ToDate.ToShortDateString))
|
params.Add(New ReportParameter("FFin", dr("Fecha").ToString.ToDate.ToShortDateString))
|
||||||
params.Add(New ReportParameter("Fecha", dr("Fecha").ToString.ToDate.ToShortDateString))
|
params.Add(New ReportParameter("Fecha", dr("Fecha").ToString.ToDate.ToShortDateString))
|
||||||
@@ -1920,7 +1931,7 @@ Partial Class ContabilidadC_RegPrePoliza
|
|||||||
reader = New iTextSharp.text.pdf.PdfReader(fileName)
|
reader = New iTextSharp.text.pdf.PdfReader(fileName)
|
||||||
pageCount = reader.NumberOfPages
|
pageCount = reader.NumberOfPages
|
||||||
pdfDoc = New iTextSharp.text.Document(reader.GetPageSizeWithRotation(1), 18, 18, 18, 18)
|
pdfDoc = New iTextSharp.text.Document(reader.GetPageSizeWithRotation(1), 18, 18, 18, 18)
|
||||||
writer = PdfWriter.GetInstance(pdfDoc, New FileStream(String.Format("{0}\{1}\Salida.pdf", AppDomain.CurrentDomain.BaseDirectory, Tick), FileMode.Create))
|
writer = PdfWriter.GetInstance(pdfDoc, New FileStream(String.Format("{0}\{1}\{2}-{3}.pdf", AppDomain.CurrentDomain.BaseDirectory, Tick, TipoPoliza, Folio), FileMode.Create))
|
||||||
|
|
||||||
With pdfDoc
|
With pdfDoc
|
||||||
.Open()
|
.Open()
|
||||||
@@ -1953,7 +1964,7 @@ Partial Class ContabilidadC_RegPrePoliza
|
|||||||
|
|
||||||
pdfDoc.Close()
|
pdfDoc.Close()
|
||||||
|
|
||||||
Dim Archivo As New System.IO.FileInfo(String.Format("{0}\{1}\Salida.pdf", AppDomain.CurrentDomain.BaseDirectory, Tick))
|
Dim Archivo As New System.IO.FileInfo(String.Format("{0}\{1}\{2}-{3}.pdf", AppDomain.CurrentDomain.BaseDirectory, Tick, TipoPoliza, Folio))
|
||||||
|
|
||||||
If Archivo.Exists Then
|
If Archivo.Exists Then
|
||||||
HttpContext.Current.Response.Clear()
|
HttpContext.Current.Response.Clear()
|
||||||
@@ -1961,7 +1972,7 @@ Partial Class ContabilidadC_RegPrePoliza
|
|||||||
HttpContext.Current.Response.ContentType = "application/octet-stream"
|
HttpContext.Current.Response.ContentType = "application/octet-stream"
|
||||||
HttpContext.Current.Response.AppendHeader("Content-disposition", String.Format("attachment; filename={0}", Archivo.Name))
|
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.AddHeader("Content-Length", Archivo.Length.ToString())
|
||||||
HttpContext.Current.Response.TransmitFile(String.Format("{0}\{1}\Salida.pdf", AppDomain.CurrentDomain.BaseDirectory, Tick))
|
HttpContext.Current.Response.TransmitFile(String.Format("{0}\{1}\{2}-{3}.pdf", AppDomain.CurrentDomain.BaseDirectory, Tick, TipoPoliza, Folio))
|
||||||
Response.Flush() ' send it to the client to download
|
Response.Flush() ' send it to the client to download
|
||||||
HttpContext.Current.Response.SuppressContent = True
|
HttpContext.Current.Response.SuppressContent = True
|
||||||
HttpContext.Current.ApplicationInstance.CompleteRequest()
|
HttpContext.Current.ApplicationInstance.CompleteRequest()
|
||||||
|
|||||||
Reference in New Issue
Block a user