Commit inicial Ventas Productivo
This commit is contained in:
152
AC/CatClasificacionAdministrativa.aspx
Normal file
152
AC/CatClasificacionAdministrativa.aspx
Normal file
@@ -0,0 +1,152 @@
|
||||
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="CatClasificacionAdministrativa.aspx.vb" Inherits="AC_CatClasificacionAdministrativa" %>
|
||||
|
||||
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
|
||||
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="HB" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="E" runat="Server">
|
||||
Catálogo de Clasificaciones Administrativas
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
|
||||
<asp:UpdatePanel ID="UpTitulos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<table class="table table-striped table-advance table-hover">
|
||||
<thead>
|
||||
<tr class="Titulos">
|
||||
<th width="100px" style="text-align: center">
|
||||
<asp:LinkButton ID="LbClave" runat="server" CausesValidation="false" Text="" CommandArgument="Clave;0" OnClick="LbOrden_Click">
|
||||
Clave
|
||||
<asp:Literal ID="ImgClave" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
||||
</asp:LinkButton>
|
||||
</th>
|
||||
<th width="250px" style="text-align: center">
|
||||
<asp:LinkButton ID="LbClasificacionAdministrativa" runat="server" CausesValidation="false" Text="" CommandArgument="ClasificacionAdministrativa;0" OnClick="LbOrden_Click">
|
||||
Clasif. Adm.
|
||||
<asp:Literal ID="ImgClasificacionAdministrativa" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
||||
</asp:LinkButton>
|
||||
</th>
|
||||
<th width="100px" style="text-align: center">
|
||||
<asp:LinkButton ID="LbEstatus" runat="server" CausesValidation="false" Text="" CommandArgument="Estatus;0" OnClick="LbOrden_Click">
|
||||
Estatus
|
||||
<asp:Literal ID="ImgEstatus" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
||||
</asp:LinkButton>
|
||||
</th>
|
||||
<th width="100px" style="text-align: center">
|
||||
<asp:LinkButton ID="LbFechaIng" runat="server" CausesValidation="false" Text="" CommandArgument="FechaIng;0" OnClick="LbOrden_Click">
|
||||
Fecha
|
||||
<asp:Literal ID="ImgFechaIng" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
||||
</asp:LinkButton>
|
||||
</th>
|
||||
<th width="100px" style="text-align: center">
|
||||
<asp:LinkButton ID="LbUsuario" runat="server" CausesValidation="false" Text="" CommandArgument="Usuario;0" OnClick="LbOrden_Click">
|
||||
Usuario
|
||||
<asp:Literal ID="ImgUsuario" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
||||
</asp:LinkButton>
|
||||
</th>
|
||||
<th width="103" style="text-align: center">Comandos</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tr>
|
||||
<td>
|
||||
<asp:TextBox ID="TxtClave" runat="server" CausesValidation="true" MaxLength="5" ValidationGroup="GrpGuardar" Width="95px"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVClave" runat="server" ControlToValidate="TxtClave" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Clave''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCClave" runat="server" HighlightCssClass="vco" TargetControlID="RFVClave" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</td>
|
||||
<td>
|
||||
<asp:TextBox ID="TxtClasificacionAdministrativa" runat="server" CausesValidation="true" MaxLength="100" ValidationGroup="GrpGuardar" Width="244px"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVClasificacionAdministrativa" runat="server" ControlToValidate="TxtClasificacionAdministrativa" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Código''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCClasificacionAdministrativa" runat="server" HighlightCssClass="vco" TargetControlID="RFVClasificacionAdministrativa" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td style="text-align: center">
|
||||
<asp:LinkButton ID="LbAgregar" runat="server" CausesValidation="true" CssClass="Texto" Text="Agregar" ValidationGroup="GrpGuardar"></asp:LinkButton></td>
|
||||
</tr>
|
||||
</table>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" DataKeyNames="CveClasificacionAdministrativa" EmptyDataText="No se encontraron Clasificacies Administrativas Registradas" ToolTip="Listado de Clasificaciones Administrativas" CssClass="table table-striped table-advance table-hover" Style="margin-top: -10px;" GridLines="None" >
|
||||
<Columns>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlClave" runat="server" Text='<%# Eval("Clave", "{0}")%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<EditItemTemplate>
|
||||
<asp:TextBox ID="TxtClave" runat="server" CausesValidation="true" MaxLength="5" Text='<%# Eval("Clave")%>' ValidationGroup="GrpGV" Width="95px"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVClave" runat="server" ControlToValidate="TxtClave" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Clave''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGV"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCClave" runat="server" HighlightCssClass="vco" TargetControlID="RFVClave" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</EditItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlClasificacionAdministrativa" runat="server" Text='<%# Eval("ClasificacionAdministrativa", "{0}")%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<EditItemTemplate>
|
||||
<asp:TextBox ID="TxtClasificacionAdministrativa" runat="server" CausesValidation="true" MaxLength="100" Text='<%# Eval("ClasificacionAdministrativa")%>' ValidationGroup="GrpGV" Width="244px"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVClasificacionAdministrativa" runat="server" ControlToValidate="TxtClasificacionAdministrativa" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Código''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGV"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCClasificacionAdministrativa" runat="server" HighlightCssClass="vco" TargetControlID="RFVClasificacionAdministrativa" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</EditItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlEstatus" runat="server" Text='<%# Eval("Estatus") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<EditItemTemplate>
|
||||
<asp:CheckBox ID="ChkEstatus" runat="server" Checked='<%# If (Eval("Estatus").ToString = "Activo", True, False) %>' />
|
||||
</EditItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlFecha" runat="server" Text='<%# Eval("FechaIng", "{0:d}") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlUsuario" runat="server" Text='<%# Eval("Usuario") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Editar">
|
||||
<EditItemTemplate>
|
||||
<center>
|
||||
<asp:LinkButton ID="imgU" runat="server" AlternateText="Actualizar" CausesValidation="True"
|
||||
CommandName="Update" CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-check'></i>" ValidationGroup="GrpGV" />
|
||||
<asp:LinkButton ID="imgC" runat="server" AlternateText="Cancelar" CausesValidation="False"
|
||||
CommandName="Cancel" CssClass="btn btn-circle btn-sm red" Text="<i class='fa fa-times'></i>" />
|
||||
</center>
|
||||
</EditItemTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="imgE" runat="server" AlternateText="Editar" CausesValidation="False" CommandName="Edit"
|
||||
CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-pencil'></i>" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Eliminar">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="imgD" runat="server" AlternateText="Eliminar"
|
||||
CausesValidation="False" CommandName="Delete" CssClass="btn btn-circle btn-sm red" Text="<i class='icon-trash'></i>"
|
||||
OnClientClick="javascript:return C();" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
<RowStyle CssClass="Texto" />
|
||||
<AlternatingRowStyle CssClass="TextoAlterno" />
|
||||
</asp:GridView>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
||||
<script language="javascript" type="text/javascript">
|
||||
function C() {
|
||||
return confirm('¿Está seguro que desea eliminar el Clasificación Administrativa?');
|
||||
}
|
||||
</script>
|
||||
</asp:Content>
|
||||
|
||||
183
AC/CatClasificacionAdministrativa.aspx.vb
Normal file
183
AC/CatClasificacionAdministrativa.aspx.vb
Normal file
@@ -0,0 +1,183 @@
|
||||
Option Explicit On
|
||||
Option Strict On
|
||||
|
||||
Imports System.Data
|
||||
Imports System.Linq
|
||||
Imports Extensiones
|
||||
|
||||
Partial Class AC_CatClasificacionAdministrativa
|
||||
Inherits ClsPaginas
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||
If Not Page.IsPostBack Then
|
||||
ViewState("Orden") = ""
|
||||
CargaDatos()
|
||||
'CargaClavePadre()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Public Sub CargaDatos()
|
||||
Dim ObjClasificacionAdministrativa As New ClsAC
|
||||
If ObjClasificacionAdministrativa.GetClasificacionAdministrativa() Then
|
||||
ViewState("DTClasificacionAdministrativas") = ObjClasificacionAdministrativa.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
|
||||
GlobalDTAC_ClasificacionAdministrativa(UsuarioActual.CveEmpresa) = ObjClasificacionAdministrativa.DtResultados
|
||||
Else
|
||||
Me.GvDatos.DataSource = Nothing
|
||||
End If
|
||||
|
||||
ObjClasificacionAdministrativa.Dispose()
|
||||
|
||||
If ViewState("Orden").ToString() <> String.Empty Then
|
||||
CargaGrid(ViewState("Orden").ToString())
|
||||
Else
|
||||
CargaGrid("")
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Protected Sub LbAgregar_Click(sender As Object, e As System.EventArgs) Handles LbAgregar.Click
|
||||
Dim ObjClasificacionAdministrativa As New ClsAC
|
||||
If ObjClasificacionAdministrativa.AddClasificacionAdministrativa(TxtClave.Text.Trim, TxtClasificacionAdministrativa.Text.Trim, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
|
||||
TxtClave.Text = ""
|
||||
TxtClasificacionAdministrativa.Text = ""
|
||||
Alert("La Unidad Administrativa se guardó correctamente.", TipoMensaje.MsgInformacion)
|
||||
UpTitulos.Update()
|
||||
ViewState("DTClasificacionAdministrativas") = ObjClasificacionAdministrativa.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
|
||||
GlobalDTAC_ClasificacionAdministrativa(UsuarioActual.CveEmpresa) = ObjClasificacionAdministrativa.DtResultados
|
||||
|
||||
If ViewState("Orden").ToString() <> String.Empty Then
|
||||
CargaGrid(ViewState("Orden").ToString())
|
||||
Else
|
||||
CargaGrid("")
|
||||
End If
|
||||
End If
|
||||
ObjClasificacionAdministrativa.Dispose()
|
||||
End Sub
|
||||
|
||||
#Region "G V D A T O S"
|
||||
Protected Sub GvDatos_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvDatos.RowDataBound
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
If e.Row.RowIndex = 0 Then
|
||||
e.Row.Cells(0).Width = Unit.Pixel(100)
|
||||
e.Row.Cells(1).Width = Unit.Pixel(250)
|
||||
e.Row.Cells(2).Width = Unit.Pixel(100)
|
||||
e.Row.Cells(3).Width = Unit.Pixel(100)
|
||||
e.Row.Cells(4).Width = Unit.Pixel(100)
|
||||
e.Row.Cells(5).Width = Unit.Pixel(50)
|
||||
e.Row.Cells(6).Width = Unit.Pixel(50)
|
||||
End If
|
||||
e.Row.Cells(0).HorizontalAlign = HorizontalAlign.Center
|
||||
e.Row.Cells(1).HorizontalAlign = HorizontalAlign.Left
|
||||
e.Row.Cells(2).HorizontalAlign = HorizontalAlign.Center
|
||||
e.Row.Cells(3).HorizontalAlign = HorizontalAlign.Center
|
||||
e.Row.Cells(4).HorizontalAlign = HorizontalAlign.Center
|
||||
e.Row.Cells(5).HorizontalAlign = HorizontalAlign.Center
|
||||
e.Row.Cells(6).HorizontalAlign = HorizontalAlign.Center
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Protected Sub GvDatos_RowDeleting(sender As Object, e As System.Web.UI.WebControls.GridViewDeleteEventArgs) Handles GvDatos.RowDeleting
|
||||
Dim ObjClasificacionAdministrativa As New ClsAC
|
||||
If ObjClasificacionAdministrativa.RemoveClasificacionAdministrativa(GvDatos.DataKeys(e.RowIndex).Value.ToString.ToEntero) Then
|
||||
GvDatos.EditIndex = -1
|
||||
ViewState("DTClasificacionAdministrativas") = ObjClasificacionAdministrativa.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
|
||||
GlobalDTAC_ClasificacionAdministrativa(UsuarioActual.CveEmpresa) = ObjClasificacionAdministrativa.DtResultados
|
||||
Alert("El Unidad Administrativa se eliminó correctamente.", TipoMensaje.MsgInformacion)
|
||||
End If
|
||||
|
||||
ObjClasificacionAdministrativa.Dispose()
|
||||
|
||||
If ViewState("Orden").ToString() <> String.Empty Then
|
||||
CargaGrid(ViewState("Orden").ToString())
|
||||
Else
|
||||
CargaGrid("")
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Protected Sub GvDatos_RowCancelingEdit(sender As Object, e As System.Web.UI.WebControls.GridViewCancelEditEventArgs) Handles GvDatos.RowCancelingEdit
|
||||
GvDatos.EditIndex = -1
|
||||
If ViewState("Orden").ToString() <> String.Empty Then
|
||||
CargaGrid(ViewState("Orden").ToString())
|
||||
Else
|
||||
CargaGrid("")
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Protected Sub GvDatos_RowUpdating(sender As Object, e As System.Web.UI.WebControls.GridViewUpdateEventArgs) Handles GvDatos.RowUpdating
|
||||
|
||||
Dim ObjClasificacionAdministrativa As New ClsAC
|
||||
|
||||
Dim ClasificacionAdministrativa As String = DirectCast(GvDatos.Rows(e.RowIndex).FindControl("TxtClasificacionAdministrativa"), TextBox).Text.Trim
|
||||
Dim Estatus As Boolean = GvDatos.Rows(e.RowIndex).FCCheckBox("ChkEstatus").Checked
|
||||
Dim CveClasificacionAdministrativa As Integer = GvDatos.DataKeys(e.RowIndex).Value.ToString.ToEntero
|
||||
Dim Clave As String = DirectCast(GvDatos.Rows(e.RowIndex).FindControl("TxtClave"), TextBox).Text.Trim
|
||||
|
||||
If ObjClasificacionAdministrativa.UpdateClasificacionAdministrativa(Clave, ClasificacionAdministrativa, Estatus, CveClasificacionAdministrativa) Then
|
||||
GvDatos.EditIndex = -1
|
||||
ViewState("DTClasificacionAdministrativas") = ObjClasificacionAdministrativa.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
|
||||
GlobalDTAC_ClasificacionAdministrativa(UsuarioActual.CveEmpresa) = ObjClasificacionAdministrativa.DtResultados
|
||||
Alert("Los cambios se guardaron correctamente.", TipoMensaje.MsgInformacion)
|
||||
End If
|
||||
|
||||
ObjClasificacionAdministrativa.Dispose()
|
||||
|
||||
If ViewState("Orden").ToString() <> String.Empty Then
|
||||
CargaGrid(ViewState("Orden").ToString())
|
||||
Else
|
||||
CargaGrid("")
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Sub GvDatos_RowEditing(sender As Object, e As System.Web.UI.WebControls.GridViewEditEventArgs) Handles GvDatos.RowEditing
|
||||
GvDatos.EditIndex = e.NewEditIndex
|
||||
|
||||
If ViewState("Orden").ToString() <> String.Empty Then
|
||||
CargaGrid(ViewState("Orden").ToString())
|
||||
Else
|
||||
CargaGrid("")
|
||||
End If
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
#Region "O R D E N A M I E N T O"
|
||||
|
||||
Protected Sub LbOrden_Click(ByVal sender As Object, ByVal e As EventArgs)
|
||||
Dim Orden As String = ""
|
||||
Dim Campo As String = ""
|
||||
Dim gvi As Integer = 0
|
||||
Dim Literal As Literal = Nothing
|
||||
Const OrdenInicial As String = ""
|
||||
Dim Arg(2) As String
|
||||
|
||||
Arg = CType(sender, LinkButton).CommandArgument().ToString.Split(";"c)
|
||||
Campo = Arg(0)
|
||||
gvi = Arg(1).ToEntero
|
||||
Literal = CType(CType(sender, LinkButton).NamingContainer.FindControl("Img" & Campo.Replace(",", "_")), Literal)
|
||||
|
||||
If ViewState(String.Format("O{0}{1}", Campo, gvi)) IsNot Nothing AndAlso ViewState(String.Format("O{0}{1}", Campo, gvi)).ToString = String.Format("{0} DESC", Campo) Then
|
||||
ViewState(String.Format("O{0}{1}", Campo, gvi)) = 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}{1}", Campo, gvi)) = String.Format("{0} DESC", Campo)
|
||||
Literal.Text = String.Format("<i class='fa fa-sort-desc' style='color:#999' ></i>")
|
||||
End If
|
||||
Orden = OrdenInicial & ViewState(String.Format("O{0}{1}", Campo, gvi)).ToString
|
||||
ViewState("Orden") = Orden
|
||||
CargaGrid(Orden)
|
||||
End Sub
|
||||
|
||||
Private Sub CargaGrid(ByVal Orden As String)
|
||||
If Orden <> String.Empty Then
|
||||
Dim DV As New DataView(CType(ViewState("DTClasificacionAdministrativas"), DataTable), "", Orden, DataViewRowState.CurrentRows)
|
||||
GvDatos.DataSource = DV.ToTable()
|
||||
DV.Dispose()
|
||||
Else
|
||||
GvDatos.DataSource = CType(ViewState("DTClasificacionAdministrativas"), DataTable)
|
||||
End If
|
||||
|
||||
GvDatos.DataBind()
|
||||
UpDatos.Update()
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
End Class
|
||||
185
AC/CatClasificacionFuncional.aspx
Normal file
185
AC/CatClasificacionFuncional.aspx
Normal file
@@ -0,0 +1,185 @@
|
||||
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="CatClasificacionFuncional.aspx.vb" Inherits="AC_CatClasificacionFuncional" %>
|
||||
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="HB" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="E" runat="Server">
|
||||
Catálogo de Clasificación Funcional
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
<img src="/Imagenes/separador02.gif" alt="" />
|
||||
<asp:ImageButton ID="ImgExcel" OnClick="ImgExcel_Click" runat="server" ImageUrl="/Imagenes/IconoExcel.gif" Width="17px" Height="17px" />
|
||||
<img src="/Imagenes/separador02.gif" alt="" />
|
||||
|
||||
<asp:ImageButton ID="BtnImprimir" OnClick="BtnImprimir_Click" runat="server" alt="Imprimir" src="/Imagenes/btnImprimir.gif" Style="cursor: pointer; height: 20px" />
|
||||
|
||||
|
||||
<img src="/Imagenes/separador02.gif" alt="" />
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
|
||||
<div class="portlet box blue-hoki">
|
||||
<div class="portlet-body">
|
||||
<asp:UpdatePanel ID="UpTitulos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<table class="table table-striped table-advance table-hover Widthall">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="text-align: center">
|
||||
<asp:LinkButton ID="LbClasificacionFuncional" runat="server" CausesValidation="false" Text="" CommandArgument="ClasificacionFuncional;0" OnClick="LbOrden_Click">
|
||||
Clasificación Funcional
|
||||
<asp:Literal ID="ImgClasificacionFuncional" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
||||
</asp:LinkButton>
|
||||
</th>
|
||||
<th style="text-align: center">
|
||||
<asp:LinkButton ID="LbClaveClasificacionFuncional" runat="server" CausesValidation="false" Text="" CommandArgument="ClaveClasificacionFuncional;0" OnClick="LbOrden_Click">
|
||||
Clave
|
||||
<asp:Literal ID="ImgClaveClasificacionFuncional" runat="server" Text="<i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
||||
</asp:LinkButton>
|
||||
</th>
|
||||
<th style="text-align: center">
|
||||
<asp:LinkButton ID="LbEstatus" runat="server" CausesValidation="false" Text="" CommandArgument="Estatus;0" OnClick="LbOrden_Click">
|
||||
Estatus
|
||||
<asp:Literal ID="ImgEstatus" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
||||
</asp:LinkButton>
|
||||
</th>
|
||||
<th style="text-align: center">
|
||||
<asp:LinkButton ID="LbFechaIng" runat="server" CausesValidation="false" Text="" CommandArgument="FechaIng;0" OnClick="LbOrden_Click">
|
||||
Fecha
|
||||
<asp:Literal ID="ImgFechaIng" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
||||
</asp:LinkButton>
|
||||
</th>
|
||||
<th style="text-align: center">
|
||||
<asp:LinkButton ID="LbUsuario" runat="server" CausesValidation="false" Text="" CommandArgument="Usuario;0" OnClick="LbOrden_Click">
|
||||
Usuario
|
||||
<asp:Literal ID="ImgUsuario" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
||||
</asp:LinkButton>
|
||||
</th>
|
||||
<th style="text-align: center">Comandos</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tr>
|
||||
<td>
|
||||
<asp:TextBox ID="TxtClasificacionFuncional" runat="server" CausesValidation="true" MaxLength="395" ValidationGroup="GrpGuardar" Width="384px"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVClasificacionFuncional" runat="server" ControlToValidate="TxtClasificacionFuncional" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''ClasificacionFuncional''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCClasificacionFuncional" runat="server" HighlightCssClass="vco" TargetControlID="RFVClasificacionFuncional" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</td>
|
||||
<td>
|
||||
<asp:TextBox ID="TxtClaveClasificacionFuncional" runat="server" CausesValidation="true" MaxLength="5" ValidationGroup="GrpGuardar" Width="80px"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVClaveClasificacionFuncional" runat="server" ControlToValidate="TxtClaveClasificacionFuncional" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''ClaveClasificacionFuncional''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCClaveClasificacionFuncional" runat="server" HighlightCssClass="vco" TargetControlID="RFVClaveClasificacionFuncional" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td style="text-align: center">
|
||||
<asp:LinkButton ID="LbAgregar" runat="server" CausesValidation="true" CssClass="Texto" Text="Agregar" ValidationGroup="GrpGuardar"></asp:LinkButton></td>
|
||||
</tr>
|
||||
</table>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" DataKeyNames="CveClasificacionFuncional" EmptyDataText="No se encontraron Clasificaciones Registrados" ToolTip="Listado de ClasificacionFuncional" CssClass="table table-striped table-advance table-hover Widthall" GridLines="None">
|
||||
<Columns>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlClasificacionFuncional" runat="server" Text='<%# Eval("ClasificacionFuncional", "{0}") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<EditItemTemplate>
|
||||
<asp:TextBox ID="TxtClasificacionFuncional" runat="server" CausesValidation="true" MaxLength="100" Text='<%# Eval("ClasificacionFuncional") %>' ValidationGroup="GrpGV" Width="384px"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVClasificacionFuncional" runat="server" ControlToValidate="TxtClasificacionFuncional" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''ClasificacionFuncional''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGV"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCClasificacionFuncional" runat="server" HighlightCssClass="vco" TargetControlID="RFVClasificacionFuncional" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</EditItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlClaveClasificacionFuncional" runat="server" Text='<%# Eval("ClaveClasificacionFuncional", "{0}") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<EditItemTemplate>
|
||||
<asp:TextBox ID="TxtClaveClasificacionFuncional" runat="server" CausesValidation="true" MaxLength="50" Text='<%# Eval("ClaveClasificacionFuncional") %>' ValidationGroup="GrpGV" Width="88px"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVClaveClasificacionFuncional" runat="server" ControlToValidate="TxtClaveClasificacionFuncional" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''ClaveClasificacionFuncional''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGV"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCClaveClasificacionFuncional" runat="server" HighlightCssClass="vco" TargetControlID="RFVClaveClasificacionFuncional" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</EditItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlEstatus" runat="server" Text='<%# Eval("Estatus") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<EditItemTemplate>
|
||||
<asp:CheckBox ID="ChkEstatus" runat="server" Checked='<%# If (Eval("Estatus").ToString = "Activo", True, False) %>' />
|
||||
</EditItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlFecha" runat="server" Text='<%# Eval("FechaIng", "{0:d}") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlUsuario" runat="server" Text='<%# Eval("Usuario") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Editar">
|
||||
<EditItemTemplate>
|
||||
<center>
|
||||
<asp:LinkButton ID="imgU" runat="server" AlternateText="Actualizar" CausesValidation="True"
|
||||
CommandName="Update" CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-check'></i>" ValidationGroup="GrpGV" />
|
||||
<asp:LinkButton ID="imgC" runat="server" AlternateText="Cancelar" CausesValidation="False"
|
||||
CommandName="Cancel" CssClass="btn btn-circle btn-sm red" Text="<i class='fa fa-times'></i>" />
|
||||
</center>
|
||||
</EditItemTemplate>
|
||||
<ItemTemplate>
|
||||
<center>
|
||||
<asp:LinkButton ID="imgE" runat="server" AlternateText="Editar" CausesValidation="False"
|
||||
CommandName="Edit" CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-pencil'></i>" />
|
||||
</center>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Eliminar">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="imgD" runat="server" AlternateText="Eliminar" CausesValidation="False"
|
||||
CommandName="Delete" CssClass="btn btn-circle btn-sm red" Text="<i class='icon-trash'></i>"
|
||||
data-toggle="confirmation" data-popout="true" data-original-title="confirmar" data-btn-ok-label="si" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
<RowStyle CssClass="Texto" />
|
||||
<AlternatingRowStyle CssClass="TextoAlterno" />
|
||||
</asp:GridView>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<table runat="server" id="Tbl" style="display:none;">
|
||||
<tr>
|
||||
<td>
|
||||
<asp:UpdatePanel runat="server">
|
||||
<ContentTemplate>
|
||||
<asp:GridView ID="Gv" runat="server" AutoGenerateColumns="False" GridLines="None">
|
||||
<Columns>
|
||||
<asp:BoundField HeaderText="Clasificación Funcional" DataField="ClasificacionFuncional" DataFormatString="{0}" ItemStyle-Width="400px" ItemStyle-HorizontalAlign="Left"/>
|
||||
<asp:BoundField HeaderText="Clave" DataField="ClaveClasificacionFuncional" DataFormatString="{0}" ItemStyle-Width="100px" ItemStyle-HorizontalAlign="Left"/>
|
||||
<asp:BoundField HeaderText="Estatus" DataField="Estatus" ItemStyle-Width="100px" ItemStyle-HorizontalAlign="Left"/>
|
||||
<asp:BoundField HeaderText="Fecha" DataField="FechaIng" DataFormatString="{0}" ItemStyle-Width="120px" ItemStyle-HorizontalAlign="Left"/>
|
||||
<asp:BoundField HeaderText="Usuario" DataField="Usuario" ItemStyle-Width="100px" ItemStyle-HorizontalAlign="Left"/>
|
||||
</Columns>
|
||||
<HeaderStyle CssClass="Titulos" />
|
||||
<RowStyle CssClass="Texto" />
|
||||
<AlternatingRowStyle CssClass="TextoAlterno" />
|
||||
</asp:GridView>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
||||
</asp:Content>
|
||||
|
||||
|
||||
238
AC/CatClasificacionFuncional.aspx.vb
Normal file
238
AC/CatClasificacionFuncional.aspx.vb
Normal file
@@ -0,0 +1,238 @@
|
||||
Option Explicit On
|
||||
Option Strict On
|
||||
|
||||
Imports System.Data
|
||||
Imports System.Linq
|
||||
Imports Extensiones
|
||||
Imports Microsoft.Reporting.WebForms
|
||||
|
||||
Partial Class AC_CatClasificacionFuncional
|
||||
Inherits ClsPaginas
|
||||
|
||||
Private Property DtClasificacionFuncional As DataTable
|
||||
Get
|
||||
Return CType(ViewState("DtClasificacionFuncional"), DataTable)
|
||||
End Get
|
||||
Set(value As DataTable)
|
||||
ViewState("DtClasificacionFuncional") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Property PuedeEditar As Boolean
|
||||
Get
|
||||
Return CBool(ViewState("PuedeEditar"))
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
ViewState("PuedeEditar") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Property PuedeEliminar As Boolean
|
||||
Get
|
||||
Return CBool(ViewState("PuedeEditar"))
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
ViewState("PuedeEditar") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||
If Not Page.IsPostBack Then
|
||||
ViewState("Orden") = ""
|
||||
CargaDatos()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Public Sub CargaDatos()
|
||||
Dim ObjClasificacionFuncional As New ClsAC
|
||||
If ObjClasificacionFuncional.GetClasificacionFuncional() Then
|
||||
ViewState("DTClasificacionFuncional") = ObjClasificacionFuncional.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
|
||||
GlobalDTAC_ClasificacionFuncional(UsuarioActual.CveEmpresa) = ObjClasificacionFuncional.DtResultados
|
||||
Else
|
||||
Me.GvDatos.DataSource = Nothing
|
||||
End If
|
||||
|
||||
ObjClasificacionFuncional.Dispose()
|
||||
|
||||
If ViewState("Orden").ToString() <> String.Empty Then
|
||||
CargaGrid(ViewState("Orden").ToString())
|
||||
Else
|
||||
CargaGrid("")
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Protected Sub LbAgregar_Click(sender As Object, e As System.EventArgs) Handles LbAgregar.Click
|
||||
Dim ObjClasificacionFuncional As New ClsAC
|
||||
If ObjClasificacionFuncional.AddClasificacionFuncional(TxtClasificacionFuncional.Text.Trim, TxtClaveClasificacionFuncional.Text.Trim, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
|
||||
TxtClasificacionFuncional.Text = ""
|
||||
TxtClaveClasificacionFuncional.Text = ""
|
||||
Alert("El Nuevo Registro se guardó correctamente.", TipoMensaje.MsgInformacion)
|
||||
UpTitulos.Update()
|
||||
ViewState("DTClasificacionFuncional") = ObjClasificacionFuncional.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
|
||||
GlobalDTAC_ClasificacionFuncional(UsuarioActual.CveEmpresa) = ObjClasificacionFuncional.DtResultados
|
||||
|
||||
If ViewState("Orden").ToString() <> String.Empty Then
|
||||
CargaGrid(ViewState("Orden").ToString())
|
||||
Else
|
||||
CargaGrid("")
|
||||
End If
|
||||
End If
|
||||
ObjClasificacionFuncional.Dispose()
|
||||
End Sub
|
||||
|
||||
#Region "G V D A T O S"
|
||||
Protected Sub GvDatos_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvDatos.RowDataBound
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
If e.Row.RowIndex = 0 Then
|
||||
e.Row.Cells(0).Width = Unit.Pixel(400)
|
||||
e.Row.Cells(1).Width = Unit.Pixel(100)
|
||||
e.Row.Cells(2).Width = Unit.Pixel(100)
|
||||
e.Row.Cells(3).Width = Unit.Pixel(100)
|
||||
e.Row.Cells(4).Width = Unit.Pixel(100)
|
||||
e.Row.Cells(5).Width = Unit.Pixel(105)
|
||||
e.Row.Cells(6).Width = Unit.Pixel(65)
|
||||
|
||||
End If
|
||||
e.Row.Cells(0).HorizontalAlign = HorizontalAlign.Left
|
||||
e.Row.Cells(1).HorizontalAlign = HorizontalAlign.Center
|
||||
e.Row.Cells(2).HorizontalAlign = HorizontalAlign.Center
|
||||
e.Row.Cells(3).HorizontalAlign = HorizontalAlign.Center
|
||||
e.Row.Cells(4).HorizontalAlign = HorizontalAlign.Center
|
||||
e.Row.Cells(5).HorizontalAlign = HorizontalAlign.Center
|
||||
e.Row.Cells(6).HorizontalAlign = HorizontalAlign.Center
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Protected Sub GvDatos_RowDeleting(sender As Object, e As System.Web.UI.WebControls.GridViewDeleteEventArgs) Handles GvDatos.RowDeleting
|
||||
Dim ObjClasificacionFuncional As New ClsAC
|
||||
If ObjClasificacionFuncional.RemoveClasificacionFuncional(GvDatos.DataKeys(e.RowIndex).Value.ToString.ToEntero) Then
|
||||
GvDatos.EditIndex = -1
|
||||
ViewState("DTClasificacionFuncional") = ObjClasificacionFuncional.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
|
||||
GlobalDTAC_ClasificacionFuncional(UsuarioActual.CveEmpresa) = ObjClasificacionFuncional.DtResultados
|
||||
Alert("El Registro se eliminó correctamente.", TipoMensaje.MsgInformacion)
|
||||
End If
|
||||
|
||||
ObjClasificacionFuncional.Dispose()
|
||||
|
||||
If ViewState("Orden").ToString() <> String.Empty Then
|
||||
CargaGrid(ViewState("Orden").ToString())
|
||||
Else
|
||||
CargaGrid("")
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Protected Sub GvDatos_RowCancelingEdit(sender As Object, e As System.Web.UI.WebControls.GridViewCancelEditEventArgs) Handles GvDatos.RowCancelingEdit
|
||||
GvDatos.EditIndex = -1
|
||||
If ViewState("Orden").ToString() <> String.Empty Then
|
||||
CargaGrid(ViewState("Orden").ToString())
|
||||
Else
|
||||
CargaGrid("")
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Protected Sub GvDatos_RowUpdating(sender As Object, e As System.Web.UI.WebControls.GridViewUpdateEventArgs) Handles GvDatos.RowUpdating
|
||||
|
||||
Dim ObjClasificacionFuncional As New ClsAC
|
||||
|
||||
Dim ClasificacionFuncional As String = DirectCast(GvDatos.Rows(e.RowIndex).FindControl("TxtClasificacionFuncional"), TextBox).Text.Trim
|
||||
Dim ClaveClasificacionFuncional As String = DirectCast(GvDatos.Rows(e.RowIndex).FindControl("TxtClaveClasificacionFuncional"), TextBox).Text.Trim
|
||||
Dim Estatus As Boolean = GvDatos.Rows(e.RowIndex).FCCheckBox("ChkEstatus").Checked
|
||||
Dim CveClasificacionFuncional As Integer = GvDatos.DataKeys(e.RowIndex).Value.ToString.ToEntero
|
||||
|
||||
If ObjClasificacionFuncional.UpdateClasificacionFuncional(ClasificacionFuncional, ClaveClasificacionFuncional, Estatus, CveClasificacionFuncional) Then
|
||||
GvDatos.EditIndex = -1
|
||||
ViewState("DTClasificacionFuncional") = ObjClasificacionFuncional.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
|
||||
GlobalDTAC_ClasificacionFuncional(UsuarioActual.CveEmpresa) = ObjClasificacionFuncional.DtResultados
|
||||
Alert("Los cambios se guardaron correctamente.", TipoMensaje.MsgInformacion)
|
||||
End If
|
||||
|
||||
ObjClasificacionFuncional.Dispose()
|
||||
|
||||
If ViewState("Orden").ToString() <> String.Empty Then
|
||||
CargaGrid(ViewState("Orden").ToString())
|
||||
Else
|
||||
CargaGrid("")
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Sub GvDatos_RowEditing(sender As Object, e As System.Web.UI.WebControls.GridViewEditEventArgs) Handles GvDatos.RowEditing
|
||||
GvDatos.EditIndex = e.NewEditIndex
|
||||
|
||||
If ViewState("Orden").ToString() <> String.Empty Then
|
||||
CargaGrid(ViewState("Orden").ToString())
|
||||
Else
|
||||
CargaGrid("")
|
||||
End If
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
#Region "O R D E N A M I E N T O"
|
||||
|
||||
Protected Sub LbOrden_Click(ByVal sender As Object, ByVal e As EventArgs)
|
||||
Dim Orden As String = ""
|
||||
Dim Campo As String = ""
|
||||
Dim gvi As Integer = 0
|
||||
Dim Literal As Literal = Nothing
|
||||
Const OrdenInicial As String = ""
|
||||
Dim Arg(2) As String
|
||||
|
||||
Arg = CType(sender, LinkButton).CommandArgument().ToString.Split(";"c)
|
||||
Campo = Arg(0)
|
||||
gvi = Arg(1).ToEntero
|
||||
Literal = CType(CType(sender, LinkButton).NamingContainer.FindControl("Img" & Campo.Replace(",", "_")), Literal)
|
||||
|
||||
If ViewState(String.Format("O{0}{1}", Campo, gvi)) IsNot Nothing AndAlso ViewState(String.Format("O{0}{1}", Campo, gvi)).ToString = String.Format("{0} DESC", Campo) Then
|
||||
ViewState(String.Format("O{0}{1}", Campo, gvi)) = 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}{1}", Campo, gvi)) = String.Format("{0} DESC", Campo)
|
||||
Literal.Text = String.Format("<i class='fa fa-sort-desc' style='color:#999' ></i>")
|
||||
End If
|
||||
Orden = OrdenInicial & ViewState(String.Format("O{0}{1}", Campo, gvi)).ToString
|
||||
ViewState("Orden") = Orden
|
||||
CargaGrid(Orden)
|
||||
End Sub
|
||||
|
||||
Private Sub CargaGrid(ByVal Orden As String)
|
||||
If Orden <> String.Empty Then
|
||||
Dim DV As New DataView(CType(ViewState("DTClasificacionFuncional"), DataTable), "", Orden, DataViewRowState.CurrentRows)
|
||||
GvDatos.DataSource = DV.ToTable()
|
||||
Gv.DataSource = DV.ToTable()
|
||||
DtClasificacionFuncional = DV.ToTable()
|
||||
DV.Dispose()
|
||||
Else
|
||||
GvDatos.DataSource = CType(ViewState("DTClasificacionFuncional"), DataTable)
|
||||
Gv.DataSource = CType(ViewState("DTClasificacionFuncional"), DataTable)
|
||||
DtClasificacionFuncional = CType(ViewState("DTClasificacionFuncional"), DataTable)
|
||||
End If
|
||||
|
||||
GvDatos.DataBind()
|
||||
Gv.DataBind()
|
||||
|
||||
UpDatos.Update()
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
#Region " EXPORTAR - PDF - EXCEL "
|
||||
Protected Sub ImgExcel_Click(sender As Object, e As ImageClickEventArgs)
|
||||
Tbl.ExportToExcel("Catalogo Clasificacion Funcional")
|
||||
End Sub
|
||||
|
||||
Protected Sub BtnImprimir_Click(sender As Object, e As ImageClickEventArgs)
|
||||
ImprimiReporte()
|
||||
End Sub
|
||||
'No quitar porque no funciona el exporta PDF
|
||||
Public Overrides Sub VerifyRenderingInServerForm(control As Control)
|
||||
' Verifies that the control is rendered
|
||||
End Sub
|
||||
|
||||
Protected Sub ImprimiReporte()
|
||||
Dim params As New List(Of ReportParameter)
|
||||
params.Add(New ReportParameter("pEmp", UsuarioActual.Empresa.Empresa))
|
||||
params.Add(New ReportParameter("pImg", New Uri(Server.MapPath(String.Format("~/Empresas/{0}/Logo.png", UsuarioActual.CveEmpresa))).AbsoluteUri))
|
||||
|
||||
ImprimirPDF("AC/Reportes/RepClasificacionFuncional.rdlc", DtClasificacionFuncional, params, "ReporteClasificacionFuncional")
|
||||
End Sub
|
||||
#End Region
|
||||
End Class
|
||||
162
AC/CatClasificacionGeografica.aspx
Normal file
162
AC/CatClasificacionGeografica.aspx
Normal file
@@ -0,0 +1,162 @@
|
||||
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="CatClasificacionGeografica.aspx.vb" Inherits="AC_CatClasificacionGeografica" %>
|
||||
|
||||
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="HB" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="E" runat="Server">
|
||||
Catálogo de Clasificación Geográfica
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
<asp:ImageButton ID="ImgExcel" OnClick="ImgExcel_Click" runat="server" ImageUrl="/Imagenes/IconoExcel.gif" Width="17px" Height="17px" />
|
||||
<asp:ImageButton ID="BtnImprimir" OnClick="BtnImprimir_Click" runat="server" alt="Imprimir" src="/Imagenes/btnImprimir.gif" Style="cursor: pointer; height: 20px" />
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
|
||||
<div class="portlet box blue-hoki">
|
||||
<div class="portlet-body">
|
||||
<asp:UpdatePanel ID="UpTitulos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<table class="table table-striped table-hover Widthall">
|
||||
<thead>
|
||||
<tr>
|
||||
<th width="243px" style="text-align: center">
|
||||
<asp:LinkButton ID="LbClasificacionGeografica" runat="server" CausesValidation="false" Text="" CommandArgument="ClasificacionGeografica;0" OnClick="LbOrden_Click">
|
||||
Clasificación Geográfica
|
||||
<asp:Literal ID="ImgClasificacionGeografica" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
||||
</asp:LinkButton>
|
||||
</th>
|
||||
<th width="100px" style="text-align: center">
|
||||
<asp:LinkButton ID="LbEstatus" runat="server" CausesValidation="false" Text="" CommandArgument="Estatus;0" OnClick="LbOrden_Click">
|
||||
Estatus<asp:Literal ID="ImgEstatus" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
||||
</asp:LinkButton>
|
||||
</th>
|
||||
<th width="100px" style="text-align: center">
|
||||
<asp:LinkButton ID="LbFechaIng" runat="server" CausesValidation="false" Text="" CommandArgument="FechaIng;0" OnClick="LbOrden_Click">
|
||||
Fecha
|
||||
<asp:Literal ID="ImgFechaIng" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
||||
</asp:LinkButton>
|
||||
</th>
|
||||
<th width="100px" style="text-align: center">
|
||||
<asp:LinkButton ID="LbUsuario" runat="server" CausesValidation="false" Text="" CommandArgument="Usuario;0" OnClick="LbOrden_Click">
|
||||
Usuario
|
||||
<asp:Literal ID="ImgUsuario" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
||||
</asp:LinkButton>
|
||||
</th>
|
||||
<th width="118" style="text-align: center">Comandos</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tr>
|
||||
<td>
|
||||
<asp:TextBox ID="TxtClasificacionGeografica" runat="server" CausesValidation="true" MaxLength="50" ValidationGroup="GrpGuardar" Width="240px"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVClasificacionGeografica" runat="server" ControlToValidate="TxtClasificacionGeografica" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Clasificación Geográfica''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCClasificacionGeografica" runat="server" HighlightCssClass="vco" TargetControlID="RFVClasificacionGeografica" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td style="text-align: center">
|
||||
<asp:LinkButton ID="LbAgregar" runat="server" CausesValidation="true" CssClass="Texto" Text="Agregar" ValidationGroup="GrpGuardar"></asp:LinkButton></td>
|
||||
</tr>
|
||||
</table>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" DataKeyNames="CveClasificacionGeografica" EmptyDataText="No se encontraron Clasificación Geográfica Registrados" ToolTip="Listado de ClasificacionGeografica" CssClass="table table-striped table-advance table-hover Widthall" GridLines="None">
|
||||
<Columns>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlClasificacionGeografica" runat="server" Text='<%# Eval("ClasificacionGeografica", "{0}") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<EditItemTemplate>
|
||||
<asp:TextBox ID="TxtClasificacionGeografica" runat="server" CausesValidation="true" MaxLength="50" Text='<%# Eval("ClasificacionGeografica") %>' ValidationGroup="GrpGV" Width="240px"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVClasificacionGeografica" runat="server" ControlToValidate="TxtClasificacionGeografica" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Clasificación Geográfica''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGV"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCClasificacionGeografica" runat="server" HighlightCssClass="vco" TargetControlID="RFVClasificacionGeografica" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</EditItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlEstatus" runat="server" Text='<%# Eval("Estatus") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<EditItemTemplate>
|
||||
<asp:CheckBox ID="ChkEstatus" runat="server" Checked='<%# If (Eval("Estatus").ToString = "Activo", True, False) %>' />
|
||||
</EditItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlFecha" runat="server" Text='<%# Eval("FechaIng", "{0:d}") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlUsuario" runat="server" Text='<%# Eval("Usuario") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Editar">
|
||||
<EditItemTemplate>
|
||||
<center>
|
||||
<asp:LinkButton ID="imgU" runat="server" AlternateText="Actualizar" CausesValidation="True" CommandName="Update"
|
||||
CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-check'></i>" ValidationGroup="GrpGV" />
|
||||
<asp:LinkButton ID="imgC" runat="server" AlternateText="Cancelar" CausesValidation="False" CommandName="Cancel"
|
||||
CssClass="btn btn-circle btn-sm red" Text="<i class='fa fa-times'></i>" />
|
||||
</center>
|
||||
</EditItemTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="imgE" runat="server" AlternateText="Editar" CausesValidation="False" CommandName="Edit"
|
||||
CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-pencil'></i>" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Eliminar">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="imgD" runat="server" AlternateText="Eliminar" CausesValidation="False" CommandName="Delete"
|
||||
CssClass="btn btn-circle btn-sm red" Text="<i class='icon-trash'></i>"
|
||||
data-toggle="confirmation" data-popout="true" data-original-title="confirmar" data-btn-ok-label="si" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
<RowStyle CssClass="Texto" />
|
||||
<AlternatingRowStyle CssClass="TextoAlterno" />
|
||||
</asp:GridView>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<table runat="server" id="Tbl" style="display:none;">
|
||||
<tr>
|
||||
<td>
|
||||
<asp:UpdatePanel runat="server">
|
||||
<ContentTemplate>
|
||||
<asp:GridView ID="Gv" runat="server" AutoGenerateColumns="False" GridLines="None">
|
||||
<Columns>
|
||||
<asp:BoundField HeaderText="Clasificación Geográfica" DataField="ClasificacionGeografica" DataFormatString="{0}" ItemStyle-HorizontalAlign="Left"/> <%--ItemStyle-Width="250px"--%>
|
||||
<asp:BoundField HeaderText="Estatus" DataField="Estatus" ItemStyle-HorizontalAlign="Left"/> <%--ItemStyle-Width="100px"--%>
|
||||
<asp:BoundField HeaderText="Fecha" DataField="FechaIng" DataFormatString="{0}" ItemStyle-HorizontalAlign="Left"/> <%--ItemStyle-Width="120px"--%>
|
||||
<asp:BoundField HeaderText="Usuario" DataField="Usuario" ItemStyle-HorizontalAlign="Left"/> <%--ItemStyle-Width="100px"--%>
|
||||
</Columns>
|
||||
<%--<HeaderStyle CssClass="Titulos" />
|
||||
<RowStyle CssClass="Texto" />
|
||||
<AlternatingRowStyle CssClass="TextoAlterno" />--%>
|
||||
</asp:GridView>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
||||
<script language="javascript" type="text/javascript">
|
||||
function C() {
|
||||
return confirm('¿Está seguro que desea eliminar la Clasificación Geográfica?');
|
||||
}
|
||||
</script>
|
||||
</asp:Content>
|
||||
|
||||
|
||||
238
AC/CatClasificacionGeografica.aspx.vb
Normal file
238
AC/CatClasificacionGeografica.aspx.vb
Normal file
@@ -0,0 +1,238 @@
|
||||
Option Explicit On
|
||||
Option Strict On
|
||||
|
||||
Imports System.Data
|
||||
Imports System.Linq
|
||||
Imports Extensiones
|
||||
Imports System.IO
|
||||
Imports iTextSharp.text
|
||||
Imports iTextSharp.text.html.simpleparser
|
||||
Imports iTextSharp.text.pdf
|
||||
Imports Microsoft.Reporting.WebForms
|
||||
|
||||
Partial Class AC_CatClasificacionGeografica
|
||||
Inherits ClsPaginas
|
||||
|
||||
Private Property DtClasificacionGeografica As DataTable
|
||||
Get
|
||||
Return CType(ViewState("DtClasificacionGeografica"), DataTable)
|
||||
End Get
|
||||
Set(value As DataTable)
|
||||
ViewState("DtClasificacionGeografica") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Property PuedeEditar As Boolean
|
||||
Get
|
||||
Return CBool(ViewState("PuedeEditar"))
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
ViewState("PuedeEditar") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Property PuedeEliminar As Boolean
|
||||
Get
|
||||
Return CBool(ViewState("PuedeEditar"))
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
ViewState("PuedeEditar") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||
If Not Page.IsPostBack Then
|
||||
ViewState("Orden") = ""
|
||||
CargaDatos()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Public Sub CargaDatos()
|
||||
Dim ObjClasificacionGeografica As New ClsAC
|
||||
If ObjClasificacionGeografica.GetClasificacionGeografica() Then
|
||||
ViewState("DTClasificacionGeografica") = ObjClasificacionGeografica.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
|
||||
GlobalDTAC_ClasificacionGeografica(UsuarioActual.CveEmpresa) = ObjClasificacionGeografica.DtResultados
|
||||
Else
|
||||
Me.GvDatos.DataSource = Nothing
|
||||
End If
|
||||
|
||||
ObjClasificacionGeografica.Dispose()
|
||||
|
||||
If ViewState("Orden").ToString() <> String.Empty Then
|
||||
CargaGrid(ViewState("Orden").ToString())
|
||||
Else
|
||||
CargaGrid("")
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Protected Sub LbAgregar_Click(sender As Object, e As System.EventArgs) Handles LbAgregar.Click
|
||||
Dim ObjClasificacionGeografica As New ClsAC
|
||||
If ObjClasificacionGeografica.AddClasificacionGeografica(TxtClasificacionGeografica.Text.Trim, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
|
||||
TxtClasificacionGeografica.Text = ""
|
||||
Alert("El Nuevo Registro se guardó correctamente.", TipoMensaje.MsgInformacion)
|
||||
UpTitulos.Update()
|
||||
ViewState("DTClasificacionGeografica") = ObjClasificacionGeografica.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
|
||||
GlobalDTAC_ClasificacionGeografica(UsuarioActual.CveEmpresa) = ObjClasificacionGeografica.DtResultados
|
||||
|
||||
If ViewState("Orden").ToString() <> String.Empty Then
|
||||
CargaGrid(ViewState("Orden").ToString())
|
||||
Else
|
||||
CargaGrid("")
|
||||
End If
|
||||
End If
|
||||
ObjClasificacionGeografica.Dispose()
|
||||
End Sub
|
||||
|
||||
#Region "G V D A T O S"
|
||||
Protected Sub GvDatos_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvDatos.RowDataBound
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
If e.Row.RowIndex = 0 Then
|
||||
e.Row.Cells(0).Width = Unit.Pixel(250)
|
||||
e.Row.Cells(1).Width = Unit.Pixel(100)
|
||||
e.Row.Cells(2).Width = Unit.Pixel(100)
|
||||
e.Row.Cells(3).Width = Unit.Pixel(100)
|
||||
e.Row.Cells(4).Width = Unit.Pixel(50)
|
||||
e.Row.Cells(5).Width = Unit.Pixel(50)
|
||||
End If
|
||||
e.Row.Cells(0).HorizontalAlign = HorizontalAlign.Left
|
||||
e.Row.Cells(0).HorizontalAlign = HorizontalAlign.Left
|
||||
e.Row.Cells(1).HorizontalAlign = HorizontalAlign.Center
|
||||
e.Row.Cells(2).HorizontalAlign = HorizontalAlign.Center
|
||||
e.Row.Cells(3).HorizontalAlign = HorizontalAlign.Center
|
||||
e.Row.Cells(4).HorizontalAlign = HorizontalAlign.Center
|
||||
e.Row.Cells(5).HorizontalAlign = HorizontalAlign.Center
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Protected Sub GvDatos_RowDeleting(sender As Object, e As System.Web.UI.WebControls.GridViewDeleteEventArgs) Handles GvDatos.RowDeleting
|
||||
Dim ObjClasificacionGeografica As New ClsAC
|
||||
If ObjClasificacionGeografica.RemoveClasificacionGeografica(GvDatos.DataKeys(e.RowIndex).Value.ToString.ToEntero) Then
|
||||
GvDatos.EditIndex = -1
|
||||
ViewState("DTClasificacionGeografica") = ObjClasificacionGeografica.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
|
||||
GlobalDTAC_ClasificacionGeografica(UsuarioActual.CveEmpresa) = ObjClasificacionGeografica.DtResultados
|
||||
Alert("El Registro se eliminó correctamente.", TipoMensaje.MsgInformacion)
|
||||
End If
|
||||
|
||||
ObjClasificacionGeografica.Dispose()
|
||||
|
||||
If ViewState("Orden").ToString() <> String.Empty Then
|
||||
CargaGrid(ViewState("Orden").ToString())
|
||||
Else
|
||||
CargaGrid("")
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Protected Sub GvDatos_RowCancelingEdit(sender As Object, e As System.Web.UI.WebControls.GridViewCancelEditEventArgs) Handles GvDatos.RowCancelingEdit
|
||||
GvDatos.EditIndex = -1
|
||||
If ViewState("Orden").ToString() <> String.Empty Then
|
||||
CargaGrid(ViewState("Orden").ToString())
|
||||
Else
|
||||
CargaGrid("")
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Protected Sub GvDatos_RowUpdating(sender As Object, e As System.Web.UI.WebControls.GridViewUpdateEventArgs) Handles GvDatos.RowUpdating
|
||||
|
||||
Dim ObjClasificacionGeografica As New ClsAC
|
||||
|
||||
Dim ClasificacionGeografica As String = DirectCast(GvDatos.Rows(e.RowIndex).FindControl("TxtClasificacionGeografica"), TextBox).Text.Trim
|
||||
Dim Estatus As Boolean = GvDatos.Rows(e.RowIndex).FCCheckBox("ChkEstatus").Checked
|
||||
Dim CveClasificacionGeografica As Integer = GvDatos.DataKeys(e.RowIndex).Value.ToString.ToEntero
|
||||
|
||||
If ObjClasificacionGeografica.UpdateClasificacionGeografica(ClasificacionGeografica, Estatus, CveClasificacionGeografica) Then
|
||||
GvDatos.EditIndex = -1
|
||||
ViewState("DTClasificacionGeografica") = ObjClasificacionGeografica.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
|
||||
GlobalDTAC_ClasificacionGeografica(UsuarioActual.CveEmpresa) = ObjClasificacionGeografica.DtResultados
|
||||
Alert("Los cambios se guardaron correctamente.", TipoMensaje.MsgInformacion)
|
||||
End If
|
||||
|
||||
ObjClasificacionGeografica.Dispose()
|
||||
|
||||
If ViewState("Orden").ToString() <> String.Empty Then
|
||||
CargaGrid(ViewState("Orden").ToString())
|
||||
Else
|
||||
CargaGrid("")
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Sub GvDatos_RowEditing(sender As Object, e As System.Web.UI.WebControls.GridViewEditEventArgs) Handles GvDatos.RowEditing
|
||||
GvDatos.EditIndex = e.NewEditIndex
|
||||
|
||||
If ViewState("Orden").ToString() <> String.Empty Then
|
||||
CargaGrid(ViewState("Orden").ToString())
|
||||
Else
|
||||
CargaGrid("")
|
||||
End If
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
#Region "O R D E N A M I E N T O"
|
||||
|
||||
Protected Sub LbOrden_Click(ByVal sender As Object, ByVal e As EventArgs)
|
||||
Dim Orden As String = ""
|
||||
Dim Campo As String = ""
|
||||
Dim gvi As Integer = 0
|
||||
Dim Literal As Literal = Nothing
|
||||
Const OrdenInicial As String = ""
|
||||
Dim Arg(2) As String
|
||||
|
||||
Arg = CType(sender, LinkButton).CommandArgument().ToString.Split(";"c)
|
||||
Campo = Arg(0)
|
||||
gvi = Arg(1).ToEntero
|
||||
Literal = CType(CType(sender, LinkButton).NamingContainer.FindControl("Img" & Campo.Replace(",", "_")), Literal)
|
||||
|
||||
If ViewState(String.Format("O{0}{1}", Campo, gvi)) IsNot Nothing AndAlso ViewState(String.Format("O{0}{1}", Campo, gvi)).ToString = String.Format("{0} DESC", Campo) Then
|
||||
ViewState(String.Format("O{0}{1}", Campo, gvi)) = 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}{1}", Campo, gvi)) = String.Format("{0} DESC", Campo)
|
||||
Literal.Text = String.Format("<i class='fa fa-sort-desc' style='color:#999' ></i>")
|
||||
End If
|
||||
Orden = OrdenInicial & ViewState(String.Format("O{0}{1}", Campo, gvi)).ToString
|
||||
ViewState("Orden") = Orden
|
||||
CargaGrid(Orden)
|
||||
End Sub
|
||||
|
||||
Private Sub CargaGrid(ByVal Orden As String)
|
||||
If Orden <> String.Empty Then
|
||||
Dim DV As New DataView(CType(ViewState("DTClasificacionGeografica"), DataTable), "", Orden, DataViewRowState.CurrentRows)
|
||||
GvDatos.DataSource = DV.ToTable()
|
||||
Gv.DataSource = DV.ToTable()
|
||||
DtClasificacionGeografica = DV.ToTable()
|
||||
DV.Dispose()
|
||||
Else
|
||||
GvDatos.DataSource = CType(ViewState("DTClasificacionGeografica"), DataTable)
|
||||
Gv.DataSource = CType(ViewState("DTClasificacionGeografica"), DataTable)
|
||||
DtClasificacionGeografica = CType(ViewState("DTClasificacionGeografica"), DataTable)
|
||||
End If
|
||||
|
||||
GvDatos.DataBind()
|
||||
Gv.DataBind()
|
||||
|
||||
UpDatos.Update()
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
#Region " EXPORTAR - PDF - EXCEL "
|
||||
Protected Sub ImgExcel_Click(sender As Object, e As ImageClickEventArgs)
|
||||
Tbl.ExportToExcel("Catalogo Clasificacion Geografica")
|
||||
End Sub
|
||||
|
||||
Protected Sub BtnImprimir_Click(sender As Object, e As ImageClickEventArgs)
|
||||
ImprimiReporte()
|
||||
End Sub
|
||||
'No quitar porque no funciona el exporta PDF
|
||||
Public Overrides Sub VerifyRenderingInServerForm(control As Control)
|
||||
' Verifies that the control is rendered
|
||||
End Sub
|
||||
|
||||
Protected Sub ImprimiReporte()
|
||||
Dim params As New List(Of ReportParameter)
|
||||
params.Add(New ReportParameter("pEmp", UsuarioActual.Empresa.Empresa))
|
||||
params.Add(New ReportParameter("pImg", New Uri(Server.MapPath(String.Format("~/Empresas/{0}/Logo.png", UsuarioActual.CveEmpresa))).AbsoluteUri))
|
||||
|
||||
ImprimirPDF("AC/Reportes/RepClasificacionGeografica.rdlc", DtClasificacionGeografica, params, "ReporteClasificacionGeografica")
|
||||
End Sub
|
||||
#End Region
|
||||
End Class
|
||||
134
AC/CatFinalidad.aspx
Normal file
134
AC/CatFinalidad.aspx
Normal file
@@ -0,0 +1,134 @@
|
||||
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="CatFinalidad.aspx.vb" Inherits="AC_CatFinalidad" %>
|
||||
|
||||
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="HB" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="E" runat="Server">
|
||||
Catálogo de Finalidad
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
|
||||
<div class="portlet box blue-hoki">
|
||||
<div class="portlet-body">
|
||||
<asp:UpdatePanel ID="UpTitulos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<table class="table table-striped table-hover Widthall">
|
||||
<thead>
|
||||
<tr>
|
||||
<th width="250px" style="text-align: center">
|
||||
<asp:LinkButton ID="LbFinalidad" runat="server" CausesValidation="false" Text="" CommandArgument="Finalidad;0" OnClick="LbOrden_Click">
|
||||
Finalidad
|
||||
<asp:Literal ID="ImgFinalidad" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
||||
</asp:LinkButton>
|
||||
</th>
|
||||
<th width="100px" style="text-align: center">
|
||||
<asp:LinkButton ID="LbEstatus" runat="server" CausesValidation="false" Text="" CommandArgument="Estatus;0" OnClick="LbOrden_Click">
|
||||
Estatus
|
||||
<asp:Literal ID="ImgEstatus" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
||||
</asp:LinkButton>
|
||||
</th>
|
||||
<th width="100px" style="text-align: center">
|
||||
<asp:LinkButton ID="LbFecha" runat="server" CausesValidation="false" Text="" CommandArgument="FechaIng;0" OnClick="LbOrden_Click">
|
||||
Fecha
|
||||
<asp:Literal ID="ImgFechaIng" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
||||
</asp:LinkButton>
|
||||
</th>
|
||||
<th width="100px" style="text-align: center">
|
||||
<asp:LinkButton ID="LbUsuario" runat="server" CausesValidation="false" Text="" CommandArgument="Usuario;0" OnClick="LbOrden_Click">
|
||||
Usuario
|
||||
<asp:Literal ID="ImgUsuario" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
||||
</asp:LinkButton>
|
||||
</th>
|
||||
<th width="103" style="text-align: center">Comandos</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tr>
|
||||
<td>
|
||||
<asp:TextBox ID="TxtFinalidad" runat="server" CausesValidation="true" MaxLength="50" ValidationGroup="GrpGuardar" Width="244px"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVFinalidad" runat="server" ControlToValidate="TxtFinalidad" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Finalidad''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCFinalidad" runat="server" HighlightCssClass="vco" TargetControlID="RFVFinalidad" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td style="text-align: center">
|
||||
<asp:LinkButton ID="LbAgregar" runat="server" CausesValidation="true" CssClass="Texto" Text="Agregar" ValidationGroup="GrpGuardar"></asp:LinkButton></td>
|
||||
</tr>
|
||||
</table>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" DataKeyNames="CveFinalidad" EmptyDataText="No se encontraron Finalidad Registrados" ToolTip="Listado de Finalidad" CssClass="table table-striped table-advance table-hover Widthall" GridLines="None">
|
||||
<Columns>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlFinalidad" runat="server" Text='<%# Eval("Finalidad", "{0}") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<EditItemTemplate>
|
||||
<asp:TextBox ID="TxtFinalidad" runat="server" CausesValidation="true" MaxLength="50" Text='<%# Eval("Finalidad") %>' ValidationGroup="GrpGV" Width="244px"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVFinalidad" runat="server" ControlToValidate="TxtFinalidad" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Finalidad''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGV"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCFinalidad" runat="server" HighlightCssClass="vco" TargetControlID="RFVFinalidad" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</EditItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlEstatus" runat="server" Text='<%# Eval("Estatus") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<EditItemTemplate>
|
||||
<asp:CheckBox ID="ChkEstatus" runat="server" Checked='<%# If (Eval("Estatus").ToString = "Activo", True, False) %>' />
|
||||
</EditItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlFecha" runat="server" Text='<%# Eval("FechaIng", "{0:d}") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlUsuario" runat="server" Text='<%# Eval("Usuario") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Editar">
|
||||
<EditItemTemplate>
|
||||
<center>
|
||||
<asp:LinkButton ID="imgU" runat="server" AlternateText="Actualizar" CausesValidation="True" CommandName="Update"
|
||||
CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-check'></i>" ValidationGroup="GrpGV" />
|
||||
<asp:LinkButton ID="imgC" runat="server" AlternateText="Cancelar" CausesValidation="False" CommandName="Cancel"
|
||||
CssClass="btn btn-circle btn-sm red" Text="<i class='fa fa-times'></i>" />
|
||||
</center>
|
||||
</EditItemTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="imgE" runat="server" AlternateText="Editar" CausesValidation="False" CommandName="Edit"
|
||||
CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-pencil'></i>"/>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Eliminar">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="imgD" runat="server" AlternateText="Eliminar" CausesValidation="False" CommandName="Delete"
|
||||
CssClass="btn btn-circle btn-sm red" Text="<i class='icon-trash'></i>"
|
||||
data-toggle="confirmation" data-popout="true" data-original-title="confirmar" data-btn-ok-label="si"/>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
<RowStyle CssClass="Texto" />
|
||||
<AlternatingRowStyle CssClass="TextoAlterno" />
|
||||
</asp:GridView>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</div>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
||||
<script language="javascript" type="text/javascript">
|
||||
function C() {
|
||||
return confirm('¿Está seguro que desea eliminar la Finalidad?');
|
||||
}
|
||||
</script>
|
||||
</asp:Content>
|
||||
|
||||
196
AC/CatFinalidad.aspx.vb
Normal file
196
AC/CatFinalidad.aspx.vb
Normal file
@@ -0,0 +1,196 @@
|
||||
Option Explicit On
|
||||
Option Strict On
|
||||
|
||||
Imports System.Data
|
||||
Imports System.Linq
|
||||
Imports Extensiones
|
||||
|
||||
Partial Class AC_CatFinalidad
|
||||
Inherits ClsPaginas
|
||||
|
||||
Public Property PuedeEditar As Boolean
|
||||
Get
|
||||
Return CBool(ViewState("PuedeEditar"))
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
ViewState("PuedeEditar") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Property PuedeEliminar As Boolean
|
||||
Get
|
||||
Return CBool(ViewState("PuedeEditar"))
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
ViewState("PuedeEditar") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||
If Not Page.IsPostBack Then
|
||||
ViewState("Orden") = ""
|
||||
CargaDatos()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Public Sub CargaDatos()
|
||||
Dim ObjFinalidad As New ClsAC
|
||||
If ObjFinalidad.GetFinalidad() Then
|
||||
ViewState("DTFinalidad") = ObjFinalidad.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
|
||||
GlobalDTAC_Finalidad = ObjFinalidad.DtResultados
|
||||
Else
|
||||
Me.GvDatos.DataSource = Nothing
|
||||
ViewState("DTFinalidad") = Nothing
|
||||
End If
|
||||
|
||||
ObjFinalidad.Dispose()
|
||||
|
||||
If ViewState("Orden").ToString() <> String.Empty Then
|
||||
CargaGrid(ViewState("Orden").ToString())
|
||||
Else
|
||||
CargaGrid("")
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Protected Sub LbAgregar_Click(sender As Object, e As System.EventArgs) Handles LbAgregar.Click
|
||||
Dim ObjFinalidad As New ClsAC
|
||||
If ObjFinalidad.AddFinalidad(TxtFinalidad.Text.Trim, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
|
||||
TxtFinalidad.Text = ""
|
||||
Alert("El Nuevo Registro se guardó correctamente.", TipoMensaje.MsgInformacion)
|
||||
UpTitulos.Update()
|
||||
ViewState("DTFinalidad") = ObjFinalidad.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
|
||||
GlobalDTAC_Finalidad = ObjFinalidad.DtResultados
|
||||
|
||||
If ViewState("Orden").ToString() <> String.Empty Then
|
||||
CargaGrid(ViewState("Orden").ToString())
|
||||
Else
|
||||
CargaGrid("")
|
||||
End If
|
||||
End If
|
||||
ObjFinalidad.Dispose()
|
||||
End Sub
|
||||
|
||||
#Region "GV D A T O S"
|
||||
Protected Sub GvDatos_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvDatos.RowDataBound
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
If e.Row.RowIndex = 0 Then
|
||||
e.Row.Cells(0).Width = Unit.Pixel(250)
|
||||
e.Row.Cells(1).Width = Unit.Pixel(100)
|
||||
e.Row.Cells(2).Width = Unit.Pixel(100)
|
||||
e.Row.Cells(3).Width = Unit.Pixel(100)
|
||||
e.Row.Cells(4).Width = Unit.Pixel(50)
|
||||
e.Row.Cells(5).Width = Unit.Pixel(50)
|
||||
End If
|
||||
e.Row.Cells(0).HorizontalAlign = HorizontalAlign.Left
|
||||
e.Row.Cells(1).HorizontalAlign = HorizontalAlign.Center
|
||||
e.Row.Cells(2).HorizontalAlign = HorizontalAlign.Center
|
||||
e.Row.Cells(3).HorizontalAlign = HorizontalAlign.Center
|
||||
e.Row.Cells(4).HorizontalAlign = HorizontalAlign.Center
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Protected Sub GvDatos_RowDeleting(sender As Object, e As System.Web.UI.WebControls.GridViewDeleteEventArgs) Handles GvDatos.RowDeleting
|
||||
Dim ObjFinalidad As New ClsAC
|
||||
If ObjFinalidad.RemoveFinalidad(GvDatos.DataKeys(e.RowIndex).Value.ToString.ToEntero) Then
|
||||
GvDatos.EditIndex = -1
|
||||
ViewState("DTFinalidad") = ObjFinalidad.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
|
||||
GlobalDTAC_Finalidad = ObjFinalidad.DtResultados
|
||||
Alert("El Registro se eliminó correctamente.", TipoMensaje.MsgInformacion)
|
||||
End If
|
||||
|
||||
ObjFinalidad.Dispose()
|
||||
|
||||
If ViewState("Orden").ToString() <> String.Empty Then
|
||||
CargaGrid(ViewState("Orden").ToString())
|
||||
Else
|
||||
CargaGrid("")
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Protected Sub GvDatos_RowCancelingEdit(sender As Object, e As System.Web.UI.WebControls.GridViewCancelEditEventArgs) Handles GvDatos.RowCancelingEdit
|
||||
GvDatos.EditIndex = -1
|
||||
If ViewState("Orden").ToString() <> String.Empty Then
|
||||
CargaGrid(ViewState("Orden").ToString())
|
||||
Else
|
||||
CargaGrid("")
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Protected Sub GvDatos_RowUpdating(sender As Object, e As System.Web.UI.WebControls.GridViewUpdateEventArgs) Handles GvDatos.RowUpdating
|
||||
|
||||
Dim ObjFinalidad As New ClsAC
|
||||
|
||||
Dim Finalidad As String = DirectCast(GvDatos.Rows(e.RowIndex).FindControl("TxtFinalidad"), TextBox).Text.Trim
|
||||
Dim Estatus As Boolean = GvDatos.Rows(e.RowIndex).FCCheckBox("ChkEstatus").Checked
|
||||
Dim CveFinalidad As Integer = GvDatos.DataKeys(e.RowIndex).Value.ToString.ToEntero
|
||||
|
||||
If ObjFinalidad.UpdateFinalidad(Finalidad, Estatus, CveFinalidad) Then
|
||||
GvDatos.EditIndex = -1
|
||||
ViewState("DTFinalidad") = ObjFinalidad.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
|
||||
GlobalDTAC_Finalidad = ObjFinalidad.DtResultados
|
||||
Alert("Los cambios se guardaron correctamente.", TipoMensaje.MsgInformacion)
|
||||
End If
|
||||
|
||||
ObjFinalidad.Dispose()
|
||||
|
||||
If ViewState("Orden").ToString() <> String.Empty Then
|
||||
CargaGrid(ViewState("Orden").ToString())
|
||||
Else
|
||||
CargaGrid("")
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Sub GvDatos_RowEditing(sender As Object, e As System.Web.UI.WebControls.GridViewEditEventArgs) Handles GvDatos.RowEditing
|
||||
GvDatos.EditIndex = e.NewEditIndex
|
||||
|
||||
If ViewState("Orden").ToString() <> String.Empty Then
|
||||
CargaGrid(ViewState("Orden").ToString())
|
||||
Else
|
||||
CargaGrid("")
|
||||
End If
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
#Region "O R D E N A M I E N T O"
|
||||
|
||||
Protected Sub LbOrden_Click(ByVal sender As Object, ByVal e As EventArgs)
|
||||
Dim Orden As String = ""
|
||||
Dim Campo As String = ""
|
||||
Dim gvi As Integer = 0
|
||||
Dim Literal As Literal = Nothing
|
||||
Const OrdenInicial As String = ""
|
||||
Dim Arg(2) As String
|
||||
|
||||
Arg = CType(sender, LinkButton).CommandArgument().ToString.Split(";"c)
|
||||
Campo = Arg(0)
|
||||
gvi = Arg(1).ToEntero
|
||||
Literal = CType(CType(sender, LinkButton).NamingContainer.FindControl("Img" & Campo.Replace(",", "_")), Literal)
|
||||
|
||||
If ViewState(String.Format("O{0}{1}", Campo, gvi)) IsNot Nothing AndAlso ViewState(String.Format("O{0}{1}", Campo, gvi)).ToString = String.Format("{0} DESC", Campo) Then
|
||||
ViewState(String.Format("O{0}{1}", Campo, gvi)) = 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}{1}", Campo, gvi)) = String.Format("{0} DESC", Campo)
|
||||
Literal.Text = String.Format("<i class='fa fa-sort-desc' style='color:#999' ></i>")
|
||||
End If
|
||||
Orden = OrdenInicial & ViewState(String.Format("O{0}{1}", Campo, gvi)).ToString
|
||||
ViewState("Orden") = Orden
|
||||
CargaGrid(Orden)
|
||||
End Sub
|
||||
|
||||
Private Sub CargaGrid(ByVal Orden As String)
|
||||
If Orden <> String.Empty Then
|
||||
Dim DV As New DataView(CType(ViewState("DTFinalidad"), DataTable), "", Orden, DataViewRowState.CurrentRows)
|
||||
GvDatos.DataSource = DV.ToTable()
|
||||
DV.Dispose()
|
||||
Else
|
||||
GvDatos.DataSource = CType(ViewState("DTFinalidad"), DataTable)
|
||||
End If
|
||||
|
||||
GvDatos.DataBind()
|
||||
UpDatos.Update()
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
End Class
|
||||
226
AC/CatFuentesFinanciamiento.aspx
Normal file
226
AC/CatFuentesFinanciamiento.aspx
Normal file
@@ -0,0 +1,226 @@
|
||||
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="CatFuentesFinanciamiento.aspx.vb" Inherits="AC_CatFuentesFinanciamiento" %>
|
||||
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="HB" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="E" runat="Server">
|
||||
Catálogo de Fuentes de Financiamiento
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
<img src="/Imagenes/separador02.gif" alt="" />
|
||||
<asp:ImageButton ID="ImgExcel" OnClick="ImgExcel_Click" runat="server" ImageUrl="/Imagenes/IconoExcel.gif" Width="17px" Height="17px" />
|
||||
<img src="/Imagenes/separador02.gif" alt="" />
|
||||
|
||||
<asp:ImageButton ID="BtnImprimir" OnClick="BtnImprimir_Click" runat="server" alt="Imprimir" src="/Imagenes/btnImprimir.gif" Style="cursor: pointer; height: 20px" />
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
|
||||
<div class="portlet box blue-hoki" style="width: 1000px;">
|
||||
<div class="portlet-body">
|
||||
<asp:UpdatePanel ID="UpTitulos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<table class="table table-striped table-advance table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<th width="82px" style="text-align: center">
|
||||
<asp:LinkButton ID="LbCodigoFuenteFinanciamiento" runat="server" CausesValidation="false" Text="" CommandArgument="CodigoFuenteFinanciamiento;0" OnClick="LbOrden_Click">
|
||||
Código
|
||||
<asp:Literal ID="ImgCodigoFuenteFinanciamiento" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
||||
</asp:LinkButton>
|
||||
</th>
|
||||
<th width="250px" style="text-align: center">
|
||||
<asp:LinkButton ID="LbFuenteFinanciamiento" runat="server" CausesValidation="false" Text="" CommandArgument="FuenteFinanciamiento;0" OnClick="LbOrden_Click">
|
||||
Fuente Financiamiento
|
||||
<asp:Literal ID="ImgFuenteFinanciamiento" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
||||
</asp:LinkButton>
|
||||
</th>
|
||||
<th width="160px" style="text-align: center">
|
||||
<asp:LinkButton ID="LbNombre" runat="server" CausesValidation="false" Text="" CommandArgument="Nombre;0" OnClick="LbOrden_Click">
|
||||
Clave CONAC
|
||||
<asp:Literal ID="ImgNombre" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
||||
</asp:LinkButton>
|
||||
</th>
|
||||
<%--<td width="150px"><asp:LinkButton ID="LbFuenteFinanciamiento" runat="server" CausesValidation="false" Text="Dependecias"></asp:LinkButton> <asp:ImageButton ID="ImgFuenteFinanciamientoCONAC" runat="server" CausesValidation="false" ImageUrl="/Imagenes/FlechasAbajo.gif" /></td>--%>
|
||||
<th width="100px" style="text-align: center">
|
||||
<asp:LinkButton ID="LbEstatus" runat="server" CausesValidation="false" Text="" CommandArgument="Estatus;0" OnClick="LbOrden_Click">
|
||||
Estatus
|
||||
<asp:Literal ID="ImgEstatus" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
||||
</asp:LinkButton>
|
||||
</th>
|
||||
<th width="100px" style="text-align: center">
|
||||
<asp:LinkButton ID="LbFecha" runat="server" CausesValidation="false" Text="" CommandArgument="FechaIng;0" OnClick="LbOrden_Click">
|
||||
Fecha
|
||||
<asp:Literal ID="ImgFechaIng" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
||||
</asp:LinkButton>
|
||||
</th>
|
||||
<th width="100px" style="text-align: center">
|
||||
<asp:LinkButton ID="LbUsuario" runat="server" CausesValidation="false" Text="" CommandArgument="Usuario;0" OnClick="LbOrden_Click">
|
||||
Usuario
|
||||
<asp:Literal ID="IMgUsuario" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
||||
</asp:LinkButton>
|
||||
</th>
|
||||
<th width="119" style="text-align: center">Comandos</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tr>
|
||||
<td>
|
||||
<asp:TextBox ID="TxtCodigo" runat="server" CausesValidation="true" MaxLength="5" ValidationGroup="GrpGuardar" Width="72px"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVCodigo" runat="server" ControlToValidate="TxtCodigo" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Codigo''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCECodigo" runat="server" HighlightCssClass="vco" TargetControlID="RFVCodigo" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</td>
|
||||
<td>
|
||||
<asp:TextBox ID="TxtFuenteFinanciamiento" runat="server" CausesValidation="true" MaxLength="50" ValidationGroup="GrpGuardar" Width="240px"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVFuenteFinanciamiento" runat="server" ControlToValidate="TxtFuenteFinanciamiento" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''FuenteFinanciamiento''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCFuenteFinanciamiento" runat="server" HighlightCssClass="vco" TargetControlID="RFVFuenteFinanciamiento" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</td>
|
||||
<%-- <td>
|
||||
<asp:TextBox ID="TxtCveFuenteFinanciamientoCONAC" runat="server" CausesValidation="true" MaxLength="10" ValidationGroup="GrpGuardar" Width="145px"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVCveFuenteFinanciamientoCONAC" runat="server" ControlToValidate="TxtCveFuenteFinanciamientoCONAC" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Código''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCCveFuenteFinanciamientoCONAC" runat="server" HighlightCssClass="vco" TargetControlID="RFVCveFuenteFinanciamientoCONAC" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</td>--%>
|
||||
<td>
|
||||
<asp:DropDownList ID="DdlFuenteFinanciamientoCONAC" runat="server" AppendDataBoundItems="true" DataValueField="CveFinanciamientoCONAC" DataTextField="Nombre" ValidationGroup="GrpGuardar" Width="150px">
|
||||
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RFVFuenteFinanciamientoCONAC" runat="server" ControlToValidate="DdlFuenteFinanciamientoCONAC" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''FuenteFinanciamientoCONAC''</b> es necesario, por favor ingréselo." InitialValue="-1" ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOFuenteFinanciamientoCONAC" runat="server" HighlightCssClass="vco" TargetControlID="RFVFuenteFinanciamientoCONAC" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td style="text-align: center">
|
||||
<asp:LinkButton ID="LbAgregar" runat="server" CausesValidation="true" CssClass="Texto" Text="Agregar" ValidationGroup="GrpGuardar"></asp:LinkButton></td>
|
||||
</tr>
|
||||
</table>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" DataKeyNames="CveFuenteFinanciamiento" EmptyDataText="No se encontraron FuentesFinanciamiento Registrados" ToolTip="Listado de FuentesFinanciamiento" CssClass="table table-striped table-advance table-hover" Style="margin-top: -10px;" GridLines="None">
|
||||
<Columns>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlCodigoFuenteFinanciamiento" runat="server" Text='<%# Eval("CodigoFuenteFinanciamiento", "{0}") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<EditItemTemplate>
|
||||
<asp:TextBox ID="TxtCodigo" runat="server" CausesValidation="true" MaxLength="5" Text='<%# Eval("CodigoFuenteFinanciamiento") %>' ValidationGroup="GrpGV" Width="72px"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVTxtCodigoFuenteFinanciamiento" runat="server" ControlToValidate="TxtCodigo" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''FuenteFinanciamiento''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGV"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCTxtCodigoFuenteFinanciamiento" runat="server" HighlightCssClass="vco" TargetControlID="RFVTxtCodigoFuenteFinanciamiento" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</EditItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlFuenteFinanciamiento" runat="server" Text='<%# Eval("FuenteFinanciamiento", "{0}") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<EditItemTemplate>
|
||||
<asp:TextBox ID="TxtFuenteFinanciamiento" runat="server" CausesValidation="true" MaxLength="50" Text='<%# Eval("FuenteFinanciamiento") %>' ValidationGroup="GrpGV" Width="238px"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVFuenteFinanciamiento" runat="server" ControlToValidate="TxtFuenteFinanciamiento" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''FuenteFinanciamiento''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGV"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCFuenteFinanciamiento" runat="server" HighlightCssClass="vco" TargetControlID="RFVFuenteFinanciamiento" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</EditItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<%-- <asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlCveFuenteFinanciamientoCONAC" runat="server" Text='<%# Eval("CveFuenteFinanciamientoCONAC", "{0}")%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<EditItemTemplate>
|
||||
<asp:TextBox ID="TxtCveFuenteFinanciamientoCONAC" runat="server" CausesValidation="true" MaxLength="50" Text='<%# Eval("CveFuenteFinanciamientoCONAC")%>' ValidationGroup="GrpGV" Width="145px"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVCveFuenteFinanciamientoCONAC" runat="server" ControlToValidate="TxtCveFuenteFinanciamientoCONAC" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Código''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGV"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCCveFuenteFinanciamientoCONAC" runat="server" HighlightCssClass="vco" TargetControlID="RFVCveFuenteFinanciamientoCONAC" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</EditItemTemplate>
|
||||
</asp:TemplateField>
|
||||
--%>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlFuenteFinanciamientoCONAC" runat="server" Text='<%# Eval("Nombre", "{0}")%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<EditItemTemplate>
|
||||
<asp:DropDownList ID="DdlFuenteFinanciamientoCONAC" runat="server" DataValueField="CveFinanciamientoCONAC" DataTextField="Nombre" Width="150px"></asp:DropDownList>
|
||||
</EditItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlEstatus" runat="server" Text='<%# Eval("Estatus") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<EditItemTemplate>
|
||||
<asp:CheckBox ID="ChkEstatus" runat="server" Checked='<%# If (Eval("Estatus").ToString = "Activo", True, False) %>' />
|
||||
</EditItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlFecha" runat="server" Text='<%# Eval("FechaIng", "{0:d}") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlUsuario" runat="server" Text='<%# Eval("Usuario") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Editar">
|
||||
<EditItemTemplate>
|
||||
<center>
|
||||
<asp:LinkButton ID="imgU" runat="server" AlternateText="Actualizar" CausesValidation="True" CommandName="Update"
|
||||
CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-check'></i>" ValidationGroup="GrpGV" />
|
||||
<asp:LinkButton ID="imgC" runat="server" AlternateText="Cancelar" CausesValidation="False" CommandName="Cancel"
|
||||
CssClass="btn btn-circle btn-sm red" Text="<i class='fa fa-times'></i>" />
|
||||
</center>
|
||||
</EditItemTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="imgE" runat="server" AlternateText="Editar" CausesValidation="False" CommandName="Edit"
|
||||
CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-pencil'></i>" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Eliminar">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="imgD" runat="server" AlternateText="Eliminar" CausesValidation="False" CommandName="Delete"
|
||||
CssClass="btn btn-circle btn-sm red" Text="<i class='icon-trash'></i>"
|
||||
data-toggle="confirmation" data-popout="true" data-original-title="confirmar" data-btn-ok-label="si" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
<RowStyle CssClass="Texto" />
|
||||
<AlternatingRowStyle CssClass="TextoAlterno" />
|
||||
</asp:GridView>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<table runat="server" id="Tbl" style="display: none;">
|
||||
<tr>
|
||||
<td>
|
||||
<asp:UpdatePanel runat="server">
|
||||
<ContentTemplate>
|
||||
<asp:GridView ID="Gv" runat="server" AutoGenerateColumns="False" GridLines="None">
|
||||
<Columns>
|
||||
<asp:BoundField HeaderText="Código" DataField="CodigoFuenteFinanciamiento" DataFormatString="{0}" ItemStyle-Width="80" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField HeaderText="Fuente Financiamiento" DataField="FuenteFinanciamiento" DataFormatString="{0}" ItemStyle-Width="250px" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField HeaderText="Clave CONAC" DataField="Nombre" DataFormatString="{0}" ItemStyle-Width="160" ItemStyle-HorizontalAlign="Left"/>
|
||||
<asp:BoundField HeaderText="Estatus" DataField="Estatus" DataFormatString="{0}" ItemStyle-Width="100" ItemStyle-HorizontalAlign="Left"/>
|
||||
<asp:BoundField HeaderText="Fecha" DataField="FechaIng" DataFormatString="{0:d}" ItemStyle-Width="100" ItemStyle-HorizontalAlign="Left"/>
|
||||
<asp:BoundField HeaderText="Usuario" DataField="Usuario" ItemStyle-Width="100" ItemStyle-HorizontalAlign="Left"/>
|
||||
</Columns>
|
||||
<HeaderStyle CssClass="Titulos" />
|
||||
<RowStyle CssClass="Texto" />
|
||||
<AlternatingRowStyle CssClass="TextoAlterno" />
|
||||
</asp:GridView>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
||||
<script language="javascript" type="text/javascript">
|
||||
function C() {
|
||||
return confirm('¿Está seguro que desea eliminar el Registro?');
|
||||
}
|
||||
</script>
|
||||
</asp:Content>
|
||||
|
||||
|
||||
236
AC/CatFuentesFinanciamiento.aspx.vb
Normal file
236
AC/CatFuentesFinanciamiento.aspx.vb
Normal file
@@ -0,0 +1,236 @@
|
||||
Option Explicit On
|
||||
Option Strict On
|
||||
|
||||
Imports System.Data
|
||||
Imports System.Linq
|
||||
Imports Extensiones
|
||||
Imports Microsoft.Reporting.WebForms
|
||||
|
||||
Partial Class AC_CatFuentesFinanciamiento
|
||||
Inherits ClsPaginas
|
||||
Private Property DtFuentesFinanciamiento As DataTable
|
||||
Get
|
||||
Return CType(ViewState("DtFuentesFinanciamiento"), DataTable)
|
||||
End Get
|
||||
Set(value As DataTable)
|
||||
ViewState("DtFuentesFinanciamiento") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||
If Not Page.IsPostBack Then
|
||||
ViewState("Orden") = ""
|
||||
CargaDatos()
|
||||
CargaFuenteFinanciamientoCONAC()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Public Sub CargaDatos()
|
||||
Dim ObjFuentesFinanciamiento As New ClsAC
|
||||
If ObjFuentesFinanciamiento.GetFuentesFinanciamiento() Then
|
||||
ViewState("DTFuentesFinanciamiento") = ObjFuentesFinanciamiento.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
|
||||
GlobalDTAC_FuentesFinanciamiento(-1) = ObjFuentesFinanciamiento.DtResultados
|
||||
Else
|
||||
Me.GvDatos.DataSource = Nothing
|
||||
End If
|
||||
|
||||
ObjFuentesFinanciamiento.Dispose()
|
||||
|
||||
If ViewState("Orden").ToString() <> String.Empty Then
|
||||
CargaGrid(ViewState("Orden").ToString())
|
||||
Else
|
||||
CargaGrid("")
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Protected Sub LbAgregar_Click(sender As Object, e As System.EventArgs) Handles LbAgregar.Click
|
||||
Dim ObjFuentesFinanciamiento As New ClsAC
|
||||
If ObjFuentesFinanciamiento.AddFuenteFinanciamiento(TxtCodigo.Text.Trim, TxtFuenteFinanciamiento.Text.Trim, DdlFuenteFinanciamientoCONAC.SelectedValue.ToEntero, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
|
||||
TxtFuenteFinanciamiento.Text = ""
|
||||
'TxtFuenteFinanciamientoCONAC.Text = ""
|
||||
Alert("El Registro se guardó correctamente.", TipoMensaje.MsgInformacion)
|
||||
UpTitulos.Update()
|
||||
ViewState("DTFuentesFinanciamiento") = ObjFuentesFinanciamiento.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
|
||||
GlobalDTAC_FuentesFinanciamiento(-1) = ObjFuentesFinanciamiento.DtResultados
|
||||
|
||||
If ViewState("Orden").ToString() <> String.Empty Then
|
||||
CargaGrid(ViewState("Orden").ToString())
|
||||
Else
|
||||
CargaGrid("")
|
||||
End If
|
||||
End If
|
||||
ObjFuentesFinanciamiento.Dispose()
|
||||
End Sub
|
||||
|
||||
Private Sub CargaFuenteFinanciamientoCONAC()
|
||||
DdlFuenteFinanciamientoCONAC.DataSource = GlobalDTAC_FuentesFinanciamientoCONAC
|
||||
DdlFuenteFinanciamientoCONAC.DataBind()
|
||||
End Sub
|
||||
|
||||
#Region "G V D A T O S"
|
||||
Protected Sub GvDatos_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvDatos.RowDataBound
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
If e.Row.RowIndex = 0 Then
|
||||
e.Row.Cells(0).Width = Unit.Pixel(82)
|
||||
e.Row.Cells(1).Width = Unit.Pixel(250)
|
||||
e.Row.Cells(2).Width = Unit.Pixel(160)
|
||||
e.Row.Cells(3).Width = Unit.Pixel(100)
|
||||
e.Row.Cells(4).Width = Unit.Pixel(100)
|
||||
e.Row.Cells(5).Width = Unit.Pixel(100)
|
||||
e.Row.Cells(6).Width = Unit.Pixel(50)
|
||||
e.Row.Cells(7).Width = Unit.Pixel(50)
|
||||
'e.Row.Cells(7).Width = Unit.Pixel(50)
|
||||
End If
|
||||
e.Row.Cells(0).HorizontalAlign = HorizontalAlign.Center
|
||||
e.Row.Cells(1).HorizontalAlign = HorizontalAlign.Left
|
||||
e.Row.Cells(2).HorizontalAlign = HorizontalAlign.Left
|
||||
e.Row.Cells(3).HorizontalAlign = HorizontalAlign.Center
|
||||
e.Row.Cells(4).HorizontalAlign = HorizontalAlign.Center
|
||||
e.Row.Cells(5).HorizontalAlign = HorizontalAlign.Center
|
||||
e.Row.Cells(6).HorizontalAlign = HorizontalAlign.Center
|
||||
e.Row.Cells(7).HorizontalAlign = HorizontalAlign.Center
|
||||
|
||||
If e.Row.RowState = DataControlRowState.Edit OrElse e.Row.RowState = 5 Then
|
||||
e.Row.FCDropDownList("DdlFuenteFinanciamientoCONAC").DataSource = GlobalDTAC_FuentesFinanciamientoCONAC
|
||||
e.Row.FCDropDownList("DdlFuenteFinanciamientoCONAC").DataBind()
|
||||
e.Row.FCDropDownList("DdlFuenteFinanciamientoCONAC").SelectedValue = e.Row.DBCampo("CveFuenteFinanciamientoCONAC")
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Protected Sub GvDatos_RowDeleting(sender As Object, e As System.Web.UI.WebControls.GridViewDeleteEventArgs) Handles GvDatos.RowDeleting
|
||||
Dim ObjFuentesFinanciamiento As New ClsAC
|
||||
If ObjFuentesFinanciamiento.RemoveFuenteFinanciamiento(GvDatos.DataKeys(e.RowIndex).Value.ToString.ToEntero) Then
|
||||
GvDatos.EditIndex = -1
|
||||
ViewState("DTFuentesFinanciamiento") = ObjFuentesFinanciamiento.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
|
||||
GlobalDTAC_FuentesFinanciamiento(-1) = ObjFuentesFinanciamiento.DtResultados
|
||||
Alert("El Registro se eliminó correctamente.", TipoMensaje.MsgInformacion)
|
||||
End If
|
||||
|
||||
ObjFuentesFinanciamiento.Dispose()
|
||||
|
||||
If ViewState("Orden").ToString() <> String.Empty Then
|
||||
CargaGrid(ViewState("Orden").ToString())
|
||||
Else
|
||||
CargaGrid("")
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Protected Sub GvDatos_RowCancelingEdit(sender As Object, e As System.Web.UI.WebControls.GridViewCancelEditEventArgs) Handles GvDatos.RowCancelingEdit
|
||||
GvDatos.EditIndex = -1
|
||||
If ViewState("Orden").ToString() <> String.Empty Then
|
||||
CargaGrid(ViewState("Orden").ToString())
|
||||
Else
|
||||
CargaGrid("")
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Protected Sub GvDatos_RowUpdating(sender As Object, e As System.Web.UI.WebControls.GridViewUpdateEventArgs) Handles GvDatos.RowUpdating
|
||||
|
||||
Dim CodigoFuenteFinanciamiento As String = DirectCast(GvDatos.Rows(e.RowIndex).FindControl("TxtCodigo"), TextBox).Text.Trim
|
||||
Dim FuenteFinanciamiento As String = DirectCast(GvDatos.Rows(e.RowIndex).FindControl("TxtFuenteFinanciamiento"), TextBox).Text.Trim
|
||||
Dim Estatus As Boolean = GvDatos.Rows(e.RowIndex).FCCheckBox("ChkEstatus").Checked
|
||||
Dim CveFuenteFinanciamiento As Integer = GvDatos.DataKeys(e.RowIndex).Value.ToString.ToEntero
|
||||
'Dim CveFuenteFinanciamientoCONAC As String = DirectCast(GvDatos.Rows(e.RowIndex).FindControl("TxtCveFuenteFinanciamientoCONAC"), TextBox).Text.Trim
|
||||
Dim FuenteFinanciamientoCONAC As Integer = DirectCast(GvDatos.Rows(e.RowIndex).FindControl("DdlFuenteFinanciamientoCONAC"), DropDownList).SelectedValue.ToEntero
|
||||
|
||||
Dim ObjFuentesFinanciamiento As New ClsAC
|
||||
If ObjFuentesFinanciamiento.UpdateFuenteFinanciamiento(CodigoFuenteFinanciamiento, FuenteFinanciamiento, FuenteFinanciamientoCONAC, Estatus, CveFuenteFinanciamiento) Then
|
||||
GvDatos.EditIndex = -1
|
||||
ViewState("DTFuentesFinanciamiento") = ObjFuentesFinanciamiento.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
|
||||
GlobalDTAC_FuentesFinanciamiento(-1) = ObjFuentesFinanciamiento.DtResultados
|
||||
Alert("Los cambios se guardaron correctamente.", TipoMensaje.MsgInformacion)
|
||||
End If
|
||||
|
||||
ObjFuentesFinanciamiento.Dispose()
|
||||
|
||||
If ViewState("Orden").ToString() <> String.Empty Then
|
||||
CargaGrid(ViewState("Orden").ToString())
|
||||
Else
|
||||
CargaGrid("")
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Sub GvDatos_RowEditing(sender As Object, e As System.Web.UI.WebControls.GridViewEditEventArgs) Handles GvDatos.RowEditing
|
||||
GvDatos.EditIndex = e.NewEditIndex
|
||||
|
||||
If ViewState("Orden").ToString() <> String.Empty Then
|
||||
CargaGrid(ViewState("Orden").ToString())
|
||||
Else
|
||||
CargaGrid("")
|
||||
End If
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
#Region "O R D E N A M I E N T O"
|
||||
|
||||
Protected Sub LbOrden_Click(ByVal sender As Object, ByVal e As EventArgs)
|
||||
Dim Orden As String = ""
|
||||
Dim Campo As String = ""
|
||||
Dim gvi As Integer = 0
|
||||
Dim Literal As Literal = Nothing
|
||||
Const OrdenInicial As String = ""
|
||||
Dim Arg(2) As String
|
||||
|
||||
Arg = CType(sender, LinkButton).CommandArgument().ToString.Split(";"c)
|
||||
Campo = Arg(0)
|
||||
gvi = Arg(1).ToEntero
|
||||
Literal = CType(CType(sender, LinkButton).NamingContainer.FindControl("Img" & Campo.Replace(",", "_")), Literal)
|
||||
|
||||
If ViewState(String.Format("O{0}{1}", Campo, gvi)) IsNot Nothing AndAlso ViewState(String.Format("O{0}{1}", Campo, gvi)).ToString = String.Format("{0} DESC", Campo) Then
|
||||
ViewState(String.Format("O{0}{1}", Campo, gvi)) = 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}{1}", Campo, gvi)) = String.Format("{0} DESC", Campo)
|
||||
Literal.Text = String.Format("<i class='fa fa-sort-desc' style='color:#999' ></i>")
|
||||
End If
|
||||
Orden = OrdenInicial & ViewState(String.Format("O{0}{1}", Campo, gvi)).ToString
|
||||
ViewState("Orden") = Orden
|
||||
CargaGrid(Orden)
|
||||
End Sub
|
||||
|
||||
Private Sub CargaGrid(ByVal Orden As String)
|
||||
If Orden <> String.Empty Then
|
||||
Dim DV As New DataView(CType(ViewState("DTFuentesFinanciamiento"), DataTable), "", Orden, DataViewRowState.CurrentRows)
|
||||
GvDatos.DataSource = DV.ToTable()
|
||||
Gv.DataSource = DV.ToTable()
|
||||
DtFuentesFinanciamiento = DV.ToTable()
|
||||
|
||||
DV.Dispose()
|
||||
Else
|
||||
GvDatos.DataSource = CType(ViewState("DTFuentesFinanciamiento"), DataTable)
|
||||
Gv.DataSource = CType(ViewState("DTFuentesFinanciamiento"), DataTable)
|
||||
DtFuentesFinanciamiento = CType(ViewState("DTFuentesFinanciamiento"), DataTable)
|
||||
End If
|
||||
|
||||
GvDatos.DataBind()
|
||||
Gv.DataBind()
|
||||
UpDatos.Update()
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
|
||||
#Region " EXPORTAR - PDF - EXCEL "
|
||||
Protected Sub ImgExcel_Click(sender As Object, e As ImageClickEventArgs)
|
||||
Tbl.ExportToExcel("Catalogo de Fuentes de Financiamiento")
|
||||
End Sub
|
||||
|
||||
Protected Sub BtnImprimir_Click(sender As Object, e As ImageClickEventArgs)
|
||||
ImprimiReporte()
|
||||
End Sub
|
||||
'No quitar porque no funciona el exporta PDF
|
||||
Public Overrides Sub VerifyRenderingInServerForm(control As Control)
|
||||
' Verifies that the control is rendered
|
||||
End Sub
|
||||
|
||||
Protected Sub ImprimiReporte()
|
||||
Dim params As New List(Of ReportParameter)
|
||||
params.Add(New ReportParameter("pEmp", UsuarioActual.Empresa.Empresa))
|
||||
params.Add(New ReportParameter("pImg", New Uri(Server.MapPath(String.Format("~/Empresas/{0}/Logo.png", UsuarioActual.CveEmpresa))).AbsoluteUri))
|
||||
|
||||
ImprimirPDF("AC/Reportes/RepFuentesFinanciamiento.rdlc", DtFuentesFinanciamiento, params, "ReporteFuentesFinanciamiento")
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
End Class
|
||||
180
AC/CatFuentesFinanciamientoCONAC.aspx
Normal file
180
AC/CatFuentesFinanciamientoCONAC.aspx
Normal file
@@ -0,0 +1,180 @@
|
||||
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="CatFuentesFinanciamientoCONAC.aspx.vb" Inherits="AC_CatFuentesFinanciamientoCONAC" %>
|
||||
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="HB" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="E" runat="Server">
|
||||
Catálogo de Fuente de Financiamiento
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
<img src="/Imagenes/separador02.gif" alt="" />
|
||||
<asp:ImageButton ID="ImgExcel" OnClick="ImgExcel_Click" runat="server" ImageUrl="/Imagenes/IconoExcel.gif" Width="17px" Height="17px" />
|
||||
<img src="/Imagenes/separador02.gif" alt="" />
|
||||
|
||||
<asp:ImageButton ID="BtnImprimir" OnClick="BtnImprimir_Click" runat="server" alt="Imprimir" src="/Imagenes/btnImprimir.gif" Style="cursor: pointer; height: 20px" />
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
|
||||
<div class="portlet box blue-hoki" style="width:1000px;">
|
||||
<div class="portlet-body">
|
||||
<asp:UpdatePanel ID="UpTitulos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<table class="table table-striped table-advance table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<th width="65px" style="text-align: center">
|
||||
<asp:LinkButton ID="LbClaveFinanciamientoCONAC" runat="server" CausesValidation="false" Text="" CommandArgument="ClaveFinanciamientoCONAC;0" OnClick="LbOrden_Click">
|
||||
Clave <asp:Literal ID="ImgClaveFinanciamientoCONAC" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
||||
</asp:LinkButton>
|
||||
</th>
|
||||
<th width="250px" style="text-align: center">
|
||||
<asp:LinkButton ID="LbNombre" runat="server" CausesValidation="false" Text="" CommandArgument="Nombre;0" OnClick="LbOrden_Click">
|
||||
Nombre <asp:Literal ID="ImgNombre" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
||||
</asp:LinkButton>
|
||||
</th>
|
||||
<th width="100px" style="text-align: center">
|
||||
<asp:LinkButton ID="LbEstatus" runat="server" CausesValidation="false" Text="" CommandArgument="Estatus;0" OnClick="LbOrden_Click">
|
||||
Estatus <asp:Literal ID="ImgEstatus" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
||||
</asp:LinkButton>
|
||||
</th>
|
||||
<th width="100px" style="text-align: center">
|
||||
<asp:LinkButton ID="LbFecha" runat="server" CausesValidation="false" Text="" CommandArgument="FechaIng;0" OnClick="LbOrden_Click">
|
||||
Fecha <asp:Literal ID="ImgFechaIng" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
||||
</asp:LinkButton>
|
||||
</th>
|
||||
<th width="100px" style="text-align: center">
|
||||
<asp:LinkButton ID="LbUsuario" runat="server" CausesValidation="false" Text="" CommandArgument="Usuario;0" OnClick="LbOrden_Click">
|
||||
Usuario <asp:Literal ID="ImgUsuario" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
||||
</asp:LinkButton>
|
||||
</th>
|
||||
<th width="118" style="text-align: center">Comandos</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tr>
|
||||
|
||||
<td>
|
||||
<asp:TextBox ID="TxtClaveFinanciamientoCONAC" runat="server" CausesValidation="true" MaxLength="2" ValidationGroup="GrpGuardar" Width="55px"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVClaveFinanciamientoCONAC" runat="server" ControlToValidate="TxtClaveFinanciamientoCONAC" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''ClaveFinanciamientoCONAC''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCClaveFinanciamientoCONAC" runat="server" HighlightCssClass="vco" TargetControlID="RFVClaveFinanciamientoCONAC" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</td>
|
||||
<td>
|
||||
<asp:TextBox ID="TxtNombre" runat="server" CausesValidation="true" MaxLength="50" ValidationGroup="GrpGuardar" Width="240px"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVNombre" runat="server" ControlToValidate="TxtNombre" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Nombre''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCNombre" runat="server" HighlightCssClass="vco" TargetControlID="RFVNombre" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td style="text-align: center">
|
||||
<asp:LinkButton ID="LbAgregar" runat="server" CausesValidation="true" CssClass="Texto" Text="Agregar" ValidationGroup="GrpGuardar"></asp:LinkButton></td>
|
||||
</tr>
|
||||
</table>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" DataKeyNames="CveFinanciamientoCONAC" EmptyDataText="No se encontraron Fuente de Financiamiento Registrados" ToolTip="Listado de Fuente de Financiamiento" CssClass="table table-striped table-advance table-hover" style="margin-top:-10px;" GridLines="None" >
|
||||
<Columns>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlClaveFinanciamientoCONAC" runat="server" Text='<%# Eval("ClaveFinanciamientoCONAC", "{0}")%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<EditItemTemplate>
|
||||
<asp:TextBox ID="TxtClaveFinanciamientoCONAC" runat="server" CausesValidation="true" MaxLength="2" Text='<%# Eval("ClaveFinanciamientoCONAC")%>' ValidationGroup="GrpGV" Width="55px"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVClaveFinanciamientoCONAC" runat="server" ControlToValidate="TxtClaveFinanciamientoCONAC" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fuente de Financiamiento''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGV"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCClaveFinanciamientoCONAC" runat="server" HighlightCssClass="vco" TargetControlID="RFVClaveFinanciamientoCONAC" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</EditItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlNombre" runat="server" Text='<%# Eval("Nombre", "{0}")%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<EditItemTemplate>
|
||||
<asp:TextBox ID="TxtNombre" runat="server" CausesValidation="true" MaxLength="50" Text='<%# Eval("Nombre")%>' ValidationGroup="GrpGV" Width="240px"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVNombre" runat="server" ControlToValidate="TxtNombre" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fuente de Financiamiento''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGV"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCNombre" runat="server" HighlightCssClass="vco" TargetControlID="RFVNombre" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</EditItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlEstatus" runat="server" Text='<%# Eval("Estatus") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<EditItemTemplate>
|
||||
<asp:CheckBox ID="ChkEstatus" runat="server" Checked='<%# If (Eval("Estatus").ToString = "Activo", True, False) %>' />
|
||||
</EditItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlFecha" runat="server" Text='<%# Eval("FechaIng", "{0:d}") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlUsuario" runat="server" Text='<%# Eval("Usuario") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Editar">
|
||||
<EditItemTemplate>
|
||||
<center>
|
||||
<asp:LinkButton ID="imgU" runat="server" AlternateText="Actualizar" CausesValidation="True" CommandName="Update"
|
||||
CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-check'></i>" ValidationGroup="GrpGV" />
|
||||
<asp:LinkButton ID="imgC" runat="server" AlternateText="Cancelar" CausesValidation="False" CommandName="Cancel"
|
||||
CssClass="btn btn-circle btn-sm red" Text="<i class='fa fa-times'></i>" />
|
||||
</center>
|
||||
</EditItemTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="imgE" runat="server" AlternateText="Editar" CausesValidation="False" CommandName="Edit"
|
||||
CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-pencil'></i>" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Eliminar">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="imgD" runat="server" AlternateText="Eliminar" CausesValidation="False" CommandName="Delete"
|
||||
CssClass="btn btn-circle btn-sm red" Text="<i class='icon-trash'></i>"
|
||||
data-toggle="confirmation" data-popout="true" data-original-title="confirmar" data-btn-ok-label="si" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
<RowStyle CssClass="Texto" />
|
||||
<AlternatingRowStyle CssClass="TextoAlterno" />
|
||||
</asp:GridView>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<table runat="server" id="Tbl" style="display: none;">
|
||||
<tr>
|
||||
<td>
|
||||
<asp:UpdatePanel runat="server">
|
||||
<ContentTemplate>
|
||||
<asp:GridView ID="Gv" runat="server" AutoGenerateColumns="False" GridLines="None">
|
||||
<Columns>
|
||||
<asp:BoundField HeaderText="Clave" DataField="ClaveFinanciamientoCONAC" DataFormatString="{0}" ItemStyle-Width="65" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField HeaderText="Nombre" DataField="Nombre" DataFormatString="{0}" ItemStyle-Width="250" ItemStyle-HorizontalAlign="Left"/>
|
||||
<asp:BoundField HeaderText="Estatus" DataField="Estatus" DataFormatString="{0}" ItemStyle-Width="100" ItemStyle-HorizontalAlign="Left"/>
|
||||
<asp:BoundField HeaderText="Fecha" DataField="FechaIng" DataFormatString="{0:d}" ItemStyle-Width="100" ItemStyle-HorizontalAlign="Left"/>
|
||||
<asp:BoundField HeaderText="Usuario" DataField="Usuario" ItemStyle-Width="100" ItemStyle-HorizontalAlign="Left"/>
|
||||
</Columns>
|
||||
<HeaderStyle CssClass="Titulos" />
|
||||
<RowStyle CssClass="Texto" />
|
||||
<AlternatingRowStyle CssClass="TextoAlterno" />
|
||||
</asp:GridView>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
||||
<script language="javascript" type="text/javascript">
|
||||
function C() {
|
||||
return confirm('¿Está seguro que desea eliminar la Fuente de Financiamiento?');
|
||||
}
|
||||
</script>
|
||||
</asp:Content>
|
||||
235
AC/CatFuentesFinanciamientoCONAC.aspx.vb
Normal file
235
AC/CatFuentesFinanciamientoCONAC.aspx.vb
Normal file
@@ -0,0 +1,235 @@
|
||||
Option Explicit On
|
||||
Option Strict On
|
||||
|
||||
Imports System.Data
|
||||
Imports System.Linq
|
||||
Imports Extensiones
|
||||
Imports Microsoft.Reporting.WebForms
|
||||
|
||||
Partial Class AC_CatFuentesFinanciamientoCONAC
|
||||
Inherits ClsPaginas
|
||||
|
||||
Private Property DtFuentesFinanciamientoCONAC As DataTable
|
||||
Get
|
||||
Return CType(ViewState("DtFuentesFinanciamientoCONAC"), DataTable)
|
||||
End Get
|
||||
Set(value As DataTable)
|
||||
ViewState("DtFuentesFinanciamientoCONAC") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Property PuedeEditar As Boolean
|
||||
Get
|
||||
Return CBool(ViewState("PuedeEditar"))
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
ViewState("PuedeEditar") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Property PuedeEliminar As Boolean
|
||||
Get
|
||||
Return CBool(ViewState("PuedeEditar"))
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
ViewState("PuedeEditar") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||
If Not Page.IsPostBack Then
|
||||
ViewState("Orden") = ""
|
||||
CargaDatos()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Public Sub CargaDatos()
|
||||
Dim ObjFuentesFinanciamientoCONAC As New ClsAC
|
||||
If ObjFuentesFinanciamientoCONAC.GetFuenteFinanciamientoCONAC() Then
|
||||
ViewState("DTFuentesFinanciamientoCONAC") = ObjFuentesFinanciamientoCONAC.DtResultados
|
||||
GlobalDTAC_FuentesFinanciamientoCONAC = ObjFuentesFinanciamientoCONAC.DtResultados
|
||||
Else
|
||||
Me.GvDatos.DataSource = Nothing
|
||||
End If
|
||||
|
||||
ObjFuentesFinanciamientoCONAC.Dispose()
|
||||
|
||||
If ViewState("Orden").ToString() <> String.Empty Then
|
||||
CargaGrid(ViewState("Orden").ToString())
|
||||
Else
|
||||
CargaGrid("")
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Protected Sub LbAgregar_Click(sender As Object, e As System.EventArgs) Handles LbAgregar.Click
|
||||
Dim ObjFuentesFinanciamientoCONAC As New ClsAC
|
||||
If ObjFuentesFinanciamientoCONAC.AddFuenteFinanciamientoCONAC(TxtClaveFinanciamientoCONAC.Text.Trim, TxtNombre.Text.Trim, UsuarioActual.CveUsuario) Then
|
||||
TxtNombre.Text = ""
|
||||
TxtClaveFinanciamientoCONAC.Text = ""
|
||||
Alert("El Nuevo Registro se guardó correctamente.", TipoMensaje.MsgInformacion)
|
||||
UpTitulos.Update()
|
||||
ViewState("DTFuentesFinanciamientoCONAC") = ObjFuentesFinanciamientoCONAC.DtResultados
|
||||
GlobalDTAC_FuentesFinanciamientoCONAC = ObjFuentesFinanciamientoCONAC.DtResultados
|
||||
|
||||
If ViewState("Orden").ToString() <> String.Empty Then
|
||||
CargaGrid(ViewState("Orden").ToString())
|
||||
Else
|
||||
CargaGrid("")
|
||||
End If
|
||||
End If
|
||||
ObjFuentesFinanciamientoCONAC.Dispose()
|
||||
End Sub
|
||||
|
||||
#Region "G V D A T O S"
|
||||
Protected Sub GvDatos_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvDatos.RowDataBound
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
If e.Row.RowIndex = 0 Then
|
||||
e.Row.Cells(0).Width = Unit.Pixel(65)
|
||||
e.Row.Cells(1).Width = Unit.Pixel(250)
|
||||
e.Row.Cells(2).Width = Unit.Pixel(100)
|
||||
e.Row.Cells(3).Width = Unit.Pixel(100)
|
||||
e.Row.Cells(4).Width = Unit.Pixel(100)
|
||||
e.Row.Cells(5).Width = Unit.Pixel(50)
|
||||
e.Row.Cells(6).Width = Unit.Pixel(50)
|
||||
End If
|
||||
e.Row.Cells(0).HorizontalAlign = HorizontalAlign.Center
|
||||
e.Row.Cells(1).HorizontalAlign = HorizontalAlign.Left
|
||||
e.Row.Cells(2).HorizontalAlign = HorizontalAlign.Center
|
||||
e.Row.Cells(3).HorizontalAlign = HorizontalAlign.Center
|
||||
e.Row.Cells(4).HorizontalAlign = HorizontalAlign.Center
|
||||
e.Row.Cells(5).HorizontalAlign = HorizontalAlign.Center
|
||||
e.Row.Cells(6).HorizontalAlign = HorizontalAlign.Center
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Protected Sub GvDatos_RowDeleting(sender As Object, e As System.Web.UI.WebControls.GridViewDeleteEventArgs) Handles GvDatos.RowDeleting
|
||||
Dim ObjFuentesFinanciamientoCONAC As New ClsAC
|
||||
If ObjFuentesFinanciamientoCONAC.RemoveFuenteFinanciamientoCONAC(GvDatos.DataKeys(e.RowIndex).Value.ToString.ToEntero) Then
|
||||
GvDatos.EditIndex = -1
|
||||
ViewState("DTFuentesFinanciamientoCONAC") = ObjFuentesFinanciamientoCONAC.DtResultados
|
||||
GlobalDTAC_FuentesFinanciamientoCONAC = ObjFuentesFinanciamientoCONAC.DtResultados
|
||||
Alert("El Registro se eliminó correctamente.", TipoMensaje.MsgInformacion)
|
||||
End If
|
||||
|
||||
ObjFuentesFinanciamientoCONAC.Dispose()
|
||||
|
||||
If ViewState("Orden").ToString() <> String.Empty Then
|
||||
CargaGrid(ViewState("Orden").ToString())
|
||||
Else
|
||||
CargaGrid("")
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Protected Sub GvDatos_RowCancelingEdit(sender As Object, e As System.Web.UI.WebControls.GridViewCancelEditEventArgs) Handles GvDatos.RowCancelingEdit
|
||||
GvDatos.EditIndex = -1
|
||||
If ViewState("Orden").ToString() <> String.Empty Then
|
||||
CargaGrid(ViewState("Orden").ToString())
|
||||
Else
|
||||
CargaGrid("")
|
||||
End If
|
||||
End Sub
|
||||
Protected Sub GvDatos_RowUpdating(sender As Object, e As System.Web.UI.WebControls.GridViewUpdateEventArgs) Handles GvDatos.RowUpdating
|
||||
|
||||
Dim ObjFuentesFinanciamientoCONAC As New ClsAC
|
||||
|
||||
Dim ClaveFinanciamientoCONAC As String = DirectCast(GvDatos.Rows(e.RowIndex).FindControl("TxtClaveFinanciamientoCONAC"), TextBox).Text.Trim
|
||||
Dim Nombre As String = DirectCast(GvDatos.Rows(e.RowIndex).FindControl("TxtNombre"), TextBox).Text.Trim
|
||||
Dim Estatus As Boolean = GvDatos.Rows(e.RowIndex).FCCheckBox("ChkEstatus").Checked
|
||||
Dim CveFinanciamientoCONAC As Integer = GvDatos.DataKeys(e.RowIndex).Value.ToString.ToEntero
|
||||
|
||||
If ObjFuentesFinanciamientoCONAC.UpdateFuenteFinanciamientoCONAC(ClaveFinanciamientoCONAC, Nombre, Estatus, CveFinanciamientoCONAC) Then
|
||||
GvDatos.EditIndex = -1
|
||||
ViewState("DTFuentesFinanciamientoCONAC") = ObjFuentesFinanciamientoCONAC.DtResultados
|
||||
GlobalDTAC_FuentesFinanciamientoCONAC = ObjFuentesFinanciamientoCONAC.DtResultados
|
||||
Alert("Los cambios se guardaron correctamente.", TipoMensaje.MsgInformacion)
|
||||
End If
|
||||
|
||||
ObjFuentesFinanciamientoCONAC.Dispose()
|
||||
|
||||
If ViewState("Orden").ToString() <> String.Empty Then
|
||||
CargaGrid(ViewState("Orden").ToString())
|
||||
Else
|
||||
CargaGrid("")
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Sub GvDatos_RowEditing(sender As Object, e As System.Web.UI.WebControls.GridViewEditEventArgs) Handles GvDatos.RowEditing
|
||||
GvDatos.EditIndex = e.NewEditIndex
|
||||
|
||||
If ViewState("Orden").ToString() <> String.Empty Then
|
||||
CargaGrid(ViewState("Orden").ToString())
|
||||
Else
|
||||
CargaGrid("")
|
||||
End If
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
#Region "O R D E N A M I E N T O"
|
||||
|
||||
Protected Sub LbOrden_Click(ByVal sender As Object, ByVal e As EventArgs)
|
||||
Dim Orden As String = ""
|
||||
Dim Campo As String = ""
|
||||
Dim Literal As Literal = Nothing
|
||||
Const OrdenInicial As String = ""
|
||||
Dim Arg(2) As String
|
||||
|
||||
Arg = CType(sender, LinkButton).CommandArgument().ToString.Split(";"c)
|
||||
Campo = Arg(0)
|
||||
Literal = CType(CType(sender, LinkButton).NamingContainer.FindControl("Img" & Campo.Replace(",", "_")), Literal)
|
||||
|
||||
If ViewState(String.Format("O{0}", Campo)) IsNot Nothing AndAlso ViewState(String.Format("O{0}", Campo)).ToString = String.Format("{0} DESC", Campo) Then
|
||||
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>")
|
||||
End If
|
||||
Orden = OrdenInicial & ViewState(String.Format("O{0}", Campo)).ToString
|
||||
ViewState("Orden") = Orden
|
||||
CargaGrid(Orden)
|
||||
End Sub
|
||||
|
||||
Private Sub CargaGrid(ByVal Orden As String)
|
||||
If Orden <> String.Empty Then
|
||||
Dim DV As New DataView(CType(ViewState("DTFuentesFinanciamientoCONAC"), DataTable), "", Orden, DataViewRowState.CurrentRows)
|
||||
GvDatos.DataSource = DV.ToTable()
|
||||
Gv.DataSource = DV.ToTable()
|
||||
DtFuentesFinanciamientoCONAC = DV.ToTable()
|
||||
DV.Dispose()
|
||||
Else
|
||||
GvDatos.DataSource = CType(ViewState("DTFuentesFinanciamientoCONAC"), DataTable)
|
||||
Gv.DataSource = CType(ViewState("DTFuentesFinanciamientoCONAC"), DataTable)
|
||||
DtFuentesFinanciamientoCONAC = CType(ViewState("DTFuentesFinanciamientoCONAC"), DataTable)
|
||||
End If
|
||||
|
||||
GvDatos.DataBind()
|
||||
Gv.DataBind()
|
||||
UpDatos.Update()
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
#Region " EXPORTAR - PDF - EXCEL "
|
||||
Protected Sub ImgExcel_Click(sender As Object, e As ImageClickEventArgs)
|
||||
Tbl.ExportToExcel("Catalogo de Fuente de Financiamiento ")
|
||||
End Sub
|
||||
|
||||
Protected Sub BtnImprimir_Click(sender As Object, e As ImageClickEventArgs)
|
||||
ImprimiReporte()
|
||||
End Sub
|
||||
'No quitar porque no funciona el exporta PDF
|
||||
Public Overrides Sub VerifyRenderingInServerForm(control As Control)
|
||||
' Verifies that the control is rendered
|
||||
End Sub
|
||||
|
||||
Protected Sub ImprimiReporte()
|
||||
Dim params As New List(Of ReportParameter)
|
||||
params.Add(New ReportParameter("pEmp", UsuarioActual.Empresa.Empresa))
|
||||
params.Add(New ReportParameter("pImg", New Uri(Server.MapPath(String.Format("~/Empresas/{0}/Logo.png", UsuarioActual.CveEmpresa))).AbsoluteUri))
|
||||
|
||||
ImprimirPDF("AC/Reportes/RepFuentesFinanciamientoCONAC.rdlc", DtFuentesFinanciamientoCONAC, params, "ReporteFuentesFinanciamientoCONAC")
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
End Class
|
||||
163
AC/CatFuentesRecaudacion.aspx
Normal file
163
AC/CatFuentesRecaudacion.aspx
Normal file
@@ -0,0 +1,163 @@
|
||||
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="CatFuentesRecaudacion.aspx.vb" Inherits="AC_CatFuentesRecaudacion" %>
|
||||
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="CP" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="Css" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="HB" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="E" runat="Server">
|
||||
Catálogo de Fuentes de Recaudación
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content8" ContentPlaceHolderID="H" runat="Server">
|
||||
<img src="/Imagenes/separador02.gif" alt="" />
|
||||
<asp:ImageButton ID="ImgExcel" OnClick="ImgExcel_Click" runat="server" ImageUrl="/Imagenes/IconoExcel.gif" Width="17px" Height="17px" />
|
||||
<img src="/Imagenes/separador02.gif" alt="" />
|
||||
|
||||
<asp:ImageButton ID="BtnImprimir" OnClick="BtnImprimir_Click" runat="server" alt="Imprimir" src="/Imagenes/btnImprimir.gif" Style="cursor: pointer; height: 20px" />
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content9" ContentPlaceHolderID="C" runat="Server">
|
||||
<div class="portlet box blue-hoki" style="width: 1000px;">
|
||||
<div class="portlet-body">
|
||||
<asp:UpdatePanel ID="UpTitulos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<table class="table table-striped table-advance table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<th width="350px" style="text-align: center">
|
||||
<asp:LinkButton ID="LbFuenteRecaudacion" runat="server" CausesValidation="false" Text="" CommandArgument="FuenteRecaudacion;0" OnClick="LbOrden_Click">
|
||||
Fuente de Recaudación
|
||||
<asp:Literal ID="ImgFuenteRecaudacion" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
||||
</asp:LinkButton>
|
||||
</th>
|
||||
<th width="100px" style="text-align: center">
|
||||
<asp:LinkButton ID="LbEstatus" runat="server" CausesValidation="false" Text="" CommandArgument="Estatus;0" OnClick="LbOrden_Click">
|
||||
Estatus
|
||||
<asp:Literal ID="ImgEstatus" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
||||
</asp:LinkButton>
|
||||
</th>
|
||||
<th width="100px" style="text-align: center">
|
||||
<asp:LinkButton ID="LbFechaIng" runat="server" CausesValidation="false" Text="" CommandArgument="FechaIng;0" OnClick="LbOrden_Click">
|
||||
Fecha
|
||||
<asp:Literal ID="ImgFechaIng" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
||||
</asp:LinkButton>
|
||||
</th>
|
||||
<th width="100px" style="text-align: center">
|
||||
<asp:LinkButton ID="LbUsuario" runat="server" CausesValidation="false" Text="" CommandArgument="Usuario;0" OnClick="LbOrden_Click">
|
||||
Usuario
|
||||
<asp:Literal ID="ImgUsuario" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
||||
</asp:LinkButton>
|
||||
</th>
|
||||
<th width="119px" style="text-align: center">Comandos</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tr>
|
||||
<td>
|
||||
<asp:TextBox ID="TxtFuenteRecaudacion" runat="server" CausesValidation="true" MaxLength="100" ValidationGroup="GrpGuardar" Width="338px"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVFuenteRecaudacion" runat="server" ControlToValidate="TxtFuenteRecaudacion" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''FuenteRecaudacion''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCFuenteRecaudacion" runat="server" HighlightCssClass="vco" TargetControlID="RFVFuenteRecaudacion" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td style="text-align: center">
|
||||
<asp:LinkButton ID="LbAgregar" runat="server" CausesValidation="true" CssClass="Texto" Text="Agregar" ValidationGroup="GrpGuardar"></asp:LinkButton></td>
|
||||
</tr>
|
||||
</table>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" DataKeyNames="CveFuenteRecaudacion" EmptyDataText="No se encontraron Fuente de Recaudacións Registrados" ToolTip="Listado de FuenteRecaudacion" CssClass="table table-striped table-advance table-hover" Style="margin-top: -10px;" GridLines="None">
|
||||
<Columns>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlFuenteRecaudacion" runat="server" Text='<%# Eval("FuenteRecaudacion", "{0}") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<EditItemTemplate>
|
||||
<asp:TextBox ID="TxtFuenteRecaudacion" runat="server" CausesValidation="true" MaxLength="100" Text='<%# Eval("FuenteRecaudacion") %>' ValidationGroup="GrpGV" Width="338px"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVFuenteRecaudacion" runat="server" ControlToValidate="TxtFuenteRecaudacion" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''FuenteRecaudacion''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGV"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCFuenteRecaudacion" runat="server" HighlightCssClass="vco" TargetControlID="RFVFuenteRecaudacion" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</EditItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlEstatus" runat="server" Text='<%# Eval("Estatus") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<EditItemTemplate>
|
||||
<asp:CheckBox ID="ChkEstatus" runat="server" Checked='<%# If (Eval("Estatus").ToString = "Activo", True, False) %>' />
|
||||
</EditItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlFecha" runat="server" Text='<%# Eval("FechaIng", "{0:d}") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlUsuario" runat="server" Text='<%# Eval("Usuario") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Editar">
|
||||
<EditItemTemplate>
|
||||
<center>
|
||||
<asp:LinkButton ID="imgU" runat="server" AlternateText="Actualizar" CausesValidation="True" CommandName="Update"
|
||||
CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-check'></i>" />
|
||||
<asp:LinkButton ID="imgC" runat="server" AlternateText="Cancelar" CausesValidation="False" CommandName="Cancel"
|
||||
CssClass="btn btn-circle btn-sm red" Text="<i class='fa fa-times'></i>" />
|
||||
</center>
|
||||
</EditItemTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="imgE" runat="server" AlternateText="Editar" CausesValidation="False" CommandName="Edit"
|
||||
CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-pencil'></i>" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Eliminar">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="imgD" runat="server" AlternateText="Eliminar" CausesValidation="False" CommandName="Delete"
|
||||
CssClass="btn btn-circle btn-sm red" Text="<i class='icon-trash'></i>"
|
||||
data-toggle="confirmation" data-popout="true" data-original-title="confirmar" data-btn-ok-label="si" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
<RowStyle CssClass="Texto" />
|
||||
<AlternatingRowStyle CssClass="TextoAlterno" />
|
||||
</asp:GridView>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<table runat="server" id="Tbl" style="display: none;">
|
||||
<tr>
|
||||
<td>
|
||||
<asp:UpdatePanel runat="server">
|
||||
<ContentTemplate>
|
||||
<asp:GridView ID="Gv" runat="server" AutoGenerateColumns="False" GridLines="None">
|
||||
<Columns>
|
||||
<asp:BoundField HeaderText="Fuente de Recaudación" DataField="FuenteRecaudacion" DataFormatString="{0}" ItemStyle-Width="250" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField HeaderText="Estatus" DataField="Estatus" DataFormatString="{0}" ItemStyle-Width="100" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField HeaderText="Fecha" DataField="FechaIng" DataFormatString="{0:d}" ItemStyle-Width="100" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField HeaderText="Usuario" DataField="Usuario" ItemStyle-Width="100" ItemStyle-HorizontalAlign="Left" />
|
||||
</Columns>
|
||||
<HeaderStyle CssClass="Titulos" />
|
||||
<RowStyle CssClass="Texto" />
|
||||
<AlternatingRowStyle CssClass="TextoAlterno" />
|
||||
</asp:GridView>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content10" ContentPlaceHolderID="JS" runat="Server">
|
||||
<script language="javascript" type="text/javascript">
|
||||
function C() {
|
||||
return confirm('¿Está seguro que desea eliminar el Fuente de Recaudación?');
|
||||
}
|
||||
</script>
|
||||
</asp:Content>
|
||||
|
||||
|
||||
220
AC/CatFuentesRecaudacion.aspx.vb
Normal file
220
AC/CatFuentesRecaudacion.aspx.vb
Normal file
@@ -0,0 +1,220 @@
|
||||
Option Strict On
|
||||
|
||||
Imports System.Data
|
||||
Imports System.Linq
|
||||
Imports Extensiones
|
||||
Imports Microsoft.Reporting.WebForms
|
||||
|
||||
Partial Class AC_CatFuentesRecaudacion
|
||||
Inherits ClsPaginas
|
||||
|
||||
Private Property DtFuentesRecaudacion As DataTable
|
||||
Get
|
||||
Return CType(ViewState("DtFuentesRecaudacion"), DataTable)
|
||||
End Get
|
||||
Set(value As DataTable)
|
||||
ViewState("DtFuentesRecaudacion") = value
|
||||
End Set
|
||||
End Property
|
||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||
If Not Page.IsPostBack Then
|
||||
ViewState("Orden") = ""
|
||||
CargaDatos()
|
||||
|
||||
''Permiso Registro
|
||||
'If PermisoRegistro Then
|
||||
' LbAgregar.Enabled = True
|
||||
'Else
|
||||
' LbAgregar.Enabled = False
|
||||
'End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Public Sub CargaDatos()
|
||||
Dim ObjFuenteRecaudacion As New ClsAC
|
||||
If ObjFuenteRecaudacion.GetFuentesRecaudacion() Then
|
||||
ViewState("DTFuenteRecaudacion") = ObjFuenteRecaudacion.DtResultados.FiltraParametros(String.Format("CveEmpresa={0}", UsuarioActual.CveEmpresa))
|
||||
GlobalDTAC_FuentesRecaudacion(-1) = ObjFuenteRecaudacion.DtResultados
|
||||
Else
|
||||
Me.GvDatos.DataSource = Nothing
|
||||
End If
|
||||
|
||||
ObjFuenteRecaudacion.Dispose()
|
||||
|
||||
If ViewState("Orden").ToString() <> String.Empty Then
|
||||
CargaGrid(ViewState("Orden").ToString())
|
||||
Else
|
||||
CargaGrid("")
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Protected Sub LbAgregar_Click(sender As Object, e As System.EventArgs) Handles LbAgregar.Click
|
||||
Dim ObjFuenteRecaudacion As New ClsAC
|
||||
If ObjFuenteRecaudacion.AddFuentesRecaudacion(TxtFuenteRecaudacion.Text.Trim, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
|
||||
TxtFuenteRecaudacion.Text = ""
|
||||
Alert("La nueva Fuente de Recaudacion se guardo correctamente.", TipoMensaje.MsgInformacion)
|
||||
UpTitulos.Update()
|
||||
ViewState("DTFuenteRecaudacion") = ObjFuenteRecaudacion.DtResultados.FiltraParametros(String.Format("CveEmpresa={0}", UsuarioActual.CveEmpresa))
|
||||
GlobalDTAC_FuentesRecaudacion(-1) = ObjFuenteRecaudacion.DtResultados
|
||||
|
||||
If ViewState("Orden").ToString() <> String.Empty Then
|
||||
CargaGrid(ViewState("Orden").ToString())
|
||||
Else
|
||||
CargaGrid("")
|
||||
End If
|
||||
End If
|
||||
ObjFuenteRecaudacion.Dispose()
|
||||
End Sub
|
||||
|
||||
#Region "G V D A T O S"
|
||||
Protected Sub GvDatos_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvDatos.RowDataBound
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
If e.Row.RowIndex = 0 Then
|
||||
e.Row.Cells(0).Width = Unit.Pixel(350)
|
||||
e.Row.Cells(1).Width = Unit.Pixel(100)
|
||||
e.Row.Cells(2).Width = Unit.Pixel(100)
|
||||
e.Row.Cells(3).Width = Unit.Pixel(100)
|
||||
e.Row.Cells(4).Width = Unit.Pixel(50)
|
||||
e.Row.Cells(5).Width = Unit.Pixel(50)
|
||||
End If
|
||||
e.Row.Cells(0).HorizontalAlign = HorizontalAlign.Left
|
||||
e.Row.Cells(1).HorizontalAlign = HorizontalAlign.Center
|
||||
e.Row.Cells(2).HorizontalAlign = HorizontalAlign.Center
|
||||
e.Row.Cells(3).HorizontalAlign = HorizontalAlign.Center
|
||||
e.Row.Cells(4).HorizontalAlign = HorizontalAlign.Center
|
||||
e.Row.Cells(5).HorizontalAlign = HorizontalAlign.Center
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Protected Sub GvDatos_RowDeleting(sender As Object, e As System.Web.UI.WebControls.GridViewDeleteEventArgs) Handles GvDatos.RowDeleting
|
||||
Dim ObjFuenteRecaudacion As New ClsAC
|
||||
If ObjFuenteRecaudacion.RemoveFuentesRecaudacion(GvDatos.DataKeys(e.RowIndex).Value.ToString.ToEntero) Then
|
||||
GvDatos.EditIndex = -1
|
||||
ViewState("DTFuenteRecaudacion") = ObjFuenteRecaudacion.DtResultados.FiltraParametros(String.Format("CveEmpresa={0}", UsuarioActual.CveEmpresa))
|
||||
GlobalDTAC_FuentesRecaudacion(-1) = ObjFuenteRecaudacion.DtResultados
|
||||
Alert("El Registro se eliminó correctamente.", TipoMensaje.MsgInformacion)
|
||||
End If
|
||||
|
||||
ObjFuenteRecaudacion.Dispose()
|
||||
|
||||
If ViewState("Orden").ToString() <> String.Empty Then
|
||||
CargaGrid(ViewState("Orden").ToString())
|
||||
Else
|
||||
CargaGrid("")
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Protected Sub GvDatos_RowCancelingEdit(sender As Object, e As System.Web.UI.WebControls.GridViewCancelEditEventArgs) Handles GvDatos.RowCancelingEdit
|
||||
GvDatos.EditIndex = -1
|
||||
If ViewState("Orden").ToString() <> String.Empty Then
|
||||
CargaGrid(ViewState("Orden").ToString())
|
||||
Else
|
||||
CargaGrid("")
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Protected Sub GvDatos_RowUpdating(sender As Object, e As System.Web.UI.WebControls.GridViewUpdateEventArgs) Handles GvDatos.RowUpdating
|
||||
|
||||
Dim ObjFuenteRecaudacion As New ClsAC
|
||||
|
||||
Dim FuenteRecaudacion As String = DirectCast(GvDatos.Rows(e.RowIndex).FindControl("TxtFuenteRecaudacion"), TextBox).Text.Trim
|
||||
Dim Estatus As Boolean = GvDatos.Rows(e.RowIndex).FCCheckBox("ChkEstatus").Checked
|
||||
Dim CveFuenteRecaudacion As Integer = GvDatos.DataKeys(e.RowIndex).Value.ToString.ToEntero
|
||||
|
||||
If ObjFuenteRecaudacion.UpdateFuentesRecaudacion(FuenteRecaudacion, Estatus, CveFuenteRecaudacion) Then
|
||||
GvDatos.EditIndex = -1
|
||||
ViewState("DTFuenteRecaudacion") = ObjFuenteRecaudacion.DtResultados.FiltraParametros(String.Format("CveEmpresa={0}", UsuarioActual.CveEmpresa))
|
||||
GlobalDTAC_FuentesRecaudacion(-1) = ObjFuenteRecaudacion.DtResultados
|
||||
Alert("Los cambios se guardaron correctamente.", TipoMensaje.MsgInformacion)
|
||||
End If
|
||||
|
||||
ObjFuenteRecaudacion.Dispose()
|
||||
|
||||
If ViewState("Orden").ToString() <> String.Empty Then
|
||||
CargaGrid(ViewState("Orden").ToString())
|
||||
Else
|
||||
CargaGrid("")
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Sub GvDatos_RowEditing(sender As Object, e As System.Web.UI.WebControls.GridViewEditEventArgs) Handles GvDatos.RowEditing
|
||||
GvDatos.EditIndex = e.NewEditIndex
|
||||
|
||||
If ViewState("Orden").ToString() <> String.Empty Then
|
||||
CargaGrid(ViewState("Orden").ToString())
|
||||
Else
|
||||
CargaGrid("")
|
||||
End If
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
#Region "O R D E N A M I E N T O"
|
||||
|
||||
Protected Sub LbOrden_Click(ByVal sender As Object, ByVal e As EventArgs)
|
||||
Dim Orden As String = ""
|
||||
Dim Campo As String = ""
|
||||
Dim gvi As Integer = 0
|
||||
Dim Literal As Literal = Nothing
|
||||
Const OrdenInicial As String = ""
|
||||
Dim Arg(2) As String
|
||||
|
||||
Arg = CType(sender, LinkButton).CommandArgument().ToString.Split(";"c)
|
||||
Campo = Arg(0)
|
||||
gvi = Arg(1).ToEntero
|
||||
Literal = CType(CType(sender, LinkButton).NamingContainer.FindControl("Img" & Campo.Replace(",", "_")), Literal)
|
||||
|
||||
If ViewState(String.Format("O{0}{1}", Campo, gvi)) IsNot Nothing AndAlso ViewState(String.Format("O{0}{1}", Campo, gvi)).ToString = String.Format("{0} DESC", Campo) Then
|
||||
ViewState(String.Format("O{0}{1}", Campo, gvi)) = 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}{1}", Campo, gvi)) = String.Format("{0} DESC", Campo)
|
||||
Literal.Text = String.Format("<i class='fa fa-sort-desc' style='color:#999' ></i>")
|
||||
End If
|
||||
Orden = OrdenInicial & ViewState(String.Format("O{0}{1}", Campo, gvi)).ToString
|
||||
ViewState("Orden") = Orden
|
||||
CargaGrid(Orden)
|
||||
End Sub
|
||||
|
||||
Private Sub CargaGrid(ByVal Orden As String)
|
||||
If Orden <> String.Empty Then
|
||||
Dim DV As New DataView(CType(ViewState("DTFuenteRecaudacion"), DataTable), "", Orden, DataViewRowState.CurrentRows)
|
||||
GvDatos.DataSource = DV.ToTable()
|
||||
Gv.DataSource = DV.ToTable()
|
||||
DtFuentesRecaudacion = DV.ToTable()
|
||||
DV.Dispose()
|
||||
Else
|
||||
GvDatos.DataSource = CType(ViewState("DTFuenteRecaudacion"), DataTable)
|
||||
Gv.DataSource = CType(ViewState("DTFuenteRecaudacion"), DataTable)
|
||||
DtFuentesRecaudacion = CType(ViewState("DTFuenteRecaudacion"), DataTable)
|
||||
End If
|
||||
|
||||
GvDatos.DataBind()
|
||||
Gv.DataBind()
|
||||
UpDatos.Update()
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
#Region " EXPORTAR - PDF - EXCEL "
|
||||
Protected Sub ImgExcel_Click(sender As Object, e As ImageClickEventArgs)
|
||||
Tbl.ExportToExcel("Catalogo de Fuentes de Recaudacion ")
|
||||
End Sub
|
||||
|
||||
Protected Sub BtnImprimir_Click(sender As Object, e As ImageClickEventArgs)
|
||||
ImprimiReporte()
|
||||
End Sub
|
||||
'No quitar porque no funciona el exporta PDF
|
||||
Public Overrides Sub VerifyRenderingInServerForm(control As Control)
|
||||
' Verifies that the control is rendered
|
||||
End Sub
|
||||
|
||||
Protected Sub ImprimiReporte()
|
||||
Dim params As New List(Of ReportParameter)
|
||||
params.Add(New ReportParameter("pEmp", UsuarioActual.Empresa.Empresa))
|
||||
params.Add(New ReportParameter("pImg", New Uri(Server.MapPath(String.Format("~/Empresas/{0}/Logo.png", UsuarioActual.CveEmpresa))).AbsoluteUri))
|
||||
|
||||
ImprimirPDF("AC/Reportes/RepFuentesRecaudacion.rdlc", DtFuentesRecaudacion, params, "ReporteFuentesRecaudacion")
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
End Class
|
||||
135
AC/CatFuncion.aspx
Normal file
135
AC/CatFuncion.aspx
Normal file
@@ -0,0 +1,135 @@
|
||||
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="CatFuncion.aspx.vb" Inherits="AC_CatFuncion" %>
|
||||
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="HB" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="E" runat="Server">
|
||||
Catálogo de Función
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
|
||||
<div class="portlet box blue-hoki" style="width:1000px;">
|
||||
<div class="portlet-body">
|
||||
<asp:UpdatePanel ID="UpTitulos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<table class="table table-striped table-advance table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<th width="250px" style="text-align: center">
|
||||
<asp:LinkButton ID="LbFuncion" runat="server" CausesValidation="false" Text="" CommandArgument="Funcion;0" OnClick="LbOrden_Click">
|
||||
Funcion
|
||||
<asp:Literal ID="ImgFuncion" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
||||
</asp:LinkButton>
|
||||
</th>
|
||||
<th width="100px" style="text-align: center">
|
||||
<asp:LinkButton ID="LbEstatus" runat="server" CausesValidation="false" Text="" CommandArgument="Estatus;0" OnClick="LbOrden_Click">
|
||||
Estatus
|
||||
<asp:Literal ID="ImgEstatus" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
||||
</asp:LinkButton>
|
||||
</th>
|
||||
<th width="100px" style="text-align: center">
|
||||
<asp:LinkButton ID="LbFechaIng" runat="server" CausesValidation="false" Text="" CommandArgument="FechaIng;0" OnClick="LbOrden_Click">
|
||||
Fecha
|
||||
<asp:Literal ID="ImgFechaUng" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
||||
</asp:LinkButton>
|
||||
</th>
|
||||
<th width="100px" style="text-align: center">
|
||||
<asp:LinkButton ID="LbUsuario" runat="server" CausesValidation="false" Text="" CommandArgument="Usuario;0" OnClick="LbOrden_Click">
|
||||
Usuario
|
||||
<asp:Literal ID="ImgUsuario" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
||||
</asp:LinkButton>
|
||||
</th>
|
||||
<th width="119" style="text-align: center">Comandos</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tr>
|
||||
<td>
|
||||
<asp:TextBox ID="TxtFuncion" runat="server" CausesValidation="true" MaxLength="50" ValidationGroup="GrpGuardar" Width="238px"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVFuncion" runat="server" ControlToValidate="TxtFuncion" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Funcion''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCFuncion" runat="server" HighlightCssClass="vco" TargetControlID="RFVFuncion" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td style="text-align: center">
|
||||
<asp:LinkButton ID="LbAgregar" runat="server" CausesValidation="true" CssClass="Texto" Text="Agregar" ValidationGroup="GrpGuardar"></asp:LinkButton></td>
|
||||
</tr>
|
||||
</table>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" DataKeyNames="CveFuncion" EmptyDataText="No se encontraron Funciones Registradas" ToolTip="Listado de Funcion" CssClass="table table-striped table-advance table-hover" style="margin-top:-10px;" GridLines="None" >
|
||||
<Columns>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlFuncion" runat="server" Text='<%# Eval("Funcion", "{0}") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<EditItemTemplate>
|
||||
<asp:TextBox ID="TxtFuncion" runat="server" CausesValidation="true" MaxLength="50" Text='<%# Eval("Funcion") %>' ValidationGroup="GrpGV" Width="238px"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVFuncion" runat="server" ControlToValidate="TxtFuncion" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Funcion''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGV"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCFuncion" runat="server" HighlightCssClass="vco" TargetControlID="RFVFuncion" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</EditItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlEstatus" runat="server" Text='<%# Eval("Estatus") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<EditItemTemplate>
|
||||
<asp:CheckBox ID="ChkEstatus" runat="server" Checked='<%# If (Eval("Estatus").ToString = "Activo", True, False) %>' />
|
||||
</EditItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlFecha" runat="server" Text='<%# Eval("FechaIng", "{0:d}") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlUsuario" runat="server" Text='<%# Eval("Usuario") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Editar">
|
||||
<EditItemTemplate>
|
||||
<center>
|
||||
<asp:LinkButton ID="imgU" runat="server" AlternateText="Actualizar" CausesValidation="True" CommandName="Update"
|
||||
CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-check'></i>" ValidationGroup="GrpGV" />
|
||||
<asp:LinkButton ID="imgC" runat="server" AlternateText="Cancelar" CausesValidation="False" CommandName="Cancel"
|
||||
CssClass="btn btn-circle btn-sm red" Text="<i class='fa fa-times'></i>"/>
|
||||
</center>
|
||||
</EditItemTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="imgE" runat="server" AlternateText="Editar" CausesValidation="False" CommandName="Edit"
|
||||
CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-pencil'></i>" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Eliminar">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="imgD" runat="server" AlternateText="Eliminar" CausesValidation="False" CommandName="Delete"
|
||||
CssClass="btn btn-circle btn-sm red" Text="<i class='icon-trash'></i>"
|
||||
data-toggle="confirmation" data-popout="true" data-original-title="confirmar" data-btn-ok-label="si" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
<RowStyle CssClass="Texto" />
|
||||
<AlternatingRowStyle CssClass="TextoAlterno" />
|
||||
</asp:GridView>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
||||
<script language="javascript" type="text/javascript">
|
||||
function C() {
|
||||
return confirm('¿Está seguro que desea eliminar la Funcion?');
|
||||
}
|
||||
</script>
|
||||
</asp:Content>
|
||||
|
||||
|
||||
177
AC/CatFuncion.aspx.vb
Normal file
177
AC/CatFuncion.aspx.vb
Normal file
@@ -0,0 +1,177 @@
|
||||
Option Explicit On
|
||||
Option Strict On
|
||||
|
||||
Imports System.Data
|
||||
Imports System.Linq
|
||||
Imports Extensiones
|
||||
|
||||
Partial Class AC_CatFuncion
|
||||
Inherits ClsPaginas
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||
If Not Page.IsPostBack Then
|
||||
ViewState("Orden") = ""
|
||||
CargaDatos()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Public Sub CargaDatos()
|
||||
Dim ObjFuncion As New ClsAC
|
||||
If ObjFuncion.GetFuncion() Then
|
||||
ViewState("DTFuncion") = ObjFuncion.DtResultados
|
||||
GlobalDTAC_Funcion = ObjFuncion.DtResultados
|
||||
Else
|
||||
Me.GvDatos.DataSource = Nothing
|
||||
ViewState("DTFuncion") = Nothing
|
||||
End If
|
||||
|
||||
ObjFuncion.Dispose()
|
||||
|
||||
If ViewState("Orden").ToString() <> String.Empty Then
|
||||
CargaGrid(ViewState("Orden").ToString())
|
||||
Else
|
||||
CargaGrid("")
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Protected Sub LbAgregar_Click(sender As Object, e As System.EventArgs) Handles LbAgregar.Click
|
||||
Dim ObjFuncion As New ClsAC
|
||||
If ObjFuncion.AddFuncion(TxtFuncion.Text.Trim, UsuarioActual.CveUsuario) Then
|
||||
TxtFuncion.Text = ""
|
||||
Alert("El Nuevo Registro se guardó correctamente.", TipoMensaje.MsgInformacion)
|
||||
UpTitulos.Update()
|
||||
ViewState("DTFuncion") = ObjFuncion.DtResultados
|
||||
GlobalDTAC_Funcion = ObjFuncion.DtResultados
|
||||
|
||||
If ViewState("Orden").ToString() <> String.Empty Then
|
||||
CargaGrid(ViewState("Orden").ToString())
|
||||
Else
|
||||
CargaGrid("")
|
||||
End If
|
||||
End If
|
||||
ObjFuncion.Dispose()
|
||||
End Sub
|
||||
|
||||
#Region "G V D A T O S"
|
||||
Protected Sub GvDatos_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvDatos.RowDataBound
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
If e.Row.RowIndex = 0 Then
|
||||
e.Row.Cells(0).Width = Unit.Pixel(250)
|
||||
e.Row.Cells(1).Width = Unit.Pixel(100)
|
||||
e.Row.Cells(2).Width = Unit.Pixel(100)
|
||||
e.Row.Cells(3).Width = Unit.Pixel(100)
|
||||
e.Row.Cells(4).Width = Unit.Pixel(50)
|
||||
e.Row.Cells(5).Width = Unit.Pixel(50)
|
||||
End If
|
||||
e.Row.Cells(0).HorizontalAlign = HorizontalAlign.Left
|
||||
e.Row.Cells(1).HorizontalAlign = HorizontalAlign.Center
|
||||
e.Row.Cells(2).HorizontalAlign = HorizontalAlign.Center
|
||||
e.Row.Cells(3).HorizontalAlign = HorizontalAlign.Center
|
||||
e.Row.Cells(4).HorizontalAlign = HorizontalAlign.Center
|
||||
e.Row.Cells(5).HorizontalAlign = HorizontalAlign.Center
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Protected Sub GvDatos_RowDeleting(sender As Object, e As System.Web.UI.WebControls.GridViewDeleteEventArgs) Handles GvDatos.RowDeleting
|
||||
Dim ObjFuncion As New ClsAC
|
||||
If ObjFuncion.RemoveFuncion(GvDatos.DataKeys(e.RowIndex).Value.ToString.ToEntero) Then
|
||||
GvDatos.EditIndex = -1
|
||||
ViewState("DTFuncion") = ObjFuncion.DtResultados
|
||||
GlobalDTAC_Funcion = ObjFuncion.DtResultados
|
||||
Alert("El Registro se eliminó correctamente.", TipoMensaje.MsgInformacion)
|
||||
End If
|
||||
|
||||
ObjFuncion.Dispose()
|
||||
|
||||
If ViewState("Orden").ToString() <> String.Empty Then
|
||||
CargaGrid(ViewState("Orden").ToString())
|
||||
Else
|
||||
CargaGrid("")
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Protected Sub GvDatos_RowCancelingEdit(sender As Object, e As System.Web.UI.WebControls.GridViewCancelEditEventArgs) Handles GvDatos.RowCancelingEdit
|
||||
GvDatos.EditIndex = -1
|
||||
If ViewState("Orden").ToString() <> String.Empty Then
|
||||
CargaGrid(ViewState("Orden").ToString())
|
||||
Else
|
||||
CargaGrid("")
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Protected Sub GvDatos_RowUpdating(sender As Object, e As System.Web.UI.WebControls.GridViewUpdateEventArgs) Handles GvDatos.RowUpdating
|
||||
|
||||
Dim ObjFuncion As New ClsAC
|
||||
|
||||
Dim Funcion As String = DirectCast(GvDatos.Rows(e.RowIndex).FindControl("TxtFuncion"), TextBox).Text.Trim
|
||||
Dim Estatus As Boolean = GvDatos.Rows(e.RowIndex).FCCheckBox("ChkEstatus").Checked
|
||||
Dim CveFuncion As Integer = GvDatos.DataKeys(e.RowIndex).Value.ToString.ToEntero
|
||||
|
||||
If ObjFuncion.UpdateFuncion(Funcion, Estatus, CveFuncion) Then
|
||||
GvDatos.EditIndex = -1
|
||||
ViewState("DTFuncion") = ObjFuncion.DtResultados
|
||||
GlobalDTAC_Funcion = ObjFuncion.DtResultados
|
||||
Alert("Los cambios se guardaron correctamente.", TipoMensaje.MsgInformacion)
|
||||
End If
|
||||
|
||||
ObjFuncion.Dispose()
|
||||
|
||||
If ViewState("Orden").ToString() <> String.Empty Then
|
||||
CargaGrid(ViewState("Orden").ToString())
|
||||
Else
|
||||
CargaGrid("")
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Sub GvDatos_RowEditing(sender As Object, e As System.Web.UI.WebControls.GridViewEditEventArgs) Handles GvDatos.RowEditing
|
||||
GvDatos.EditIndex = e.NewEditIndex
|
||||
|
||||
If ViewState("Orden").ToString() <> String.Empty Then
|
||||
CargaGrid(ViewState("Orden").ToString())
|
||||
Else
|
||||
CargaGrid("")
|
||||
End If
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
#Region "O R D E N A M I E N T O"
|
||||
|
||||
Protected Sub LbOrden_Click(ByVal sender As Object, ByVal e As EventArgs)
|
||||
Dim Orden As String = ""
|
||||
Dim Campo As String = ""
|
||||
Dim Literal As Literal = Nothing
|
||||
Const OrdenInicial As String = ""
|
||||
Dim Arg(2) As String
|
||||
|
||||
Arg = CType(sender, LinkButton).CommandArgument().ToString.Split(";"c)
|
||||
Campo = Arg(0)
|
||||
Literal = CType(CType(sender, LinkButton).NamingContainer.FindControl("Img" & Campo.Replace(",", "_")), Literal)
|
||||
|
||||
If ViewState(String.Format("O{0}", Campo)) IsNot Nothing AndAlso ViewState(String.Format("O{0}", Campo)).ToString = String.Format("{0} DESC", Campo) Then
|
||||
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>")
|
||||
End If
|
||||
Orden = OrdenInicial & ViewState(String.Format("O{0}", Campo)).ToString
|
||||
ViewState("Orden") = Orden
|
||||
CargaGrid(Orden)
|
||||
End Sub
|
||||
|
||||
Private Sub CargaGrid(ByVal Orden As String)
|
||||
If Orden <> String.Empty Then
|
||||
Dim DV As New DataView(CType(ViewState("DTFuncion"), DataTable), "", Orden, DataViewRowState.CurrentRows)
|
||||
GvDatos.DataSource = DV.ToTable()
|
||||
DV.Dispose()
|
||||
Else
|
||||
GvDatos.DataSource = CType(ViewState("DTFuncion"), DataTable)
|
||||
End If
|
||||
|
||||
GvDatos.DataBind()
|
||||
UpDatos.Update()
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
End Class
|
||||
210
AC/CatOGClasificaciones.aspx
Normal file
210
AC/CatOGClasificaciones.aspx
Normal file
@@ -0,0 +1,210 @@
|
||||
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="CatOGClasificaciones.aspx.vb" Inherits="AC_CatOGClasificaciones" %>
|
||||
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="HB" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="E" runat="Server">
|
||||
Catálogo de Clasificaciones de Objeto de Gasto
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
|
||||
<%-- <li>
|
||||
<asp:LinkButton ID="ImgExcel" OnClick="ImgExcel_Click" runat="server"><i class="fa fa-ad-excel"></i> Exporta Excel</asp:LinkButton>
|
||||
</li>
|
||||
<li>
|
||||
<asp:LinkButton ID="BtnImprimir" OnClick="BtnImprimir_Click" runat="server"><i class="fa fa-print"></i> Imprimir</asp:LinkButton>
|
||||
</li>--%>
|
||||
|
||||
<%--<img src="/Imagenes/separador02.gif" alt="" />
|
||||
<asp:ImageButton ID="ImgExcel" OnClick="ImgExcel_Click" runat="server" ImageUrl="/Imagenes/IconoExcel.gif" Width="17px" Height="17px" />
|
||||
<img src="/Imagenes/separador02.gif" alt="" />
|
||||
|
||||
<asp:ImageButton ID="BtnImprimir" OnClick="BtnImprimir_Click" runat="server" alt="Imprimir" src="/Imagenes/btnImprimir.gif" Style="cursor: pointer; height: 20px" />
|
||||
--%>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
|
||||
<div class="portlet box blue-hoki" style="width: 1000px;">
|
||||
<div class="portlet-body">
|
||||
<asp:UpdatePanel ID="UpTitulos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<table class="table table-striped table-advance table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<th width="75px" style="text-align: center">
|
||||
<asp:LinkButton ID="LbCodigo" runat="server" CausesValidation="false" Text="" CommandArgument="Codigo" OnClick="LbOrden_Click">
|
||||
Código
|
||||
<asp:Literal ID="ImgCodigo" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
||||
</asp:LinkButton>
|
||||
</th>
|
||||
<th width="406px" style="text-align: center">
|
||||
<asp:LinkButton ID="LbClasificacion" runat="server" CausesValidation="false" Text="" CommandArgument="Clasificacion" OnClick="LbOrden_Click">
|
||||
Clasificación
|
||||
<asp:Literal ID="ImgClasificacion" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
||||
</asp:LinkButton>
|
||||
</th>
|
||||
<th width="90px" style="text-align: center">
|
||||
<asp:LinkButton ID="LbAfectable" runat="server" CausesValidation="false" Text="" CommandArgument="Afectable" OnClick="LbOrden_Click">
|
||||
Afectable
|
||||
<asp:Literal ID="ImgbAfectable" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
||||
</asp:LinkButton>
|
||||
</th>
|
||||
<th width="80px" style="text-align: center">
|
||||
<asp:LinkButton ID="LbEstatus" runat="server" CausesValidation="false" Text="" CommandArgument="Estatus" OnClick="LbOrden_Click">
|
||||
Estatus
|
||||
<asp:Literal ID="ImgEstatus" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
||||
</asp:LinkButton>
|
||||
</th>
|
||||
<th width="100px" style="text-align: center">
|
||||
<asp:LinkButton ID="LbFecha" runat="server" CausesValidation="false" Text="" CommandArgument="Fecha" OnClick="LbOrden_Click">
|
||||
Fecha
|
||||
<asp:Literal ID="ImgFecha" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
||||
</asp:LinkButton>
|
||||
</th>
|
||||
<th width="100px" style="text-align: center">
|
||||
<asp:LinkButton ID="LbUsuario" runat="server" CausesValidation="false" Text="" CommandArgument="Usuario" OnClick="LbOrden_Click">
|
||||
Usuario
|
||||
<asp:Literal ID="ImgUsuario" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
||||
</asp:LinkButton>
|
||||
</th>
|
||||
<th width="119" style="text-align: center">Comandos</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tr>
|
||||
<td>
|
||||
<asp:TextBox ID="TxtCodigo" runat="server" CausesValidation="true" MaxLength="10" ValidationGroup="GrpGuardar" Width="65px"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVCodigo" runat="server" ControlToValidate="TxtCodigo" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Código''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCCodigo" runat="server" HighlightCssClass="vco" TargetControlID="RFVCodigo" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</td>
|
||||
<td>
|
||||
<asp:TextBox ID="TxtOGClasificacion" runat="server" CausesValidation="true" MaxLength="100" ValidationGroup="GrpGuardar" Width="395px"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVOGClasificacion" runat="server" ControlToValidate="TxtOGClasificacion" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''OGClasificacion''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOGClasificacion" runat="server" HighlightCssClass="vco" TargetControlID="RFVOGClasificacion" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td style="text-align: center">
|
||||
<asp:LinkButton ID="LbAgregar" runat="server" CausesValidation="true" CssClass="Texto" Text="Agregar" ValidationGroup="GrpGuardar"></asp:LinkButton></td>
|
||||
</tr>
|
||||
</table>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" DataKeyNames="CveClasificacion" EmptyDataText="No se encontraron Clasificaciones de Objeto de Gasto Registradas" ToolTip="Listado de Clasificaciones de Objeto de Gasto" CssClass="table table-striped table-advance table-hover" Style="margin-top: -10px;" GridLines="None">
|
||||
<Columns>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlCodigo" runat="server" Text='<%# Eval("Codigo")%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<EditItemTemplate>
|
||||
<asp:TextBox ID="TxtCodigo" runat="server" CausesValidation="true" MaxLength="50" Text='<%# Eval("Codigo")%>' ValidationGroup="GrpGV" Width="65px"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVCodigo" runat="server" ControlToValidate="TxtCodigo" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Código''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGV"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCCodigo" runat="server" HighlightCssClass="vco" TargetControlID="RFVCodigo" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</EditItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlOGClasificacion" runat="server" Text='<%# Eval("Clasificacion", "{0}") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<EditItemTemplate>
|
||||
<asp:TextBox ID="TxtOGClasificacion" runat="server" CausesValidation="true" MaxLength="50" Text='<%# Eval("Clasificacion") %>' ValidationGroup="GrpGV" Width="395px"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVOGClasificacion" runat="server" ControlToValidate="TxtOGClasificacion" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''OGClasificacion''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGV"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOGClasificacion" runat="server" HighlightCssClass="vco" TargetControlID="RFVOGClasificacion" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</EditItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlAfectable" runat="server" Text='<%# Eval("Afectable")%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<EditItemTemplate>
|
||||
<asp:CheckBox ID="ChkAfectable" runat="server" Checked='<%# If (Eval("Afectable").ToString = "Activo", True, False) %>' />
|
||||
</EditItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlEstatus" runat="server" Text='<%# Eval("Estatus") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<EditItemTemplate>
|
||||
<asp:CheckBox ID="ChkEstatus" runat="server" Checked='<%# If (Eval("Estatus").ToString = "Activo", True, False) %>' />
|
||||
</EditItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlFecha" runat="server" Text='<%# Eval("Fecha", "{0:d}") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlUsuario" runat="server" Text='<%# Eval("Usuario") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Editar">
|
||||
<EditItemTemplate>
|
||||
<center>
|
||||
<asp:LinkButton ID="imgU" runat="server" AlternateText="Actualizar" CausesValidation="True" CommandName="Update"
|
||||
CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-check'></i>" />
|
||||
<asp:LinkButton ID="imgC" runat="server" AlternateText="Cancelar" CausesValidation="False" CommandName="Cancel"
|
||||
CssClass="btn btn-circle btn-sm red" Text="<i class='fa fa-times'></i>" />
|
||||
</center>
|
||||
</EditItemTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="imgE" runat="server" AlternateText="Editar" CausesValidation="False" CommandName="Edit"
|
||||
CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-pencil'></i>" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Eliminar">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="imgD" runat="server" AlternateText="Eliminar" CausesValidation="False" CommandName="Delete"
|
||||
CssClass="btn btn-circle btn-sm red" Text="<i class='icon-trash'></i>"
|
||||
data-toggle="confirmation" data-popout="true" data-original-title="confirmar" data-btn-ok-label="si" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
<RowStyle CssClass="Texto" />
|
||||
<AlternatingRowStyle CssClass="TextoAlterno" />
|
||||
</asp:GridView>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<table runat="server" id="Tbl" style="display: none;">
|
||||
<tr>
|
||||
<td>
|
||||
<asp:UpdatePanel runat="server">
|
||||
<ContentTemplate>
|
||||
<asp:GridView ID="Gv" runat="server" AutoGenerateColumns="False" GridLines="None">
|
||||
<Columns>
|
||||
<asp:BoundField HeaderText="Codigo" DataField="Codigo" DataFormatString="{0}" ItemStyle-Width="75" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField HeaderText="Clasificación" DataField="Clasificacion" DataFormatString="{0}" ItemStyle-Width="410" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField HeaderText="Afectable" DataField="Afectable" DataFormatString="{0}" ItemStyle-Width="90" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField HeaderText="Estatus" DataField="Estatus" DataFormatString="{0}" ItemStyle-Width="80" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField HeaderText="Fecha" DataField="Fecha" DataFormatString="{0:d}" ItemStyle-Width="100" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField HeaderText="Usuario" DataField="Usuario" ItemStyle-Width="100" ItemStyle-HorizontalAlign="Left" />
|
||||
</Columns>
|
||||
<HeaderStyle CssClass="Titulos" />
|
||||
<RowStyle CssClass="Texto" />
|
||||
<AlternatingRowStyle CssClass="TextoAlterno" />
|
||||
</asp:GridView>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
||||
<script language="javascript" type="text/javascript">
|
||||
function C() {
|
||||
return confirm('¿Está seguro que desea eliminar la Clasificación de Objeto de Gasto?');
|
||||
}
|
||||
</script>
|
||||
</asp:Content>
|
||||
|
||||
218
AC/CatOGClasificaciones.aspx.vb
Normal file
218
AC/CatOGClasificaciones.aspx.vb
Normal file
@@ -0,0 +1,218 @@
|
||||
Option Explicit On
|
||||
Option Strict On
|
||||
|
||||
Imports System.Data
|
||||
Imports System.Linq
|
||||
Imports Extensiones
|
||||
Imports Microsoft.Reporting.WebForms
|
||||
|
||||
Partial Class AC_CatOGClasificaciones
|
||||
Inherits ClsPaginas
|
||||
|
||||
Private Property DtOGClasificaciones As DataTable
|
||||
Get
|
||||
Return CType(ViewState("DtOGClasificaciones"), DataTable)
|
||||
End Get
|
||||
Set(value As DataTable)
|
||||
ViewState("DtOGClasificaciones") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||
If Not Page.IsPostBack Then
|
||||
ViewState("Orden") = ""
|
||||
CargaDatos()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Public Sub CargaDatos()
|
||||
Dim ObjClasificaciones As New ClsClasificaciones
|
||||
If ObjClasificaciones.GetClasificaciones() Then
|
||||
ViewState("DTOGClasificaciones") = ObjClasificaciones.DtResultados.FiltraParametros("Codigo <> '' AND CveEmpresa = " & UsuarioActual.CveEmpresa, "Codigo")
|
||||
GlobalDTClasificaciones = ObjClasificaciones.DtResultados
|
||||
Else
|
||||
Me.GvDatos.DataSource = Nothing
|
||||
End If
|
||||
|
||||
ObjClasificaciones.Dispose()
|
||||
|
||||
If ViewState("Orden").ToString() <> String.Empty Then
|
||||
CargaGrid(ViewState("Orden").ToString())
|
||||
Else
|
||||
CargaGrid("")
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Protected Sub LbAgregar_Click(sender As Object, e As System.EventArgs) Handles LbAgregar.Click
|
||||
Dim ObjClasificaciones As New ClsClasificaciones
|
||||
If ObjClasificaciones.AddClasificaciones(TxtOGClasificacion.Text.Trim, TxtCodigo.Text.Trim, -1, "", -1, "", -1, "", 0, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
|
||||
TxtOGClasificacion.Text = ""
|
||||
TxtCodigo.Text = ""
|
||||
Alert("La Clasificacion de Objeto de Gasto se guardó correctamente.", TipoMensaje.MsgInformacion)
|
||||
UpTitulos.Update()
|
||||
ViewState("DTOGClasificaciones") = ObjClasificaciones.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
|
||||
GlobalDTClasificaciones = ObjClasificaciones.DtResultados
|
||||
|
||||
If ViewState("Orden").ToString() <> String.Empty Then
|
||||
CargaGrid(ViewState("Orden").ToString())
|
||||
Else
|
||||
CargaGrid("")
|
||||
End If
|
||||
End If
|
||||
ObjClasificaciones.Dispose()
|
||||
End Sub
|
||||
|
||||
#Region "G V D A T O S"
|
||||
Protected Sub GvDatos_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvDatos.RowDataBound
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
e.Row.Cells(0).Width = Unit.Pixel(75)
|
||||
e.Row.Cells(1).Width = Unit.Pixel(406)
|
||||
e.Row.Cells(2).Width = Unit.Pixel(90)
|
||||
e.Row.Cells(3).Width = Unit.Pixel(80)
|
||||
e.Row.Cells(4).Width = Unit.Pixel(100)
|
||||
e.Row.Cells(5).Width = Unit.Pixel(100)
|
||||
e.Row.Cells(6).Width = Unit.Pixel(50)
|
||||
e.Row.Cells(7).Width = Unit.Pixel(50)
|
||||
|
||||
e.Row.Cells(0).HorizontalAlign = HorizontalAlign.Center
|
||||
e.Row.Cells(1).HorizontalAlign = HorizontalAlign.Left
|
||||
e.Row.Cells(2).HorizontalAlign = HorizontalAlign.Center
|
||||
e.Row.Cells(3).HorizontalAlign = HorizontalAlign.Center
|
||||
e.Row.Cells(4).HorizontalAlign = HorizontalAlign.Center
|
||||
e.Row.Cells(5).HorizontalAlign = HorizontalAlign.Center
|
||||
e.Row.Cells(6).HorizontalAlign = HorizontalAlign.Center
|
||||
e.Row.Cells(7).HorizontalAlign = HorizontalAlign.Center
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Protected Sub GvDatos_RowDeleting(sender As Object, e As System.Web.UI.WebControls.GridViewDeleteEventArgs) Handles GvDatos.RowDeleting
|
||||
Dim ObjClasificaciones As New ClsClasificaciones
|
||||
If ObjClasificaciones.RemoveClasificacion(GvDatos.DataKeys(e.RowIndex).Value.ToString.ToEntero) Then
|
||||
GvDatos.EditIndex = -1
|
||||
ViewState("DTOGClasificaciones") = ObjClasificaciones.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
|
||||
GlobalDTClasificaciones = ObjClasificaciones.DtResultados
|
||||
Alert("la Clasificacion de Objeto de Gasto se eliminó correctamente.", TipoMensaje.MsgInformacion)
|
||||
End If
|
||||
|
||||
ObjClasificaciones.Dispose()
|
||||
|
||||
If ViewState("Orden").ToString() <> String.Empty Then
|
||||
CargaGrid(ViewState("Orden").ToString())
|
||||
Else
|
||||
CargaGrid("")
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Protected Sub GvDatos_RowCancelingEdit(sender As Object, e As System.Web.UI.WebControls.GridViewCancelEditEventArgs) Handles GvDatos.RowCancelingEdit
|
||||
GvDatos.EditIndex = -1
|
||||
If ViewState("Orden").ToString() <> String.Empty Then
|
||||
CargaGrid(ViewState("Orden").ToString())
|
||||
Else
|
||||
CargaGrid("")
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Protected Sub GvDatos_RowUpdating(sender As Object, e As System.Web.UI.WebControls.GridViewUpdateEventArgs) Handles GvDatos.RowUpdating
|
||||
|
||||
Dim ObjOGClasificaciones As New ClsClasificaciones
|
||||
|
||||
Dim OGClasificacion As String = DirectCast(GvDatos.Rows(e.RowIndex).FindControl("TxtOGClasificacion"), TextBox).Text.Trim
|
||||
Dim Estatus As Boolean = GvDatos.Rows(e.RowIndex).FCCheckBox("ChkEstatus").Checked
|
||||
Dim Afectable As Boolean = GvDatos.Rows(e.RowIndex).FCCheckBox("ChkAfectable").Checked
|
||||
Dim CveOGClasificacion As Integer = GvDatos.DataKeys(e.RowIndex).Value.ToString.ToEntero
|
||||
Dim Codigo As String = DirectCast(GvDatos.Rows(e.RowIndex).FindControl("TxtCodigo"), TextBox).Text.Trim
|
||||
|
||||
If ObjOGClasificaciones.UpdateClasificacion(OGClasificacion, Codigo, -1, "", -1, "", -1, "", Estatus, Afectable, 0, UsuarioActual.CveUsuario, CveOGClasificacion) Then
|
||||
GvDatos.EditIndex = -1
|
||||
ViewState("DTOGClasificaciones") = ObjOGClasificaciones.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
|
||||
GlobalDTClasificaciones = ObjOGClasificaciones.DtResultados
|
||||
Alert("Los cambios se guardaron correctamente.", TipoMensaje.MsgInformacion)
|
||||
End If
|
||||
|
||||
ObjOGClasificaciones.Dispose()
|
||||
|
||||
If ViewState("Orden").ToString() <> String.Empty Then
|
||||
CargaGrid(ViewState("Orden").ToString())
|
||||
Else
|
||||
CargaGrid("")
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Sub GvDatos_RowEditing(sender As Object, e As System.Web.UI.WebControls.GridViewEditEventArgs) Handles GvDatos.RowEditing
|
||||
GvDatos.EditIndex = e.NewEditIndex
|
||||
|
||||
If ViewState("Orden").ToString() <> String.Empty Then
|
||||
CargaGrid(ViewState("Orden").ToString())
|
||||
Else
|
||||
CargaGrid("")
|
||||
End If
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
#Region "O R D E N A M I E N T O"
|
||||
Protected Sub LbOrden_Click(ByVal sender As Object, ByVal e As EventArgs)
|
||||
Dim Orden As String = ""
|
||||
Dim Campo As String = ""
|
||||
Dim Literal As Literal = Nothing
|
||||
Const OrdenInicial As String = ""
|
||||
Dim Arg(2) As String
|
||||
|
||||
Arg = CType(sender, LinkButton).CommandArgument().ToString.Split(";"c)
|
||||
Campo = Arg(0)
|
||||
Literal = CType(CType(sender, LinkButton).NamingContainer.FindControl("Img" & Campo.Replace(",", "_")), Literal)
|
||||
|
||||
If ViewState(String.Format("O{0}", Campo)) IsNot Nothing AndAlso ViewState(String.Format("O{0}", Campo)).ToString = String.Format("{0} DESC", Campo) Then
|
||||
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>")
|
||||
End If
|
||||
Orden = OrdenInicial & ViewState(String.Format("O{0}", Campo)).ToString
|
||||
ViewState("Orden") = Orden
|
||||
CargaGrid(Orden)
|
||||
End Sub
|
||||
|
||||
Private Sub CargaGrid(Orden As String)
|
||||
If Orden <> String.Empty Then
|
||||
Dim DV As New DataView(CType(ViewState("DTOGClasificaciones"), DataTable), "", Orden, DataViewRowState.CurrentRows)
|
||||
GvDatos.DataSource = DV.ToTable()
|
||||
Gv.DataSource = DV.ToTable()
|
||||
DtOGClasificaciones = DV.Table()
|
||||
DV.Dispose()
|
||||
Else
|
||||
GvDatos.DataSource = CType(ViewState("DTOGClasificaciones"), DataTable)
|
||||
Gv.DataSource = CType(ViewState("DTOGClasificaciones"), DataTable)
|
||||
DtOGClasificaciones = CType(ViewState("DTOGClasificaciones"), DataTable)
|
||||
End If
|
||||
GvDatos.DataBind()
|
||||
Gv.DataBind()
|
||||
UpDatos.Update()
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
#Region " EXPORTAR - PDF - EXCEL "
|
||||
Protected Sub ImgExcel_Click(sender As Object, e As ImageClickEventArgs)
|
||||
Tbl.ExportToExcel("Catalogo de Clasificaciones de Objeto de Gasto ")
|
||||
End Sub
|
||||
|
||||
Protected Sub BtnImprimir_Click(sender As Object, e As ImageClickEventArgs)
|
||||
ImprimirReporte()
|
||||
End Sub
|
||||
'No quitar porque no funciona el exporta PDF
|
||||
Public Overrides Sub VerifyRenderingInServerForm(control As Control)
|
||||
' Verifies that the control is rendered
|
||||
End Sub
|
||||
|
||||
Protected Sub ImprimirReporte()
|
||||
Dim params As New List(Of ReportParameter)
|
||||
params.Add(New ReportParameter("pEmp", UsuarioActual.Empresa.Empresa))
|
||||
params.Add(New ReportParameter("pImg", New Uri(Server.MapPath(String.Format("~/Empresas/{0}/Logo.png", UsuarioActual.CveEmpresa))).AbsoluteUri))
|
||||
|
||||
ImprimirPDF("AC/Reportes/RepOGClasificaciones.rdlc", DtOGClasificaciones, params, "ReporteOGClasificaciones")
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
End Class
|
||||
20
AC/CatPD_EjeRector.aspx
Normal file
20
AC/CatPD_EjeRector.aspx
Normal file
@@ -0,0 +1,20 @@
|
||||
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="CatPD_EjeRector.aspx.vb" Inherits="AC_CatPD_EjeRector" %>
|
||||
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="HB" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="E" runat="Server">
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
|
||||
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
||||
|
||||
</asp:Content>
|
||||
5
AC/CatPD_EjeRector.aspx.vb
Normal file
5
AC/CatPD_EjeRector.aspx.vb
Normal file
@@ -0,0 +1,5 @@
|
||||
|
||||
Partial Class AC_CatPD_EjeRector
|
||||
Inherits System.Web.UI.Page
|
||||
|
||||
End Class
|
||||
20
AC/CatPD_Estrategia.aspx
Normal file
20
AC/CatPD_Estrategia.aspx
Normal file
@@ -0,0 +1,20 @@
|
||||
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="CatPD_Estrategia.aspx.vb" Inherits="AC_CatPD_Estrategia" %>
|
||||
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="CP" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="Css" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="HB" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="E" runat="Server">
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content8" ContentPlaceHolderID="H" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content9" ContentPlaceHolderID="C" runat="Server">
|
||||
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content10" ContentPlaceHolderID="JS" runat="Server">
|
||||
|
||||
</asp:Content>
|
||||
5
AC/CatPD_Estrategia.aspx.vb
Normal file
5
AC/CatPD_Estrategia.aspx.vb
Normal file
@@ -0,0 +1,5 @@
|
||||
|
||||
Partial Class AC_CatPD_Estrategia
|
||||
Inherits System.Web.UI.Page
|
||||
|
||||
End Class
|
||||
20
AC/CatPD_LineaAccion.aspx
Normal file
20
AC/CatPD_LineaAccion.aspx
Normal file
@@ -0,0 +1,20 @@
|
||||
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="CatPD_LineaAccion.aspx.vb" Inherits="AC_CatPD_LineaAccion" %>
|
||||
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="CP" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="Css" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="HB" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="E" runat="Server">
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content8" ContentPlaceHolderID="H" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content9" ContentPlaceHolderID="C" runat="Server">
|
||||
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content10" ContentPlaceHolderID="JS" runat="Server">
|
||||
|
||||
</asp:Content>
|
||||
5
AC/CatPD_LineaAccion.aspx.vb
Normal file
5
AC/CatPD_LineaAccion.aspx.vb
Normal file
@@ -0,0 +1,5 @@
|
||||
|
||||
Partial Class AC_CatPD_LineaAccion
|
||||
Inherits System.Web.UI.Page
|
||||
|
||||
End Class
|
||||
22
AC/CatPD_Meta.aspx
Normal file
22
AC/CatPD_Meta.aspx
Normal file
@@ -0,0 +1,22 @@
|
||||
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="CatPD_Meta.aspx.vb" Inherits="AC_CatPD_Meta" %>
|
||||
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="CP" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="Css" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="HB" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="E" runat="Server">
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content8" ContentPlaceHolderID="H" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content9" ContentPlaceHolderID="C" runat="Server">
|
||||
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content10" ContentPlaceHolderID="JS" runat="Server">
|
||||
|
||||
</asp:Content>
|
||||
|
||||
|
||||
5
AC/CatPD_Meta.aspx.vb
Normal file
5
AC/CatPD_Meta.aspx.vb
Normal file
@@ -0,0 +1,5 @@
|
||||
|
||||
Partial Class AC_CatPD_Meta
|
||||
Inherits System.Web.UI.Page
|
||||
|
||||
End Class
|
||||
22
AC/CatPD_Programa.aspx
Normal file
22
AC/CatPD_Programa.aspx
Normal file
@@ -0,0 +1,22 @@
|
||||
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="CatPD_Programa.aspx.vb" Inherits="AC_CatPD_Programa" %>
|
||||
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="CP" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="Css" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="HB" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="E" runat="Server">
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content8" ContentPlaceHolderID="H" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content9" ContentPlaceHolderID="C" runat="Server">
|
||||
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content10" ContentPlaceHolderID="JS" runat="Server">
|
||||
|
||||
</asp:Content>
|
||||
|
||||
|
||||
5
AC/CatPD_Programa.aspx.vb
Normal file
5
AC/CatPD_Programa.aspx.vb
Normal file
@@ -0,0 +1,5 @@
|
||||
|
||||
Partial Class AC_CatPD_Programa
|
||||
Inherits System.Web.UI.Page
|
||||
|
||||
End Class
|
||||
111
AC/CatPresupuestoEgresos.aspx
Normal file
111
AC/CatPresupuestoEgresos.aspx
Normal file
@@ -0,0 +1,111 @@
|
||||
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="CatPresupuestoEgresos.aspx.vb" Inherits="AC_CatPresupuestoEgresos" %>
|
||||
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="H" runat="Server">
|
||||
|
||||
<li>
|
||||
<asp:HyperLink ID="HplAgregar" runat="server" NavigateUrl="/AC/PresupuestoEgresos.aspx"><i class="fa fa-plus-circle"></i> Agregar</asp:HyperLink>
|
||||
</li>
|
||||
<li>
|
||||
<asp:LinkButton ID="LBPdf" OnClick="LBPdf_Click" runat="server"><i class="fa fa-ad-pdf"></i> Exporta PDF</asp:LinkButton>
|
||||
</li>
|
||||
<li>
|
||||
<asp:LinkButton ID="LBExcel" OnClick="LBExcel_Click" runat="server"><i class="fa fa-ad-excel"></i> Exporta Excel</asp:LinkButton>
|
||||
</li>
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="E" runat="Server">
|
||||
Catálogo Presupuesto Egresos
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="C" runat="Server">
|
||||
|
||||
<asp:UpdatePanel ID="UPFiltros" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="portlet solid grey-cascade portlet-filter">
|
||||
<div class="portlet-title portlet-filterT smalltitle">
|
||||
<div class="tools">
|
||||
<asp:Button CssClass="btn btn-primary" ID="BtnConsultar" runat="server" Text="Consultar" Width="100px" OnClick="BtnConsultar_Click" />
|
||||
</div>
|
||||
<div class="titlefiltros caption ">
|
||||
<div class="row">
|
||||
<div class="col-md-1" style="width: 150px"><span>Tipo de proyecto:</span></div>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="DdlProyecto" runat="server" Width="100%">
|
||||
<asp:ListItem Text="Prespuesto" Value="1"></asp:ListItem>
|
||||
<asp:ListItem Text="AnteProyecto" Value="0"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
|
||||
<div class="col-md-1 text-size-12"><span>Ejercicio:</span></div>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="DdlEjercicio" runat="server" Width="100%" DataTextField="Ejercicio" DataValueField="Ejercicio"></asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
<br />
|
||||
<asp:UpdatePanel runat="server">
|
||||
<ContentTemplate>
|
||||
<div class="row">
|
||||
<div class="col-md-3"></div>
|
||||
<asp:Label ID="LblEmpresa" CssClass="col-md-6" Style="text-align: center;" runat="server" Font-Bold="True" Font-Size="15" Text=""></asp:Label>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-3"></div>
|
||||
<asp:Label ID="LblPresupAnio" CssClass="col-md-6" Style="text-align: center;" Font-Bold="True" Font-Size="11" runat="server" Text=""></asp:Label>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
<br />
|
||||
|
||||
<asp:UpdatePanel ID="UPDatos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:GridView ID="Gv" runat="server" CssClass="table table-advance table-hover ScrollAD Widthall" AutoGenerateColumns="False" EmptyDataText="No se encontraron registros del Presupuesto de Egresos del ejercicio y tipo de proyecto seleccionados" GridLines="None" CellPadding="1" CellSpacing="1" RowStyle-VerticalAlign="Middle" RowStyle-HorizontalAlign="Center"
|
||||
DataKeyNames="Total,CveClasificacion,CodigoCOG,CvePresupuestoEgreso,Clasificacion,CveProgramaOperativo,CveFuenteFinanciamiento,ClaveProgramaOperativo,CodigoFuenteFinanciamiento,CodigoUnidadAdministrativa,CveTipoGasto,CveUnidadAdministrativa,Enero,Febrero,Marzo,Abril,Mayo,Junio,Julio,Agosto,Septiembre,Octubre,Noviembre,Diciembre">
|
||||
<Columns>
|
||||
<asp:HyperLinkField DataTextField="ProgramaOperativo" HeaderText="Programa Operativo" ItemStyle-HorizontalAlign="Left" DataNavigateUrlFields="CvePresupuestoEgreso,EsProyecto,Bloqueado" DataNavigateUrlFormatString="/AC/PresupuestoEgresos.aspx?CvePresupuestoEgresos={0}&EsProyecto={1}&Bloqueado={2}" ControlStyle-CssClass="Texto" />
|
||||
<asp:HyperLinkField DataTextField="FuenteFinanciamiento" HeaderText="Fuente de Financiamiento " DataNavigateUrlFields="CvePresupuestoEgreso,EsProyecto,Bloqueado" DataNavigateUrlFormatString="/AC/PresupuestoEgresos.aspx?CvePresupuestoEgresos={0}&EsProyecto={1}&Bloqueado={2}" ControlStyle-CssClass="Texto" />
|
||||
<asp:HyperLinkField DataTextField="TipoGasto" HeaderText="Tipo de Gasto" DataNavigateUrlFields="CvePresupuestoEgreso,EsProyecto,Bloqueado" DataNavigateUrlFormatString="/AC/PresupuestoEgresos.aspx?CvePresupuestoEgresos={0}&EsProyecto={1}&Bloqueado={2}" ControlStyle-CssClass="Texto" />
|
||||
<asp:HyperLinkField DataTextField="UnidadAdministrativa" HeaderText="Unidad Administrativa" DataNavigateUrlFields="CvePresupuestoEgreso,EsProyecto,Bloqueado" DataNavigateUrlFormatString="/AC/PresupuestoEgresos.aspx?CvePresupuestoEgresos={0}&EsProyecto={1}&Bloqueado={2}" ControlStyle-CssClass="Texto" />
|
||||
<asp:HyperLinkField DataTextField="ClasificadorOGRep" HeaderText="Clasificacion del Objeto del Gasto" ItemStyle-HorizontalAlign="Left" DataNavigateUrlFields="CvePresupuestoEgreso,EsProyecto,Bloqueado" DataNavigateUrlFormatString="/AC/PresupuestoEgresos.aspx?CvePresupuestoEgresos={0}&EsProyecto={1}&Bloqueado={2}" ControlStyle-CssClass="Texto" />
|
||||
<asp:HyperLinkField DataTextField="Total" HeaderText="Total" DataTextFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" DataNavigateUrlFields="CvePresupuestoEgreso,EsProyecto,Bloqueado" DataNavigateUrlFormatString="/AC/PresupuestoEgresos.aspx?CvePresupuestoEgresos={0}&EsProyecto={1}&Bloqueado={2}" ControlStyle-CssClass="Texto" />
|
||||
<%--ItemStyle-CssClass="BorderR"--%>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
<asp:UpdatePanel runat="server" ID="UpTotales" Visible="true" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<table style="width: 100%">
|
||||
<tr>
|
||||
<td align="right" style="float: right;">
|
||||
<asp:Label runat="server" ID="LbTotales" Width="80px"></asp:Label></td>
|
||||
<td style="float: right;">Total:</td>
|
||||
</tr>
|
||||
</table>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
<asp:UpdatePanel runat="server">
|
||||
<ContentTemplate>
|
||||
<table width="100%">
|
||||
<tr>
|
||||
<td align="right">
|
||||
<asp:Button ID="BtnPresupuesto" CssClass="btn green" runat="server" Text="Generar Presupuesto" Visible="False" OnClick="BtnPresupuesto_Click" /><br />
|
||||
<asp:Button ID="BtnCongelarPrespuesto" CssClass="btn green" runat="server" Text="Aprobar Presupuesto" Visible="False" OnClick="BtnCongelarPrespuesto_Click" /><br />
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
<br />
|
||||
<br />
|
||||
|
||||
</asp:Content>
|
||||
|
||||
422
AC/CatPresupuestoEgresos.aspx.vb
Normal file
422
AC/CatPresupuestoEgresos.aspx.vb
Normal file
@@ -0,0 +1,422 @@
|
||||
Option Strict On
|
||||
Option Explicit On
|
||||
|
||||
Imports System.Data
|
||||
Imports System.Linq
|
||||
Imports Extensiones
|
||||
Imports Microsoft.Reporting.WebForms
|
||||
|
||||
Partial Class AC_CatPresupuestoEgresos
|
||||
Inherits ClsPaginas
|
||||
|
||||
#Region " PROPIEDADES "
|
||||
Private Property DtPresupuestoEgresos As DataTable
|
||||
Get
|
||||
Return CType(ViewState("DtPresupuestoEgresos"), DataTable)
|
||||
End Get
|
||||
Set(value As DataTable)
|
||||
ViewState("DtPresupuestoEgresos") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Property pTotal As String
|
||||
Get
|
||||
Return CType(ViewState("pTotal"), String)
|
||||
End Get
|
||||
Set(value As String)
|
||||
ViewState("pTotal") = value
|
||||
End Set
|
||||
End Property
|
||||
#End Region
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||
If Not Page.IsPostBack Then
|
||||
|
||||
SetValues()
|
||||
CargaDatos()
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
|
||||
#Region " VALORES INICIALES "
|
||||
Private Sub SetValues()
|
||||
CargaEjercicios()
|
||||
End Sub
|
||||
Private Sub CargaEjercicios()
|
||||
If UsuarioActual.Empresa.UsaAC Then
|
||||
Dim ClsConta As New ClsContPAQi(UsuarioActual.Empresa)
|
||||
If ClsConta.GetEjercicios() Then
|
||||
DdlEjercicio.DataSource = ClsConta.DtResultados
|
||||
Else
|
||||
DdlEjercicio.DataSource = Nothing
|
||||
End If
|
||||
ClsConta.Dispose()
|
||||
DdlEjercicio.DataBind()
|
||||
Else
|
||||
Dim ClsConta As New ClsContabilidad
|
||||
If ClsConta.GetEjercicios(UsuarioActual.CveEmpresa) Then
|
||||
DdlEjercicio.DataSource = ClsConta.DtResultados
|
||||
Else
|
||||
DdlEjercicio.DataSource = Nothing
|
||||
End If
|
||||
ClsConta.Dispose()
|
||||
DdlEjercicio.DataBind()
|
||||
|
||||
End If
|
||||
|
||||
DdlEjercicio.SelectedValueExist(UsuarioActual.Empresa.EjercicioActual.ToString)
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
|
||||
#Region " CARGA DATOS "
|
||||
Protected Sub BtnConsultar_Click(sender As Object, e As EventArgs)
|
||||
BtnCongelarPrespuesto.Visible = False
|
||||
BtnPresupuesto.Visible = False
|
||||
CargaDatos()
|
||||
End Sub
|
||||
Private Sub CargaDatos()
|
||||
Dim AC As New ClsAC
|
||||
Dim Ejercicio As Integer = DdlEjercicio.SelectedValue.ToString.ToEntero
|
||||
Dim EsProyecto As Boolean = CBool(DdlProyecto.SelectedValue.ToString)
|
||||
|
||||
LblEmpresa.Text = UsuarioActual.Empresa.Empresa
|
||||
LblPresupAnio.Text = String.Format("Presupuesto {0}", DdlEjercicio.SelectedValue)
|
||||
|
||||
If AC.GetPresupuestoEgresos(-1, EsProyecto, Ejercicio, UsuarioActual.CveEmpresa) Then
|
||||
DtPresupuestoEgresos = AC.DtResultados
|
||||
Gv.DataSource = AC.DtResultados
|
||||
Gv.DataBind()
|
||||
|
||||
'debe de haber datos para habilitar los botones
|
||||
If DtPresupuestoEgresos.Rows.Count > 0 Then
|
||||
|
||||
If EsProyecto Then
|
||||
If DtPresupuestoEgresos.Rows(0)("Bloqueado").ToString = "0" Then
|
||||
'Ejercicio = UsuarioActual.Empresa.EjercicioActual AndAlso
|
||||
BtnCongelarPrespuesto.Visible = True
|
||||
End If
|
||||
|
||||
Else
|
||||
'si es anteproyecto
|
||||
If DtPresupuestoEgresos.Rows(0)("Bloqueado").ToString = "0" Then
|
||||
'AndAlso Ejercicio >= UsuarioActual.Empresa.EjercicioActual
|
||||
BtnPresupuesto.Visible = True
|
||||
End If
|
||||
' If Ejercicio = UsuarioActual.Empresa.EjercicioActual Then
|
||||
End If
|
||||
|
||||
Dim Total As Double = Gv.Rows.Cast(Of GridViewRow)().Sum(Function(gvr) gvr.DataKey("Total").ToDouble)
|
||||
LbTotales.Text = Total.ToString.FormatoNumero
|
||||
Else
|
||||
LbTotales.Text = "0.00"
|
||||
pTotal = "0.00"
|
||||
UpTotales.Visible = False
|
||||
End If
|
||||
End If
|
||||
|
||||
UpTotales.Update()
|
||||
UPDatos.Update()
|
||||
AC.Dispose()
|
||||
End Sub
|
||||
Private Sub CargaGrid(Orden As String)
|
||||
If Orden <> String.Empty Then
|
||||
Dim DV As New DataView(CType(ViewState("DT_AC_PresupuestosEgresos"), DataTable), "", Orden, DataViewRowState.CurrentRows)
|
||||
Gv.DataSource = DV.ToTable()
|
||||
DV.Dispose()
|
||||
Else
|
||||
Gv.DataSource = CType(ViewState("DT_AC_PresupuestosEgresos"), DataTable)
|
||||
End If
|
||||
Gv.DataBind()
|
||||
UPDatos.Update()
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
|
||||
#Region " FUNCIONES "
|
||||
Private Function FNCIDCuenta(dt As DataTable, codigo As String) As Integer
|
||||
Dim Retorno As Integer = 0
|
||||
Dim dr As DataRow
|
||||
dr = dt.FiltroPrimero(String.Format("Codigo ='{0}'", codigo))
|
||||
If dr IsNot Nothing Then
|
||||
|
||||
Retorno = dr("Id").ToString.ToEntero
|
||||
End If
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
Private Function FNCAddCuenta(dt As DataTable, id As Integer, codigo As String) As Integer
|
||||
' se crea una coleccion para grabar las claves y las cuentas que se van insertando, por si se comparten, no marque error de que ya esta registrada y esta en la transaccion todavia
|
||||
Dim Retorno As Integer = 0
|
||||
Dim dr As DataRow = dt.NewRow
|
||||
|
||||
dr("Codigo") = codigo
|
||||
dr("Id") = id
|
||||
|
||||
dt.Rows.Add(dr)
|
||||
dt.AcceptChanges()
|
||||
Return Retorno
|
||||
End Function
|
||||
Private Function FnCuentaCargo(CC As String) As String
|
||||
Return CC.Replace("-0", "").Replace("-1", "").Replace("-2", "").Replace("-3", "").Replace("-4", "").Replace("-5", "").Replace("-6", "").Replace("-7", "").Replace("-8", "").Replace("-9", "")
|
||||
End Function
|
||||
#End Region
|
||||
|
||||
|
||||
|
||||
|
||||
Protected Sub BtnCongelarPrespuesto_Click(sender As Object, e As EventArgs)
|
||||
If UsuarioActual.Empresa.UsaAC Then
|
||||
Dim Conta As New ClsContPAQi(UsuarioActual.Empresa)
|
||||
Conta.IniciaTransacSQL()
|
||||
Dim AC As New ClsAC
|
||||
AC.IniciaTransacSQL()
|
||||
|
||||
'registro las cuentas prespuestales por cada movimiento, si existe la ignoro
|
||||
Dim dtCuentas As DataTable = Nothing
|
||||
Dim IDPoliza As Integer
|
||||
Dim IdCuentaAprobado, IdCuentaPorEjercer, IdCuentaModificaciones, IdCuentaComprometido, IdCuentaDevengado, IdCuentaEjercido, IdCuentaPagado, IdCuentaMatriz, IdCuentaMatrizAbono As Integer
|
||||
Dim Codigo As String
|
||||
Dim TieneError As Boolean = False
|
||||
Dim MensajeError = ""
|
||||
Dim IdCuentaAprobadoPadre, IdCuentaPorEjercerPadre, IdCuentaModificacionesPadre, IdCuentaComprometidoPadre, IdCuentaDevengadoPadre, IdCuentaEjercidoPadre, IdCuentaPagadoPadre, IdCuentaMatrizPadre As Integer
|
||||
|
||||
'hay que registrar una poliza de cargo en 821, aprobado contra Ley de egresos, luego registrar o de por ejercer
|
||||
|
||||
If Conta.GetCuentas(-1, "-1", -1) Then
|
||||
dtCuentas = Conta.DtResultados
|
||||
End If
|
||||
|
||||
Dim drPadre As DataRow
|
||||
drPadre = dtCuentas.FiltroPrimero("Nombre = 'PRESUPUESTO DE EGRESOS APROBADO'")
|
||||
IdCuentaAprobadoPadre = If(drPadre IsNot Nothing, drPadre("Id").ToString.ToEntero, 0)
|
||||
|
||||
drPadre = dtCuentas.FiltroPrimero("Nombre = 'PRESUPUESTO DE EGRESOS POR EJERCER'")
|
||||
IdCuentaPorEjercerPadre = If(drPadre IsNot Nothing, drPadre("Id").ToString.ToEntero, 0)
|
||||
|
||||
drPadre = dtCuentas.FiltroPrimero("Nombre = 'MODIFICACIONES AL PRESUPUESTO DE EGRESOS APROBADO'")
|
||||
IdCuentaModificacionesPadre = If(drPadre IsNot Nothing, drPadre("Id").ToString.ToEntero, 0)
|
||||
|
||||
drPadre = dtCuentas.FiltroPrimero("Nombre = 'PRESUPUESTO DE EGRESOS COMPROMETIDO'")
|
||||
IdCuentaComprometidoPadre = If(drPadre IsNot Nothing, drPadre("Id").ToString.ToEntero, 0)
|
||||
|
||||
drPadre = dtCuentas.FiltroPrimero("Nombre = 'PRESUPUESTO DE EGRESOS DEVENGADO'")
|
||||
IdCuentaDevengadoPadre = If(drPadre IsNot Nothing, drPadre("Id").ToString.ToEntero, 0)
|
||||
|
||||
drPadre = dtCuentas.FiltroPrimero("Nombre = 'PRESUPUESTO DE EGRESOS EJERCIDO'")
|
||||
IdCuentaEjercidoPadre = If(drPadre IsNot Nothing, drPadre("Id").ToString.ToEntero, 0)
|
||||
|
||||
drPadre = dtCuentas.FiltroPrimero("Nombre = 'PRESUPUESTO DE EGRESOS PAGADO'")
|
||||
IdCuentaPagadoPadre = If(drPadre IsNot Nothing, drPadre("Id").ToString.ToEntero, 0)
|
||||
|
||||
Dim Total As Double = Gv.Rows.Cast(Of GridViewRow)().Sum(Function(gvr) gvr.DataKey("Total").ToDouble)
|
||||
Dim Fecha As Date = String.Format("01/01/{0}", DdlEjercicio.SelectedValue).ToDate
|
||||
|
||||
IDPoliza = Conta.AddPoliza(4, String.Format("POLIZA INICIAL - PRESUPUESTO DE EGRESOS APROBADO {0}", DdlEjercicio.SelectedValue), Total, Total, UsuarioActual.CveUsuario, Fecha)
|
||||
If IDPoliza > 0 Then
|
||||
|
||||
For Each gvr As GridViewRow In Gv.Rows
|
||||
|
||||
Codigo = String.Format("{0}{1}{2}{3}{4}", gvr.DataKey("ClaveProgramaOperativo").PadLeft(2, "0"c), gvr.DataKey("CodigoUnidadAdministrativa").PadLeft(2, "0"c), gvr.DataKey("CodigoFuenteFinanciamiento").PadLeft(2, "0"c), gvr.DataKey("CveTipoGasto").PadLeft(2, "0"c), gvr.DataKey("CodigoCOG")).PadLeft(5, "0"c)
|
||||
'Registro las cuentas afectables
|
||||
IdCuentaAprobado = FNCIDCuenta(dtCuentas, String.Format("00821{0}", Codigo))
|
||||
If IdCuentaAprobado = 0 Then IdCuentaAprobado = Conta.AddCuenta(String.Format("00821{0}", Codigo), gvr.DataKey("Clasificacion").ToUpper, "L", 2, 0, 1, 0, "", 1, IdCuentaAprobadoPadre) : FNCAddCuenta(dtCuentas, IdCuentaAprobado, String.Format("00821{0}", Codigo))
|
||||
|
||||
IdCuentaPorEjercer = FNCIDCuenta(dtCuentas, String.Format("00822{0}", Codigo))
|
||||
If IdCuentaPorEjercer = 0 Then IdCuentaPorEjercer = Conta.AddCuenta(String.Format("00822{0}", Codigo), gvr.DataKey("Clasificacion").ToUpper, "L", 2, 0, 1, 0, "", 1, IdCuentaPorEjercerPadre) : FNCAddCuenta(dtCuentas, IdCuentaPorEjercer, String.Format("00822{0}", Codigo))
|
||||
|
||||
IdCuentaModificaciones = FNCIDCuenta(dtCuentas, String.Format("00823{0}", Codigo))
|
||||
If IdCuentaModificaciones = 0 Then IdCuentaModificaciones = Conta.AddCuenta(String.Format("00823{0}", Codigo), gvr.DataKey("Clasificacion").ToUpper, "L", 2, 0, 1, 0, "", 1, IdCuentaModificacionesPadre) : FNCAddCuenta(dtCuentas, IdCuentaModificaciones, String.Format("00823{0}", Codigo))
|
||||
|
||||
IdCuentaComprometido = FNCIDCuenta(dtCuentas, String.Format("00824{0}", Codigo))
|
||||
If IdCuentaComprometido = 0 Then IdCuentaComprometido = Conta.AddCuenta(String.Format("00824{0}", Codigo), gvr.DataKey("Clasificacion").ToUpper, "L", 2, 0, 1, 0, "", 1, IdCuentaComprometidoPadre) : FNCAddCuenta(dtCuentas, IdCuentaComprometido, String.Format("00824{0}", Codigo))
|
||||
|
||||
IdCuentaDevengado = FNCIDCuenta(dtCuentas, String.Format("00825{0}", Codigo))
|
||||
If IdCuentaDevengado = 0 Then IdCuentaDevengado = Conta.AddCuenta(String.Format("00825{0}", Codigo), gvr.DataKey("Clasificacion").ToUpper, "L", 2, 0, 1, 0, "", 1, IdCuentaDevengadoPadre) : FNCAddCuenta(dtCuentas, IdCuentaDevengado, String.Format("00825{0}", Codigo))
|
||||
|
||||
IdCuentaEjercido = FNCIDCuenta(dtCuentas, String.Format("00826{0}", Codigo))
|
||||
If IdCuentaEjercido = 0 Then IdCuentaEjercido = Conta.AddCuenta(String.Format("00826{0}", Codigo), gvr.DataKey("Clasificacion").ToUpper, "L", 2, 0, 1, 0, "", 1, IdCuentaEjercidoPadre) : FNCAddCuenta(dtCuentas, IdCuentaEjercido, String.Format("00826{0}", Codigo))
|
||||
|
||||
IdCuentaPagado = FNCIDCuenta(dtCuentas, String.Format("00827{0}", Codigo))
|
||||
If IdCuentaPagado = 0 Then IdCuentaPagado = Conta.AddCuenta(String.Format("00827{0}", Codigo), gvr.DataKey("Clasificacion").ToUpper, "L", 2, 0, 1, 0, "", 1, IdCuentaPagadoPadre) : FNCAddCuenta(dtCuentas, IdCuentaPagado, String.Format("00827{0}", Codigo))
|
||||
|
||||
Dim filtro As New StringBuilder
|
||||
filtro.AppendFormat("Partida = {0} and TipoGasto = {1}", gvr.DataKey("CodigoCOG").ToString.Substring(0, 4), gvr.DataKey("CveTipoGasto").ToString)
|
||||
Dim RegistroMatriz As DataRow = GlobalDTAC_MatrizEgresos.FiltroPrimero(filtro.ToString)
|
||||
|
||||
If RegistroMatriz Is Nothing Then
|
||||
Dim CCOG As String = gvr.DataKey("CodigoCOG").ToString.Substring(0, 3)
|
||||
If CCOG = "161" Then CCOG = "159" ' ajuste manual, porque no hay conversion de estas cuentas
|
||||
RegistroMatriz = GlobalDTAC_MatrizEgresos.FiltroPrimero(String.Format("Partida = {0}0 and TipoGasto = {1}", CCOG, gvr.DataKey("CveTipoGasto").ToString))
|
||||
End If
|
||||
If RegistroMatriz IsNot Nothing AndAlso FnCuentaCargo(RegistroMatriz("CuentaCargo").ToString).ToEntero > 0 Then
|
||||
IdCuentaMatrizPadre = FnCuentaCargo(RegistroMatriz("CuentaCargo").ToString).ToEntero
|
||||
|
||||
Dim CuentaCargo As Integer = dtCuentas.FiltroPrimeroValor("Id", String.Format("Codigo = '{0}'", String.Format("0{0}0000000000000", IdCuentaMatrizPadre))).ToEntero
|
||||
|
||||
If CuentaCargo > 0 Then
|
||||
|
||||
IdCuentaMatriz = FNCIDCuenta(dtCuentas, String.Format("0{0}{1}", IdCuentaMatrizPadre, Codigo))
|
||||
If IdCuentaMatriz = 0 Then IdCuentaMatriz = Conta.AddCuenta(String.Format("0{0}{1}", IdCuentaMatrizPadre, Codigo), gvr.DataKey("Clasificacion").ToUpper, "G", 2, 0, 1, 0, "", 1, CuentaCargo) : FNCAddCuenta(dtCuentas, IdCuentaMatriz, String.Format("0{0}{1}", IdCuentaMatrizPadre, Codigo))
|
||||
|
||||
IdCuentaMatrizAbono = 0
|
||||
'si el COG, es de la 1000, se le ingresa la cuenta abono
|
||||
If gvr.DataKey("CodigoCOG").ToString.Substring(0, 1) = "1" Then
|
||||
|
||||
IdCuentaMatrizPadre = FnCuentaCargo(RegistroMatriz("CuentaAbono").ToString.Substring(0, 4)).ToEntero
|
||||
|
||||
Dim CuentaAbono As Integer = dtCuentas.FiltroPrimero(String.Format("Codigo = '{0}'", String.Format("0{0}0000000000000", IdCuentaMatrizPadre)))("Id").ToString.ToEntero
|
||||
|
||||
IdCuentaMatrizAbono = FNCIDCuenta(dtCuentas, String.Format("0{0}{1}", IdCuentaMatrizPadre, Codigo))
|
||||
If IdCuentaMatrizAbono = 0 Then IdCuentaMatrizAbono = Conta.AddCuenta(String.Format("0{0}{1}", IdCuentaMatrizPadre, Codigo), gvr.DataKey("Clasificacion").ToUpper, "G", 2, 0, 1, 0, "", 1, CuentaAbono) : FNCAddCuenta(dtCuentas, IdCuentaMatriz, String.Format("0{0}{1}", IdCuentaMatrizPadre, Codigo))
|
||||
End If
|
||||
|
||||
Total = gvr.DataKey("Total").ToDouble
|
||||
If Total > 0 Then
|
||||
If Conta.AddMovimiento(IDPoliza, IdCuentaAprobado, True, Total, "", "", 0, Fecha, "") Then
|
||||
'actualizo el idcuenta del presupuesto
|
||||
If Not Conta.AddMovimiento(IDPoliza, IdCuentaPorEjercer, False, Total, "", "", 0, Fecha, "") Then
|
||||
MensajeError = "Ocurrió un error al generar los movimientos contables de Ejercido"
|
||||
TieneError = True
|
||||
Exit For
|
||||
End If
|
||||
|
||||
Else
|
||||
MensajeError = "Ocurrió un error al generar los movimientos contables de Aprobado"
|
||||
TieneError = True
|
||||
Exit For
|
||||
End If
|
||||
End If
|
||||
|
||||
If Not AC.UpdateCuentasPresupuestoEgresos(IdCuentaAprobado, IdCuentaPorEjercer, IdCuentaModificaciones, IdCuentaComprometido, IdCuentaDevengado, IdCuentaEjercido, IdCuentaPagado, IdCuentaMatriz, IdCuentaMatrizAbono, gvr.DataKey("CvePresupuestoEgreso").ToEntero) Then
|
||||
MensajeError = "Ocurrió un error al actualizar el presupuesto de egreso"
|
||||
TieneError = True
|
||||
Exit For
|
||||
End If
|
||||
|
||||
Else
|
||||
MensajeError = $"Ocurrió un error al buscar la cuenta cargo del presupuesto de egreso. <br/><br/> Cuenta: {String.Format("0{0}0000000000000", IdCuentaMatrizPadre)}"
|
||||
TieneError = True
|
||||
Exit For
|
||||
End If
|
||||
|
||||
Else
|
||||
MensajeError = "Ocurrió un error al buscar la cuenta cargo matriz del presupuesto de egreso"
|
||||
TieneError = True
|
||||
Exit For
|
||||
End If
|
||||
|
||||
|
||||
Next
|
||||
|
||||
Else
|
||||
MensajeError = "Ocurrió un error al generar la poliza inicial contable"
|
||||
TieneError = True
|
||||
End If
|
||||
|
||||
If Not TieneError Then
|
||||
If Not AC.UpdateEjercicios(DdlEjercicio.SelectedValue.ToEntero, -1, IDPoliza, UsuarioActual.CveEmpresa) Then
|
||||
TieneError = True
|
||||
End If
|
||||
End If
|
||||
|
||||
If Not TieneError Then
|
||||
'actualizo las cuentas de cadapresupuesto
|
||||
AC.Commit()
|
||||
Conta.Commit()
|
||||
Alert("El Presupuesto de Egresos se ha aprobado correctamente", TipoMensaje.MsgInformacion)
|
||||
BtnCongelarPrespuesto.Visible = False
|
||||
Else
|
||||
Conta.RollBack()
|
||||
AC.RollBack()
|
||||
Alert($"Ocurrió un error al aprobar el Presupuesto de Egresos. Por favor vuelva a intentar. <br/><br/> {MensajeError}", TipoMensaje.MsgError)
|
||||
End If
|
||||
|
||||
Conta.Dispose()
|
||||
AC.Dispose()
|
||||
Else
|
||||
Dim Conta As New ClsContabilidad
|
||||
Dim TieneError As Boolean = False
|
||||
If Not Conta.GetGeneraPolizaPresupuestoEgresos(UsuarioActual.CveEmpresa, DdlEjercicio.SelectedValue.ToEntero) Then
|
||||
TieneError = True
|
||||
End If
|
||||
If TieneError Then
|
||||
Alert("Ocurrió un error al aprobar el Presupuesto de Egresos. Por favor vuelva a intentar.", TipoMensaje.MsgError)
|
||||
Else
|
||||
Alert("El Presupuesto de Egresos se ha aprobado correctamente", TipoMensaje.MsgInformacion)
|
||||
BtnCongelarPrespuesto.Visible = False
|
||||
End If
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Protected Sub BtnPresupuesto_Click(sender As Object, e As EventArgs)
|
||||
Dim AC As New ClsAC
|
||||
AC.IniciaTransacSQL()
|
||||
Dim TieneError As Boolean = False
|
||||
|
||||
For Each gvr As GridViewRow In Gv.Rows
|
||||
|
||||
Dim Total As Double = gvr.DataKey("Total").ToDouble
|
||||
Dim Enero As Double = gvr.DataKey("Enero").ToDouble
|
||||
Dim Febrero As Double = gvr.DataKey("Febrero").ToDouble
|
||||
Dim Marzo As Double = gvr.DataKey("Marzo").ToDouble
|
||||
Dim Abril As Double = gvr.DataKey("Abril").ToDouble
|
||||
Dim Mayo As Double = gvr.DataKey("Mayo").ToDouble
|
||||
Dim Junio As Double = gvr.DataKey("Junio").ToDouble
|
||||
Dim Julio As Double = gvr.DataKey("Julio").ToDouble
|
||||
Dim Agosto As Double = gvr.DataKey("Agosto").ToDouble
|
||||
Dim Septiembre As Double = gvr.DataKey("Septiembre").ToDouble
|
||||
Dim Octubre As Double = gvr.DataKey("Octubre").ToDouble
|
||||
Dim Noviembre As Double = gvr.DataKey("Noviembre").ToDouble
|
||||
Dim Diciembre As Double = gvr.DataKey("Diciembre").ToDouble
|
||||
|
||||
Dim Ejercicio As Integer = 2015
|
||||
Dim CveProgramaOperativo As Integer = gvr.DataKey("CveProgramaOperativo").ToEntero
|
||||
Dim CveFuenteFinanciamiento As Integer = gvr.DataKey("CveFuenteFinanciamiento").ToEntero
|
||||
Dim CveTipoGasto As Integer = gvr.DataKey("CveTipoGasto").ToEntero
|
||||
Dim CveUnidadAdministrativa As Integer = gvr.DataKey("CveUnidadAdministrativa").ToEntero
|
||||
Dim CveClasificacionOG As Integer = gvr.DataKey("CveClasificacion").ToEntero
|
||||
Dim CvePresupuestoEgresos As Integer = gvr.DataKey("CvePresupuestoEgreso").ToEntero
|
||||
|
||||
If Not AC.ProyectoPresupuestoEgresos(Ejercicio, CveProgramaOperativo, CveFuenteFinanciamiento, CveTipoGasto, CveUnidadAdministrativa, CveClasificacionOG, Total, Enero, Febrero, Marzo, Abril, Mayo, Junio, Julio, Agosto, Septiembre, Octubre, Noviembre, Diciembre, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CvePresupuestoEgresos) Then
|
||||
TieneError = True
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
|
||||
If Not TieneError Then
|
||||
AC.Commit()
|
||||
Alert("Movimientos Guardados", TipoMensaje.MsgInformacion)
|
||||
BtnPresupuesto.Visible = False
|
||||
Else
|
||||
AC.RollBack()
|
||||
End If
|
||||
|
||||
AC.Dispose()
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
#Region " IMPRIMIR EXCEL "
|
||||
Protected Sub LBExcel_Click(sender As Object, e As EventArgs)
|
||||
ImprimirReporte("Excel")
|
||||
End Sub
|
||||
Protected Sub LBPdf_Click(sender As Object, e As EventArgs)
|
||||
ImprimirReporte()
|
||||
End Sub
|
||||
Private Sub ImprimirReporte(Optional Formato As String = "PDF")
|
||||
'parametros a enviar al reporte
|
||||
Dim params As New List(Of ReportParameter)
|
||||
params.Add(New ReportParameter("pEmp", UsuarioActual.Empresa.Empresa))
|
||||
params.Add(New ReportParameter("pImg", New Uri(Server.MapPath(String.Format("~/Empresas/{0}/Logo.png", UsuarioActual.CveEmpresa))).AbsoluteUri))
|
||||
params.Add(New ReportParameter("pEjercicio", DdlEjercicio.SelectedValue.ToString))
|
||||
params.Add(New ReportParameter("pTotal", pTotal))
|
||||
ImprimirPDF("AC/Reportes/RepCatPresupuestoEgresos.rdlc", DtPresupuestoEgresos, params, "PresupuestoEgresos", Formato)
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
|
||||
|
||||
End Class
|
||||
96
AC/CatPresupuestoIngresos.aspx
Normal file
96
AC/CatPresupuestoIngresos.aspx
Normal file
@@ -0,0 +1,96 @@
|
||||
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="CatPresupuestoIngresos.aspx.vb" Inherits="AC_CatPresupuestoIngresos" %>
|
||||
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="H" runat="Server">
|
||||
|
||||
<li>
|
||||
<asp:HyperLink ID="HplAgregar" runat="server" NavigateUrl="/AC/PresupuestoIngresos.aspx"><i class="fa fa-plus-circle"></i> Agregar</asp:HyperLink>
|
||||
</li>
|
||||
<li>
|
||||
<asp:LinkButton ID="LBPdf" OnClick="LBPdf_Click" runat="server"><i class="fa fa-ad-pdf"></i> Exporta PDF</asp:LinkButton>
|
||||
</li>
|
||||
<li>
|
||||
<asp:LinkButton ID="LBExcel" OnClick="LBExcel_Click" runat="server"><i class="fa fa-ad-excel"></i> Exporta Excel</asp:LinkButton>
|
||||
</li>
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="E" runat="Server">
|
||||
Catálogo Presupuesto Ingresos
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="C" runat="Server">
|
||||
|
||||
<asp:UpdatePanel ID="UPFiltros" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="portlet solid grey-cascade portlet-filter">
|
||||
<div class="portlet-title portlet-filterT smalltitle">
|
||||
<div class="tools">
|
||||
<asp:Button ID="consultar" CssClass="btn btn-primary" runat="server" Text="Consultar" Width="100px" OnClick="consultar_Click" />
|
||||
</div>
|
||||
<div class="titlefiltros caption ">
|
||||
<div class="row">
|
||||
<div class="col-md-1"><span>Tipo:</span></div>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="DdlProyecto" runat="server" Width="150px">
|
||||
<asp:ListItem Text="Presupuesto" Value="1"></asp:ListItem>
|
||||
<asp:ListItem Text="AnteProyecto" Value="0"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
<div class="col-md-1"><span>Ejercicio:</span></div>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="DdlEjercicio" runat="server" Width="100%" DataTextField="Ejercicio" DataValueField="Ejercicio"></asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
<br />
|
||||
|
||||
|
||||
<asp:UpdatePanel ID="UPDatos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:GridView ID="Gv" runat="server" AutoGenerateColumns="False" EmptyDataText="No se encontraron Registros de Presupuesto de Egresos del Ejercicio y Tipo de Proyecto seleccionados" CssClass="table table-hover table-advance Widthall" GridLines="None"
|
||||
CellPadding="1" CellSpacing="1" RowStyle-VerticalAlign="Middle" RowStyle-HorizontalAlign="Center"
|
||||
DataKeyNames="CodigoRubroIngreso,RubroIngreso,FuenteRecaudacion,Total,CvePresupuestoIngreso,CveFuenteRecaudacion,CveRubroIngreso,Enero,Febrero,Marzo,Abril,Mayo,Junio,Julio,Agosto,Septiembre,Octubre,Noviembre,Diciembre">
|
||||
<Columns>
|
||||
<asp:HyperLinkField DataTextField="FuenteRecaudacion" HeaderText="Fuente Recaudación" ItemStyle-Width="400px" DataNavigateUrlFields="CvePresupuestoIngreso,EsProyecto,Bloqueado" DataNavigateUrlFormatString="/AC/PresupuestoIngresos.aspx?CvePresupuestoIngresos={0}&EsProyecto={1}&Bloqueado={2}" ControlStyle-CssClass="Texto" />
|
||||
<asp:HyperLinkField DataTextField="CodigoRubroIngreso" HeaderText="Código" ItemStyle-Width="70px" DataNavigateUrlFields="CvePresupuestoIngreso,EsProyecto,Bloqueado" DataNavigateUrlFormatString="/AC/PresupuestoIngresos.aspx?CvePresupuestoIngresos={0}&EsProyecto={1}&Bloqueado={2}" ControlStyle-CssClass="Texto" />
|
||||
<asp:HyperLinkField DataTextField="RubroIngreso" HeaderText="Rubro Ingreso " ItemStyle-Width="400px" DataNavigateUrlFields="CvePresupuestoIngreso,EsProyecto,Bloqueado" DataNavigateUrlFormatString="/AC/PresupuestoIngresos.aspx?CvePresupuestoIngresos={0}&EsProyecto={1}&Bloqueado={2}" ControlStyle-CssClass="Texto" />
|
||||
<asp:HyperLinkField DataTextField="Total" HeaderText="Total" DataTextFormatString="{0:N2}" ItemStyle-Width="110px" ItemStyle-HorizontalAlign="Right" DataNavigateUrlFields="CvePresupuestoIngreso,EsProyecto,Bloqueado" DataNavigateUrlFormatString="/AC/PresupuestoIngresos.aspx?CvePresupuestoIngresos={0}&EsProyecto={1}&Bloqueado={2}" ControlStyle-CssClass="Texto" />
|
||||
<%--ItemStyle-CssClass="BorderR"--%>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
<asp:UpdatePanel runat="server" ID="UpTotales" Visible="false" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<table style="width: 100%">
|
||||
<tr>
|
||||
<td style="float: right; width: 10px;"></td>
|
||||
<td align="right" style="float: right; width: 100px;">
|
||||
<asp:Label runat="server" ID="LbTotales" Width="70px"></asp:Label></td>
|
||||
<td style="float: right;">Total:</td>
|
||||
</tr>
|
||||
</table>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
<asp:UpdatePanel runat="server">
|
||||
<ContentTemplate>
|
||||
<table width="100%">
|
||||
<tr>
|
||||
<td align="right">
|
||||
<asp:Button ID="BtnPresupuesto" runat="server" Text="Generar Presupuesto" Visible="False" OnClick="BtnPresupuesto_Click" CssClass="btn green" /><br />
|
||||
<asp:Button ID="BtnCongelarPrespuesto" runat="server" Text="Aprobar Presupuesto" Visible="False" OnClick="BtnCongelarPrespuesto_Click" CssClass="btn green" /><br />
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
</asp:Content>
|
||||
|
||||
|
||||
337
AC/CatPresupuestoIngresos.aspx.vb
Normal file
337
AC/CatPresupuestoIngresos.aspx.vb
Normal file
@@ -0,0 +1,337 @@
|
||||
Option Strict On
|
||||
Option Explicit On
|
||||
|
||||
Imports System.Data
|
||||
Imports Extensiones
|
||||
Imports Microsoft.Reporting.WebForms
|
||||
|
||||
Partial Class AC_CatPresupuestoIngresos
|
||||
Inherits ClsPaginas
|
||||
|
||||
#Region " PROPIEDADES "
|
||||
Private Property DtPresupuestoIngresos As DataTable
|
||||
Get
|
||||
Return CType(ViewState("DtPresupuestoIngresos"), DataTable)
|
||||
End Get
|
||||
Set(value As DataTable)
|
||||
ViewState("DtPresupuestoIngresos") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Property pTotal As String
|
||||
Get
|
||||
Return CType(ViewState("pTotal"), String)
|
||||
End Get
|
||||
Set(value As String)
|
||||
ViewState("pTotal") = value
|
||||
End Set
|
||||
End Property
|
||||
#End Region
|
||||
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||
If Not Page.IsPostBack Then
|
||||
SetValues()
|
||||
CargaDatos()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
|
||||
#Region " VALORES INICIALES "
|
||||
Private Sub SetValues()
|
||||
CargaEjercicios()
|
||||
End Sub
|
||||
Private Sub CargaEjercicios()
|
||||
Dim ClsConta As New ClsContPAQi(UsuarioActual.Empresa)
|
||||
If ClsConta.GetEjercicios() Then
|
||||
DdlEjercicio.DataSource = ClsConta.DtResultados
|
||||
Else
|
||||
DdlEjercicio.DataSource = Nothing
|
||||
End If
|
||||
ClsConta.Dispose()
|
||||
DdlEjercicio.DataBind()
|
||||
|
||||
DdlEjercicio.SelectedValueExist(UsuarioActual.Empresa.EjercicioActual.ToString)
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
|
||||
#Region " CARGA DATOS "
|
||||
|
||||
Protected Sub consultar_Click(sender As Object, e As EventArgs)
|
||||
BtnCongelarPrespuesto.Visible = False
|
||||
BtnPresupuesto.Visible = False
|
||||
CargaDatos()
|
||||
End Sub
|
||||
Private Sub CargaDatos()
|
||||
Dim AC As New ClsAC
|
||||
Dim Ejercicio As Integer = DdlEjercicio.SelectedValue.ToString.ToEntero
|
||||
Dim EsProyecto As Boolean = CBool(DdlProyecto.SelectedValue.ToString)
|
||||
Gv.DataBind()
|
||||
|
||||
|
||||
If AC.GetPresupuestoIngresos(-1, Ejercicio, EsProyecto, UsuarioActual.CveEmpresa) Then
|
||||
|
||||
DtPresupuestoIngresos = AC.DtResultados
|
||||
Gv.DataSource = AC.DtResultados
|
||||
Gv.DataBind()
|
||||
|
||||
'debe de haber datos para habilitar los botones
|
||||
If AC.DtResultados.Rows.Count > 0 Then
|
||||
If EsProyecto Then
|
||||
If AC.DtResultados.Rows(0)("Bloqueado").ToString = "0" Then
|
||||
'Ejercicio = UsuarioActual.Empresa.EjercicioActual AndAlso
|
||||
BtnCongelarPrespuesto.Visible = True
|
||||
End If
|
||||
Else
|
||||
'si es anteproyecto
|
||||
If AC.DtResultados.Rows(0)("Bloqueado").ToString = "0" Then
|
||||
'AndAlso Ejercicio >= UsuarioActual.Empresa.EjercicioActual
|
||||
BtnPresupuesto.Visible = True
|
||||
End If
|
||||
' If Ejercicio = UsuarioActual.Empresa.EjercicioActual Then
|
||||
End If
|
||||
Dim Total As Double = Gv.Rows.Cast(Of GridViewRow)().Sum(Function(gvr) gvr.DataKey("Total").ToDouble)
|
||||
LbTotales.Text = Total.ToString.FormatoNumero
|
||||
pTotal = Total.ToString.FormatoNumero
|
||||
End If
|
||||
End If
|
||||
|
||||
UpTotales.Update()
|
||||
UPDatos.Update()
|
||||
|
||||
AC.Dispose()
|
||||
End Sub
|
||||
Private Sub CargaGrid(Orden As String)
|
||||
If Orden <> String.Empty Then
|
||||
Dim DV As New DataView(CType(ViewState("DT_AC_PresupuestosIngresos"), DataTable), "", Orden, DataViewRowState.CurrentRows)
|
||||
Gv.DataSource = DV.ToTable()
|
||||
DV.Dispose()
|
||||
Else
|
||||
Gv.DataSource = CType(ViewState("DT_AC_PresupuestosIngresos"), DataTable)
|
||||
End If
|
||||
Gv.DataBind()
|
||||
UPDatos.Update()
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
#Region " FUNCIONES "
|
||||
Private Function FNCIDCuenta(dt As DataTable, codigo As String) As Integer
|
||||
Dim Retorno As Integer = 0
|
||||
Dim dr As DataRow
|
||||
dr = dt.FiltroPrimero(String.Format("Codigo ='{0}'", codigo))
|
||||
If dr IsNot Nothing Then
|
||||
|
||||
Retorno = dr("Id").ToString.ToEntero
|
||||
End If
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
Private Function FNCAddCuenta(dt As DataTable, id As Integer, codigo As String) As Integer
|
||||
' se crea una coleccion para grabar las claves y las cuentas que se van insertando, por si se comparten, no marque error de que ya esta registrada y esta en la transaccion todavia
|
||||
Dim Retorno As Integer = 0
|
||||
Dim dr As DataRow = dt.NewRow
|
||||
|
||||
dr("Codigo") = codigo
|
||||
dr("Id") = id
|
||||
|
||||
dt.Rows.Add(dr)
|
||||
dt.AcceptChanges()
|
||||
Return Retorno
|
||||
End Function
|
||||
#End Region
|
||||
|
||||
|
||||
Protected Sub BtnCongelarPrespuesto_Click(sender As Object, e As EventArgs)
|
||||
Dim Conta As New ClsContPAQi(UsuarioActual.Empresa)
|
||||
Conta.IniciaTransacSQL()
|
||||
Dim AC As New ClsAC
|
||||
AC.IniciaTransacSQL()
|
||||
'registro las cuentas prespuestales por cada movimiento, si existe la ignoro
|
||||
Dim dtCuentas As DataTable = Nothing
|
||||
Dim IDPoliza As Integer
|
||||
Dim IdCuentaEstimado, IdCuentaPorEjecutar, IdCuentaModificado, IdCuentaDevengado, IdCuentaRecaudado, IdCuentaMatriz As Integer
|
||||
Dim Codigo As String
|
||||
Dim TieneError As Boolean = False
|
||||
Dim IdCuentaEstimadoPadre, IdCuentaPorEjecutarPadre, IdCuentaModificadoPadre, IdCuentaDevengadoPadre, IdCuentaRecaudadoPadre, IdCuentaMatrizPadre As Integer
|
||||
|
||||
'hay que registrar una poliza de cargo en 821, aprobado contra Ley de egresos, luego registrar o de por ejercer
|
||||
|
||||
If Conta.GetCuentas(-1, "-1", -1) Then
|
||||
dtCuentas = Conta.DtResultados
|
||||
End If
|
||||
|
||||
Dim drPadre As DataRow
|
||||
drPadre = dtCuentas.FiltroPrimero("Nombre = 'LEY DE INGRESOS ESTIMADA'")
|
||||
IdCuentaEstimadoPadre = If(drPadre IsNot Nothing, drPadre("Id").ToString.ToEntero, 0)
|
||||
|
||||
drPadre = dtCuentas.FiltroPrimero("Nombre = 'LEY DE INGRESOS POR EJECUTAR'")
|
||||
IdCuentaPorEjecutarPadre = If(drPadre IsNot Nothing, drPadre("Id").ToString.ToEntero, 0)
|
||||
|
||||
drPadre = dtCuentas.FiltroPrimero("Nombre = 'MODIFICACIONES A LA LEY DE INGRESOS ESTIMADA'")
|
||||
IdCuentaModificadoPadre = If(drPadre IsNot Nothing, drPadre("Id").ToString.ToEntero, 0)
|
||||
|
||||
drPadre = dtCuentas.FiltroPrimero("Nombre = 'LEY DE INGRESOS DEVENGADA'")
|
||||
IdCuentaDevengadoPadre = If(drPadre IsNot Nothing, drPadre("Id").ToString.ToEntero, 0)
|
||||
|
||||
drPadre = dtCuentas.FiltroPrimero("Nombre = 'LEY DE INGRESOS RECAUDADA'")
|
||||
IdCuentaRecaudadoPadre = If(drPadre IsNot Nothing, drPadre("Id").ToString.ToEntero, 0)
|
||||
|
||||
Dim Total As Double = Gv.Rows.Cast(Of GridViewRow)().Sum(Function(gvr) gvr.DataKey("Total").ToDouble)
|
||||
|
||||
IDPoliza = Conta.AddPoliza(4, String.Format("POLIZA INICIAL - PRESUPUESTO DE INGRESOS ESTIMADO {0}", DdlEjercicio.SelectedValue), Total, Total, UsuarioActual.CveUsuario, String.Format("01/01/{0}", DdlEjercicio.SelectedValue).ToDate)
|
||||
If IDPoliza > 0 Then
|
||||
|
||||
For Each gvr As GridViewRow In Gv.Rows
|
||||
|
||||
'Codigo = String.Format("{0}-{1}", gvr.DataKey("CvePresupuestoIngreso"), gvr.DataKey("CodigoRubroIngreso"))
|
||||
Codigo = String.Format("{0}{1}00000", gvr.DataKey("CodigoRubroIngreso").PadLeft(4, "0"c), gvr.DataKey("CveFuenteRecaudacion").PadLeft(4, "0"c)).PadLeft(5, "0"c)
|
||||
'Registro las cuentas afectables
|
||||
IdCuentaEstimado = FNCIDCuenta(dtCuentas, String.Format("00811{0}", Codigo))
|
||||
If IdCuentaEstimado = 0 Then IdCuentaEstimado = Conta.AddCuenta(String.Format("00811{0}", Codigo), gvr.DataKey("FuenteRecaudacion"), "K", 2, 0, 1, 0, "", 1, IdCuentaEstimadoPadre) : FNCAddCuenta(dtCuentas, IdCuentaEstimado, String.Format("00811{0}", Codigo))
|
||||
|
||||
IdCuentaPorEjecutar = FNCIDCuenta(dtCuentas, String.Format("00812{0}", Codigo))
|
||||
If IdCuentaPorEjecutar = 0 Then IdCuentaPorEjecutar = Conta.AddCuenta(String.Format("00812{0}", Codigo), gvr.DataKey("FuenteRecaudacion"), "K", 2, 0, 1, 0, "", 1, IdCuentaPorEjecutarPadre) : FNCAddCuenta(dtCuentas, IdCuentaPorEjecutar, String.Format("00812{0}", Codigo))
|
||||
|
||||
IdCuentaModificado = FNCIDCuenta(dtCuentas, String.Format("00813{0}", Codigo))
|
||||
If IdCuentaModificado = 0 Then IdCuentaModificado = Conta.AddCuenta(String.Format("00813{0}", Codigo), gvr.DataKey("FuenteRecaudacion"), "K", 2, 0, 1, 0, "", 1, IdCuentaModificadoPadre) : FNCAddCuenta(dtCuentas, IdCuentaModificado, String.Format("00813{0}", Codigo))
|
||||
|
||||
IdCuentaDevengado = FNCIDCuenta(dtCuentas, String.Format("00814{0}", Codigo))
|
||||
If IdCuentaDevengado = 0 Then IdCuentaDevengado = Conta.AddCuenta(String.Format("00814{0}", Codigo), gvr.DataKey("FuenteRecaudacion"), "K", 2, 0, 1, 0, "", 1, IdCuentaDevengadoPadre) : FNCAddCuenta(dtCuentas, IdCuentaDevengado, String.Format("00814{0}", Codigo))
|
||||
|
||||
IdCuentaRecaudado = FNCIDCuenta(dtCuentas, String.Format("00815{0}", Codigo))
|
||||
If IdCuentaRecaudado = 0 Then IdCuentaRecaudado = Conta.AddCuenta(String.Format("00815{0}", Codigo), gvr.DataKey("FuenteRecaudacion"), "K", 2, 0, 1, 0, "", 1, IdCuentaRecaudadoPadre) : FNCAddCuenta(dtCuentas, IdCuentaRecaudado, String.Format("00815{0}", Codigo))
|
||||
|
||||
'falta generar y gaurdar la cuenta contable y vincularla
|
||||
Dim filtro As New StringBuilder
|
||||
filtro.AppendFormat("CodigoRubroIngreso = {0} and Caracteristicas = 1", gvr.DataKey("CodigoRubroIngreso"))
|
||||
|
||||
Dim RegistroMatriz As DataRow = GlobalDTAC_MatrizIngresos.FiltroPrimero(filtro.ToString)
|
||||
filtro.Clear()
|
||||
If RegistroMatriz Is Nothing Then
|
||||
RegistroMatriz = GlobalDTAC_MatrizIngresos.FiltroPrimero(String.Format("(CodigoRubroIngreso = {0} and Caracteristicas = 1) OR (CodigoRubroIngreso = {0})", gvr.DataKey("CodigoRubroIngreso")), "Caracteristicas")
|
||||
|
||||
If RegistroMatriz Is Nothing Then
|
||||
TieneError = True
|
||||
Exit For
|
||||
End If
|
||||
End If
|
||||
|
||||
If RegistroMatriz IsNot Nothing AndAlso RegistroMatriz("CuentaCargo").ToString.ToEntero > 0 Then
|
||||
IdCuentaMatrizPadre = RegistroMatriz("CuentaAbono").ToString.ToEntero
|
||||
|
||||
Dim CuentaAbono As Integer = dtCuentas.FiltroPrimero(String.Format("Codigo = '{0}'", String.Format("0{0}0000000000000", IdCuentaMatrizPadre)))("Id").ToString.ToEntero
|
||||
|
||||
IdCuentaMatriz = FNCIDCuenta(dtCuentas, String.Format("0{0}{1}", IdCuentaMatrizPadre, Codigo))
|
||||
If IdCuentaMatriz = 0 Then IdCuentaMatriz = Conta.AddCuenta(String.Format("0{0}{1}", IdCuentaMatrizPadre, Codigo), gvr.DataKey("FuenteRecaudacion").ToUpper, "H", 2, 0, 1, 0, "", 1, CuentaAbono) : FNCAddCuenta(dtCuentas, IdCuentaMatriz, String.Format("0{0}{1}", IdCuentaMatrizPadre, Codigo))
|
||||
|
||||
End If
|
||||
|
||||
Total = gvr.DataKey("Total").ToDouble
|
||||
If Conta.AddMovimiento(IDPoliza, IdCuentaEstimado, False, Total, "", "", 0, String.Format("01/01/{0}", DdlEjercicio.SelectedValue).ToDate, "") Then
|
||||
'actualizo el idcuenta del presupuesto
|
||||
If Not Conta.AddMovimiento(IDPoliza, IdCuentaPorEjecutar, True, Total, "", "", 0, String.Format("01/01/{0}", DdlEjercicio.SelectedValue).ToDate, "") Then
|
||||
TieneError = True
|
||||
Exit For
|
||||
End If
|
||||
If Not AC.UpdateCuentasPresupuestoIngresos(IdCuentaEstimado, IdCuentaPorEjecutar, IdCuentaModificado, IdCuentaDevengado, IdCuentaRecaudado, IdCuentaMatriz, gvr.DataKey("CvePresupuestoIngreso").ToEntero) Then
|
||||
TieneError = True
|
||||
Exit For
|
||||
|
||||
End If
|
||||
Else
|
||||
TieneError = True
|
||||
Exit For
|
||||
End If
|
||||
|
||||
Next
|
||||
|
||||
Else
|
||||
TieneError = True
|
||||
End If
|
||||
|
||||
If Not TieneError Then
|
||||
'actualizo las cuentas de cadapresupuesto
|
||||
AC.Commit()
|
||||
Conta.Commit()
|
||||
Alert("Presupuesto se ha aprobado con exito", TipoMensaje.MsgInformacion)
|
||||
BtnCongelarPrespuesto.Visible = False
|
||||
Else
|
||||
Conta.RollBack()
|
||||
AC.RollBack()
|
||||
Alert("Ocurrió un error al aprobar el Presupuesto. Por favor vuelva a intentar.", TipoMensaje.MsgError)
|
||||
End If
|
||||
|
||||
Conta.Dispose()
|
||||
AC.Dispose()
|
||||
|
||||
CargaDatos()
|
||||
End Sub
|
||||
|
||||
Protected Sub BtnPresupuesto_Click(sender As Object, e As EventArgs)
|
||||
Dim AC As New ClsAC
|
||||
AC.IniciaTransacSQL()
|
||||
Dim TieneError As Boolean = False
|
||||
|
||||
For Each gvr As GridViewRow In Gv.Rows
|
||||
|
||||
Dim Total As Double = gvr.DataKey("Total").ToDouble
|
||||
Dim Enero As Double = gvr.DataKey("Enero").ToDouble
|
||||
Dim Febrero As Double = gvr.DataKey("Febrero").ToDouble
|
||||
Dim Marzo As Double = gvr.DataKey("Marzo").ToDouble
|
||||
Dim Abril As Double = gvr.DataKey("Abril").ToDouble
|
||||
Dim Mayo As Double = gvr.DataKey("Mayo").ToDouble
|
||||
Dim Junio As Double = gvr.DataKey("Junio").ToDouble
|
||||
Dim Julio As Double = gvr.DataKey("Julio").ToDouble
|
||||
Dim Agosto As Double = gvr.DataKey("Agosto").ToDouble
|
||||
Dim Septiembre As Double = gvr.DataKey("Septiembre").ToDouble
|
||||
Dim Octubre As Double = gvr.DataKey("Octubre").ToDouble
|
||||
Dim Noviembre As Double = gvr.DataKey("Noviembre").ToDouble
|
||||
Dim Diciembre As Double = gvr.DataKey("Diciembre").ToDouble
|
||||
|
||||
Dim Ejercicio As Integer = 2015
|
||||
Dim CveFuenteRecaudacion As Integer = gvr.DataKey("CveFuenteRecaudacion").ToEntero
|
||||
Dim CveRubroIngreso As Integer = gvr.DataKey("CveRubroIngreso").ToEntero
|
||||
Dim CvePresupuestoIngresos As Integer = gvr.DataKey("CvePresupuestoIngreso").ToEntero
|
||||
|
||||
If Not AC.ProyectoPresupuestoIngresos(Ejercicio, CveFuenteRecaudacion, CveRubroIngreso, Total, Enero, Febrero, Marzo, Abril, Mayo, Junio, Julio, Agosto, Septiembre, Octubre, Noviembre, Diciembre, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CvePresupuestoIngresos) Then
|
||||
TieneError = True
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
|
||||
If Not TieneError Then
|
||||
AC.Commit()
|
||||
Alert("Movimientos Guardados", TipoMensaje.MsgInformacion)
|
||||
BtnPresupuesto.Visible = False
|
||||
Else
|
||||
AC.RollBack()
|
||||
End If
|
||||
|
||||
AC.Dispose()
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
#Region " EXCEL "
|
||||
Protected Sub LBPdf_Click(sender As Object, e As EventArgs)
|
||||
ImprimirReporte()
|
||||
End Sub
|
||||
Protected Sub LBExcel_Click(sender As Object, e As EventArgs)
|
||||
ImprimirReporte("Excel")
|
||||
End Sub
|
||||
Private Sub ImprimirReporte(Optional Formato As String = "PDF")
|
||||
'parametros a enviar al reporte
|
||||
Dim params As New List(Of ReportParameter)
|
||||
params.Add(New ReportParameter("pEmp", UsuarioActual.Empresa.Empresa))
|
||||
params.Add(New ReportParameter("pImg", New Uri(Server.MapPath(String.Format("~/Empresas/{0}/Logo.png", UsuarioActual.CveEmpresa))).AbsoluteUri))
|
||||
params.Add(New ReportParameter("pEjercicio", DdlEjercicio.SelectedValue.ToString))
|
||||
'params.Add(New ReportParameter("pTotal", pTotal))
|
||||
ImprimirPDF("AC/Reportes/RepCatPresupuestoIngresos.rdlc", DtPresupuestoIngresos, params, "PresupuestoIngresos", Formato)
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
|
||||
End Class
|
||||
154
AC/CatPrograma.aspx
Normal file
154
AC/CatPrograma.aspx
Normal file
@@ -0,0 +1,154 @@
|
||||
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="CatPrograma.aspx.vb" Inherits="AC_CatPrograma" %>
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="HB" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="E" runat="Server">
|
||||
Catálogo de Programa
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
|
||||
<div class="portlet box blue-hoki" style="width:1000px;">
|
||||
<div class="portlet-body">
|
||||
<asp:UpdatePanel ID="UpTitulos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<table class="table table-striped table-advance table-hover">
|
||||
<thead>
|
||||
<tr class="Titulos">
|
||||
<th width="250px">
|
||||
<asp:LinkButton ID="LbPrograma" runat="server" CausesValidation="false" Text="" CommandArgument="Programa" OnClick="LbOrden_Click">
|
||||
Programa
|
||||
<asp:Literal ID="ImgPrograma" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
||||
</asp:LinkButton>
|
||||
</th>
|
||||
<th width="150px">
|
||||
<asp:LinkButton ID="LbProgramaCONAC" runat="server" CausesValidation="false" Text="" CommandArgument="ProgramaCONAC" OnClick="LbOrden_Click">
|
||||
Programa CONAC
|
||||
<asp:Literal ID="ImgProgramaCONAC" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
||||
</asp:LinkButton>
|
||||
</th>
|
||||
<th width="100px">
|
||||
<asp:LinkButton ID="LbEstatus" runat="server" CausesValidation="false" Text="" CommandArgument="Estatus" OnClick="LbOrden_Click">
|
||||
Estatus
|
||||
<asp:Literal ID="ImgEstatus" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
||||
</asp:LinkButton>
|
||||
</th>
|
||||
<th width="100px">
|
||||
<asp:LinkButton ID="LbFechaIng" runat="server" CausesValidation="false" Text="" CommandArgument="FechaIng" OnClick="LbOrden_Click">
|
||||
Fecha
|
||||
<asp:Literal ID="ImgFechaIng" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
||||
</asp:LinkButton>
|
||||
</th>
|
||||
<th width="100px">
|
||||
<asp:LinkButton ID="LbUsuario" runat="server" CausesValidation="false" Text="" CommandArgument="Usuario" OnClick="LbOrden_Click">
|
||||
Usuario
|
||||
<asp:Literal ID="ImgUsuario" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
||||
</asp:LinkButton>
|
||||
</th>
|
||||
<th width="121px">Comandos</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tr>
|
||||
<td>
|
||||
<asp:TextBox ID="TxtPrograma" runat="server" CausesValidation="true" MaxLength="50" ValidationGroup="GrpGuardar" Width="244px"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVPrograma" runat="server" ControlToValidate="TxtPrograma" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Programa''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCPrograma" runat="server" HighlightCssClass="vco" TargetControlID="RFVPrograma" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</td>
|
||||
|
||||
<td>
|
||||
<asp:DropDownList ID="DdlProgramaCONAC" runat="server" AppendDataBoundItems="true" DataValueField="CveProgramaCONAC" DataTextField="ProgramaCONAC" ValidationGroup="GrpGuardar" Width="150px">
|
||||
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RFVProgramaCONAC" runat="server" ControlToValidate="DdlProgramaCONAC" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''ProgramaCONAC''</b> es necesario, por favor ingréselo." InitialValue="-1" ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOProgramaCONAC" runat="server" HighlightCssClass="vco" TargetControlID="RFVProgramaCONAC" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td>
|
||||
<asp:LinkButton ID="LbAgregar" runat="server" CausesValidation="true" CssClass="Texto" Text="Agregar" ValidationGroup="GrpGuardar"></asp:LinkButton></td>
|
||||
</tr>
|
||||
</table>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" DataKeyNames="CvePrograma" EmptyDataText="No se encontraron Programa Registrados" ToolTip="Listado de Programa" CssClass="table table-striped table-advance table-hover" style="margin-top:-10px;" >
|
||||
<Columns>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlPrograma" runat="server" Text='<%# Eval("Programa", "{0}")%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<EditItemTemplate>
|
||||
<asp:TextBox ID="TxtPrograma" runat="server" CausesValidation="true" MaxLength="50" Text='<%# Eval("Programa")%>' ValidationGroup="GrpGV" Width="244px"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVPrograma" runat="server" ControlToValidate="TxtPrograma" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Programa''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGV"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCPrograma" runat="server" HighlightCssClass="vco" TargetControlID="RFVPrograma" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</EditItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlProgramaCONAC" runat="server" Text='<%# Eval("ProgramaCONAC", "{0}")%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<EditItemTemplate>
|
||||
<asp:DropDownList ID="DdlProgramaCONAC" runat="server" DataValueField="CveProgramaCONAC" DataTextField="ProgramaCONAC" Width="150px"></asp:DropDownList>
|
||||
</EditItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlEstatus" runat="server" Text='<%# Eval("Estatus") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<EditItemTemplate>
|
||||
<asp:CheckBox ID="ChkEstatus" runat="server" Checked='<%# If (Eval("Estatus").ToString = "Activo", True, False) %>' />
|
||||
</EditItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlFecha" runat="server" Text='<%# Eval("FechaIng", "{0:d}") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlUsuario" runat="server" Text='<%# Eval("Usuario") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Editar">
|
||||
<EditItemTemplate>
|
||||
<center>
|
||||
<asp:LinkButton ID="imgU" runat="server" AlternateText="Actualizar" CausesValidation="True" CommandName="Update"
|
||||
CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-check'></i>" ValidationGroup="GrpGV" />
|
||||
<asp:LinkButton ID="imgC" runat="server" AlternateText="Cancelar" CausesValidation="False" CommandName="Cancel"
|
||||
CssClass="btn btn-circle btn-sm red" Text="<i class='fa fa-times'></i>"/>
|
||||
</center>
|
||||
</EditItemTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="imgE" runat="server" AlternateText="Editar" CausesValidation="False" CommandName="Edit"
|
||||
CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-pencil'></i>" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Eliminar">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="imgD" runat="server" AlternateText="Eliminar" CausesValidation="False" CommandName="Delete"
|
||||
CssClass="btn btn-circle btn-sm red" Text="<i class='icon-trash'></i>"
|
||||
data-toggle="confirmation" data-popout="true" data-original-title="confirmar" data-btn-ok-label="si" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
<RowStyle CssClass="Texto" />
|
||||
<AlternatingRowStyle CssClass="TextoAlterno" />
|
||||
</asp:GridView>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</div>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
||||
<script language="javascript" type="text/javascript">
|
||||
function C() {
|
||||
return confirm('¿Está seguro que desea eliminar el Programa?');
|
||||
}
|
||||
</script>
|
||||
</asp:Content>
|
||||
|
||||
184
AC/CatPrograma.aspx.vb
Normal file
184
AC/CatPrograma.aspx.vb
Normal file
@@ -0,0 +1,184 @@
|
||||
Option Explicit On
|
||||
Option Strict On
|
||||
|
||||
Imports System.Data
|
||||
Imports System.Linq
|
||||
Imports Extensiones
|
||||
|
||||
Partial Class AC_CatPrograma
|
||||
Inherits ClsPaginas
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||
If Not Page.IsPostBack Then
|
||||
ViewState("Orden") = ""
|
||||
CargaDatos()
|
||||
CargaProgramaCONAC()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Public Sub CargaDatos()
|
||||
Dim ObjPrograma As New ClsAC
|
||||
If ObjPrograma.GetProgramas() Then
|
||||
ViewState("DTProgramas") = ObjPrograma.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
|
||||
GlobalDTAC_Programas = ObjPrograma.DtResultados
|
||||
Else
|
||||
Me.GvDatos.DataSource = Nothing
|
||||
End If
|
||||
|
||||
ObjPrograma.Dispose()
|
||||
|
||||
If ViewState("Orden").ToString() <> String.Empty Then
|
||||
CargaGrid(ViewState("Orden").ToString())
|
||||
Else
|
||||
CargaGrid("")
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Protected Sub LbAgregar_Click(sender As Object, e As System.EventArgs) Handles LbAgregar.Click
|
||||
Dim ObjPrograma As New ClsAC
|
||||
If ObjPrograma.AddPrograma(TxtPrograma.Text.Trim, DdlProgramaCONAC.SelectedValue.ToEntero, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
|
||||
TxtPrograma.Text = ""
|
||||
|
||||
Alert("El Programa se guardó correctamente.", TipoMensaje.MsgInformacion)
|
||||
UpTitulos.Update()
|
||||
ViewState("DTProgramas") = ObjPrograma.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
|
||||
GlobalDTAC_Programas = ObjPrograma.DtResultados
|
||||
|
||||
If ViewState("Orden").ToString() <> String.Empty Then
|
||||
CargaGrid(ViewState("Orden").ToString())
|
||||
Else
|
||||
CargaGrid("")
|
||||
End If
|
||||
End If
|
||||
ObjPrograma.Dispose()
|
||||
End Sub
|
||||
|
||||
Private Sub CargaProgramaCONAC()
|
||||
DdlProgramaCONAC.DataSource = GlobalDTAC_ProgramasCONAC
|
||||
DdlProgramaCONAC.DataBind()
|
||||
End Sub
|
||||
|
||||
#Region "G V D A T O S"
|
||||
Protected Sub GvDatos_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvDatos.RowDataBound
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
If e.Row.RowIndex = 0 Then
|
||||
e.Row.Cells(0).Width = Unit.Pixel(250)
|
||||
e.Row.Cells(1).Width = Unit.Pixel(150)
|
||||
e.Row.Cells(2).Width = Unit.Pixel(100)
|
||||
e.Row.Cells(3).Width = Unit.Pixel(100)
|
||||
e.Row.Cells(4).Width = Unit.Pixel(100)
|
||||
e.Row.Cells(5).Width = Unit.Pixel(53)
|
||||
e.Row.Cells(6).Width = Unit.Pixel(68)
|
||||
End If
|
||||
e.Row.Cells(0).HorizontalAlign = HorizontalAlign.Left
|
||||
|
||||
If e.Row.RowState = DataControlRowState.Edit OrElse e.Row.RowState = 5 Then
|
||||
e.Row.FCDropDownList("DdlProgramaCONAC").DataSource = GlobalDTAC_ProgramasCONAC
|
||||
e.Row.FCDropDownList("DdlProgramaCONAC").DataBind()
|
||||
e.Row.FCDropDownList("DdlProgramaCONAC").SelectedValue = e.Row.DBCampo("CveProgramaCONAC")
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Protected Sub GvDatos_RowDeleting(sender As Object, e As System.Web.UI.WebControls.GridViewDeleteEventArgs) Handles GvDatos.RowDeleting
|
||||
Dim ObjPrograma As New ClsAC
|
||||
If ObjPrograma.RemovePrograma(GvDatos.DataKeys(e.RowIndex).Value.ToString.ToEntero) Then
|
||||
GvDatos.EditIndex = -1
|
||||
ViewState("DTProgramas") = ObjPrograma.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
|
||||
GlobalDTAC_Programas = ObjPrograma.DtResultados
|
||||
Alert("El Registro se eliminó correctamente.", TipoMensaje.MsgInformacion)
|
||||
End If
|
||||
|
||||
ObjPrograma.Dispose()
|
||||
|
||||
If ViewState("Orden").ToString() <> String.Empty Then
|
||||
CargaGrid(ViewState("Orden").ToString())
|
||||
Else
|
||||
CargaGrid("")
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Protected Sub GvDatos_RowCancelingEdit(sender As Object, e As System.Web.UI.WebControls.GridViewCancelEditEventArgs) Handles GvDatos.RowCancelingEdit
|
||||
GvDatos.EditIndex = -1
|
||||
If ViewState("Orden").ToString() <> String.Empty Then
|
||||
CargaGrid(ViewState("Orden").ToString())
|
||||
Else
|
||||
CargaGrid("")
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Protected Sub GvDatos_RowUpdating(sender As Object, e As System.Web.UI.WebControls.GridViewUpdateEventArgs) Handles GvDatos.RowUpdating
|
||||
|
||||
Dim ObjPrograma As New ClsAC
|
||||
|
||||
Dim Programa As String = DirectCast(GvDatos.Rows(e.RowIndex).FindControl("TxtPrograma"), TextBox).Text.Trim
|
||||
Dim Estatus As Boolean = GvDatos.Rows(e.RowIndex).FCCheckBox("ChkEstatus").Checked
|
||||
Dim CvePrograma As Integer = GvDatos.DataKeys(e.RowIndex).Value.ToString.ToEntero
|
||||
'Dim Programa As String = DirectCast(GvDatos.Rows(e.RowIndex).FindControl("TxtPrograma"), TextBox).Text.Trim
|
||||
Dim ProgramaCONAC As Integer = DirectCast(GvDatos.Rows(e.RowIndex).FindControl("DdlProgramaCONAC"), DropDownList).SelectedValue.ToEntero
|
||||
|
||||
If ObjPrograma.UpdatePrograma(Programa, ProgramaCONAC, Estatus, CvePrograma) Then
|
||||
GvDatos.EditIndex = -1
|
||||
ViewState("DTProgramas") = ObjPrograma.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
|
||||
GlobalDTAC_Programas = ObjPrograma.DtResultados
|
||||
Alert("Los cambios se guardaron correctamente.", TipoMensaje.MsgInformacion)
|
||||
End If
|
||||
|
||||
ObjPrograma.Dispose()
|
||||
|
||||
If ViewState("Orden").ToString() <> String.Empty Then
|
||||
CargaGrid(ViewState("Orden").ToString())
|
||||
Else
|
||||
CargaGrid("")
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Sub GvDatos_RowEditing(sender As Object, e As System.Web.UI.WebControls.GridViewEditEventArgs) Handles GvDatos.RowEditing
|
||||
GvDatos.EditIndex = e.NewEditIndex
|
||||
|
||||
If ViewState("Orden").ToString() <> String.Empty Then
|
||||
CargaGrid(ViewState("Orden").ToString())
|
||||
Else
|
||||
CargaGrid("")
|
||||
End If
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
|
||||
#Region "O R D E N A M I E N T O"
|
||||
Protected Sub LbOrden_Click(ByVal sender As Object, ByVal e As EventArgs)
|
||||
Dim Orden As String = ""
|
||||
Dim Campo As String = ""
|
||||
Dim Literal As Literal = Nothing
|
||||
Const OrdenInicial As String = ""
|
||||
Dim Arg(2) As String
|
||||
|
||||
Arg = CType(sender, LinkButton).CommandArgument().ToString.Split(";"c)
|
||||
Campo = Arg(0)
|
||||
Literal = CType(CType(sender, LinkButton).NamingContainer.FindControl("Img" & Campo.Replace(",", "_")), Literal)
|
||||
|
||||
If ViewState(String.Format("O{0}", Campo)) IsNot Nothing AndAlso ViewState(String.Format("O{0}", Campo)).ToString = String.Format("{0} DESC", Campo) Then
|
||||
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>")
|
||||
End If
|
||||
Orden = OrdenInicial & ViewState(String.Format("O{0}", Campo)).ToString
|
||||
ViewState("Orden") = Orden
|
||||
CargaGrid(Orden)
|
||||
End Sub
|
||||
Private Sub CargaGrid(Orden As String)
|
||||
If Orden <> String.Empty Then
|
||||
Dim DV As New DataView(CType(ViewState("DTProgramas"), DataTable), "", Orden, DataViewRowState.CurrentRows)
|
||||
GvDatos.DataSource = DV.ToTable()
|
||||
DV.Dispose()
|
||||
Else
|
||||
GvDatos.DataSource = CType(ViewState("DTProgramas"), DataTable)
|
||||
End If
|
||||
GvDatos.DataBind()
|
||||
UpDatos.Update()
|
||||
End Sub
|
||||
#End Region
|
||||
End Class
|
||||
201
AC/CatProgramaCONAC.aspx
Normal file
201
AC/CatProgramaCONAC.aspx
Normal file
@@ -0,0 +1,201 @@
|
||||
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="CatProgramaCONAC.aspx.vb" Inherits="AC_CatProgramaCONAC" %>
|
||||
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="CP" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="Css" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="HB" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="E" runat="Server">
|
||||
Catálogo de ProgramaCONAC
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content8" ContentPlaceHolderID="H" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content9" ContentPlaceHolderID="C" runat="Server">
|
||||
<div class="portlet box blue-hoki" style="width:1000px;">
|
||||
<div class="portlet-body">
|
||||
<asp:UpdatePanel ID="UpTitulos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<table class="table table-striped table-advance table-hover">
|
||||
<thead>
|
||||
<tr class="Titulos">
|
||||
<th width="80px">
|
||||
<asp:LinkButton ID="LbProgramaCONAC" runat="server" CausesValidation="false" Text="" CommandArgument="ProgramaCONAC" OnClick="LbOrden_Click">
|
||||
Prog. CONAC
|
||||
<asp:Literal ID="ImgProgramaCONAC" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
||||
</asp:LinkButton>
|
||||
</th>
|
||||
<th width="70px">
|
||||
<asp:LinkButton ID="LbClave" runat="server" CausesValidation="false" Text="" CommandArgument="Clave" OnClick="LbOrden_Click">
|
||||
Clave
|
||||
<asp:Literal ID="ImgClave" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
||||
</asp:LinkButton>
|
||||
</th>
|
||||
<th width="225px">
|
||||
<asp:LinkButton ID="LbNombre" runat="server" CausesValidation="false" Text="" CommandArgument="Nombre" OnClick="LbOrden_Click">
|
||||
Nombre
|
||||
<asp:Literal ID="ImgNombre" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
||||
</asp:LinkButton>
|
||||
</th>
|
||||
<th width="349px">
|
||||
<asp:LinkButton ID="LbCaracteristica" runat="server" CausesValidation="false" Text="" CommandArgument="Caracteristica" OnClick="LbOrden_Click">
|
||||
Caracteristica
|
||||
<asp:Literal ID="ImgCaracteristica" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
||||
</asp:LinkButton>
|
||||
</th>
|
||||
<th width="80px">
|
||||
<asp:LinkButton ID="LbEstatus" runat="server" CausesValidation="false" Text="" CommandArgument="Estatus" OnClick="LbOrden_Click">
|
||||
Estatus
|
||||
<asp:Literal ID="ImgEstatus" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
||||
</asp:LinkButton>
|
||||
</th>
|
||||
<th width="74px">
|
||||
<asp:LinkButton ID="LbFechaIng" runat="server" CausesValidation="false" Text="" CommandArgument="FechaIng" OnClick="LbOrden_Click">
|
||||
Fecha
|
||||
<asp:Literal ID="ImgFechaIng" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
||||
</asp:LinkButton>
|
||||
</th>
|
||||
<th width="80px">
|
||||
<asp:LinkButton ID="LbUsuario" runat="server" CausesValidation="false" Text="" CommandArgument="Usuario" OnClick="LbOrden_Click">
|
||||
Usuario
|
||||
<asp:Literal ID="ImgUsuario" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
||||
</asp:LinkButton>
|
||||
</th>
|
||||
<th width="117">Comandos</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tr>
|
||||
<td>
|
||||
<asp:TextBox ID="TxtProgramaCONAC" runat="server" CausesValidation="true" MaxLength="5" ValidationGroup="GrpGuardar" Width="75px"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVProgramaCONAC" runat="server" ControlToValidate="TxtProgramaCONAC" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''ProgramaCONAC''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCProgramaCONAC" runat="server" HighlightCssClass="vco" TargetControlID="RFVProgramaCONAC" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</td>
|
||||
<td>
|
||||
<asp:TextBox ID="TxtClave" runat="server" CausesValidation="true" MaxLength="1" ValidationGroup="GrpGuardar" Width="65px"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVClave" runat="server" ControlToValidate="TxtClave" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Clave''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCClave" runat="server" HighlightCssClass="vco" TargetControlID="RFVClave" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</td>
|
||||
<td>
|
||||
<asp:TextBox ID="TxtNombre" runat="server" CausesValidation="true" MaxLength="100" ValidationGroup="GrpGuardar" Width="215px"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVNombre" runat="server" ControlToValidate="TxtNombre" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Nombre''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCNombre" runat="server" HighlightCssClass="vco" TargetControlID="RFVNombre" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</td>
|
||||
<td>
|
||||
<asp:TextBox ID="TxtCaracteristica" runat="server" CausesValidation="true" MaxLength="500" ValidationGroup="GrpGuardar" Width="335px"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVCaracteristica" runat="server" ControlToValidate="TxtCaracteristica" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Caracteristica''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCCaracteristica" runat="server" HighlightCssClass="vco" TargetControlID="RFVCaracteristica" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td style="text-align: center">
|
||||
<asp:LinkButton ID="LbAgregar" runat="server" CausesValidation="true" CssClass="Texto" Text="Agregar" ValidationGroup="GrpGuardar"></asp:LinkButton></td>
|
||||
</tr>
|
||||
</table>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" DataKeyNames="CveProgramaCONAC" EmptyDataText="No se encontraron ProgramaCONAC Registrados" ToolTip="Listado de ProgramaCONAC" CssClass="table table-striped table-advance table-hover" Style="margin-top: -10px;" GridLines="None">
|
||||
<Columns>
|
||||
<asp:TemplateField>
|
||||
<ItemStyle Width="85px" />
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlProgramaCONAC" runat="server" Text='<%# Eval("ProgramaCONAC", "{0}") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<EditItemTemplate>
|
||||
<asp:TextBox ID="TxtProgramaCONAC" runat="server" CausesValidation="true" MaxLength="5" Text='<%# Eval("ProgramaCONAC") %>' ValidationGroup="GrpGV" Width="75px"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVProgramaCONAC" runat="server" ControlToValidate="TxtProgramaCONAC" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''ProgramaCONAC''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGV"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCProgramaCONAC" runat="server" HighlightCssClass="vco" TargetControlID="RFVProgramaCONAC" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</EditItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemStyle Width="75px" />
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlClave" runat="server" Text='<%# Eval("Clave", "{0}") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<EditItemTemplate>
|
||||
<asp:TextBox ID="TxtClave" runat="server" CausesValidation="true" MaxLength="1" Text='<%# Eval("Clave") %>' ValidationGroup="GrpGV" Width="65px"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVClave" runat="server" ControlToValidate="TxtClave" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Clave''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGV"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCClave" runat="server" HighlightCssClass="vco" TargetControlID="RFVClave" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</EditItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemStyle Width="225px" />
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlNombre" runat="server" Text='<%# Eval("Nombre", "{0}") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<EditItemTemplate>
|
||||
<asp:TextBox ID="TxtNombre" runat="server" CausesValidation="true" MaxLength="100" Text='<%# Eval("Nombre") %>' ValidationGroup="GrpGV" Width="215px"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVNombre" runat="server" ControlToValidate="TxtNombre" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Nombre''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGV"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCNombre" runat="server" HighlightCssClass="vco" TargetControlID="RFVNombre" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</EditItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemStyle Width="350px" />
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlCaracteristica" runat="server" Text='<%# Eval("Caracteristica", "{0}") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<EditItemTemplate>
|
||||
<asp:TextBox ID="TxtCaracteristica" runat="server" CausesValidation="true" MaxLength="500" Text='<%# Eval("Caracteristica") %>' ValidationGroup="GrpGV" Width="335px"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVCaracteristica" runat="server" ControlToValidate="TxtCaracteristica" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Caracteristica''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGV"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCCaracteristica" runat="server" HighlightCssClass="vco" TargetControlID="RFVCaracteristica" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</EditItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemStyle Width="80px" />
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlEstatus" runat="server" Text='<%# Eval("Estatus") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<EditItemTemplate>
|
||||
<asp:CheckBox ID="ChkEstatus" runat="server" Checked='<%# If (Eval("Estatus").ToString = "Activo", True, False) %>' />
|
||||
</EditItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemStyle Width="70px" />
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlFecha" runat="server" Text='<%# Eval("FechaIng", "{0:d}") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemStyle Width="80px" />
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlUsuario" runat="server" Text='<%# Eval("Usuario") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Editar">
|
||||
<EditItemTemplate>
|
||||
<center>
|
||||
<asp:LinkButton ID="imgU" runat="server" AlternateText="Actualizar" CausesValidation="True" CommandName="Update"
|
||||
CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-check'></i>" ValidationGroup="GrpGV" />
|
||||
<asp:LinkButton ID="imgC" runat="server" AlternateText="Cancelar" CausesValidation="False" CommandName="Cancel"
|
||||
CssClass="btn btn-circle btn-sm red" Text="<i class='fa fa-times'></i>" />
|
||||
</center>
|
||||
</EditItemTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="imgE" runat="server" AlternateText="Editar" CausesValidation="False" CommandName="Edit"
|
||||
CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-pencil'></i>" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Eliminar">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="imgD" runat="server" AlternateText="Eliminar" CausesValidation="False" CommandName="Delete"
|
||||
CssClass="btn btn-circle btn-sm red" Text="<i class='icon-trash'></i>"
|
||||
data-toggle="confirmation" data-popout="true" data-original-title="confirmar" data-btn-ok-label="si" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
<RowStyle CssClass="Texto" />
|
||||
<AlternatingRowStyle CssClass="TextoAlterno" />
|
||||
</asp:GridView>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div></div>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content10" ContentPlaceHolderID="JS" runat="Server">
|
||||
<script language="javascript" type="text/javascript">
|
||||
function C() {
|
||||
return confirm('¿Está seguro que desea eliminar la ProgramaCONAC?');
|
||||
}
|
||||
</script>
|
||||
</asp:Content>
|
||||
191
AC/CatProgramaCONAC.aspx.vb
Normal file
191
AC/CatProgramaCONAC.aspx.vb
Normal file
@@ -0,0 +1,191 @@
|
||||
Option Explicit On
|
||||
Option Strict On
|
||||
|
||||
Imports System.Data
|
||||
Imports System.Linq
|
||||
Imports Extensiones
|
||||
|
||||
Partial Class AC_CatProgramaCONAC
|
||||
Inherits ClsPaginas
|
||||
|
||||
Public Property PuedeEditar As Boolean
|
||||
Get
|
||||
Return CBool(ViewState("PuedeEditar"))
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
ViewState("PuedeEditar") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Property PuedeEliminar As Boolean
|
||||
Get
|
||||
Return CBool(ViewState("PuedeEditar"))
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
ViewState("PuedeEditar") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||
If Not Page.IsPostBack Then
|
||||
ViewState("Orden") = ""
|
||||
CargaDatos()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Public Sub CargaDatos()
|
||||
Dim ObjProgramaCONAC As New ClsAC
|
||||
If ObjProgramaCONAC.GetProgramaCONAC() Then
|
||||
ViewState("DTProgramaCONAC") = ObjProgramaCONAC.DtResultados
|
||||
GlobalDTAC_ProgramasCONAC = ObjProgramaCONAC.DtResultados
|
||||
Else
|
||||
Me.GvDatos.DataSource = Nothing
|
||||
End If
|
||||
|
||||
ObjProgramaCONAC.Dispose()
|
||||
|
||||
If ViewState("Orden").ToString() <> String.Empty Then
|
||||
CargaGrid(ViewState("Orden").ToString())
|
||||
Else
|
||||
CargaGrid("")
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Protected Sub LbAgregar_Click(sender As Object, e As System.EventArgs) Handles LbAgregar.Click
|
||||
Dim ObjProgramaCONAC As New ClsAC
|
||||
If ObjProgramaCONAC.AddProgramaCONAC(TxtProgramaCONAC.Text.Trim, TxtClave.Text.Trim, TxtNombre.Text.Trim, TxtCaracteristica.Text.Trim, UsuarioActual.CveUsuario) Then
|
||||
TxtProgramaCONAC.Text = ""
|
||||
TxtClave.Text = ""
|
||||
TxtNombre.Text = ""
|
||||
TxtCaracteristica.Text = ""
|
||||
Alert("El Nuevo Registro se guardó correctamente.", TipoMensaje.MsgInformacion)
|
||||
UpTitulos.Update()
|
||||
ViewState("DTProgramaCONAC") = ObjProgramaCONAC.DtResultados
|
||||
GlobalDTAC_ProgramasCONAC = ObjProgramaCONAC.DtResultados
|
||||
|
||||
If ViewState("Orden").ToString() <> String.Empty Then
|
||||
CargaGrid(ViewState("Orden").ToString())
|
||||
Else
|
||||
CargaGrid("")
|
||||
End If
|
||||
End If
|
||||
ObjProgramaCONAC.Dispose()
|
||||
End Sub
|
||||
|
||||
#Region "G V D A T O S"
|
||||
Protected Sub GvDatos_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvDatos.RowDataBound
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
e.Row.Cells(0).HorizontalAlign = HorizontalAlign.Center
|
||||
e.Row.Cells(1).HorizontalAlign = HorizontalAlign.Center
|
||||
e.Row.Cells(2).HorizontalAlign = HorizontalAlign.Left
|
||||
e.Row.Cells(3).HorizontalAlign = HorizontalAlign.Justify
|
||||
e.Row.Cells(4).HorizontalAlign = HorizontalAlign.Center
|
||||
e.Row.Cells(6).HorizontalAlign = HorizontalAlign.Center
|
||||
e.Row.Cells(7).HorizontalAlign = HorizontalAlign.Center
|
||||
e.Row.Cells(8).HorizontalAlign = HorizontalAlign.Center
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Protected Sub GvDatos_RowDeleting(sender As Object, e As System.Web.UI.WebControls.GridViewDeleteEventArgs) Handles GvDatos.RowDeleting
|
||||
Dim ObjProgramaCONAC As New ClsAC
|
||||
If ObjProgramaCONAC.RemoveProgramaCONAC(GvDatos.DataKeys(e.RowIndex).Value.ToString.ToEntero) Then
|
||||
GvDatos.EditIndex = -1
|
||||
ViewState("DTProgramaCONAC") = ObjProgramaCONAC.DtResultados
|
||||
GlobalDTAC_ProgramasCONAC = ObjProgramaCONAC.DtResultados
|
||||
Alert("El Registro se eliminó correctamente.", TipoMensaje.MsgInformacion)
|
||||
End If
|
||||
|
||||
ObjProgramaCONAC.Dispose()
|
||||
|
||||
If ViewState("Orden").ToString() <> String.Empty Then
|
||||
CargaGrid(ViewState("Orden").ToString())
|
||||
Else
|
||||
CargaGrid("")
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Protected Sub GvDatos_RowCancelingEdit(sender As Object, e As System.Web.UI.WebControls.GridViewCancelEditEventArgs) Handles GvDatos.RowCancelingEdit
|
||||
GvDatos.EditIndex = -1
|
||||
If ViewState("Orden").ToString() <> String.Empty Then
|
||||
CargaGrid(ViewState("Orden").ToString())
|
||||
Else
|
||||
CargaGrid("")
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Protected Sub GvDatos_RowUpdating(sender As Object, e As System.Web.UI.WebControls.GridViewUpdateEventArgs) Handles GvDatos.RowUpdating
|
||||
|
||||
Dim ObjProgramaCONAC As New ClsAC
|
||||
|
||||
Dim ProgramaCONAC As String = DirectCast(GvDatos.Rows(e.RowIndex).FindControl("TxtProgramaCONAC"), TextBox).Text.Trim
|
||||
Dim Clave As String = DirectCast(GvDatos.Rows(e.RowIndex).FindControl("TxtClave"), TextBox).Text.Trim
|
||||
Dim Nombre As String = DirectCast(GvDatos.Rows(e.RowIndex).FindControl("TxtNombre"), TextBox).Text.Trim
|
||||
Dim Caracteristica As String = DirectCast(GvDatos.Rows(e.RowIndex).FindControl("TxtCaracteristica"), TextBox).Text.Trim
|
||||
Dim Estatus As Boolean = GvDatos.Rows(e.RowIndex).FCCheckBox("ChkEstatus").Checked
|
||||
Dim CveProgramaCONAC As Integer = GvDatos.DataKeys(e.RowIndex).Value.ToString.ToEntero
|
||||
|
||||
If ObjProgramaCONAC.UpdateProgramaCONAC(ProgramaCONAC, Clave, Nombre, Caracteristica, Estatus, CveProgramaCONAC) Then
|
||||
GvDatos.EditIndex = -1
|
||||
ViewState("DTProgramaCONAC") = ObjProgramaCONAC.DtResultados
|
||||
GlobalDTAC_ProgramasCONAC = ObjProgramaCONAC.DtResultados
|
||||
Alert("Los cambios se guardaron correctamente.", TipoMensaje.MsgInformacion)
|
||||
End If
|
||||
|
||||
ObjProgramaCONAC.Dispose()
|
||||
|
||||
If ViewState("Orden").ToString() <> String.Empty Then
|
||||
CargaGrid(ViewState("Orden").ToString())
|
||||
Else
|
||||
CargaGrid("")
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Sub GvDatos_RowEditing(sender As Object, e As System.Web.UI.WebControls.GridViewEditEventArgs) Handles GvDatos.RowEditing
|
||||
GvDatos.EditIndex = e.NewEditIndex
|
||||
|
||||
If ViewState("Orden").ToString() <> String.Empty Then
|
||||
CargaGrid(ViewState("Orden").ToString())
|
||||
Else
|
||||
CargaGrid("")
|
||||
End If
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
#Region "O R D E N A M I E N T O"
|
||||
Protected Sub LbOrden_Click(ByVal sender As Object, ByVal e As EventArgs)
|
||||
Dim Orden As String = ""
|
||||
Dim Campo As String = ""
|
||||
Dim Literal As Literal = Nothing
|
||||
Const OrdenInicial As String = ""
|
||||
Dim Arg(2) As String
|
||||
|
||||
Arg = CType(sender, LinkButton).CommandArgument().ToString.Split(";"c)
|
||||
Campo = Arg(0)
|
||||
Literal = CType(CType(sender, LinkButton).NamingContainer.FindControl("Img" & Campo.Replace(",", "_")), Literal)
|
||||
|
||||
If ViewState(String.Format("O{0}", Campo)) IsNot Nothing AndAlso ViewState(String.Format("O{0}", Campo)).ToString = String.Format("{0} DESC", Campo) Then
|
||||
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>")
|
||||
End If
|
||||
Orden = OrdenInicial & ViewState(String.Format("O{0}", Campo)).ToString
|
||||
ViewState("Orden") = Orden
|
||||
CargaGrid(Orden)
|
||||
End Sub
|
||||
|
||||
Private Sub CargaGrid(Orden As String)
|
||||
If Orden <> String.Empty Then
|
||||
Dim DV As New DataView(CType(ViewState("DTProgramaCONAC"), DataTable), "", Orden, DataViewRowState.CurrentRows)
|
||||
GvDatos.DataSource = DV.ToTable()
|
||||
DV.Dispose()
|
||||
Else
|
||||
GvDatos.DataSource = CType(ViewState("DTProgramaCONAC"), DataTable)
|
||||
End If
|
||||
GvDatos.DataBind()
|
||||
UpDatos.Update()
|
||||
End Sub
|
||||
#End Region
|
||||
End Class
|
||||
208
AC/CatRubrosIngreso.aspx
Normal file
208
AC/CatRubrosIngreso.aspx
Normal file
@@ -0,0 +1,208 @@
|
||||
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="CatRubrosIngreso.aspx.vb" Inherits="AC_CatRubrosIngreso" %>
|
||||
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="HB" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="E" runat="Server">
|
||||
Catálogo de Rubro
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
|
||||
<div class="portlet box blue-hoki" style="width:1000px;">
|
||||
<div class="portlet-body">
|
||||
<asp:UpdatePanel ID="UpTitulos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<table class="table table-striped table-advance table-hover">
|
||||
<thead>
|
||||
<tr class="Titulos">
|
||||
<th width="550px">
|
||||
<asp:LinkButton ID="LbRubroIngreso" runat="server" CausesValidation="false" Text="" CommandArgument="RubroIngreso" OnClick="LbOrden_Click">
|
||||
Rubro
|
||||
<asp:Literal ID="ImgRubroIngreso" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
||||
</asp:LinkButton>
|
||||
</th>
|
||||
<th width="70px">
|
||||
<asp:LinkButton ID="LbOrden" runat="server" CausesValidation="false" Text="" CommandArgument="Orden" OnClick="LbOrden_Click">
|
||||
Orden
|
||||
<asp:Literal ID="ImgOrden" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
||||
</asp:LinkButton>
|
||||
</th>
|
||||
<th width="75px">
|
||||
<asp:LinkButton ID="LbCodigo" runat="server" CausesValidation="false" Text="" CommandArgument="Codigo" OnClick="LbOrden_Click">
|
||||
Código
|
||||
<asp:Literal ID="ImgCodigo" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
||||
</asp:LinkButton>
|
||||
</th>
|
||||
<th width="86px">
|
||||
<asp:LinkButton ID="LbCuentaMayor" runat="server" CausesValidation="false" Text="" CommandArgument="CuentaMayor" OnClick="LbOrden_Click">
|
||||
Cuenta Mayor
|
||||
<asp:Literal ID="imgCuentaMayor" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
||||
</asp:LinkButton>
|
||||
</th>
|
||||
<th width="85px">
|
||||
<asp:LinkButton ID="LbEditable" runat="server" CausesValidation="false" Text="" CommandArgument="Editable" OnClick="LbOrden_Click">
|
||||
Editable
|
||||
<asp:Literal ID="ImgEditable" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
||||
</asp:LinkButton>
|
||||
</th>
|
||||
<th width="85px">
|
||||
<asp:LinkButton ID="LbTipoIngreso" runat="server" CausesValidation="false" Text="" CommandArgument="TipoIngreso" OnClick="LbOrden_Click">
|
||||
Tipo Ingreso
|
||||
<asp:Literal ID="ImgTipoIngreso" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
||||
</asp:LinkButton>
|
||||
</th>
|
||||
<th width="132">Comandos</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tr style="text-align: center;">
|
||||
<td>
|
||||
<asp:TextBox ID="TxtRubroIngreso" runat="server" CausesValidation="true" MaxLength="500" ValidationGroup="GrpGuardar" Width="540px"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVRubroIngreso" runat="server" ControlToValidate="TxtRubroIngreso" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''RubroIngreso''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCRubroIngreso" runat="server" HighlightCssClass="vco" TargetControlID="RFVRubroIngreso" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</td>
|
||||
<td>
|
||||
<asp:TextBox ID="TxtOrden" runat="server" CausesValidation="true" MaxLength="50" ValidationGroup="GrpGuardar" Width="65px"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVOrden" runat="server" ControlToValidate="TxtOrden" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Orden''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOrden" runat="server" HighlightCssClass="vco" TargetControlID="RFVOrden" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</td>
|
||||
<td>
|
||||
<asp:TextBox ID="TxtCodigo" runat="server" CausesValidation="true" MaxLength="4" ValidationGroup="GrpGuardar" Width="70px"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVCodigo" runat="server" ControlToValidate="TxtCodigo" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Codigo''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCCodigo" runat="server" HighlightCssClass="vco" TargetControlID="RFVCodigo" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</td>
|
||||
<td>
|
||||
<asp:TextBox ID="TxtCuentaMayor" runat="server" CausesValidation="true" MaxLength="50" ValidationGroup="GrpGuardar" Width="70px"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVCuentaMayor" runat="server" ControlToValidate="TxtCuentaMayor" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''CuentaMayor''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCCuentaMayor" runat="server" HighlightCssClass="vco" TargetControlID="RFVCuentaMayor" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</td>
|
||||
<td>
|
||||
<asp:CheckBox ID="ChkEditable" Checked="true" runat="server" />
|
||||
<%-- <asp:TextBox ID="TxtEditable" runat="server" CausesValidation="true" MaxLength="50" ValidationGroup="GrpGuardar" Width="44px"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVEditable" runat="server" ControlToValidate="TxtEditable" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Editable''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCEditable" runat="server" HighlightCssClass="vco" TargetControlID="RFVEditable" Width="300px"></ajax:ValidatorCalloutExtender>--%>
|
||||
</td>
|
||||
<td>
|
||||
<asp:TextBox ID="TxtTipoIngreso" runat="server" CausesValidation="true" MaxLength="50" ValidationGroup="GrpGuardar" Width="80px"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVTipoIngreso" runat="server" ControlToValidate="TxtTipoIngreso" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''TipoIngreso''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCTipoIngreso" runat="server" HighlightCssClass="vco" TargetControlID="RFVTipoIngreso" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</td>
|
||||
<td>
|
||||
<asp:LinkButton ID="LbAgregar" runat="server" CausesValidation="true" CssClass="Texto" Text="Agregar" ValidationGroup="GrpGuardar"></asp:LinkButton></td>
|
||||
</tr>
|
||||
</table>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" DataKeyNames="CveRubroIngreso" EmptyDataText="No se encontraron Rubros Registrados" ToolTip="Listado de Rubro Ingreso" CssClass="table table-striped table-advance table-hover" Style="margin-top: -10px;" GridLines="None">
|
||||
<Columns>
|
||||
<asp:TemplateField>
|
||||
<ItemStyle Width="550px" />
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LtlRubroIngreso" runat="server" Text='<%# Eval("RubroIngreso", "{0}") %>'></asp:Label>
|
||||
<%-- <asp:Literal ID="LtlRubroIngreso" runat="server" Text='<%# Eval("RubroIngreso", "{0}") %>'></asp:Literal>--%>
|
||||
</ItemTemplate>
|
||||
<EditItemTemplate>
|
||||
<asp:TextBox ID="TxtRubroIngreso" runat="server" CausesValidation="true" MaxLength="500" Text='<%# Eval("RubroIngreso") %>' ValidationGroup="GrpGV" Width="540px"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVRubroIngreso" runat="server" ControlToValidate="TxtRubroIngreso" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''RubroIngreso''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGV"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCRubroIngreso" runat="server" HighlightCssClass="vco" TargetControlID="RFVRubroIngreso" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</EditItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemStyle Width="75px" />
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlOrden" runat="server" Text='<%# Eval("Orden", "{0:d}")%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<EditItemTemplate>
|
||||
<asp:TextBox ID="TxtOrden" runat="server" CausesValidation="true" MaxLength="50" Text='<%# Eval("Orden")%>' ValidationGroup="GrpGV" Width="65px"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVOrden" runat="server" ControlToValidate="TxtOrden" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Orden''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGV"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOrden" runat="server" HighlightCssClass="vco" TargetControlID="RFVOrden" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</EditItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemStyle Width="80px" />
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlCodigo" runat="server" Text='<%# Eval("Codigo")%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<EditItemTemplate>
|
||||
<asp:TextBox ID="TxtCodigo" runat="server" CausesValidation="true" MaxLength="4" Text='<%# Eval("Codigo")%>' ValidationGroup="GrpGV" Width="70px"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVCodigo" runat="server" ControlToValidate="TxtCodigo" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Codigo''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGV"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCCodigo" runat="server" HighlightCssClass="vco" TargetControlID="RFVCodigo" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</EditItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemStyle Width="85px" />
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlCuentaMayor" runat="server" Text='<%# Eval("CuentaMayor", "{0}") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<EditItemTemplate>
|
||||
<asp:TextBox ID="TxtCuentaMayor" runat="server" CausesValidation="true" MaxLength="50" Text='<%# Eval("CuentaMayor") %>' ValidationGroup="GrpGV" Width="80px"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVCuentaMayor" runat="server" ControlToValidate="TxtCuentaMayor" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''CuentaMayor''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGV"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCCuentaMayor" runat="server" HighlightCssClass="vco" TargetControlID="RFVCuentaMayor" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</EditItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemStyle Width="85px" />
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlEditable" runat="server" Text='<%# Eval("Editable") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<EditItemTemplate>
|
||||
<asp:CheckBox ID="ChkEditable" runat="server" Checked='<%# If (Eval("Editable").ToString = "Si", True, False) %>' />
|
||||
<%--<asp:CheckBox ID="ChkEditable" Checked="true" runat="server" />--%>
|
||||
</EditItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemStyle Width="90px" />
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlTipoIngreso" runat="server" Text='<%# Eval("TipoIngreso", "{0}") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<EditItemTemplate>
|
||||
<asp:TextBox ID="TxtTipoIngreso" runat="server" CausesValidation="true" MaxLength="50" Text='<%# Eval("TipoIngreso") %>' ValidationGroup="GrpGV" Width="80px"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVTipoIngreso" runat="server" ControlToValidate="TxtTipoIngreso" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''TipoIngreso''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGV"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCTipoIngreso" runat="server" HighlightCssClass="vco" TargetControlID="RFVTipoIngreso" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</EditItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Editar">
|
||||
<ItemStyle Width="65px" />
|
||||
<EditItemTemplate>
|
||||
<center>
|
||||
<asp:LinkButton ID="imgU" runat="server" AlternateText="Actualizar" CausesValidation="True" CommandName="Update"
|
||||
CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-check'></i>" ValidationGroup="GrpGV" />
|
||||
<asp:LinkButton ID="imgC" runat="server" AlternateText="Cancelar" CausesValidation="False" CommandName="Cancel"
|
||||
CssClass="btn btn-circle btn-sm red" Text="<i class='fa fa-times'></i>" />
|
||||
</center>
|
||||
</EditItemTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="imgE" runat="server" AlternateText="Editar" CausesValidation="False" CommandName="Edit"
|
||||
CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-pencil'></i>" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Eliminar">
|
||||
<ItemStyle Width="55px" />
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="imgD" runat="server" AlternateText="Eliminar" CausesValidation="False" CommandName="Delete"
|
||||
CssClass="btn btn-circle btn-sm red" Text="<i class='icon-trash'></i>"
|
||||
data-toggle="confirmation" data-popout="true" data-original-title="confirmar" data-btn-ok-label="si" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
<RowStyle CssClass="Texto" />
|
||||
<AlternatingRowStyle CssClass="TextoAlterno" />
|
||||
</asp:GridView>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div></div>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
||||
<script language="javascript" type="text/javascript">
|
||||
function C() {
|
||||
return confirm('¿Está seguro que desea eliminar el Rubro?');
|
||||
}
|
||||
</script>
|
||||
</asp:Content>
|
||||
|
||||
178
AC/CatRubrosIngreso.aspx.vb
Normal file
178
AC/CatRubrosIngreso.aspx.vb
Normal file
@@ -0,0 +1,178 @@
|
||||
Option Strict On
|
||||
|
||||
Imports System.Data
|
||||
Imports System.Linq
|
||||
Imports Extensiones
|
||||
|
||||
Partial Class AC_CatRubrosIngreso
|
||||
Inherits ClsPaginas
|
||||
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||
If Not Page.IsPostBack Then
|
||||
ViewState("Orden") = ""
|
||||
CargaDatos()
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Public Sub CargaDatos()
|
||||
Dim ObjRubroIngreso As New ClsAC
|
||||
If ObjRubroIngreso.GetRubrosIngreso() Then
|
||||
ViewState("DTRubroIngreso") = ObjRubroIngreso.DtResultados
|
||||
GlobalDTAC_RubrosIngreso = ObjRubroIngreso.DtResultados
|
||||
Else
|
||||
Me.GvDatos.DataSource = Nothing
|
||||
End If
|
||||
|
||||
ObjRubroIngreso.Dispose()
|
||||
|
||||
If ViewState("Orden").ToString() <> String.Empty Then
|
||||
CargaGrid(ViewState("Orden").ToString())
|
||||
Else
|
||||
CargaGrid("")
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Protected Sub LbAgregar_Click(sender As Object, e As System.EventArgs) Handles LbAgregar.Click
|
||||
Dim ObjRubroIngreso As New ClsAC
|
||||
If ObjRubroIngreso.AddRubrosIngreso(TxtRubroIngreso.Text.Trim, TxtCodigo.Text.Trim, TxtOrden.Text.Trim.ToEntero, TxtCuentaMayor.Text.Trim, ChkEditable.Checked, TxtTipoIngreso.Text.Trim.ToEntero) Then
|
||||
TxtRubroIngreso.Text = ""
|
||||
TxtOrden.Text = ""
|
||||
TxtCodigo.Text = ""
|
||||
TxtCuentaMayor.Text = ""
|
||||
TxtTipoIngreso.Text = ""
|
||||
|
||||
Alert("El nuevo Rubro se guardó correctamente.", TipoMensaje.MsgInformacion)
|
||||
UpTitulos.Update()
|
||||
ViewState("DTRubroIngreso") = ObjRubroIngreso.DtResultados
|
||||
GlobalDTAC_RubrosIngreso = ObjRubroIngreso.DtResultados
|
||||
|
||||
If ViewState("Orden").ToString() <> String.Empty Then
|
||||
CargaGrid(ViewState("Orden").ToString())
|
||||
Else
|
||||
CargaGrid("")
|
||||
End If
|
||||
End If
|
||||
ObjRubroIngreso.Dispose()
|
||||
End Sub
|
||||
|
||||
|
||||
#Region "G V D A T O S"
|
||||
Protected Sub GvDatos_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvDatos.RowDataBound
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
|
||||
e.Row.Cells(0).HorizontalAlign = HorizontalAlign.Left
|
||||
e.Row.Cells(1).HorizontalAlign = HorizontalAlign.Center
|
||||
e.Row.Cells(2).HorizontalAlign = HorizontalAlign.Center
|
||||
e.Row.Cells(3).HorizontalAlign = HorizontalAlign.Center
|
||||
e.Row.Cells(4).HorizontalAlign = HorizontalAlign.Center
|
||||
e.Row.Cells(5).HorizontalAlign = HorizontalAlign.Center
|
||||
e.Row.Cells(6).HorizontalAlign = HorizontalAlign.Center
|
||||
e.Row.Cells(7).HorizontalAlign = HorizontalAlign.Center
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Protected Sub GvDatos_RowDeleting(sender As Object, e As System.Web.UI.WebControls.GridViewDeleteEventArgs) Handles GvDatos.RowDeleting
|
||||
Dim ObjRubroIngreso As New ClsAC
|
||||
If ObjRubroIngreso.RemoveRubrosIngreso(GvDatos.DataKeys(e.RowIndex).Value.ToString.ToEntero) Then
|
||||
GvDatos.EditIndex = -1
|
||||
ViewState("DTRubroIngreso") = ObjRubroIngreso.DtResultados
|
||||
GlobalDTAC_RubrosIngreso = ObjRubroIngreso.DtResultados
|
||||
Alert("El Rubro de Ingreso se eliminó correctamente.", TipoMensaje.MsgInformacion)
|
||||
End If
|
||||
|
||||
ObjRubroIngreso.Dispose()
|
||||
|
||||
If ViewState("Orden").ToString() <> String.Empty Then
|
||||
CargaGrid(ViewState("Orden").ToString())
|
||||
Else
|
||||
CargaGrid("")
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Protected Sub GvDatos_RowCancelingEdit(sender As Object, e As System.Web.UI.WebControls.GridViewCancelEditEventArgs) Handles GvDatos.RowCancelingEdit
|
||||
GvDatos.EditIndex = -1
|
||||
If ViewState("Orden").ToString() <> String.Empty Then
|
||||
CargaGrid(ViewState("Orden").ToString())
|
||||
Else
|
||||
CargaGrid("")
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Protected Sub GvDatos_RowUpdating(sender As Object, e As System.Web.UI.WebControls.GridViewUpdateEventArgs) Handles GvDatos.RowUpdating
|
||||
|
||||
Dim ObjRubroIngreso As New ClsAC
|
||||
|
||||
Dim RubroIngreso As String = DirectCast(GvDatos.Rows(e.RowIndex).FindControl("TxtRubroIngreso"), TextBox).Text.Trim
|
||||
Dim Orden As Integer = DirectCast(GvDatos.Rows(e.RowIndex).FindControl("TxtOrden"), TextBox).Text.Trim.ToEntero
|
||||
Dim Codigo As String = DirectCast(GvDatos.Rows(e.RowIndex).FindControl("TxtCodigo"), TextBox).Text.Trim
|
||||
Dim CuentaMayor As String = DirectCast(GvDatos.Rows(e.RowIndex).FindControl("TxtCuentaMayor"), TextBox).Text.Trim
|
||||
Dim Editable As Boolean = GvDatos.Rows(e.RowIndex).FCCheckBox("ChkEditable").Checked
|
||||
Dim CveRubroIngreso As Integer = GvDatos.DataKeys(e.RowIndex).Value.ToString.ToEntero
|
||||
|
||||
If ObjRubroIngreso.UpdateRubrosIngreso(CveRubroIngreso, RubroIngreso, Orden, Codigo, CuentaMayor, Editable, CveRubroIngreso) Then
|
||||
GvDatos.EditIndex = -1
|
||||
ViewState("DTRubroIngreso") = ObjRubroIngreso.DtResultados
|
||||
GlobalDTAC_RubrosIngreso = ObjRubroIngreso.DtResultados
|
||||
Alert("Los cambios se guardaron correctamente.", TipoMensaje.MsgInformacion)
|
||||
End If
|
||||
|
||||
ObjRubroIngreso.Dispose()
|
||||
|
||||
If ViewState("Orden").ToString() <> String.Empty Then
|
||||
CargaGrid(ViewState("Orden").ToString())
|
||||
Else
|
||||
CargaGrid("")
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Sub GvDatos_RowEditing(sender As Object, e As System.Web.UI.WebControls.GridViewEditEventArgs) Handles GvDatos.RowEditing
|
||||
GvDatos.EditIndex = e.NewEditIndex
|
||||
|
||||
If ViewState("Orden").ToString() <> String.Empty Then
|
||||
CargaGrid(ViewState("Orden").ToString())
|
||||
Else
|
||||
CargaGrid("")
|
||||
End If
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
#Region "O R D E N A M I E N T O"
|
||||
Protected Sub LbOrden_Click(ByVal sender As Object, ByVal e As EventArgs)
|
||||
Dim Orden As String = ""
|
||||
Dim Campo As String = ""
|
||||
Dim Literal As Literal = Nothing
|
||||
Const OrdenInicial As String = ""
|
||||
Dim Arg(2) As String
|
||||
|
||||
Arg = CType(sender, LinkButton).CommandArgument().ToString.Split(";"c)
|
||||
Campo = Arg(0)
|
||||
Literal = CType(CType(sender, LinkButton).NamingContainer.FindControl("Img" & Campo.Replace(",", "_")), Literal)
|
||||
|
||||
If ViewState(String.Format("O{0}", Campo)) IsNot Nothing AndAlso ViewState(String.Format("O{0}", Campo)).ToString = String.Format("{0} DESC", Campo) Then
|
||||
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>")
|
||||
End If
|
||||
Orden = OrdenInicial & ViewState(String.Format("O{0}", Campo)).ToString
|
||||
ViewState("Orden") = Orden
|
||||
CargaGrid(Orden)
|
||||
End Sub
|
||||
|
||||
Private Sub CargaGrid(Orden As String)
|
||||
If Orden <> String.Empty Then
|
||||
Dim DV As New DataView(CType(ViewState("DTRubroIngreso"), DataTable), "", Orden, DataViewRowState.CurrentRows)
|
||||
GvDatos.DataSource = DV.ToTable()
|
||||
DV.Dispose()
|
||||
Else
|
||||
GvDatos.DataSource = CType(ViewState("DTRubroIngreso"), DataTable)
|
||||
End If
|
||||
GvDatos.DataBind()
|
||||
UpDatos.Update()
|
||||
End Sub
|
||||
#End Region
|
||||
End Class
|
||||
21
AC/CatSubFuncion.aspx
Normal file
21
AC/CatSubFuncion.aspx
Normal file
@@ -0,0 +1,21 @@
|
||||
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="CatSubFuncion.aspx.vb" Inherits="AC_CatSubFuncion" %>
|
||||
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="CP" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="Css" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="HB" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="E" runat="Server">
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content8" ContentPlaceHolderID="H" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content9" ContentPlaceHolderID="C" runat="Server">
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content10" ContentPlaceHolderID="JS" runat="Server">
|
||||
</asp:Content>
|
||||
|
||||
|
||||
|
||||
5
AC/CatSubFuncion.aspx.vb
Normal file
5
AC/CatSubFuncion.aspx.vb
Normal file
@@ -0,0 +1,5 @@
|
||||
|
||||
Partial Class AC_CatSubFuncion
|
||||
Inherits System.Web.UI.Page
|
||||
|
||||
End Class
|
||||
153
AC/CatSubPrograma.aspx
Normal file
153
AC/CatSubPrograma.aspx
Normal file
@@ -0,0 +1,153 @@
|
||||
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="CatSubPrograma.aspx.vb" Inherits="AC_CatSubPrograma" %>
|
||||
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="HB" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="E" runat="Server">
|
||||
Catálogo de SubPrograma
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
|
||||
<div class="portlet box blue-hoki" style="width:1000px;">
|
||||
<div class="portlet-body">
|
||||
<asp:UpdatePanel ID="UpTitulos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<table class="table table-striped table-advance table-hover">
|
||||
<thead>
|
||||
<tr class="Titulos">
|
||||
<th width="250px">
|
||||
<asp:LinkButton ID="LbSubPrograma" runat="server" CausesValidation="false" Text="" CommandArgument="SubPrograma" OnClick="LbOrden_Click">
|
||||
SubPrograma
|
||||
<asp:Literal ID="ImgSubPrograma" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
||||
</asp:LinkButton>
|
||||
</th>
|
||||
<th width="150px">
|
||||
<asp:LinkButton ID="LbPrograma" runat="server" CausesValidation="false" Text="Programa" CommandArgument="" OnClick="LbOrden_Click">
|
||||
Programa
|
||||
<asp:Literal ID="ImgPrograma" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
||||
</asp:LinkButton>
|
||||
</th>
|
||||
<th width="100px">
|
||||
<asp:LinkButton ID="LbEstatus" runat="server" CausesValidation="false" Text="" CommandArgument="Estatus" OnClick="LbOrden_Click">
|
||||
Estatus
|
||||
<asp:Literal ID="ImgEstatus" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
||||
</asp:LinkButton>
|
||||
</th>
|
||||
<th width="100px">
|
||||
<asp:LinkButton ID="LbFechaIng" runat="server" CausesValidation="false" Text="" CommandArgument="FechaIng" OnClick="LbOrden_Click">
|
||||
Fecha
|
||||
<asp:Literal ID="ImgFechaIng" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
||||
</asp:LinkButton>
|
||||
</th>
|
||||
<th width="100px">
|
||||
<asp:LinkButton ID="LbUsuario" runat="server" CausesValidation="false" Text="" CommandArgument="Usuario" OnClick="LbOrden_Click">
|
||||
Usuario
|
||||
<asp:Literal ID="ImgUsuario" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
||||
</asp:LinkButton>
|
||||
</th>
|
||||
<th width="121px">Comandos</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tr>
|
||||
<td>
|
||||
<asp:TextBox ID="TxtSubPrograma" runat="server" CausesValidation="true" MaxLength="50" ValidationGroup="GrpGuardar" Width="240px"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVSubPrograma" runat="server" ControlToValidate="TxtSubPrograma" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''SubPrograma''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCSubPrograma" runat="server" HighlightCssClass="vco" TargetControlID="RFVSubPrograma" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</td>
|
||||
|
||||
<td>
|
||||
<asp:DropDownList ID="DdlPrograma" runat="server" AppendDataBoundItems="true" DataValueField="CvePrograma" DataTextField="Programa" ValidationGroup="GrpGuardar" Width="140px" Class="table-group-action-input form-control input-inline input-small input-sm">
|
||||
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RFVPrograma" runat="server" ControlToValidate="DdlPrograma" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Programa''</b> es necesario, por favor ingréselo." InitialValue="-1" ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOPrograma" runat="server" HighlightCssClass="vco" TargetControlID="RFVPrograma" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td style="text-align:center">
|
||||
<asp:LinkButton ID="LbAgregar" runat="server" CausesValidation="true" CssClass="Texto" Text="Agregar" ValidationGroup="GrpGuardar"></asp:LinkButton></td>
|
||||
</tr>
|
||||
</table>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" DataKeyNames="CveSubPrograma" EmptyDataText="No se encontraron SubPrograma Registrados" ToolTip="Listado de SubPrograma" CssClass="table table-striped table-advance table-hover" Style="margin-top: -10px;">
|
||||
<Columns>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlSubPrograma" runat="server" Text='<%# Eval("SubPrograma", "{0}") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<EditItemTemplate>
|
||||
<asp:TextBox ID="TxtSubPrograma" runat="server" CausesValidation="true" MaxLength="50" Text='<%# Eval("SubPrograma") %>' ValidationGroup="GrpGV" Width="240px"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVSubPrograma" runat="server" ControlToValidate="TxtSubPrograma" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''SubPrograma''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGV"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCSubPrograma" runat="server" HighlightCssClass="vco" TargetControlID="RFVSubPrograma" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</EditItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlPrograma" runat="server" Text='<%# Eval("Programa", "{0}")%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<EditItemTemplate>
|
||||
<asp:DropDownList ID="DdlPrograma" runat="server" DataValueField="CvePrograma" DataTextField="Programa" Width="140px"></asp:DropDownList>
|
||||
</EditItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlEstatus" runat="server" Text='<%# Eval("Estatus") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<EditItemTemplate>
|
||||
<asp:CheckBox ID="ChkEstatus" runat="server" Checked='<%# If (Eval("Estatus").ToString = "Activo", True, False) %>' />
|
||||
</EditItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlFecha" runat="server" Text='<%# Eval("FechaIng", "{0:d}") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlUsuario" runat="server" Text='<%# Eval("Usuario") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Editar">
|
||||
<EditItemTemplate>
|
||||
<center>
|
||||
<asp:LinkButton ID="imgU" runat="server" AlternateText="Actualizar" CausesValidation="True" CommandName="Update"
|
||||
CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-check'></i>" ValidationGroup="GrpGV" />
|
||||
<asp:LinkButton ID="imgC" runat="server" AlternateText="Cancelar" CausesValidation="False" CommandName="Cancel"
|
||||
CssClass="btn btn-circle btn-sm red" Text="<i class='fa fa-times'></i>" />
|
||||
</center>
|
||||
</EditItemTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="imgE" runat="server" AlternateText="Editar" CausesValidation="False" CommandName="Edit"
|
||||
CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-pencil'></i>" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Eliminar">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="imgD" runat="server" AlternateText="Eliminar" CausesValidation="False" CommandName="Delete"
|
||||
CssClass="btn btn-circle btn-sm red" Text="<i class='icon-trash'></i>" data-toggle="confirmation" data-popout="true" data-original-title="confirmar" data-btn-ok-label="si" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
<RowStyle CssClass="Texto" />
|
||||
<AlternatingRowStyle CssClass="TextoAlterno" />
|
||||
</asp:GridView>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div></div>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
||||
<script language="javascript" type="text/javascript">
|
||||
function C() {
|
||||
return confirm('¿Está seguro que desea eliminar el Registro?');
|
||||
}
|
||||
</script>
|
||||
</asp:Content>
|
||||
|
||||
189
AC/CatSubPrograma.aspx.vb
Normal file
189
AC/CatSubPrograma.aspx.vb
Normal file
@@ -0,0 +1,189 @@
|
||||
Option Explicit On
|
||||
Option Strict On
|
||||
|
||||
Imports System.Data
|
||||
Imports System.Linq
|
||||
Imports Extensiones
|
||||
|
||||
Partial Class AC_CatSubPrograma
|
||||
Inherits ClsPaginas
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||
If Not Page.IsPostBack Then
|
||||
ViewState("Orden") = ""
|
||||
CargaDatos()
|
||||
CargaPrograma()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Public Sub CargaDatos()
|
||||
Dim ObjSubPrograma As New ClsAC
|
||||
If ObjSubPrograma.GetSubProgramas() Then
|
||||
ViewState("DTSubProgramas") = ObjSubPrograma.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
|
||||
GlobalDTAC_SubProgramas = ObjSubPrograma.DtResultados
|
||||
Else
|
||||
Me.GvDatos.DataSource = Nothing
|
||||
End If
|
||||
|
||||
ObjSubPrograma.Dispose()
|
||||
|
||||
If ViewState("Orden").ToString() <> String.Empty Then
|
||||
CargaGrid(ViewState("Orden").ToString())
|
||||
Else
|
||||
CargaGrid("")
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Protected Sub LbAgregar_Click(sender As Object, e As System.EventArgs) Handles LbAgregar.Click
|
||||
Dim ObjSubPrograma As New ClsAC
|
||||
If ObjSubPrograma.AddSubPrograma(TxtSubPrograma.Text.Trim, DdlPrograma.SelectedValue.ToEntero, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
|
||||
TxtSubPrograma.Text = ""
|
||||
|
||||
Alert("El Registro se guardó correctamente.", TipoMensaje.MsgInformacion)
|
||||
UpTitulos.Update()
|
||||
ViewState("DTSubProgramas") = ObjSubPrograma.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
|
||||
GlobalDTAC_SubProgramas = ObjSubPrograma.DtResultados
|
||||
|
||||
If ViewState("Orden").ToString() <> String.Empty Then
|
||||
CargaGrid(ViewState("Orden").ToString())
|
||||
Else
|
||||
CargaGrid("")
|
||||
End If
|
||||
End If
|
||||
ObjSubPrograma.Dispose()
|
||||
End Sub
|
||||
|
||||
Private Sub CargaPrograma()
|
||||
DdlPrograma.DataSource = GlobalDTAC_Programas
|
||||
DdlPrograma.DataBind()
|
||||
End Sub
|
||||
|
||||
#Region "G V D A T O S"
|
||||
Protected Sub GvDatos_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvDatos.RowDataBound
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
If e.Row.RowIndex = 0 Then
|
||||
e.Row.Cells(0).Width = Unit.Pixel(250)
|
||||
e.Row.Cells(1).Width = Unit.Pixel(150)
|
||||
e.Row.Cells(2).Width = Unit.Pixel(100)
|
||||
e.Row.Cells(3).Width = Unit.Pixel(100)
|
||||
e.Row.Cells(4).Width = Unit.Pixel(100)
|
||||
e.Row.Cells(5).Width = Unit.Pixel(53)
|
||||
e.Row.Cells(6).Width = Unit.Pixel(68)
|
||||
'e.Row.Cells(7).Width = Unit.Pixel(50)
|
||||
End If
|
||||
e.Row.Cells(2).HorizontalAlign = HorizontalAlign.Center
|
||||
e.Row.Cells(3).HorizontalAlign = HorizontalAlign.Center
|
||||
e.Row.Cells(4).HorizontalAlign = HorizontalAlign.Center
|
||||
e.Row.Cells(5).HorizontalAlign = HorizontalAlign.Center
|
||||
e.Row.Cells(6).HorizontalAlign = HorizontalAlign.Center
|
||||
|
||||
If e.Row.RowState = DataControlRowState.Edit OrElse e.Row.RowState = 5 Then
|
||||
e.Row.FCDropDownList("DdlPrograma").DataSource = GlobalDTAC_Programas
|
||||
e.Row.FCDropDownList("DdlPrograma").DataBind()
|
||||
e.Row.FCDropDownList("DdlPrograma").SelectedValue = e.Row.DBCampo("CvePrograma")
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Protected Sub GvDatos_RowDeleting(sender As Object, e As System.Web.UI.WebControls.GridViewDeleteEventArgs) Handles GvDatos.RowDeleting
|
||||
Dim ObjSubPrograma As New ClsAC
|
||||
If ObjSubPrograma.RemoveSubPrograma(GvDatos.DataKeys(e.RowIndex).Value.ToString.ToEntero) Then
|
||||
GvDatos.EditIndex = -1
|
||||
ViewState("DTSubProgramas") = ObjSubPrograma.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
|
||||
GlobalDTAC_SubProgramas = ObjSubPrograma.DtResultados
|
||||
Alert("El Registro se eliminó correctamente.", TipoMensaje.MsgInformacion)
|
||||
End If
|
||||
|
||||
ObjSubPrograma.Dispose()
|
||||
|
||||
If ViewState("Orden").ToString() <> String.Empty Then
|
||||
CargaGrid(ViewState("Orden").ToString())
|
||||
Else
|
||||
CargaGrid("")
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Protected Sub GvDatos_RowCancelingEdit(sender As Object, e As System.Web.UI.WebControls.GridViewCancelEditEventArgs) Handles GvDatos.RowCancelingEdit
|
||||
GvDatos.EditIndex = -1
|
||||
If ViewState("Orden").ToString() <> String.Empty Then
|
||||
CargaGrid(ViewState("Orden").ToString())
|
||||
Else
|
||||
CargaGrid("")
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Protected Sub GvDatos_RowUpdating(sender As Object, e As System.Web.UI.WebControls.GridViewUpdateEventArgs) Handles GvDatos.RowUpdating
|
||||
|
||||
Dim ObjSubPrograma As New ClsAC
|
||||
|
||||
Dim SubPrograma As String = DirectCast(GvDatos.Rows(e.RowIndex).FindControl("TxtSubPrograma"), TextBox).Text.Trim
|
||||
Dim Estatus As Boolean = GvDatos.Rows(e.RowIndex).FCCheckBox("ChkEstatus").Checked
|
||||
Dim CveSubPrograma As Integer = GvDatos.DataKeys(e.RowIndex).Value.ToString.ToEntero
|
||||
' Dim Programa As String = DirectCast(GvDatos.Rows(e.RowIndex).FindControl("TxtPrograma"), TextBox).Text.Trim
|
||||
Dim Programa As Integer = DirectCast(GvDatos.Rows(e.RowIndex).FindControl("DdlPrograma"), DropDownList).SelectedValue.ToEntero
|
||||
|
||||
If ObjSubPrograma.UpdateSubPrograma(SubPrograma, Programa, Estatus, CveSubPrograma) Then
|
||||
GvDatos.EditIndex = -1
|
||||
ViewState("DTSubProgramas") = ObjSubPrograma.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
|
||||
GlobalDTAC_SubProgramas = ObjSubPrograma.DtResultados
|
||||
Alert("Los cambios se guardaron correctamente.", TipoMensaje.MsgInformacion)
|
||||
End If
|
||||
|
||||
ObjSubPrograma.Dispose()
|
||||
|
||||
If ViewState("Orden").ToString() <> String.Empty Then
|
||||
CargaGrid(ViewState("Orden").ToString())
|
||||
Else
|
||||
CargaGrid("")
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Sub GvDatos_RowEditing(sender As Object, e As System.Web.UI.WebControls.GridViewEditEventArgs) Handles GvDatos.RowEditing
|
||||
GvDatos.EditIndex = e.NewEditIndex
|
||||
|
||||
If ViewState("Orden").ToString() <> String.Empty Then
|
||||
CargaGrid(ViewState("Orden").ToString())
|
||||
Else
|
||||
CargaGrid("")
|
||||
End If
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
#Region "O R D E N A M I E N T O"
|
||||
Protected Sub LbOrden_Click(ByVal sender As Object, ByVal e As EventArgs)
|
||||
Dim Orden As String = ""
|
||||
Dim Campo As String = ""
|
||||
Dim Literal As Literal = Nothing
|
||||
Const OrdenInicial As String = ""
|
||||
Dim Arg(2) As String
|
||||
|
||||
Arg = CType(sender, LinkButton).CommandArgument().ToString.Split(";"c)
|
||||
Campo = Arg(0)
|
||||
Literal = CType(CType(sender, LinkButton).NamingContainer.FindControl("Img" & Campo.Replace(",", "_")), Literal)
|
||||
|
||||
If ViewState(String.Format("O{0}", Campo)) IsNot Nothing AndAlso ViewState(String.Format("O{0}", Campo)).ToString = String.Format("{0} DESC", Campo) Then
|
||||
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>")
|
||||
End If
|
||||
Orden = OrdenInicial & ViewState(String.Format("O{0}", Campo)).ToString
|
||||
ViewState("Orden") = Orden
|
||||
CargaGrid(Orden)
|
||||
End Sub
|
||||
|
||||
Private Sub CargaGrid(Orden As String)
|
||||
If Orden <> String.Empty Then
|
||||
Dim DV As New DataView(CType(ViewState("DTSubProgramas"), DataTable), "", Orden, DataViewRowState.CurrentRows)
|
||||
GvDatos.DataSource = DV.ToTable()
|
||||
DV.Dispose()
|
||||
Else
|
||||
GvDatos.DataSource = CType(ViewState("DTSubProgramas"), DataTable)
|
||||
End If
|
||||
GvDatos.DataBind()
|
||||
UpDatos.Update()
|
||||
End Sub
|
||||
#End Region
|
||||
End Class
|
||||
138
AC/CatUbicaciones.aspx
Normal file
138
AC/CatUbicaciones.aspx
Normal file
@@ -0,0 +1,138 @@
|
||||
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="CatUbicaciones.aspx.vb" Inherits="AC_CatUbicaciones" %>
|
||||
|
||||
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="HB" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="E" runat="Server">
|
||||
Catálogo de Ubicaciones
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
|
||||
<div class="portlet box blue-hoki" style="width:1000px;">
|
||||
<div class="portlet-title" >
|
||||
<div class="caption">
|
||||
<i class="fa fa-gift"></i>Catalogo
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body">
|
||||
<asp:UpdatePanel ID="UpTitulos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<table class="table table-striped table-advance table-hover">
|
||||
<thead>
|
||||
<tr class="Titulos">
|
||||
<th width="250px">
|
||||
<asp:LinkButton ID="LbUbicacion" runat="server" CausesValidation="false" Text="" CommandArgument="Ubicacion" OnClick="LbOrden_Click">
|
||||
Ubicacion
|
||||
<asp:Literal ID="ImgUbicacion" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
||||
</asp:LinkButton>
|
||||
</th>
|
||||
<th width="100px">
|
||||
<asp:LinkButton ID="LbEstatus" runat="server" CausesValidation="false" Text="" CommandArgument="Estatus" OnClick="LbOrden_Click">
|
||||
Estatus
|
||||
<asp:Literal ID="ImgEstatus" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
||||
</asp:LinkButton>
|
||||
</th>
|
||||
<th width="100px">
|
||||
<asp:LinkButton ID="LbFechaIg" runat="server" CausesValidation="false" Text="" CommandArgument="FechaIng" OnClick="LbOrden_Click">
|
||||
Fecha
|
||||
<asp:Literal ID="ImgFechaIng" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
||||
</asp:LinkButton>
|
||||
</th>
|
||||
<th width="100px">
|
||||
<asp:LinkButton ID="LbUsuario" runat="server" CausesValidation="false" Text="" CommandArgument="Usuario" OnClick="LbOrden_Click">
|
||||
Usuario
|
||||
<asp:Literal ID="ImgUsuario" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
||||
</asp:LinkButton>
|
||||
</th>
|
||||
<th width="121px">Comandos</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tr>
|
||||
<td>
|
||||
<asp:TextBox ID="TxtUbicacion" runat="server" CausesValidation="true" MaxLength="50" ValidationGroup="GrpGuardar" Width="244px"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVUbicacion" runat="server" ControlToValidate="TxtUbicacion" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Ubicacion''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCUbicacion" runat="server" HighlightCssClass="vco" TargetControlID="RFVUbicacion" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td>
|
||||
<asp:LinkButton ID="LbAgregar" runat="server" CausesValidation="true" CssClass="Texto" Text="Agregar" ValidationGroup="GrpGuardar"></asp:LinkButton></td>
|
||||
</tr>
|
||||
</table>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" DataKeyNames="CveUbicacion" EmptyDataText="No se encontraron Ubicaciones Registrados" ToolTip="Listado de Ubicaciones" CssClass="table table-striped table-advance table-hover" Style="margin-top: -10px;">
|
||||
<Columns>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlUbicacion" runat="server" Text='<%# Eval("Ubicacion", "{0}") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<EditItemTemplate>
|
||||
<asp:TextBox ID="TxtUbicacion" runat="server" CausesValidation="true" MaxLength="50" Text='<%# Eval("Ubicacion") %>' ValidationGroup="GrpGV" Width="244px"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVUbicacion" runat="server" ControlToValidate="TxtUbicacion" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Ubicacion''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGV"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCUbicacion" runat="server" HighlightCssClass="vco" TargetControlID="RFVUbicacion" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</EditItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlEstatus" runat="server" Text='<%# Eval("Estatus") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<EditItemTemplate>
|
||||
<asp:CheckBox ID="ChkEstatus" runat="server" Checked='<%# If (Eval("Estatus").ToString = "Activo", True, False) %>' />
|
||||
</EditItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlFecha" runat="server" Text='<%# Eval("FechaIng", "{0:d}") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlUsuario" runat="server" Text='<%# Eval("Usuario") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Editar">
|
||||
<EditItemTemplate>
|
||||
<center>
|
||||
<asp:LinkButton ID="imgU" runat="server" AlternateText="Actualizar" CausesValidation="True" CommandName="Update"
|
||||
CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-check'></i>" ValidationGroup="GrpGV" />
|
||||
<asp:LinkButton ID="imgC" runat="server" AlternateText="Cancelar" CausesValidation="False" CommandName="Cancel"
|
||||
CssClass="btn btn-circle btn-sm red" Text="<i class='fa fa-times'></i>" />
|
||||
</center>
|
||||
</EditItemTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="imgE" runat="server" AlternateText="Editar" CausesValidation="False" CommandName="Edit"
|
||||
CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-pencil'></i>" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Eliminar">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="imgD" runat="server" AlternateText="Eliminar" CausesValidation="False" CommandName="Delete"
|
||||
CssClass="btn btn-circle btn-sm red" Text="<i class='icon-trash'></i>"
|
||||
data-toggle="confirmation" data-popout="true" data-original-title="confirmar" data-btn-ok-label="si" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
<RowStyle CssClass="Texto" />
|
||||
<AlternatingRowStyle CssClass="TextoAlterno" />
|
||||
</asp:GridView>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div></div>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
||||
<script language="javascript" type="text/javascript">
|
||||
function C() {
|
||||
return confirm('¿Está seguro que desea eliminar la ubicación?');
|
||||
}
|
||||
</script>
|
||||
</asp:Content>
|
||||
188
AC/CatUbicaciones.aspx.vb
Normal file
188
AC/CatUbicaciones.aspx.vb
Normal file
@@ -0,0 +1,188 @@
|
||||
|
||||
Option Explicit On
|
||||
Option Strict On
|
||||
|
||||
Imports System.Data
|
||||
Imports System.Linq
|
||||
Imports Extensiones
|
||||
|
||||
Partial Class AC_CatUbicaciones
|
||||
Inherits ClsPaginas
|
||||
|
||||
Public Property PuedeEditar As Boolean
|
||||
Get
|
||||
Return CBool(ViewState("PuedeEditar"))
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
ViewState("PuedeEditar") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Property PuedeEliminar As Boolean
|
||||
Get
|
||||
Return CBool(ViewState("PuedeEditar"))
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
ViewState("PuedeEditar") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||
If Not Page.IsPostBack Then
|
||||
ViewState("Orden") = ""
|
||||
CargaDatos()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Public Sub CargaDatos()
|
||||
Dim ObjUbicaciones As New ClsAC
|
||||
If ObjUbicaciones.GetUbicaciones() Then
|
||||
ViewState("DTUbicaciones") = ObjUbicaciones.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
|
||||
GlobalDTAC_Ubicaciones = ObjUbicaciones.DtResultados
|
||||
Else
|
||||
Me.GvDatos.DataSource = Nothing
|
||||
End If
|
||||
|
||||
ObjUbicaciones.Dispose()
|
||||
|
||||
If ViewState("Orden").ToString() <> String.Empty Then
|
||||
CargaGrid(ViewState("Orden").ToString())
|
||||
Else
|
||||
CargaGrid("")
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Protected Sub LbAgregar_Click(sender As Object, e As System.EventArgs) Handles LbAgregar.Click
|
||||
Dim ObjUbicaciones As New ClsAC
|
||||
If ObjUbicaciones.AddUbicacion(TxtUbicacion.Text.Trim, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
|
||||
TxtUbicacion.Text = ""
|
||||
Alert("El nuevo Ubicacion se guardó correctamente.", TipoMensaje.MsgInformacion)
|
||||
UpTitulos.Update()
|
||||
ViewState("DTUbicaciones") = ObjUbicaciones.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
|
||||
GlobalDTAC_Ubicaciones = ObjUbicaciones.DtResultados
|
||||
|
||||
If ViewState("Orden").ToString() <> String.Empty Then
|
||||
CargaGrid(ViewState("Orden").ToString())
|
||||
Else
|
||||
CargaGrid("")
|
||||
End If
|
||||
End If
|
||||
ObjUbicaciones.Dispose()
|
||||
End Sub
|
||||
|
||||
#Region "G V D A T O S"
|
||||
Protected Sub GvDatos_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvDatos.RowDataBound
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
If e.Row.RowIndex = 0 Then
|
||||
e.Row.Cells(0).Width = Unit.Pixel(250)
|
||||
e.Row.Cells(1).Width = Unit.Pixel(100)
|
||||
e.Row.Cells(2).Width = Unit.Pixel(100)
|
||||
e.Row.Cells(3).Width = Unit.Pixel(100)
|
||||
e.Row.Cells(4).Width = Unit.Pixel(53)
|
||||
e.Row.Cells(5).Width = Unit.Pixel(68)
|
||||
End If
|
||||
e.Row.Cells(0).HorizontalAlign = HorizontalAlign.Left
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Protected Sub GvDatos_RowDeleting(sender As Object, e As System.Web.UI.WebControls.GridViewDeleteEventArgs) Handles GvDatos.RowDeleting
|
||||
Dim ObjUbicaciones As New ClsAC
|
||||
If ObjUbicaciones.RemoveUbicacion(GvDatos.DataKeys(e.RowIndex).Value.ToString.ToEntero) Then
|
||||
GvDatos.EditIndex = -1
|
||||
ViewState("DTUbicaciones") = ObjUbicaciones.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
|
||||
GlobalDTAC_Ubicaciones = ObjUbicaciones.DtResultados
|
||||
Alert("El Ubicacion se eliminó correctamente.", TipoMensaje.MsgInformacion)
|
||||
End If
|
||||
|
||||
ObjUbicaciones.Dispose()
|
||||
|
||||
If ViewState("Orden").ToString() <> String.Empty Then
|
||||
CargaGrid(ViewState("Orden").ToString())
|
||||
Else
|
||||
CargaGrid("")
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Protected Sub GvDatos_RowCancelingEdit(sender As Object, e As System.Web.UI.WebControls.GridViewCancelEditEventArgs) Handles GvDatos.RowCancelingEdit
|
||||
GvDatos.EditIndex = -1
|
||||
If ViewState("Orden").ToString() <> String.Empty Then
|
||||
CargaGrid(ViewState("Orden").ToString())
|
||||
Else
|
||||
CargaGrid("")
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Protected Sub GvDatos_RowUpdating(sender As Object, e As System.Web.UI.WebControls.GridViewUpdateEventArgs) Handles GvDatos.RowUpdating
|
||||
|
||||
Dim ObjUbicaciones As New ClsAC
|
||||
|
||||
Dim Ubicacion As String = DirectCast(GvDatos.Rows(e.RowIndex).FindControl("TxtUbicacion"), TextBox).Text.Trim
|
||||
Dim Estatus As Boolean = GvDatos.Rows(e.RowIndex).FCCheckBox("ChkEstatus").Checked
|
||||
Dim CveUbicacion As Integer = GvDatos.DataKeys(e.RowIndex).Value.ToString.ToEntero
|
||||
|
||||
If ObjUbicaciones.UpdateUbicacion(Ubicacion, Estatus, CveUbicacion) Then
|
||||
GvDatos.EditIndex = -1
|
||||
ViewState("DTUbicaciones") = ObjUbicaciones.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
|
||||
GlobalDTAC_Ubicaciones = ObjUbicaciones.DtResultados
|
||||
Alert("Los cambios se guardaron correctamente.", TipoMensaje.MsgInformacion)
|
||||
End If
|
||||
|
||||
ObjUbicaciones.Dispose()
|
||||
|
||||
If ViewState("Orden").ToString() <> String.Empty Then
|
||||
CargaGrid(ViewState("Orden").ToString())
|
||||
Else
|
||||
CargaGrid("")
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Sub GvDatos_RowEditing(sender As Object, e As System.Web.UI.WebControls.GridViewEditEventArgs) Handles GvDatos.RowEditing
|
||||
GvDatos.EditIndex = e.NewEditIndex
|
||||
|
||||
If ViewState("Orden").ToString() <> String.Empty Then
|
||||
CargaGrid(ViewState("Orden").ToString())
|
||||
Else
|
||||
CargaGrid("")
|
||||
End If
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
|
||||
#Region "O R D E N A M I E N T O"
|
||||
Protected Sub LbOrden_Click(ByVal sender As Object, ByVal e As EventArgs)
|
||||
Dim Orden As String = ""
|
||||
Dim Campo As String = ""
|
||||
Dim Literal As Literal = Nothing
|
||||
Const OrdenInicial As String = ""
|
||||
Dim Arg(2) As String
|
||||
|
||||
Arg = CType(sender, LinkButton).CommandArgument().ToString.Split(";"c)
|
||||
Campo = Arg(0)
|
||||
Literal = CType(CType(sender, LinkButton).NamingContainer.FindControl("Img" & Campo.Replace(",", "_")), Literal)
|
||||
|
||||
If ViewState(String.Format("O{0}", Campo)) IsNot Nothing AndAlso ViewState(String.Format("O{0}", Campo)).ToString = String.Format("{0} DESC", Campo) Then
|
||||
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>")
|
||||
End If
|
||||
Orden = OrdenInicial & ViewState(String.Format("O{0}", Campo)).ToString
|
||||
ViewState("Orden") = Orden
|
||||
CargaGrid(Orden)
|
||||
End Sub
|
||||
|
||||
Private Sub CargaGrid(Orden As String)
|
||||
If Orden <> String.Empty Then
|
||||
Dim DV As New DataView(CType(ViewState("DTUbicaciones"), DataTable), "", Orden, DataViewRowState.CurrentRows)
|
||||
GvDatos.DataSource = DV.ToTable()
|
||||
DV.Dispose()
|
||||
Else
|
||||
GvDatos.DataSource = CType(ViewState("DTUbicaciones"), DataTable)
|
||||
End If
|
||||
GvDatos.DataBind()
|
||||
UpDatos.Update()
|
||||
End Sub
|
||||
#End Region
|
||||
End Class
|
||||
188
AC/CatUnidadesAdministrativas.aspx
Normal file
188
AC/CatUnidadesAdministrativas.aspx
Normal file
@@ -0,0 +1,188 @@
|
||||
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="CatUnidadesAdministrativas.aspx.vb" Inherits="AC_CatUnidadesAdministrativas" %>
|
||||
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="HB" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="E" runat="Server">
|
||||
Catálogo de Unidades Administrativas
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
<img src="/Imagenes/separador02.gif" alt="" />
|
||||
<asp:ImageButton ID="ImgExcel" OnClick="ImgExcel_Click" runat="server" ImageUrl="/Imagenes/IconoExcel.gif" Width="17px" Height="17px" />
|
||||
<img src="/Imagenes/separador02.gif" alt="" />
|
||||
|
||||
<asp:ImageButton ID="BtnImprimir" OnClick="BtnImprimir_Click" runat="server" alt="Imprimir" src="/Imagenes/btnImprimir.gif" Style="cursor: pointer; height: 20px" />
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
|
||||
<div class="portlet box blue-hoki" style="width:1000px;">
|
||||
<div class="portlet-body">
|
||||
<asp:UpdatePanel ID="UpTitulos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<table class="table table-striped table-advance table-hover">
|
||||
<thead>
|
||||
<tr class="Titulos">
|
||||
<th width="410px">
|
||||
<asp:LinkButton ID="LbUnidadAdministrativa" runat="server" CausesValidation="false" Text="" CommandArgument="UnidadAdministrativa" OnClick="LbOrden_Click">
|
||||
Unidad Administrativa
|
||||
<asp:Literal ID="ImgUnidadAdministrativa" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
||||
</asp:LinkButton>
|
||||
</th>
|
||||
<th width="75px">
|
||||
<asp:LinkButton ID="LbCodigo" runat="server" CausesValidation="false" Text="" CommandArgument="Codigo" OnClick="LbOrden_Click">
|
||||
Código
|
||||
<asp:Literal ID="ImgCodigo" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
||||
</asp:LinkButton>
|
||||
</th>
|
||||
<th width="100px">
|
||||
<asp:LinkButton ID="LbEstatus" runat="server" CausesValidation="false" Text="" CommandArgument="Estatus" OnClick="LbOrden_Click">
|
||||
Estatus
|
||||
<asp:Literal ID="ImgEstatus" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
||||
</asp:LinkButton>
|
||||
</th>
|
||||
<th width="100px">
|
||||
<asp:LinkButton ID="LbFechaIng" runat="server" CausesValidation="false" Text="" CommandArgument="FechaIng" OnClick="LbOrden_Click">
|
||||
Fecha
|
||||
<asp:Literal ID="ImgFechaIng" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
||||
</asp:LinkButton>
|
||||
</th>
|
||||
<th width="100px">
|
||||
<asp:LinkButton ID="LbUsuario" runat="server" CausesValidation="false" Text="" CommandArgument="Usuario" OnClick="LbOrden_Click">
|
||||
Usuario
|
||||
<asp:Literal ID="ImgUsuario" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
||||
</asp:LinkButton>
|
||||
</th>
|
||||
<th width="118px">Comandos</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tr>
|
||||
<td>
|
||||
<asp:TextBox ID="TxtUnidadAdministrativa" runat="server" CausesValidation="true" MaxLength="100" ValidationGroup="GrpGuardar" Width="390px"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVUnidadAdministrativa" runat="server" ControlToValidate="TxtUnidadAdministrativa" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''UnidadAdministrativa''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCUnidadAdministrativa" runat="server" HighlightCssClass="vco" TargetControlID="RFVUnidadAdministrativa" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</td>
|
||||
<td>
|
||||
<asp:TextBox ID="TxtCodigo" runat="server" CausesValidation="true" MaxLength="10" ValidationGroup="GrpGuardar" Width="70px"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVCodigo" runat="server" ControlToValidate="TxtCodigo" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Código''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCCodigo" runat="server" HighlightCssClass="vco" TargetControlID="RFVCodigo" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td style="text-align: center">
|
||||
<asp:LinkButton ID="LbAgregar" runat="server" CausesValidation="true" CssClass="Texto" Text="Agregar" ValidationGroup="GrpGuardar"></asp:LinkButton></td>
|
||||
</tr>
|
||||
</table>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" DataKeyNames="CveUnidadAdministrativa" EmptyDataText="No se encontraron UnidadAdministrativas Registrados" ToolTip="Listado de UnidadAdministrativas" CssClass="table table-striped table-advance table-hover" Style="margin-top: -10px;" GridLines="None">
|
||||
<Columns>
|
||||
<asp:TemplateField>
|
||||
<ItemStyle Width="410px" />
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlUnidadAdministrativa" runat="server" Text='<%# Eval("UnidadAdministrativa", "{0}") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<EditItemTemplate>
|
||||
<asp:TextBox ID="TxtUnidadAdministrativa" runat="server" CausesValidation="true" MaxLength="100" Text='<%# Eval("UnidadAdministrativa") %>' ValidationGroup="GrpGV" Width="390px"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVUnidadAdministrativa" runat="server" ControlToValidate="TxtUnidadAdministrativa" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''UnidadAdministrativa''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGV"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCUnidadAdministrativa" runat="server" HighlightCssClass="vco" TargetControlID="RFVUnidadAdministrativa" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</EditItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemStyle Width="80px" />
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlCodigo" runat="server" Text='<%# Eval("Codigo", "{0}")%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<EditItemTemplate>
|
||||
<asp:TextBox ID="TxtCodigo" runat="server" CausesValidation="true" MaxLength="50" Text='<%# Eval("Codigo")%>' ValidationGroup="GrpGV" Width="70px"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVCodigo" runat="server" ControlToValidate="TxtCodigo" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Código''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGV"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCCodigo" runat="server" HighlightCssClass="vco" TargetControlID="RFVCodigo" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</EditItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemStyle Width="100px" />
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlEstatus" runat="server" Text='<%# Eval("Estatus") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<EditItemTemplate>
|
||||
<asp:CheckBox ID="ChkEstatus" runat="server" Checked='<%# If (Eval("Estatus").ToString = "Activo", True, False) %>' />
|
||||
</EditItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemStyle Width="100px" />
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlFecha" runat="server" Text='<%# Eval("FechaIng", "{0:d}") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemStyle Width="100px" />
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlUsuario" runat="server" Text='<%# Eval("Usuario") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Editar">
|
||||
<EditItemTemplate>
|
||||
<center>
|
||||
<asp:LinkButton ID="imgU" runat="server" AlternateText="Actualizar" CausesValidation="True" CommandName="Update"
|
||||
CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-check'></i>" ValidationGroup="GrpGV" />
|
||||
<asp:LinkButton ID="imgC" runat="server" AlternateText="Cancelar" CausesValidation="False" CommandName="Cancel"
|
||||
CssClass="btn btn-circle btn-sm red" Text="<i class='fa fa-times'></i>" />
|
||||
</center>
|
||||
</EditItemTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="imgE" runat="server" AlternateText="Editar" CausesValidation="False" CommandName="Edit"
|
||||
CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-pencil'></i>" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Eliminar">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="imgD" runat="server" AlternateText="Eliminar" CausesValidation="False" CommandName="Delete"
|
||||
CssClass="btn btn-circle btn-sm red" Text="<i class='icon-trash'></i>"
|
||||
data-toggle="confirmation" data-popout="true" data-original-title="confirmar" data-btn-ok-label="si" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
<RowStyle CssClass="Texto" />
|
||||
<AlternatingRowStyle CssClass="TextoAlterno" />
|
||||
</asp:GridView>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div></div>
|
||||
|
||||
<table runat="server" id="Tbl" style="display: none">
|
||||
<tr>
|
||||
<td>
|
||||
<asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:GridView ID="Gv" runat="server" AutoGenerateColumns="False" GridLines="None">
|
||||
<Columns>
|
||||
<asp:BoundField HeaderText="Unidad Administrativa" DataField="UnidadAdministrativa" ItemStyle-Width="420px" ControlStyle-CssClass="Texto" />
|
||||
<asp:BoundField HeaderText="Código" DataField="Codigo" DataFormatString="{0}" ItemStyle-Width="80px" ControlStyle-CssClass="Texto" />
|
||||
<asp:BoundField HeaderText="Estatus" DataField="Estatus" ItemStyle-Width="100px" ControlStyle-CssClass="Texto" />
|
||||
<asp:BoundField HeaderText="Fecha" DataField="FechaIng" ItemStyle-Width="100px" ControlStyle-CssClass="Texto" />
|
||||
<asp:BoundField HeaderText="Usuario" DataField="Usuario" ItemStyle-Width="100px" ControlStyle-CssClass="Texto" />
|
||||
</Columns>
|
||||
<HeaderStyle CssClass="Titulos"></HeaderStyle>
|
||||
<AlternatingRowStyle CssClass="TextoAlterno"></AlternatingRowStyle>
|
||||
<RowStyle CssClass="Texto"></RowStyle>
|
||||
</asp:GridView>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
||||
<script language="javascript" type="text/javascript">
|
||||
function C() {
|
||||
return confirm('¿Está seguro que desea eliminar el Unidad Administrativa?');
|
||||
}
|
||||
</script>
|
||||
</asp:Content>
|
||||
218
AC/CatUnidadesAdministrativas.aspx.vb
Normal file
218
AC/CatUnidadesAdministrativas.aspx.vb
Normal file
@@ -0,0 +1,218 @@
|
||||
Option Explicit On
|
||||
Option Strict On
|
||||
|
||||
Imports System.Data
|
||||
Imports System.Linq
|
||||
Imports Extensiones
|
||||
Imports Microsoft.Reporting.WebForms
|
||||
|
||||
Partial Class AC_CatUnidadesAdministrativas
|
||||
Inherits ClsPaginas
|
||||
|
||||
Private Property DtUnidadesAdministrativas As DataTable
|
||||
Get
|
||||
Return CType(ViewState("DtUnidadesAdministrativas"), DataTable)
|
||||
End Get
|
||||
Set(value As DataTable)
|
||||
ViewState("DtUnidadesAdministrativas") = value
|
||||
End Set
|
||||
End Property
|
||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||
If Not Page.IsPostBack Then
|
||||
ViewState("Orden") = ""
|
||||
CargaDatos()
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Public Sub CargaDatos()
|
||||
Dim ObjUnidadAdministrativas As New ClsAC
|
||||
If ObjUnidadAdministrativas.GetUnidadesAdministrativas() Then
|
||||
ViewState("DTUnidadAdministrativas") = ObjUnidadAdministrativas.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
|
||||
GlobalDTAC_UnidadesAdministrativas(-1) = ObjUnidadAdministrativas.DtResultados
|
||||
Else
|
||||
Me.GvDatos.DataSource = Nothing
|
||||
End If
|
||||
|
||||
ObjUnidadAdministrativas.Dispose()
|
||||
|
||||
If ViewState("Orden").ToString() <> String.Empty Then
|
||||
CargaGrid(ViewState("Orden").ToString())
|
||||
Else
|
||||
CargaGrid("")
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Protected Sub LbAgregar_Click(sender As Object, e As System.EventArgs) Handles LbAgregar.Click
|
||||
Dim ObjUnidadAdministrativas As New ClsAC
|
||||
If ObjUnidadAdministrativas.AddUnidadAdministrativa(TxtUnidadAdministrativa.Text.Trim, TxtCodigo.Text.Trim, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
|
||||
TxtUnidadAdministrativa.Text = ""
|
||||
TxtCodigo.Text = ""
|
||||
Alert("La Unidad Administrativa se guardó correctamente.", TipoMensaje.MsgInformacion)
|
||||
UpTitulos.Update()
|
||||
ViewState("DTUnidadAdministrativas") = ObjUnidadAdministrativas.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
|
||||
GlobalDTAC_UnidadesAdministrativas(-1) = ObjUnidadAdministrativas.DtResultados
|
||||
|
||||
If ViewState("Orden").ToString() <> String.Empty Then
|
||||
CargaGrid(ViewState("Orden").ToString())
|
||||
Else
|
||||
CargaGrid("")
|
||||
End If
|
||||
End If
|
||||
ObjUnidadAdministrativas.Dispose()
|
||||
End Sub
|
||||
|
||||
#Region "G V D A T O S"
|
||||
Protected Sub GvDatos_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvDatos.RowDataBound
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
If e.Row.RowIndex = 0 Then
|
||||
e.Row.Cells(5).Width = Unit.Pixel(50)
|
||||
e.Row.Cells(6).Width = Unit.Pixel(50)
|
||||
End If
|
||||
e.Row.Cells(0).HorizontalAlign = HorizontalAlign.Left
|
||||
e.Row.Cells(1).HorizontalAlign = HorizontalAlign.Center
|
||||
e.Row.Cells(2).HorizontalAlign = HorizontalAlign.Center
|
||||
e.Row.Cells(3).HorizontalAlign = HorizontalAlign.Center
|
||||
e.Row.Cells(4).HorizontalAlign = HorizontalAlign.Center
|
||||
e.Row.Cells(5).HorizontalAlign = HorizontalAlign.Center
|
||||
e.Row.Cells(6).HorizontalAlign = HorizontalAlign.Center
|
||||
If e.Row.RowState = DataControlRowState.Edit OrElse e.Row.RowState = 5 Then
|
||||
'e.Row.FCDropDownList("DdlDependencia").DataSource = GlobalDTAC_UnidadesAdministrativas(UsuarioActual.CveEmpresa)
|
||||
'e.Row.FCDropDownList("DdlDependencia").DataBind()
|
||||
'e.Row.FCDropDownList("DdlDependencia").SelectedValue = e.Row.DBCampo("CveDependencia")
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Protected Sub GvDatos_RowDeleting(sender As Object, e As System.Web.UI.WebControls.GridViewDeleteEventArgs) Handles GvDatos.RowDeleting
|
||||
Dim ObjUnidadAdministrativas As New ClsAC
|
||||
If ObjUnidadAdministrativas.RemoveUnidadAdministrativa(GvDatos.DataKeys(e.RowIndex).Value.ToString.ToEntero) Then
|
||||
GvDatos.EditIndex = -1
|
||||
ViewState("DTUnidadAdministrativas") = ObjUnidadAdministrativas.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
|
||||
GlobalDTAC_UnidadesAdministrativas(-1) = ObjUnidadAdministrativas.DtResultados
|
||||
Alert("El Unidad Administrativa se eliminó correctamente.", TipoMensaje.MsgInformacion)
|
||||
End If
|
||||
|
||||
ObjUnidadAdministrativas.Dispose()
|
||||
|
||||
If ViewState("Orden").ToString() <> String.Empty Then
|
||||
CargaGrid(ViewState("Orden").ToString())
|
||||
Else
|
||||
CargaGrid("")
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Protected Sub GvDatos_RowCancelingEdit(sender As Object, e As System.Web.UI.WebControls.GridViewCancelEditEventArgs) Handles GvDatos.RowCancelingEdit
|
||||
GvDatos.EditIndex = -1
|
||||
If ViewState("Orden").ToString() <> String.Empty Then
|
||||
CargaGrid(ViewState("Orden").ToString())
|
||||
Else
|
||||
CargaGrid("")
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Protected Sub GvDatos_RowUpdating(sender As Object, e As System.Web.UI.WebControls.GridViewUpdateEventArgs) Handles GvDatos.RowUpdating
|
||||
|
||||
Dim ObjUnidadAdministrativas As New ClsAC
|
||||
|
||||
Dim UnidadAdministrativa As String = DirectCast(GvDatos.Rows(e.RowIndex).FindControl("TxtUnidadAdministrativa"), TextBox).Text.Trim
|
||||
Dim Estatus As Boolean = GvDatos.Rows(e.RowIndex).FCCheckBox("ChkEstatus").Checked
|
||||
Dim CveUnidadAdministrativa As Integer = GvDatos.DataKeys(e.RowIndex).Value.ToString.ToEntero
|
||||
Dim Codigo As String = DirectCast(GvDatos.Rows(e.RowIndex).FindControl("TxtCodigo"), TextBox).Text.Trim
|
||||
|
||||
If ObjUnidadAdministrativas.UpdateUnidadAdministrativa(UnidadAdministrativa, Codigo, Estatus, CveUnidadAdministrativa) Then
|
||||
GvDatos.EditIndex = -1
|
||||
ViewState("DTUnidadAdministrativas") = ObjUnidadAdministrativas.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
|
||||
GlobalDTAC_UnidadesAdministrativas(-1) = ObjUnidadAdministrativas.DtResultados
|
||||
Alert("Los cambios se guardaron correctamente.", TipoMensaje.MsgInformacion)
|
||||
End If
|
||||
|
||||
ObjUnidadAdministrativas.Dispose()
|
||||
|
||||
If ViewState("Orden").ToString() <> String.Empty Then
|
||||
CargaGrid(ViewState("Orden").ToString())
|
||||
Else
|
||||
CargaGrid("")
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Sub GvDatos_RowEditing(sender As Object, e As System.Web.UI.WebControls.GridViewEditEventArgs) Handles GvDatos.RowEditing
|
||||
GvDatos.EditIndex = e.NewEditIndex
|
||||
|
||||
If ViewState("Orden").ToString() <> String.Empty Then
|
||||
CargaGrid(ViewState("Orden").ToString())
|
||||
Else
|
||||
CargaGrid("")
|
||||
End If
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
|
||||
#Region "O R D E N A M I E N T O"
|
||||
Protected Sub LbOrden_Click(ByVal sender As Object, ByVal e As EventArgs)
|
||||
Dim Orden As String = ""
|
||||
Dim Campo As String = ""
|
||||
Dim Literal As Literal = Nothing
|
||||
Const OrdenInicial As String = ""
|
||||
Dim Arg(2) As String
|
||||
|
||||
Arg = CType(sender, LinkButton).CommandArgument().ToString.Split(";"c)
|
||||
Campo = Arg(0)
|
||||
Literal = CType(CType(sender, LinkButton).NamingContainer.FindControl("Img" & Campo.Replace(",", "_")), Literal)
|
||||
|
||||
If ViewState(String.Format("O{0}", Campo)) IsNot Nothing AndAlso ViewState(String.Format("O{0}", Campo)).ToString = String.Format("{0} DESC", Campo) Then
|
||||
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>")
|
||||
End If
|
||||
Orden = OrdenInicial & ViewState(String.Format("O{0}", Campo)).ToString
|
||||
ViewState("Orden") = Orden
|
||||
CargaGrid(Orden)
|
||||
End Sub
|
||||
|
||||
Private Sub CargaGrid(Orden As String)
|
||||
If Orden <> String.Empty Then
|
||||
Dim DV As New DataView(CType(ViewState("DTUnidadAdministrativas"), DataTable), "", Orden, DataViewRowState.CurrentRows)
|
||||
GvDatos.DataSource = DV.ToTable()
|
||||
Gv.DataSource = DV.ToTable()
|
||||
DtUnidadesAdministrativas = DV.ToTable()
|
||||
DV.Dispose()
|
||||
Else
|
||||
GvDatos.DataSource = CType(ViewState("DTUnidadAdministrativas"), DataTable)
|
||||
Gv.DataSource = CType(ViewState("DTUnidadAdministrativas"), DataTable)
|
||||
DtUnidadesAdministrativas = CType(ViewState("DTUnidadAdministrativas"), DataTable)
|
||||
End If
|
||||
GvDatos.DataBind()
|
||||
Gv.DataBind()
|
||||
UpDatos.Update()
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
#Region " EXPORTAR - PDF - EXCEL "
|
||||
Protected Sub ImgExcel_Click(sender As Object, e As ImageClickEventArgs)
|
||||
Tbl.ExportToExcel("Reporte Matriz de Egresos")
|
||||
End Sub
|
||||
|
||||
Protected Sub BtnImprimir_Click(sender As Object, e As ImageClickEventArgs)
|
||||
ImprimiReporte()
|
||||
End Sub
|
||||
'No quitar porque no funciona el exporta PDF
|
||||
Public Overrides Sub VerifyRenderingInServerForm(control As Control)
|
||||
' Verifies that the control is rendered
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
#Region "I M P R I M I R "
|
||||
|
||||
Protected Sub ImprimiReporte()
|
||||
Dim params As New List(Of ReportParameter)
|
||||
params.Add(New ReportParameter("pEmp", UsuarioActual.Empresa.Empresa))
|
||||
params.Add(New ReportParameter("pImg", New Uri(Server.MapPath(String.Format("~/Empresas/{0}/Logo.png", UsuarioActual.CveEmpresa))).AbsoluteUri))
|
||||
|
||||
ImprimirPDF("AC/Reportes/RepCatUnidadesAdministrativas.rdlc", DtUnidadesAdministrativas, params, "ReporteUnidadesAdministrativas")
|
||||
End Sub
|
||||
#End Region
|
||||
End Class
|
||||
323
AC/PresupuestoEgresos.aspx
Normal file
323
AC/PresupuestoEgresos.aspx
Normal file
@@ -0,0 +1,323 @@
|
||||
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="PresupuestoEgresos.aspx.vb" Inherits="AC_PresupuestoEgresos2" %>
|
||||
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="HB" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="E" runat="Server">
|
||||
Presupuesto Egresos (Detalle)
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
|
||||
|
||||
|
||||
<asp:UpdatePanel ID="upDatos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-9">
|
||||
<div class="portlet smmallpadding light bordered">
|
||||
<div class="portlet-title">
|
||||
<div class="tools">
|
||||
<a href="javascript;" data-idchekbox="<%= chkexpand.ClientID%>" class=" <%= IIf(chkexpand.Checked = True, "collapse", "expand")%>"></a>
|
||||
<asp:CheckBox ID="chkexpand" Checked="true" CssClass="hidden" runat="server" />
|
||||
</div>
|
||||
<div class="caption uppercase" style="position: relative;">
|
||||
<i class="fa fa-info-circle"></i>Información General
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body" <%= IIf(chkexpand.Checked = True, "", "style=""display:none;""")%>>
|
||||
<table style="width: 100%;">
|
||||
<tr>
|
||||
<td width="200px;">Ejercicio:</td>
|
||||
<td>
|
||||
<asp:DropDownList ID="DdlEjercicio" OnSelectedIndexChanged="DdlEjercicio_SelectedIndexChanged" AutoPostBack="true" CssClass="form-control select2me" runat="server" Width="100px" DataTextField="Ejercicio" DataValueField="Ejercicio"></asp:DropDownList>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Programa Operativo:
|
||||
</td>
|
||||
<td>
|
||||
<asp:DropDownList ID="CboProgramaOperativo" CssClass="form-control select2me" runat="server" DataTextField="ProgramaOperativo" DataValueField="CveProgramaOperativo" Width="550px"></asp:DropDownList>
|
||||
<asp:RangeValidator ID="RVProgramaOperativo" runat="server" ControlToValidate="CboProgramaOperativo" Display="None" Type="Integer" MinimumValue="1" MaximumValue="2147483647" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Programa Operativo''</b> es necesario, por favor seleccione uno." ValidationGroup="GrpGuardar"></asp:RangeValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOProgramaOperativo" runat="server" HighlightCssClass="vco" TargetControlID="RVProgramaOperativo" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Unidad Administrativa:
|
||||
</td>
|
||||
<td>
|
||||
<asp:DropDownList ID="CboUnidadAdministrativa" CssClass="form-control select2me" runat="server" DataTextField="CodigoUnidadAdminstrativa" DataValueField="CveUnidadAdministrativa" Width="550px"></asp:DropDownList>
|
||||
<asp:RangeValidator ID="RVUnidadAdministrativa" runat="server" ControlToValidate="CboUnidadAdministrativa" Display="None" Type="Integer" MinimumValue="1" MaximumValue="2147483647" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Unidad Administrativa''</b> es necesario, por favor seleccione uno." ValidationGroup="GrpGuardar"></asp:RangeValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOUnidadAdministrativa" runat="server" HighlightCssClass="vco" TargetControlID="RVUnidadAdministrativa" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Fuente de Financiamiento:
|
||||
</td>
|
||||
<td>
|
||||
<asp:DropDownList ID="CboFuenteFinanciamiento" CssClass="form-control select2me" runat="server" DataTextField="ClaveFuente" DataValueField="CveFuenteFinanciamiento" Width="550px"></asp:DropDownList>
|
||||
<asp:RangeValidator ID="RVFuenteFinanciamiento" runat="server" ControlToValidate="CboFuenteFinanciamiento" Display="None" Type="Integer" MinimumValue="1" MaximumValue="2147483647" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fuente de Financiamiento''</b> es necesario, por favor seleccione uno." ValidationGroup="GrpGuardar"></asp:RangeValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOFuenteFinanciamiento" runat="server" HighlightCssClass="vco" TargetControlID="RVFuenteFinanciamiento" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Tipo de Gasto:
|
||||
</td>
|
||||
<td>
|
||||
<asp:DropDownList ID="CboTipoGasto" CssClass="form-control select2me" runat="server" DataTextField="CodigoTipoGasto" DataValueField="CveTipoGasto" Width="550px"></asp:DropDownList>
|
||||
<asp:RangeValidator ID="RVTipoGasto" runat="server" ControlToValidate="CboTipoGasto" Display="None" Type="Integer" MinimumValue="1" MaximumValue="2147483647" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Tipo de Gasto''</b> es necesario, por favor seleccione uno." ValidationGroup="GrpGuardar"></asp:RangeValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOTipoGasto" runat="server" HighlightCssClass="vco" TargetControlID="RVTipoGasto" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Clasificación del Objeto de Gasto:
|
||||
</td>
|
||||
<td>
|
||||
<asp:DropDownList ID="CboClasificacionOG" CssClass="form-control select2me" runat="server" DataTextField="CodigoClasificacion" DataValueField="CveClasificacion" Width="550px"></asp:DropDownList>
|
||||
<asp:RangeValidator ID="RVClasificacionOG" runat="server" ControlToValidate="CboClasificacionOG" Display="None" Type="Integer" MinimumValue="1" MaximumValue="2147483647" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Clasificacion del Objeto de Gasto''</b> es necesario, por favor seleccione uno." ValidationGroup="GrpGuardar"></asp:RangeValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOClasificacionOG" runat="server" HighlightCssClass="vco" TargetControlID="RVClasificacionOG" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-3">
|
||||
<div class="portlet smmallpadding light bordered">
|
||||
<div class="portlet-title">
|
||||
<div class="tools">
|
||||
<a href="javascript;" data-idchekbox="<%= chkexpand2.ClientID%>" class=" <%= IIf(chkexpand2.Checked = True, "collapse", "expand")%>"></a>
|
||||
<asp:CheckBox ID="chkexpand2" Checked="true" CssClass="hidden" runat="server" />
|
||||
</div>
|
||||
<div class="caption uppercase" style="position: relative;">
|
||||
<i class="fa fa-info-circle"></i>Acciones
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body" <%= IIf(chkexpand2.Checked = True, "", "style=""display:none;""")%>>
|
||||
<table>
|
||||
<tr>
|
||||
<td>
|
||||
<asp:Button ID="BtnCancelar" runat="server" Text="Cancelar" OnClientClick="javascript:document.location.href='/AC/CatPresupuestoEgresos.aspx'; return false;" class="btn btn-default" />
|
||||
</td>
|
||||
<td>
|
||||
<asp:Button ID="btnGuardar" runat="server" Text="Guardar" ValidationGroup="GrpGuardar" Width="120px" class="btn btn-primary" />
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-9">
|
||||
<div class="portlet smmallpadding light bordered">
|
||||
<div class="portlet-title">
|
||||
<div class="caption uppercase" style="position: relative; display: inline-block;">
|
||||
<i class="fa fa-info-circle"></i>Plan de Desarrollo
|
||||
</div>
|
||||
<div class="tools">
|
||||
<a href="javascript;" data-idchekbox="<%= chkexpand3.ClientID%>" class=" <%= IIf(chkexpand3.Checked = True, "collapse", "expand")%>"></a>
|
||||
<asp:CheckBox ID="chkexpand3" Checked="true" CssClass="hidden" runat="server" />
|
||||
</div>
|
||||
<div style="width: 400px; float:right; position: relative; display: inline-block;">
|
||||
<table>
|
||||
<tr>
|
||||
<td style="width: 180px;">Total:
|
||||
<asp:TextBox runat="server" ID="txtTotal" ClientIDMode="Static" Style="margin-left: 10px;" Width="100px" CssClass="alineanum"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVTotal" runat="server" ControlToValidate="txtTotal" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Total''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOTotal1" runat="server" Enabled="True" HighlightCssClass="vco" TargetControlID="RFVTotal" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</td>
|
||||
<td>
|
||||
<asp:RangeValidator ID="RVTotal" runat="server" ControlToValidate="txtTotal" Display="None" Type="Currency" MinimumValue="1" MaximumValue="2147483647" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Total''</b> no tiene el Formato Correcto." ValidationGroup="GrpGuardar"></asp:RangeValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOTotal2" runat="server" HighlightCssClass="vco" TargetControlID="RVTotal" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
<asp:Button ID="btnDividir" runat="server" Text="Dividir entre meses" OnClientClick="return dividir();" class="btn btn-primary" />
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="portlet-body" <%= IIf(chkexpand3.Checked = True, "", "style=""display:none;""")%>>
|
||||
|
||||
<table class="table table-advance ">
|
||||
<tr>
|
||||
<td>Enero</td>
|
||||
<td>
|
||||
<asp:TextBox runat="server" ID="txtEnero" ClientIDMode="Static" CssClass="alineanum"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVEnero" runat="server" ControlToValidate="txtEnero" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Total de Enero''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOEnero1" runat="server" Enabled="True" HighlightCssClass="vco" TargetControlID="RFVEnero" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
|
||||
<asp:RangeValidator ID="RVEnero" runat="server" ControlToValidate="txtEnero" Display="None" Type="Currency" MinimumValue="0" MaximumValue="2147483647" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Total de Enero''</b> no tiene el Formato Correcto." ValidationGroup="GrpGuardar"></asp:RangeValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOEnero2" runat="server" HighlightCssClass="vco" TargetControlID="RVEnero" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
|
||||
</td>
|
||||
<td>Abril</td>
|
||||
<td>
|
||||
<asp:TextBox runat="server" ID="txtAbril" ClientIDMode="Static" CssClass="alineanum"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVAbril" runat="server" ControlToValidate="txtAbril" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Total de Abril''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOAbril1" runat="server" Enabled="True" HighlightCssClass="vco" TargetControlID="RFVAbril" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
|
||||
<asp:RangeValidator ID="RVAbril" runat="server" ControlToValidate="txtAbril" Display="None" Type="Currency" MinimumValue="0" MaximumValue="2147483647" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Total de Abril''</b> no tiene el Formato Correcto." ValidationGroup="GrpGuardar"></asp:RangeValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOAbril2" runat="server" HighlightCssClass="vco" TargetControlID="RVAbril" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</td>
|
||||
<td>Julio</td>
|
||||
<td>
|
||||
<asp:TextBox runat="server" ID="txtJulio" ClientIDMode="Static" CssClass="alineanum"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVJulio" runat="server" ControlToValidate="txtJulio" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Total de Julio''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOJulio1" runat="server" Enabled="True" HighlightCssClass="vco" TargetControlID="RFVJulio" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
|
||||
<asp:RangeValidator ID="RVJulio" runat="server" ControlToValidate="txtJulio" Display="None" Type="Currency" MinimumValue="0" MaximumValue="2147483647" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Total de Julio''</b> no tiene el Formato Correcto." ValidationGroup="GrpGuardar"></asp:RangeValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOJulio2" runat="server" HighlightCssClass="vco" TargetControlID="RVJulio" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</td>
|
||||
<td>Octubre</td>
|
||||
<td>
|
||||
<asp:TextBox runat="server" ID="txtOctubre" ClientIDMode="Static" CssClass="alineanum"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVOctubre" runat="server" ControlToValidate="txtOctubre" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Total de Octubre''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOOctubre1" runat="server" Enabled="True" HighlightCssClass="vco" TargetControlID="RFVOctubre" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
|
||||
<asp:RangeValidator ID="RVOctubre" runat="server" ControlToValidate="txtOctubre" Display="None" Type="Currency" MinimumValue="0" MaximumValue="2147483647" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Total de Octubre''</b> no tiene el Formato Correcto." ValidationGroup="GrpGuardar"></asp:RangeValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOOctubre2" runat="server" HighlightCssClass="vco" TargetControlID="RVOctubre" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Febrero</td>
|
||||
<td>
|
||||
<asp:TextBox runat="server" ID="txtFebrero" ClientIDMode="Static" CssClass="alineanum"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVFebrero" runat="server" ControlToValidate="txtFebrero" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Total de Febrero''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOFebrero1" runat="server" Enabled="True" HighlightCssClass="vco" TargetControlID="RFVFebrero" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
|
||||
<asp:RangeValidator ID="RVFebrero" runat="server" ControlToValidate="txtFebrero" Display="None" Type="Currency" MinimumValue="0" MaximumValue="2147483647" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Total de Febrero''</b> no tiene el Formato Correcto." ValidationGroup="GrpGuardar"></asp:RangeValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOFebrero2" runat="server" HighlightCssClass="vco" TargetControlID="RVFebrero" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</td>
|
||||
<td>Mayo</td>
|
||||
<td>
|
||||
<asp:TextBox runat="server" ID="txtMayo" ClientIDMode="Static" CssClass="alineanum"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVMayo" runat="server" ControlToValidate="txtMayo" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Total de Mayo''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOMayo1" runat="server" Enabled="True" HighlightCssClass="vco" TargetControlID="RFVMayo" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
|
||||
<asp:RangeValidator ID="RVMayo" runat="server" ControlToValidate="txtMayo" Display="None" Type="Currency" MinimumValue="0" MaximumValue="2147483647" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Total de Mayo''</b> no tiene el Formato Correcto." ValidationGroup="GrpGuardar"></asp:RangeValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOMayo2" runat="server" HighlightCssClass="vco" TargetControlID="RVMayo" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</td>
|
||||
|
||||
|
||||
<td>Agosto</td>
|
||||
<td>
|
||||
<asp:TextBox runat="server" ID="txtAgosto" ClientIDMode="Static" CssClass="alineanum"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVAgosto" runat="server" ControlToValidate="txtAgosto" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Total de Agosto''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOAgosto1" runat="server" Enabled="True" HighlightCssClass="vco" TargetControlID="RFVAgosto" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
|
||||
<asp:RangeValidator ID="RVAgosto" runat="server" ControlToValidate="txtAgosto" Display="None" Type="Currency" MinimumValue="0" MaximumValue="2147483647" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Total de Agosto''</b> no tiene el Formato Correcto." ValidationGroup="GrpGuardar"></asp:RangeValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOAgosto2" runat="server" HighlightCssClass="vco" TargetControlID="RVAgosto" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</td>
|
||||
<td>Noviembre</td>
|
||||
<td>
|
||||
<asp:TextBox runat="server" ID="txtNoviembre" ClientIDMode="Static" CssClass="alineanum"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVNoviembre" runat="server" ControlToValidate="txtNoviembre" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Total de Noviembre''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCONoviembre1" runat="server" Enabled="True" HighlightCssClass="vco" TargetControlID="RFVNoviembre" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
|
||||
<asp:RangeValidator ID="RVNoviembre" runat="server" ControlToValidate="txtNoviembre" Display="None" Type="Currency" MinimumValue="0" MaximumValue="2147483647" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Total de Noviembre''</b> no tiene el Formato Correcto." ValidationGroup="GrpGuardar"></asp:RangeValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCONoviembre2" runat="server" HighlightCssClass="vco" TargetControlID="RVNoviembre" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Marzo</td>
|
||||
<td>
|
||||
<asp:TextBox runat="server" ID="txtMarzo" ClientIDMode="Static" CssClass="alineanum"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVMarzo" runat="server" ControlToValidate="txtMarzo" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Total de Marzo''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOMarzo1" runat="server" Enabled="True" HighlightCssClass="vco" TargetControlID="RFVMarzo" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
|
||||
<asp:RangeValidator ID="RVMarzo" runat="server" ControlToValidate="txtMarzo" Display="None" Type="Currency" MinimumValue="0" MaximumValue="2147483647" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Total de Marzo''</b> no tiene el Formato Correcto." ValidationGroup="GrpGuardar"></asp:RangeValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOMarzo2" runat="server" HighlightCssClass="vco" TargetControlID="RVMarzo" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</td>
|
||||
<td>Junio</td>
|
||||
<td>
|
||||
<asp:TextBox runat="server" ID="txtJunio" ClientIDMode="Static" CssClass="alineanum"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVJunio" runat="server" ControlToValidate="txtJunio" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Total de Junio''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOJunio1" runat="server" Enabled="True" HighlightCssClass="vco" TargetControlID="RFVJunio" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
|
||||
<asp:RangeValidator ID="RVJunio" runat="server" ControlToValidate="txtJunio" Display="None" Type="Currency" MinimumValue="0" MaximumValue="2147483647" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Total de Junio''</b> no tiene el Formato Correcto." ValidationGroup="GrpGuardar"></asp:RangeValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOJunio2" runat="server" HighlightCssClass="vco" TargetControlID="RVJunio" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</td>
|
||||
<td>Septiembre</td>
|
||||
<td>
|
||||
<asp:TextBox runat="server" ID="txtSeptiembre" ClientIDMode="Static" CssClass="alineanum"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVSeptiembre" runat="server" ControlToValidate="txtSeptiembre" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Total de Septiembre''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOSeptiembre1" runat="server" Enabled="True" HighlightCssClass="vco" TargetControlID="RFVSeptiembre" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
|
||||
<asp:RangeValidator ID="RVSeptiembre" runat="server" ControlToValidate="txtSeptiembre" Display="None" Type="Currency" MinimumValue="0" MaximumValue="2147483647" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Total de Septiembre''</b> no tiene el Formato Correcto." ValidationGroup="GrpGuardar"></asp:RangeValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOSeptiembre2" runat="server" HighlightCssClass="vco" TargetControlID="RVSeptiembre" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</td>
|
||||
<td>Diciembre</td>
|
||||
<td>
|
||||
<asp:TextBox runat="server" ID="txtDiciembre" ClientIDMode="Static" CssClass="alineanum"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVDiciembre" runat="server" ControlToValidate="txtDiciembre" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Total de Diciembre''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCODiciembre1" runat="server" Enabled="True" HighlightCssClass="vco" TargetControlID="RFVDiciembre" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
|
||||
<asp:RangeValidator ID="RVDiciembre" runat="server" ControlToValidate="txtDiciembre" Display="None" Type="Currency" MinimumValue="0" MaximumValue="2147483647" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Total de Diciembre''</b> no tiene el Formato Correcto." ValidationGroup="GrpGuardar"></asp:RangeValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCODiciembre2" runat="server" HighlightCssClass="vco" TargetControlID="RVDiciembre" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
function dividir() {
|
||||
var total = ToDouble($get('txtTotal').value.replace(/,/gi, ""));
|
||||
var mensual = (Math.round(total * 100 / 12)) / 100;
|
||||
var dic = total - (mensual * 11);
|
||||
|
||||
$get('txtEnero').value = FormatoNumero(mensual, 2);
|
||||
$get('txtFebrero').value = FormatoNumero(mensual, 2);
|
||||
$get('txtMarzo').value = FormatoNumero(mensual, 2);
|
||||
$get('txtAbril').value = FormatoNumero(mensual, 2);
|
||||
$get('txtMayo').value = FormatoNumero(mensual, 2);
|
||||
$get('txtJunio').value = FormatoNumero(mensual, 2);
|
||||
$get('txtJulio').value = FormatoNumero(mensual, 2);
|
||||
$get('txtAgosto').value = FormatoNumero(mensual, 2);
|
||||
$get('txtSeptiembre').value = FormatoNumero(mensual, 2);
|
||||
$get('txtOctubre').value = FormatoNumero(mensual, 2);
|
||||
$get('txtNoviembre').value = FormatoNumero(mensual, 2);
|
||||
$get('txtDiciembre').value = FormatoNumero(dic, 2);
|
||||
|
||||
$get('txtTotal').value = FormatoNumero((total * 1), 2);
|
||||
return false;
|
||||
}
|
||||
|
||||
function sumaTotal() {
|
||||
var total = 0;
|
||||
|
||||
total = total + ToDouble($get('txtEnero').value.replace(/,/gi, ""));
|
||||
total = total + ToDouble($get('txtFebrero').value.replace(/,/gi, ""));
|
||||
total = total + ToDouble($get('txtMarzo').value.replace(/,/gi, ""));
|
||||
total = total + ToDouble($get('txtAbril').value.replace(/,/gi, ""));
|
||||
total = total + ToDouble($get('txtMayo').value.replace(/,/gi, ""));
|
||||
total = total + ToDouble($get('txtJunio').value.replace(/,/gi, ""));
|
||||
total = total + ToDouble($get('txtJulio').value.replace(/,/gi, ""));
|
||||
total = total + ToDouble($get('txtAgosto').value.replace(/,/gi, ""));
|
||||
total = total + ToDouble($get('txtSeptiembre').value.replace(/,/gi, ""));
|
||||
total = total + ToDouble($get('txtOctubre').value.replace(/,/gi, ""));
|
||||
total = total + ToDouble($get('txtNoviembre').value.replace(/,/gi, ""));
|
||||
total = total + ToDouble($get('txtDiciembre').value.replace(/,/gi, ""));
|
||||
|
||||
$get('txtTotal').value = FormatoNumero((total), 2);
|
||||
}
|
||||
|
||||
</script>
|
||||
</asp:Content>
|
||||
299
AC/PresupuestoEgresos.aspx.vb
Normal file
299
AC/PresupuestoEgresos.aspx.vb
Normal file
@@ -0,0 +1,299 @@
|
||||
Option Explicit On
|
||||
Option Strict On
|
||||
|
||||
Imports System.Data
|
||||
Imports System.Linq
|
||||
Imports Extensiones
|
||||
Partial Class AC_PresupuestoEgresos2
|
||||
Inherits ClsPaginas
|
||||
|
||||
#Region "PROPIEDADES"
|
||||
Private Property CvePresupuestoEgresos As Integer
|
||||
Get
|
||||
CvePresupuestoEgresos = ViewState("CvePresupuestoEgresos").ToString.ToEntero
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
ViewState("CvePresupuestoEgresos") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private Property EsProyecto As Integer
|
||||
Get
|
||||
EsProyecto = ViewState("EsProyecto").ToString.ToEntero
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
ViewState("EsProyecto") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property Bloqueado As Integer
|
||||
Get
|
||||
Bloqueado = ViewState("Bloqueado").ToString.ToEntero
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
ViewState("Bloqueado") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
#End Region
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||
If Not Page.IsPostBack Then
|
||||
|
||||
CvePresupuestoEgresos = IfNull(Request("CvePresupuestoEgresos"), "0").ToString.ToEntero
|
||||
EsProyecto = IfNull(Request("EsProyecto"), "1").ToString.ToEntero
|
||||
Bloqueado = IfNull(Request("Bloqueado"), "0").ToString.ToEntero
|
||||
|
||||
CargaDefault()
|
||||
|
||||
If CvePresupuestoEgresos > 0 Then
|
||||
CargaDatos()
|
||||
End If
|
||||
|
||||
If Bloqueado = 1 Then
|
||||
btnGuardar.Visible = False
|
||||
btnDividir.Visible = False
|
||||
|
||||
CboProgramaOperativo.Enabled = False
|
||||
CboFuenteFinanciamiento.Enabled = False
|
||||
CboTipoGasto.Enabled = False
|
||||
CboUnidadAdministrativa.Enabled = False
|
||||
CboClasificacionOG.Enabled = False
|
||||
DdlEjercicio.Enabled = False
|
||||
|
||||
txtTotal.Enabled = False
|
||||
txtEnero.Enabled = False
|
||||
txtFebrero.Enabled = False
|
||||
txtMarzo.Enabled = False
|
||||
txtAbril.Enabled = False
|
||||
txtMayo.Enabled = False
|
||||
txtJunio.Enabled = False
|
||||
txtJulio.Enabled = False
|
||||
txtAgosto.Enabled = False
|
||||
txtSeptiembre.Enabled = False
|
||||
txtOctubre.Enabled = False
|
||||
txtNoviembre.Enabled = False
|
||||
txtDiciembre.Enabled = False
|
||||
BtnCancelar.Text = "Regresar"
|
||||
|
||||
If EsProyecto = 0 Then
|
||||
Alert("Este Anteproyecto ya se genero como Presupuesto.", TipoMensaje.MsgInformacion)
|
||||
Else
|
||||
Alert("Este Presupuesto ya se Autorizó.", TipoMensaje.MsgInformacion)
|
||||
End If
|
||||
End If
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
|
||||
#Region " VALORES INICIALES "
|
||||
|
||||
Private Sub CargaDefault()
|
||||
txtEnero.Attributes.Add("onKeyUp", "sumaTotal();")
|
||||
txtFebrero.Attributes.Add("onKeyUp", "sumaTotal();")
|
||||
txtMarzo.Attributes.Add("onKeyUp", "sumaTotal();")
|
||||
txtAbril.Attributes.Add("onKeyUp", "sumaTotal();")
|
||||
txtMayo.Attributes.Add("onKeyUp", "sumaTotal();")
|
||||
txtJunio.Attributes.Add("onKeyUp", "sumaTotal();")
|
||||
txtJulio.Attributes.Add("onKeyUp", "sumaTotal();")
|
||||
txtAgosto.Attributes.Add("onKeyUp", "sumaTotal();")
|
||||
txtSeptiembre.Attributes.Add("onKeyUp", "sumaTotal();")
|
||||
txtOctubre.Attributes.Add("onKeyUp", "sumaTotal();")
|
||||
txtNoviembre.Attributes.Add("onKeyUp", "sumaTotal();")
|
||||
txtDiciembre.Attributes.Add("onKeyUp", "sumaTotal();")
|
||||
|
||||
CargaEjercicios()
|
||||
CargaProgramaOperativo()
|
||||
CargaFuenteFinanciamiento()
|
||||
CargaTipoGasto()
|
||||
CargaUnidadAdministrativa()
|
||||
CargaClasificacionOG()
|
||||
End Sub
|
||||
|
||||
#Region "COMBOS"
|
||||
Private Sub CargaEjercicios()
|
||||
Dim ClsConta As New ClsContPAQi(UsuarioActual.Empresa)
|
||||
If ClsConta.GetEjercicios() Then
|
||||
DdlEjercicio.DataSource = ClsConta.DtResultados
|
||||
Else
|
||||
DdlEjercicio.DataSource = Nothing
|
||||
End If
|
||||
ClsConta.Dispose()
|
||||
DdlEjercicio.DataBind()
|
||||
|
||||
DdlEjercicio.SelectedValueExist(UsuarioActual.Empresa.EjercicioActual.ToString)
|
||||
End Sub
|
||||
Private Sub CargaProgramaOperativo()
|
||||
CboProgramaOperativo.Items.Clear()
|
||||
CboProgramaOperativo.DataSource = GlobalDTAC_ProgramaOperativo(UsuarioActual.CveEmpresa).FiltraParametros(String.Format("Ejercicio = {0} AND Bloqueado = 1", DdlEjercicio.SelectedValue.ToEntero))
|
||||
CboProgramaOperativo.DataBind()
|
||||
CboProgramaOperativo.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
End Sub
|
||||
|
||||
Private Sub CargaFuenteFinanciamiento()
|
||||
CboFuenteFinanciamiento.DataSource = GlobalDTAC_FuentesFinanciamiento(UsuarioActual.CveEmpresa)
|
||||
CboFuenteFinanciamiento.DataBind()
|
||||
CboFuenteFinanciamiento.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
End Sub
|
||||
|
||||
Private Sub CargaTipoGasto()
|
||||
CboTipoGasto.DataSource = GlobalDTAC_TipoGasto
|
||||
CboTipoGasto.DataBind()
|
||||
CboTipoGasto.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
End Sub
|
||||
|
||||
Private Sub CargaUnidadAdministrativa()
|
||||
CboUnidadAdministrativa.DataSource = GlobalDTAC_UnidadesAdministrativas(UsuarioActual.CveEmpresa)
|
||||
CboUnidadAdministrativa.DataBind()
|
||||
CboUnidadAdministrativa.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
End Sub
|
||||
|
||||
Private Sub CargaClasificacionOG()
|
||||
Dim Filtro As New StringBuilder
|
||||
Filtro.AppendFormat("Afectable = {0}", "True")
|
||||
CboClasificacionOG.DataSource = GlobalDTACClasificadorObjetoGasto(UsuarioActual.CveEmpresa).FiltraParametros(Filtro.ToString, "CodigoClasificacion")
|
||||
CboClasificacionOG.DataBind()
|
||||
CboClasificacionOG.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
#End Region
|
||||
|
||||
Protected Sub DdlEjercicio_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||
CargaProgramaOperativo()
|
||||
End Sub
|
||||
|
||||
Public Sub CargaDatos()
|
||||
Dim objAC As New ClsAC
|
||||
If objAC.GetPresupuestoEgresos(CvePresupuestoEgresos, CBool(EsProyecto), -1, UsuarioActual.CveEmpresa) Then
|
||||
If objAC.DtResultados.Rows.Count = 1 Then
|
||||
DdlEjercicio.SelectedValue = objAC.DtResultados.Rows(0)("Ejercicio").ToString
|
||||
CargaProgramaOperativo()
|
||||
CboProgramaOperativo.SelectedValue = objAC.DtResultados.Rows(0)("CveProgramaOperativo").ToString
|
||||
|
||||
CboFuenteFinanciamiento.SelectedValue = objAC.DtResultados.Rows(0)("CveFuenteFinanciamiento").ToString
|
||||
CboTipoGasto.SelectedValue = objAC.DtResultados.Rows(0)("CveTipoGasto").ToString
|
||||
CboUnidadAdministrativa.SelectedValue = objAC.DtResultados.Rows(0)("CveUnidadAdministrativa").ToString
|
||||
CboClasificacionOG.SelectedValue = objAC.DtResultados.Rows(0)("CveClasificacion").ToString
|
||||
|
||||
txtTotal.Text = objAC.DtResultados.Rows(0)("Total").ToString.FormatoNumero
|
||||
txtEnero.Text = objAC.DtResultados.Rows(0)("Enero").ToString.FormatoNumero
|
||||
txtFebrero.Text = objAC.DtResultados.Rows(0)("Febrero").ToString.FormatoNumero
|
||||
txtMarzo.Text = objAC.DtResultados.Rows(0)("Marzo").ToString.FormatoNumero
|
||||
txtAbril.Text = objAC.DtResultados.Rows(0)("Abril").ToString.FormatoNumero
|
||||
txtMayo.Text = objAC.DtResultados.Rows(0)("Mayo").ToString.FormatoNumero
|
||||
txtJunio.Text = objAC.DtResultados.Rows(0)("Junio").ToString.FormatoNumero
|
||||
txtJulio.Text = objAC.DtResultados.Rows(0)("Julio").ToString.FormatoNumero
|
||||
txtAgosto.Text = objAC.DtResultados.Rows(0)("Agosto").ToString.FormatoNumero
|
||||
txtSeptiembre.Text = objAC.DtResultados.Rows(0)("Septiembre").ToString.FormatoNumero
|
||||
txtOctubre.Text = objAC.DtResultados.Rows(0)("Octubre").ToString.FormatoNumero
|
||||
txtNoviembre.Text = objAC.DtResultados.Rows(0)("Noviembre").ToString.FormatoNumero
|
||||
txtDiciembre.Text = objAC.DtResultados.Rows(0)("Diciembre").ToString.FormatoNumero
|
||||
End If
|
||||
End If
|
||||
objAC.Dispose()
|
||||
End Sub
|
||||
|
||||
|
||||
Protected Sub btnGuardar_Click(sender As Object, e As EventArgs) Handles btnGuardar.Click
|
||||
Dim objAC As New ClsAC()
|
||||
|
||||
'Valida Ejercicio
|
||||
If objAC.GetEjerciciosPresupuestoEgresos(UsuarioActual.CveEmpresa) AndAlso objAC.DtResultados.Rows.Count > -1 Then
|
||||
Dim DtEjercicios = objAC.DtResultados.FiltraParametros(String.Format("Ejercicio = {0}", DdlEjercicio.SelectedValue))
|
||||
If DtEjercicios.Rows.Count > 0 AndAlso DtEjercicios.Rows(0)("Bloqueado").ToString = "1" AndAlso txtTotal.Text.ToDecimal > 0 Then
|
||||
Alert("El Presupuesto de Egresos del ejercicio seleccionado ya esta bloqueado, solo puede generar Presupuestos en ceros.", TipoMensaje.MsgAdvertencia)
|
||||
objAC.Dispose()
|
||||
Exit Sub
|
||||
End If
|
||||
Else
|
||||
Alert("Ocurrió un error al verificar el Ejercicio. Por favor vuelva a intentar.", TipoMensaje.MsgError)
|
||||
objAC.Dispose()
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
Dim Total As Double = txtTotal.Text.ToDouble
|
||||
Dim Enero As Double = txtEnero.Text.ToDouble
|
||||
Dim Febrero As Double = txtFebrero.Text.ToDouble
|
||||
Dim Marzo As Double = txtMarzo.Text.ToDouble
|
||||
Dim Abril As Double = txtAbril.Text.ToDouble
|
||||
Dim Mayo As Double = txtMayo.Text.ToDouble
|
||||
Dim Junio As Double = txtJunio.Text.ToDouble
|
||||
Dim Julio As Double = txtJulio.Text.ToDouble
|
||||
Dim Agosto As Double = txtAgosto.Text.ToDouble
|
||||
Dim Septiembre As Double = txtSeptiembre.Text.ToDouble
|
||||
Dim Octubre As Double = txtOctubre.Text.ToDouble
|
||||
Dim Noviembre As Double = txtNoviembre.Text.ToDouble
|
||||
Dim Diciembre As Double = txtDiciembre.Text.ToDouble
|
||||
|
||||
' Dim Ejercicio As Integer = 2015
|
||||
Dim CveProgramaOperativo As Integer = CboProgramaOperativo.SelectedValue.ToString.ToEntero
|
||||
Dim CveFuenteFinanciamiento As Integer = CboFuenteFinanciamiento.SelectedValue.ToString.ToEntero
|
||||
Dim CveTipoGasto As Integer = CboTipoGasto.SelectedValue.ToString.ToEntero
|
||||
Dim CveUnidadAdministrativa As Integer = CboUnidadAdministrativa.SelectedValue.ToString.ToEntero
|
||||
Dim CveClasificacionOG As Integer = CboClasificacionOG.SelectedValue.ToString.ToEntero
|
||||
|
||||
If CvePresupuestoEgresos = 0 Then
|
||||
If objAC.AddPresupuestoEgresos(DdlEjercicio.SelectedValue.ToEntero, CveProgramaOperativo, CveFuenteFinanciamiento, CveTipoGasto, CveUnidadAdministrativa, CveClasificacionOG, Total, Enero, Febrero, Marzo, Abril, Mayo, Junio, Julio, Agosto, Septiembre, Octubre, Noviembre, Diciembre, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) > 0 Then
|
||||
Alert("El Presupuesto de Egreso se guardo Correctamente como Anteproyecto", TipoMensaje.MsgInformacion) '"document.location.href=""/AC/CatPresupuestoEgresos.aspx"""
|
||||
Limpia()
|
||||
End If
|
||||
Else
|
||||
If objAC.UpdatePresupuestoEgresos(CvePresupuestoEgresos, CveProgramaOperativo, CveFuenteFinanciamiento, CveTipoGasto, CveUnidadAdministrativa, CveClasificacionOG, Total, Enero, Febrero, Marzo, Abril, Mayo, Junio, Julio, Agosto, Septiembre, Octubre, Noviembre, Diciembre) Then
|
||||
Alert("El Presupuesto de Egreso se actualizo Correctamente", TipoMensaje.MsgInformacion, "document.location.href=""/AC/CatPresupuestoEgresos.aspx""")
|
||||
End If
|
||||
End If
|
||||
objAC.Dispose()
|
||||
End Sub
|
||||
|
||||
Private Sub Limpia()
|
||||
txtTotal.Text = ""
|
||||
txtEnero.Text = ""
|
||||
txtFebrero.Text = ""
|
||||
txtMarzo.Text = ""
|
||||
txtAbril.Text = ""
|
||||
txtMayo.Text = ""
|
||||
txtJunio.Text = ""
|
||||
txtJulio.Text = ""
|
||||
txtAgosto.Text = ""
|
||||
txtSeptiembre.Text = ""
|
||||
txtOctubre.Text = ""
|
||||
txtNoviembre.Text = ""
|
||||
txtDiciembre.Text = ""
|
||||
|
||||
CboClasificacionOG.SelectedValue = "-1"
|
||||
End Sub
|
||||
Protected Sub BtnProyecto_Click(sender As Object, e As EventArgs)
|
||||
Dim AC As New ClsAC
|
||||
Dim Total As Double = txtTotal.Text.ToDouble
|
||||
Dim Enero As Double = txtEnero.Text.ToDouble
|
||||
Dim Febrero As Double = txtFebrero.Text.ToDouble
|
||||
Dim Marzo As Double = txtMarzo.Text.ToDouble
|
||||
Dim Abril As Double = txtAbril.Text.ToDouble
|
||||
Dim Mayo As Double = txtMayo.Text.ToDouble
|
||||
Dim Junio As Double = txtJunio.Text.ToDouble
|
||||
Dim Julio As Double = txtJulio.Text.ToDouble
|
||||
Dim Agosto As Double = txtAgosto.Text.ToDouble
|
||||
Dim Septiembre As Double = txtSeptiembre.Text.ToDouble
|
||||
Dim Octubre As Double = txtOctubre.Text.ToDouble
|
||||
Dim Noviembre As Double = txtNoviembre.Text.ToDouble
|
||||
Dim Diciembre As Double = txtDiciembre.Text.ToDouble
|
||||
|
||||
'Dim Ejercicio As Integer = 2015
|
||||
Dim CveProgramaOperativo As Integer = CboProgramaOperativo.SelectedValue.ToString.ToEntero
|
||||
Dim CveFuenteFinanciamiento As Integer = CboFuenteFinanciamiento.SelectedValue.ToString.ToEntero
|
||||
Dim CveTipoGasto As Integer = CboTipoGasto.SelectedValue.ToString.ToEntero
|
||||
Dim CveUnidadAdministrativa As Integer = CboUnidadAdministrativa.SelectedValue.ToString.ToEntero
|
||||
Dim CveClasificacionOG As Integer = CboClasificacionOG.SelectedValue.ToString.ToEntero
|
||||
|
||||
If CvePresupuestoEgresos > 0 Then
|
||||
If AC.ProyectoPresupuestoEgresos(DdlEjercicio.SelectedValue.ToEntero, CveProgramaOperativo, CveFuenteFinanciamiento, CveTipoGasto, CveUnidadAdministrativa, CveClasificacionOG, Total, Enero, Febrero, Marzo, Abril, Mayo, Junio, Julio, Agosto, Septiembre, Octubre, Noviembre, Diciembre, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CvePresupuestoEgresos) Then
|
||||
Alert("El Presupuesto de Egreso se ACTUALIZO Correctamente como PROYECTO", TipoMensaje.MsgInformacion, "document.location.href=""/AC/CatPresupuestoEgresos.aspx""")
|
||||
End If
|
||||
Else
|
||||
Alert("ERROR", TipoMensaje.MsgError)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
396
AC/PresupuestoEgresosAnterior.aspx.exclude
Normal file
396
AC/PresupuestoEgresosAnterior.aspx.exclude
Normal file
@@ -0,0 +1,396 @@
|
||||
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="PresupuestoEgresosAnterior.aspx.vb" Inherits="AC_PresupuestoEgresos" %>
|
||||
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
|
||||
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="H" Runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="E" Runat="Server">
|
||||
Catálogo de Departamentos
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="C" Runat="Server">
|
||||
<script language="javascript" type="text/javascript">
|
||||
function C() {
|
||||
return confirm('¿Está seguro que desea eliminar el Departamento?');
|
||||
}
|
||||
</script>
|
||||
<asp:UpdatePanel ID="UpTitulos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<table border="1" rules="all" style="border-collapse: collapse; width: 2800px;">
|
||||
<tr class="Titulos">
|
||||
<td width="90px"><asp:LinkButton ID="LbProgramaOperativo" runat="server" CausesValidation="false" Text="Programa Operativo"></asp:LinkButton> <asp:ImageButton ID="ImgProgramaOperativo" runat="server" CausesValidation="false" ImageUrl="/Imagenes/FlechasAbajo.gif" /></td>
|
||||
<td width="100px"><asp:LinkButton ID="LbFuenteFinanciamiento" runat="server" CausesValidation="false" Text="Fuente de Financiamiento"></asp:LinkButton> <asp:ImageButton ID="ImgFuenteFinanciamiento" runat="server" CausesValidation="false" ImageUrl="/Imagenes/FlechasAbajo.gif" /></td>
|
||||
<td width="100px"><asp:LinkButton ID="LbTipoGasto" runat="server" CausesValidation="false" Text="Tipo de Gasto"></asp:LinkButton> <asp:ImageButton ID="ImgTipoGasto" runat="server" CausesValidation="false" ImageUrl="/Imagenes/FlechasAbajo.gif" /></td>
|
||||
<td width="100px"><asp:LinkButton ID="LbUnidadAdministrativa" runat="server" CausesValidation="false" Text="Unidad Administrativa"></asp:LinkButton> <asp:ImageButton ID="ImgUnidadAdministrativa" runat="server" CausesValidation="false" ImageUrl="/Imagenes/FlechasAbajo.gif" /></td>
|
||||
<td width="100px"><asp:LinkButton ID="LbOGClasificacion" runat="server" CausesValidation="false" Text="Clasificación del Objeto del Gasto"></asp:LinkButton> <asp:ImageButton ID="ImgOGClasificacion" runat="server" CausesValidation="false" ImageUrl="/Imagenes/FlechasAbajo.gif" /></td>
|
||||
<td width="66px"><asp:LinkButton ID="LbTotal" runat="server" CausesValidation="false" Text="Total"></asp:LinkButton> <asp:ImageButton ID="ImgTotal" runat="server" CausesValidation="false" ImageUrl="/Imagenes/FlechasAbajo.gif" /></td>
|
||||
<td width="66px"><asp:LinkButton ID="LbEnero" runat="server" CausesValidation="false" Text="Enero"></asp:LinkButton> <asp:ImageButton ID="ImgEnero" runat="server" CausesValidation="false" ImageUrl="/Imagenes/FlechasAbajo.gif" /></td>
|
||||
<td width="66px"><asp:LinkButton ID="LbFebrero" runat="server" CausesValidation="false" Text="Febrero"></asp:LinkButton> <asp:ImageButton ID="ImgFebrero" runat="server" CausesValidation="false" ImageUrl="/Imagenes/FlechasAbajo.gif" /></td>
|
||||
<td width="66px"><asp:LinkButton ID="LbMarzo" runat="server" CausesValidation="false" Text="Marzo"></asp:LinkButton> <asp:ImageButton ID="ImgMarzo" runat="server" CausesValidation="false" ImageUrl="/Imagenes/FlechasAbajo.gif" /></td>
|
||||
<td width="66px"><asp:LinkButton ID="LbAbril" runat="server" CausesValidation="false" Text="Abril"></asp:LinkButton> <asp:ImageButton ID="ImgAbril" runat="server" CausesValidation="false" ImageUrl="/Imagenes/FlechasAbajo.gif" /></td>
|
||||
<td width="66px"><asp:LinkButton ID="LbMayo" runat="server" CausesValidation="false" Text="Mayo"></asp:LinkButton> <asp:ImageButton ID="ImgMayo" runat="server" CausesValidation="false" ImageUrl="/Imagenes/FlechasAbajo.gif" /></td>
|
||||
<td width="66px"><asp:LinkButton ID="LbJunio" runat="server" CausesValidation="false" Text="Junio"></asp:LinkButton> <asp:ImageButton ID="ImgJunio" runat="server" CausesValidation="false" ImageUrl="/Imagenes/FlechasAbajo.gif" /></td>
|
||||
<td width="66px"><asp:LinkButton ID="LbJulio" runat="server" CausesValidation="false" Text="Julio"></asp:LinkButton> <asp:ImageButton ID="ImgJulio" runat="server" CausesValidation="false" ImageUrl="/Imagenes/FlechasAbajo.gif" /></td>
|
||||
<td width="66px"><asp:LinkButton ID="LbAgosto" runat="server" CausesValidation="false" Text="Agosto"></asp:LinkButton> <asp:ImageButton ID="ImgAgosto" runat="server" CausesValidation="false" ImageUrl="/Imagenes/FlechasAbajo.gif" /></td>
|
||||
<td width="80px"><asp:LinkButton ID="LbSeptiembre" runat="server" CausesValidation="false" Text="Septiembre"></asp:LinkButton> <asp:ImageButton ID="ImgSeptiembre" runat="server" CausesValidation="false" ImageUrl="/Imagenes/FlechasAbajo.gif" /></td>
|
||||
<td width="66px"><asp:LinkButton ID="LbOctubre" runat="server" CausesValidation="false" Text="Octubre"></asp:LinkButton> <asp:ImageButton ID="ImgOctubre" runat="server" CausesValidation="false" ImageUrl="/Imagenes/FlechasAbajo.gif" /></td>
|
||||
<td width="75px"><asp:LinkButton ID="LbNoviembre" runat="server" CausesValidation="false" Text="Noviembre"></asp:LinkButton> <asp:ImageButton ID="ImgNoviembre" runat="server" CausesValidation="false" ImageUrl="/Imagenes/FlechasAbajo.gif" /></td>
|
||||
<td width="70px"><asp:LinkButton ID="LbDiciembre" runat="server" CausesValidation="false" Text="Diciembre"></asp:LinkButton> <asp:ImageButton ID="ImgDiciembre" runat="server" CausesValidation="false" ImageUrl="/Imagenes/FlechasAbajo.gif" /></td>
|
||||
<td width="100px"><asp:LinkButton ID="LbFechaIng" runat="server" CausesValidation="false" Text="Fecha Ing"></asp:LinkButton> <asp:ImageButton ID="ImgFechaIng" runat="server" CausesValidation="false" ImageUrl="/Imagenes/FlechasAbajo.gif" /></td>
|
||||
<td width="100px"><asp:LinkButton ID="LbUsuario" runat="server" CausesValidation="false" Text="Usuario"></asp:LinkButton> <asp:ImageButton ID="ImgUsuario" runat="server" CausesValidation="false" ImageUrl="/Imagenes/FlechasAbajo.gif" /></td>
|
||||
<td width="103">Comandos</td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<asp:DropDownList ID="DdlProgramaOperativo" runat="server" AppendDataBoundItems="true" AutoPostBack="true" DataTextField="ProgramaOperativo" DataValueField="CveProgramaOperativo" Width="90px" ValidationGroup="GrpGuardar">
|
||||
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RFVProgramaOperativo" runat="server" ControlToValidate="DdlProgramaOperativo" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Tipo de Activo Fijo''</b> es necesario, por favor seleccione uno." InitialValue="-1" ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOProgramaOperativo" runat="server" HighlightCssClass="vco" TargetControlID="RFVProgramaOperativo" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</td>
|
||||
<td>
|
||||
<asp:DropDownList ID="DdlFuenteFinanciamiento" runat="server" AppendDataBoundItems="true" AutoPostBack="true" DataTextField="FuenteFinanciamiento" DataValueField="CveFuenteFinanciamiento" Width="110px" ValidationGroup="GrpGuardar">
|
||||
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RFVFuenteFinanciamiento" runat="server" ControlToValidate="DdlFuenteFinanciamiento" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Tipo de Activo Fijo''</b> es necesario, por favor seleccione uno." InitialValue="-1" ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOFuenteFinanciamiento" runat="server" HighlightCssClass="vco" TargetControlID="RFVFuenteFinanciamiento" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</td>
|
||||
<td>
|
||||
<asp:DropDownList ID="DdlTipoGasto" runat="server" AppendDataBoundItems="true" AutoPostBack="true" DataTextField="TipoGasto" DataValueField="CveTipoGasto" Width="110px" ValidationGroup="GrpGuardar">
|
||||
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RFVTipoGasto" runat="server" ControlToValidate="DdlTipoGasto" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Tipo de Activo Fijo''</b> es necesario, por favor seleccione uno." InitialValue="-1" ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOTipoGasto" runat="server" HighlightCssClass="vco" TargetControlID="RFVTipoGasto" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</td>
|
||||
<td>
|
||||
<asp:DropDownList ID="DdlUnidadAdministrativa" runat="server" AppendDataBoundItems="true" AutoPostBack="true" DataTextField="UnidadAdministrativa" DataValueField="CveUnidadAdministrativa" Width="110px" ValidationGroup="GrpGuardar">
|
||||
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RFVUnidadAdministrativa" runat="server" ControlToValidate="DdlUnidadAdministrativa" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Tipo de Activo Fijo''</b> es necesario, por favor seleccione uno." InitialValue="-1" ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOUnidadAdministrativa" runat="server" HighlightCssClass="vco" TargetControlID="RFVUnidadAdministrativa" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</td>
|
||||
<td>
|
||||
<asp:DropDownList ID="DdlClasificadorOG" runat="server" AppendDataBoundItems="true" AutoPostBack="true" DataTextField="CodigoClasificador" DataValueField="CveClasificadorOG" Width="120px" ValidationGroup="GrpGuardar">
|
||||
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RFVOGClasificacion" runat="server" ControlToValidate="DdlClasificadorOG" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Clasificador Objeto del Gasto''</b> es necesario, por favor seleccione uno." InitialValue="-1" ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOOGClasificacion" runat="server" HighlightCssClass="vco" TargetControlID="RFVOGClasificacion" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</td>
|
||||
<td>
|
||||
<asp:TextBox ID="TxtTotal" runat="server" CausesValidation="true" MaxLength="50" ValidationGroup="GrpGuardar" Width="60px"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVTotal" runat="server" ControlToValidate="TxtTotal" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Total''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCTotal" runat="server" HighlightCssClass="vco" TargetControlID="RFVTotal" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</td>
|
||||
<td>
|
||||
<asp:TextBox ID="TxtEnero" runat="server" CausesValidation="true" MaxLength="50" ValidationGroup="GrpGuardar" Width="60px"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVEnero" runat="server" ControlToValidate="TxtEnero" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Enero''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCEnero" runat="server" HighlightCssClass="vco" TargetControlID="RFVEnero" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</td>
|
||||
<td>
|
||||
<asp:TextBox ID="TxtFebrero" runat="server" CausesValidation="true" MaxLength="50" ValidationGroup="GrpGuardar" Width="60px"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVFebrero" runat="server" ControlToValidate="TxtFebrero" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Febrero''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCFebrero" runat="server" HighlightCssClass="vco" TargetControlID="RFVFebrero" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</td>
|
||||
<td>
|
||||
<asp:TextBox ID="TxtMarzo" runat="server" CausesValidation="true" MaxLength="50" ValidationGroup="GrpGuardar" Width="60px"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVMarzo" runat="server" ControlToValidate="TxtMarzo" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Marzo''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCMarzo" runat="server" HighlightCssClass="vco" TargetControlID="RFVMarzo" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</td>
|
||||
<td>
|
||||
<asp:TextBox ID="TxtAbril" runat="server" CausesValidation="true" MaxLength="50" ValidationGroup="GrpGuardar" Width="60px"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVAbril" runat="server" ControlToValidate="TxtAbril" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Abril''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCAbril" runat="server" HighlightCssClass="vco" TargetControlID="RFVAbril" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</td>
|
||||
<td>
|
||||
<asp:TextBox ID="TxtMayo" runat="server" CausesValidation="true" MaxLength="50" ValidationGroup="GrpGuardar" Width="60px"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVMayo" runat="server" ControlToValidate="TxtMayo" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Mayo''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCMayo" runat="server" HighlightCssClass="vco" TargetControlID="RFVMayo" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</td>
|
||||
<td>
|
||||
<asp:TextBox ID="TxtJunio" runat="server" CausesValidation="true" MaxLength="50" ValidationGroup="GrpGuardar" Width="60px"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVJunio" runat="server" ControlToValidate="TxtJunio" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Junio''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCJunio" runat="server" HighlightCssClass="vco" TargetControlID="RFVJunio" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</td>
|
||||
<td>
|
||||
<asp:TextBox ID="TxtJulio" runat="server" CausesValidation="true" MaxLength="50" ValidationGroup="GrpGuardar" Width="60px"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVJulio" runat="server" ControlToValidate="TxtJulio" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Julio''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCJulio" runat="server" HighlightCssClass="vco" TargetControlID="RFVJulio" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</td>
|
||||
<td>
|
||||
<asp:TextBox ID="TxtAgosto" runat="server" CausesValidation="true" MaxLength="50" ValidationGroup="GrpGuardar" Width="60px"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVAgosto" runat="server" ControlToValidate="TxtAgosto" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Agosto''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCAgosto" runat="server" HighlightCssClass="vco" TargetControlID="RFVAgosto" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</td>
|
||||
<td>
|
||||
<asp:TextBox ID="TxtSeptiembre" runat="server" CausesValidation="true" MaxLength="50" ValidationGroup="GrpGuardar" Width="74px"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVSeptiembre" runat="server" ControlToValidate="TxtSeptiembre" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Septiembre''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCSeptiembre" runat="server" HighlightCssClass="vco" TargetControlID="RFVSeptiembre" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</td>
|
||||
<td>
|
||||
<asp:TextBox ID="TxtOctubre" runat="server" CausesValidation="true" MaxLength="50" ValidationGroup="GrpGuardar" Width="60px"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVOctubre" runat="server" ControlToValidate="TxtOctubre" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Octubre''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOctubre" runat="server" HighlightCssClass="vco" TargetControlID="RFVOctubre" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</td>
|
||||
<td>
|
||||
<asp:TextBox ID="TxtNoviembre" runat="server" CausesValidation="true" MaxLength="50" ValidationGroup="GrpGuardar" Width="69px"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVNoviembre" runat="server" ControlToValidate="TxtNoviembre" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Noviembre''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCNoviembre" runat="server" HighlightCssClass="vco" TargetControlID="RFVNoviembre" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</td>
|
||||
<td>
|
||||
<asp:TextBox ID="TxtDiciembre" runat="server" CausesValidation="true" MaxLength="50" ValidationGroup="GrpGuardar" Width="64px"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVDiciembre" runat="server" ControlToValidate="TxtDiciembre" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Diciembre''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCDiciembre" runat="server" HighlightCssClass="vco" TargetControlID="RFVDiciembre" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td><asp:LinkButton ID="LbAgregar" runat="server" CausesValidation="true" CssClass="Texto" Text="Agregar" ValidationGroup="GrpGuardar"></asp:LinkButton></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" DataKeyNames="CveFuenteFinanciamiento,CvePresupuestoEgreso,IdCuentaAprobado,IdCuentaPorEjercer,IdCuentaComprometido,IdCuentaDevengado,IdCuentaEjercido,IdCuentaPagado,ClaveProgramaOperativo,ClasificadorOG,CodigoCOG,Total" EmptyDataText="No se encontraron Departamentos Registrados" ToolTip="Listado de Departamentos" Width="2800px">
|
||||
<Columns>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate> <asp:Literal ID="LtlPO" runat="server" Text='<%# Eval("ProgramaOperativo", "{0}")%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<EditItemTemplate>
|
||||
<asp:DropDownList ID="DdlProgramaOperativo" runat="server" AppendDataBoundItems="true" AutoPostBack="true" DataTextField="ProgramaOperativo" DataValueField="CveProgramaOperativo" Width="90px" ValidationGroup="GrpGuardar">
|
||||
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RFVProgramaOperativo" runat="server" ControlToValidate="DdlProgramaOperativo" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Tipo de Activo Fijo''</b> es necesario, por favor seleccione uno." InitialValue="-1" ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOProgramaOperativo" runat="server" HighlightCssClass="vco" TargetControlID="RFVProgramaOperativo" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</EditItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate> <asp:Literal ID="LtlFF" runat="server" Text='<%# Eval("FuenteFinanciamiento", "{0}")%>'></asp:Literal></ItemTemplate>
|
||||
<EditItemTemplate>
|
||||
|
||||
<asp:DropDownList ID="DdlFuenteFinanciamiento" runat="server" AppendDataBoundItems="true" AutoPostBack="true" DataTextField="FuenteFinanciamiento" DataValueField="CveFuenteFinanciamiento" Width="110px" ValidationGroup="GrpGuardar">
|
||||
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RFVFuenteFinanciamiento" runat="server" ControlToValidate="DdlFuenteFinanciamiento" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Tipo de Activo Fijo''</b> es necesario, por favor seleccione uno." InitialValue="-1" ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOFuenteFinanciamiento" runat="server" HighlightCssClass="vco" TargetControlID="RFVFuenteFinanciamiento" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</EditItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate> <asp:Literal ID="LtlTG" runat="server" Text='<%# Eval("TipoGasto")%>'></asp:Literal></ItemTemplate>
|
||||
<EditItemTemplate>
|
||||
<asp:DropDownList ID="DdlTipoGasto" runat="server" AppendDataBoundItems="true" AutoPostBack="true" DataTextField="TipoGasto" DataValueField="CveTipoGasto" Width="110px" ValidationGroup="GrpGuardar">
|
||||
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RFVTipoGasto" runat="server" ControlToValidate="DdlTipoGasto" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Tipo de Activo Fijo''</b> es necesario, por favor seleccione uno." InitialValue="-1" ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOTipoGasto" runat="server" HighlightCssClass="vco" TargetControlID="RFVTipoGasto" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</EditItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate> <asp:Literal ID="LtlUA" runat="server" Text='<%# Eval("UnidadAdministrativa")%>'></asp:Literal></ItemTemplate>
|
||||
<EditItemTemplate>
|
||||
<asp:DropDownList ID="DdlUnidadAdministrativa" runat="server" AppendDataBoundItems="true" AutoPostBack="true" DataTextField="UnidadAdministrativa" DataValueField="CveUnidadAdministrativa" Width="110px" ValidationGroup="GrpGuardar">
|
||||
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RFVUnidadAdministrativa" runat="server" ControlToValidate="DdlUnidadAdministrativa" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Tipo de Activo Fijo''</b> es necesario, por favor seleccione uno." InitialValue="-1" ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOUnidadAdministrativa" runat="server" HighlightCssClass="vco" TargetControlID="RFVUnidadAdministrativa" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</EditItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate> <asp:Literal ID="LtlCOG" runat="server" Text='<%# Eval("ClasificadorOGRep")%>'></asp:Literal></ItemTemplate>
|
||||
<EditItemTemplate>
|
||||
|
||||
<asp:DropDownList ID="DdlOGClasificacion" runat="server" AppendDataBoundItems="true" AutoPostBack="true" DataTextField="OGClasificacion" DataValueField="CveOGClasificacion" Width="120px" ValidationGroup="GrpGuardar">
|
||||
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RFVOGClasificacion" runat="server" ControlToValidate="DdlOGClasificacion" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Tipo de Activo Fijo''</b> es necesario, por favor seleccione uno." InitialValue="-1" ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOOGClasificacion" runat="server" HighlightCssClass="vco" TargetControlID="RFVOGClasificacion" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</EditItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlTotal" runat="server" Text='<%# Eval("Total", "{0:N2}")%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<EditItemTemplate>
|
||||
<asp:TextBox ID="TxtTotal" runat="server" CausesValidation="true" MaxLength="50" Text='<%# Eval("Total") %>' ValidationGroup="GrpGV" Width="60px"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVTotal" runat="server" ControlToValidate="TxtTotal" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Total''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGV"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCTotal" runat="server" HighlightCssClass="vco" TargetControlID="RFVTotal" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</EditItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlEnero" runat="server" Text='<%# Eval("Enero", "{0:N2}")%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<EditItemTemplate>
|
||||
<asp:TextBox ID="TxtEnero" runat="server" CausesValidation="true" MaxLength="50" Text='<%# Eval("Enero") %>' ValidationGroup="GrpGV" Width="60px"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVEnero" runat="server" ControlToValidate="TxtEnero" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Enero''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGV"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCEnero" runat="server" HighlightCssClass="vco" TargetControlID="RFVEnero" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</EditItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlFebrero" runat="server" Text='<%# Eval("Febrero", "{0:N2}")%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<EditItemTemplate>
|
||||
<asp:TextBox ID="TxtFebrero" runat="server" CausesValidation="true" MaxLength="50" Text='<%# Eval("Febrero") %>' ValidationGroup="GrpGV" Width="60px"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVFebrero" runat="server" ControlToValidate="TxtFebrero" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Febrero''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGV"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCFebrero" runat="server" HighlightCssClass="vco" TargetControlID="RFVFebrero" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</EditItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlMarzo" runat="server" Text='<%# Eval("Marzo", "{0:N2}")%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<EditItemTemplate>
|
||||
<asp:TextBox ID="TxtMarzo" runat="server" CausesValidation="true" MaxLength="50" Text='<%# Eval("Marzo") %>' ValidationGroup="GrpGV" Width="60px"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVMarzo" runat="server" ControlToValidate="TxtMarzo" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Marzo''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGV"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCMarzo" runat="server" HighlightCssClass="vco" TargetControlID="RFVMarzo" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</EditItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlAbril" runat="server" Text='<%# Eval("Abril", "{0:N2}")%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<EditItemTemplate>
|
||||
<asp:TextBox ID="TxtAbril" runat="server" CausesValidation="true" MaxLength="50" Text='<%# Eval("Abril") %>' ValidationGroup="GrpGV" Width="60px"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVAbril" runat="server" ControlToValidate="TxtAbril" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Abril''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGV"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCAbril" runat="server" HighlightCssClass="vco" TargetControlID="RFVAbril" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</EditItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlMayo" runat="server" Text='<%# Eval("Mayo", "{0:N2}")%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<EditItemTemplate>
|
||||
<asp:TextBox ID="TxtMayo" runat="server" CausesValidation="true" MaxLength="50" Text='<%# Eval("Mayo") %>' ValidationGroup="GrpGV" Width="60px"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVMayo" runat="server" ControlToValidate="TxtMayo" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Mayo''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGV"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCMayo" runat="server" HighlightCssClass="vco" TargetControlID="RFVMayo" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</EditItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlJunio" runat="server" Text='<%# Eval("Junio", "{0:N2}")%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<EditItemTemplate>
|
||||
<asp:TextBox ID="TxtJunio" runat="server" CausesValidation="true" MaxLength="50" Text='<%# Eval("Junio") %>' ValidationGroup="GrpGV" Width="60px"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVJunio" runat="server" ControlToValidate="TxtJunio" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Junio''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGV"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCJunio" runat="server" HighlightCssClass="vco" TargetControlID="RFVJunio" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</EditItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlJulio" runat="server" Text='<%# Eval("Julio", "{0:N2}")%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<EditItemTemplate>
|
||||
<asp:TextBox ID="TxtJulio" runat="server" CausesValidation="true" MaxLength="50" Text='<%# Eval("Julio") %>' ValidationGroup="GrpGV" Width="60px"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVJulio" runat="server" ControlToValidate="TxtJulio" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Julio''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGV"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCJulio" runat="server" HighlightCssClass="vco" TargetControlID="RFVJulio" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</EditItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlAgosto" runat="server" Text='<%# Eval("Agosto", "{0:N2}")%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<EditItemTemplate>
|
||||
<asp:TextBox ID="TxtAgosto" runat="server" CausesValidation="true" MaxLength="50" Text='<%# Eval("Agosto") %>' ValidationGroup="GrpGV" Width="60px"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVAgosto" runat="server" ControlToValidate="TxtAgosto" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Agosto''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGV"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCAgosto" runat="server" HighlightCssClass="vco" TargetControlID="RFVAgosto" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</EditItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlSeptiembre" runat="server" Text='<%# Eval("Septiembre", "{0:N2}")%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<EditItemTemplate>
|
||||
<asp:TextBox ID="TxtSeptiembre" runat="server" CausesValidation="true" MaxLength="50" Text='<%# Eval("Septiembre") %>' ValidationGroup="GrpGV" Width="74px"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVSeptiembre" runat="server" ControlToValidate="TxtSeptiembre" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Septiembre''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGV"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCSeptiembre" runat="server" HighlightCssClass="vco" TargetControlID="RFVSeptiembre" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</EditItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlOctubre" runat="server" Text='<%# Eval("Octubre", "{0:N2}")%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<EditItemTemplate>
|
||||
<asp:TextBox ID="TxtOctubre" runat="server" CausesValidation="true" MaxLength="50" Text='<%# Eval("Octubre") %>' ValidationGroup="GrpGV" Width="60px"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVOctubre" runat="server" ControlToValidate="TxtOctubre" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Octubre''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGV"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOctubre" runat="server" HighlightCssClass="vco" TargetControlID="RFVOctubre" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</EditItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlNoviembre" runat="server" Text='<%# Eval("Noviembre", "{0:N2}")%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<EditItemTemplate>
|
||||
<asp:TextBox ID="TxtNoviembre" runat="server" CausesValidation="true" MaxLength="50" Text='<%# Eval("Noviembre") %>' ValidationGroup="GrpGV" Width="69px"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVNoviembre" runat="server" ControlToValidate="TxtNoviembre" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Noviembre''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGV"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCNoviembre" runat="server" HighlightCssClass="vco" TargetControlID="RFVNoviembre" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</EditItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlDiciembre" runat="server" Text='<%# Eval("Diciembre", "{0:N2}") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<EditItemTemplate>
|
||||
<asp:TextBox ID="TxtDiciembre" runat="server" CausesValidation="true" MaxLength="50" Text='<%# Eval("Diciembre") %>' ValidationGroup="GrpGV" Width="64px"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVDiciembre" runat="server" ControlToValidate="TxtDiciembre" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Diciembre''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGV"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCDiciembre" runat="server" HighlightCssClass="vco" TargetControlID="RFVDiciembre" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</EditItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlFecha" runat="server" Text='<%# Eval("FechaIng", "{0:d}") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlUsuario" runat="server" Text='<%# Eval("Usuario") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Editar">
|
||||
<EditItemTemplate>
|
||||
<center>
|
||||
<asp:ImageButton ID="imgU" runat="server" AlternateText="Actualizar" CausesValidation="True" CommandName="Update" ImageUrl="/Imagenes/Btn_Update.png" ValidationGroup="GrpGV" />
|
||||
<asp:ImageButton ID="imgC" runat="server" AlternateText="Cancelar" CausesValidation="False" CommandName="Cancel" ImageUrl="/Imagenes/Btn_Cancel.png" />
|
||||
</center>
|
||||
</EditItemTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:ImageButton ID="imgE" runat="server" AlternateText="Editar" CausesValidation="False" CommandName="Edit" ImageUrl="/Imagenes/Btn_Edit.png" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Eliminar">
|
||||
<ItemTemplate>
|
||||
<asp:ImageButton ID="imgD" runat="server" AlternateText="Eliminar" CausesValidation="False" CommandName="Delete" ImageUrl="/Imagenes/Btn_Delete.png" OnClientClick="javascript:return C();" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate> </ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
<RowStyle CssClass="Texto" />
|
||||
<AlternatingRowStyle CssClass="TextoAlterno" />
|
||||
</asp:GridView>
|
||||
|
||||
<asp:Button ID="BtnAfectarPresupuesto" runat="server" Text="Afectar Presupuesto" />
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
<asp:UpdateProgress ID="upProgress" runat="server" DisplayAfter="0">
|
||||
<ProgressTemplate>
|
||||
<div id="overlay">
|
||||
<div id="modalprogress">
|
||||
<div id="theprogress">
|
||||
<center>
|
||||
<table border="0" cellpadding="0" cellspacing="0">
|
||||
<tr>
|
||||
<td>La información se está procesando...</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><img src="/Imagenes/Cargando.gif" style="border-width: 0px;" alt="" /></td>
|
||||
</tr>
|
||||
</table>
|
||||
</center>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ProgressTemplate>
|
||||
</asp:UpdateProgress>
|
||||
</asp:Content>
|
||||
|
||||
557
AC/PresupuestoEgresosAnterior.aspx.vb.exclude
Normal file
557
AC/PresupuestoEgresosAnterior.aspx.vb.exclude
Normal file
@@ -0,0 +1,557 @@
|
||||
Option Explicit On
|
||||
Option Strict On
|
||||
|
||||
Imports System.Data
|
||||
Imports System.Linq
|
||||
Imports Extensiones
|
||||
|
||||
Partial Class AC_PresupuestoEgresos
|
||||
Inherits ClsPaginas
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||
If Not Page.IsPostBack Then
|
||||
ViewState("Orden") = ""
|
||||
ViewState("OCvePresupuestoEgreso") = "CvePresupuestoEgreso DESC"
|
||||
ViewState("OCveProgramaOperativo") = " CveProgramaOperativo DESC"
|
||||
ViewState("OCveFuenteFinanciamiento") = "CveFuenteFinanciamiento DESC"
|
||||
ViewState("OCveTipoGasto") = "CveTipoGasto DESC "
|
||||
ViewState("OCveUnidadAdministrativa") = "CveUnidadAdministrativa DESC"
|
||||
ViewState("OCveOGClasificacion") = "CveOGClasificacion DESC"
|
||||
ViewState("OTotal") = "Total DESC"
|
||||
ViewState("OEnero") = "Enero DESC"
|
||||
ViewState("OFebrero") = "Febrero DESC"
|
||||
ViewState("OMarzo") = "Marzo DESC"
|
||||
ViewState("OAbril") = "Abril DESC"
|
||||
ViewState("OMayo") = "Mayo DESC"
|
||||
ViewState("OJunio") = "Junio DESC"
|
||||
ViewState("OJulio") = "Julio DESC"
|
||||
ViewState("OAgosto") = "Agosto DESC"
|
||||
ViewState("OSeptiembre") = "Septiembre DESC"
|
||||
ViewState("OOctubre") = "Octubre DESC"
|
||||
ViewState("ONoviembre") = "Noviembre DESC"
|
||||
ViewState("ODiciembre") = "Diciembre DESC"
|
||||
ViewState("OFechaIng") = "FechaIng DESC"
|
||||
ViewState("OCveUsuario") = "CveUsuario DESC"
|
||||
|
||||
ViewState("OFechaIng") = "FechaIng DESC"
|
||||
ViewState("OUsuario") = "Usuario DESC"
|
||||
CargaDatos()
|
||||
CargarCombos()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Public Sub CargarCombos()
|
||||
|
||||
DdlProgramaOperativo.DataSource = GlobalDTAC_ProgramaOperativo()
|
||||
DdlProgramaOperativo.DataBind()
|
||||
|
||||
DdlFuenteFinanciamiento.DataSource = GlobalDTAC_FuentesFinanciamiento(UsuarioActual.CveEmpresa)
|
||||
DdlFuenteFinanciamiento.DataBind()
|
||||
|
||||
DdlTipoGasto.DataSource = GlobalDTAC_TipoGasto
|
||||
DdlTipoGasto.DataBind()
|
||||
|
||||
DdlUnidadAdministrativa.DataSource = GlobalDTAC_UnidadesAdministrativas(UsuarioActual.CveEmpresa)
|
||||
DdlUnidadAdministrativa.DataBind()
|
||||
|
||||
DdlClasificadorOG.DataSource = GlobalDTAC_ClasificadorOG(UsuarioActual.CveEmpresa).FiltraParametros("Afectable = 1")
|
||||
DdlClasificadorOG.DataBind()
|
||||
|
||||
End Sub
|
||||
|
||||
Public Sub CargaDatos()
|
||||
Dim ObjPresupuestoEgreso As New ClsAC
|
||||
If ObjPresupuestoEgreso.GetPresupuestoEgresos(UsuarioActual.CveEmpresa) Then
|
||||
ViewState("DT_AC_PresupuestosEgresos") = ObjPresupuestoEgreso.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
|
||||
Else
|
||||
Me.GvDatos.DataSource = Nothing
|
||||
End If
|
||||
|
||||
ObjPresupuestoEgreso.Dispose()
|
||||
|
||||
If ViewState("Orden").ToString() <> String.Empty Then
|
||||
CargaGrid(ViewState("Orden").ToString())
|
||||
Else
|
||||
CargaGrid("")
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Protected Sub LbAgregar_Click(sender As Object, e As System.EventArgs) Handles LbAgregar.Click
|
||||
Dim ObjPresupuestoEgreso As New ClsAC
|
||||
If ObjPresupuestoEgreso.AddPresupuestoEgresos(DdlProgramaOperativo.SelectedValue.ToEntero, DdlFuenteFinanciamiento.SelectedValue.ToEntero, DdlTipoGasto.SelectedValue.ToEntero, DdlUnidadAdministrativa.SelectedValue.ToEntero, DdlClasificadorOG.SelectedValue.ToEntero, TxtTotal.Text.Trim.ToDouble, TxtEnero.Text.Trim.ToDouble, TxtFebrero.Text.Trim.ToDouble, TxtMarzo.Text.Trim.ToDouble, TxtAbril.Text.Trim.ToDouble, TxtMayo.Text.Trim.ToDouble, TxtJunio.Text.Trim.ToDouble, TxtJulio.Text.Trim.ToDouble, TxtAgosto.Text.Trim.ToDouble, TxtSeptiembre.Text.Trim.ToDouble, TxtOctubre.Text.Trim.ToDouble, TxtNoviembre.Text.Trim.ToDouble, TxtDiciembre.Text.Trim.ToDouble, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
|
||||
|
||||
'Limpia Controles
|
||||
DdlProgramaOperativo.SelectedIndex = 0
|
||||
DdlFuenteFinanciamiento.SelectedIndex = 0
|
||||
DdlTipoGasto.SelectedIndex = 0
|
||||
DdlUnidadAdministrativa.SelectedIndex = 0
|
||||
DdlClasificadorOG.SelectedIndex = 0
|
||||
TxtTotal.Text = ""
|
||||
TxtEnero.Text = ""
|
||||
TxtFebrero.Text = ""
|
||||
TxtMarzo.Text = ""
|
||||
TxtAbril.Text = ""
|
||||
TxtMayo.Text = ""
|
||||
TxtJunio.Text = ""
|
||||
TxtJulio.Text = ""
|
||||
TxtAgosto.Text = ""
|
||||
TxtSeptiembre.Text = ""
|
||||
TxtOctubre.Text = ""
|
||||
TxtNoviembre.Text = ""
|
||||
TxtDiciembre.Text = ""
|
||||
|
||||
Alert("El nuevo Registro se guardó correctamente.", TipoMensaje.MsgInformacion)
|
||||
|
||||
UpTitulos.Update()
|
||||
ViewState("DT_AC_PresupuestosEgresos") = ObjPresupuestoEgreso.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
|
||||
|
||||
If ViewState("Orden").ToString() <> String.Empty Then
|
||||
CargaGrid(ViewState("Orden").ToString())
|
||||
Else
|
||||
CargaGrid("")
|
||||
End If
|
||||
End If
|
||||
ObjPresupuestoEgreso.Dispose()
|
||||
End Sub
|
||||
|
||||
#Region " O R D E N"
|
||||
Protected Sub LbCveProgramaOperativo_Click(sender As Object, e As System.EventArgs) Handles LbProgramaOperativo.Click, ImgProgramaOperativo.Click
|
||||
If ViewState("OCveProgramaOperativo").ToString() = "CveProgramaOperativo DESC" Then
|
||||
ViewState("OCveProgramaOperativo") = "CveProgramaOperativo ASC"
|
||||
ImgProgramaOperativo.ImageUrl = "/Imagenes/FlechasArriba.gif"
|
||||
Else
|
||||
ViewState("OCveProgramaOperativo") = "CveProgramaOperativo DESC"
|
||||
ImgProgramaOperativo.ImageUrl = "/Imagenes/FlechasAbajo.gif"
|
||||
End If
|
||||
ViewState("Orden") = ViewState("OCveProgramaOperativo")
|
||||
CargaGrid(ViewState("Orden").ToString())
|
||||
End Sub
|
||||
|
||||
Protected Sub LbCveFuenteFinanciamiento_Click(sender As Object, e As System.EventArgs) Handles LbFuenteFinanciamiento.Click, ImgFuenteFinanciamiento.Click
|
||||
If ViewState("OCveFuenteFinanciamiento").ToString() = "CveFuenteFinanciamiento DESC" Then
|
||||
ViewState("OCveFuenteFinanciamiento") = "CveFuenteFinanciamiento ASC"
|
||||
ImgFuenteFinanciamiento.ImageUrl = "/Imagenes/FlechasArriba.gif"
|
||||
Else
|
||||
ViewState("OCveFuenteFinanciamiento") = "CveFuenteFinanciamiento DESC"
|
||||
ImgFuenteFinanciamiento.ImageUrl = "/Imagenes/FlechasAbajo.gif"
|
||||
End If
|
||||
ViewState("Orden") = ViewState("OCveFuenteFinanciamiento")
|
||||
CargaGrid(ViewState("Orden").ToString())
|
||||
End Sub
|
||||
|
||||
Protected Sub LbCveTipoGasto_Click(sender As Object, e As System.EventArgs) Handles LbTipoGasto.Click, ImgTipoGasto.Click
|
||||
If ViewState("OCveTipoGasto").ToString() = "CveTipoGasto DESC" Then
|
||||
ViewState("OCveTipoGasto") = "CveTipoGasto ASC"
|
||||
ImgTipoGasto.ImageUrl = "/Imagenes/FlechasArriba.gif"
|
||||
Else
|
||||
ViewState("OCveTipoGasto") = "CveTipoGasto DESC"
|
||||
ImgTipoGasto.ImageUrl = "/Imagenes/FlechasAbajo.gif"
|
||||
End If
|
||||
ViewState("Orden") = ViewState("OCveTipoGasto")
|
||||
CargaGrid(ViewState("Orden").ToString())
|
||||
End Sub
|
||||
|
||||
Protected Sub LbCveUnidadAdministrativa_Click(sender As Object, e As System.EventArgs) Handles LbUnidadAdministrativa.Click, ImgUnidadAdministrativa.Click
|
||||
If ViewState("OCveUnidadAdministrativa").ToString() = "CveUnidadAdministrativa DESC" Then
|
||||
ViewState("OCveUnidadAdministrativa") = "CveUnidadAdministrativa ASC"
|
||||
ImgUnidadAdministrativa.ImageUrl = "/Imagenes/FlechasArriba.gif"
|
||||
Else
|
||||
ViewState("OCveUnidadAdministrativa") = "CveUnidadAdministrativa DESC"
|
||||
ImgUnidadAdministrativa.ImageUrl = "/Imagenes/FlechasAbajo.gif"
|
||||
End If
|
||||
ViewState("Orden") = ViewState("OCveUnidadAdministrativa")
|
||||
CargaGrid(ViewState("Orden").ToString())
|
||||
End Sub
|
||||
|
||||
Protected Sub LbCveOGClasificacion_Click(sender As Object, e As System.EventArgs) Handles LbOGClasificacion.Click, ImgOGClasificacion.Click
|
||||
If ViewState("OCveOGClasificacion").ToString() = "CveOGClasificacion DESC" Then
|
||||
ViewState("OCveOGClasificacion") = "CveOGClasificacion ASC"
|
||||
ImgOGClasificacion.ImageUrl = "/Imagenes/FlechasArriba.gif"
|
||||
Else
|
||||
ViewState("OCveOGClasificacion") = "CveOGClasificacion DESC"
|
||||
ImgOGClasificacion.ImageUrl = "/Imagenes/FlechasAbajo.gif"
|
||||
End If
|
||||
ViewState("Orden") = ViewState("OCveOGClasificacion")
|
||||
CargaGrid(ViewState("Orden").ToString())
|
||||
End Sub
|
||||
|
||||
Protected Sub LbTotal_Click(sender As Object, e As System.EventArgs) Handles LbTotal.Click, ImgTotal.Click
|
||||
If ViewState("OTotal").ToString() = "Total DESC" Then
|
||||
ViewState("OTotal") = "Total ASC"
|
||||
ImgTotal.ImageUrl = "/Imagenes/FlechasArriba.gif"
|
||||
Else
|
||||
ViewState("OTotal") = "Total DESC"
|
||||
ImgTotal.ImageUrl = "/Imagenes/FlechasAbajo.gif"
|
||||
End If
|
||||
ViewState("Orden") = ViewState("OTotal")
|
||||
CargaGrid(ViewState("Orden").ToString())
|
||||
End Sub
|
||||
|
||||
Protected Sub LbEnero_Click(sender As Object, e As System.EventArgs) Handles LbEnero.Click, ImgEnero.Click
|
||||
If ViewState("OEnero").ToString() = "Enero DESC" Then
|
||||
ViewState("OEnero") = "Enero ASC"
|
||||
ImgEnero.ImageUrl = "/Imagenes/FlechasArriba.gif"
|
||||
Else
|
||||
ViewState("OEnero") = "Enero DESC"
|
||||
ImgEnero.ImageUrl = "/Imagenes/FlechasAbajo.gif"
|
||||
End If
|
||||
ViewState("Orden") = ViewState("OEnero")
|
||||
CargaGrid(ViewState("Orden").ToString())
|
||||
End Sub
|
||||
|
||||
Protected Sub LbFebrero_Click(sender As Object, e As System.EventArgs) Handles LbFebrero.Click, ImgFebrero.Click
|
||||
If ViewState("OFebrero").ToString() = "Febrero DESC" Then
|
||||
ViewState("OFebrero") = "Febrero ASC"
|
||||
ImgFebrero.ImageUrl = "/Imagenes/FlechasArriba.gif"
|
||||
Else
|
||||
ViewState("OFebrero") = "Febrero DESC"
|
||||
ImgFebrero.ImageUrl = "/Imagenes/FlechasAbajo.gif"
|
||||
End If
|
||||
ViewState("Orden") = ViewState("OFebrero")
|
||||
CargaGrid(ViewState("Orden").ToString())
|
||||
End Sub
|
||||
|
||||
Protected Sub LbMarzo_Click(sender As Object, e As System.EventArgs) Handles LbMarzo.Click, ImgMarzo.Click
|
||||
If ViewState("OMarzo").ToString() = "Marzo DESC" Then
|
||||
ViewState("OMarzo") = "Marzo ASC"
|
||||
ImgMarzo.ImageUrl = "/Imagenes/FlechasArriba.gif"
|
||||
Else
|
||||
ViewState("OMarzo") = "Marzo DESC"
|
||||
ImgMarzo.ImageUrl = "/Imagenes/FlechasAbajo.gif"
|
||||
End If
|
||||
ViewState("Orden") = ViewState("OMarzo")
|
||||
CargaGrid(ViewState("Orden").ToString())
|
||||
End Sub
|
||||
|
||||
Protected Sub LbAbril_Click(sender As Object, e As System.EventArgs) Handles LbAbril.Click, ImgAbril.Click
|
||||
If ViewState("OAbril").ToString() = "Abril DESC" Then
|
||||
ViewState("OAbril") = "Abril ASC"
|
||||
ImgAbril.ImageUrl = "/Imagenes/FlechasArriba.gif"
|
||||
Else
|
||||
ViewState("OAbril") = "Abril DESC"
|
||||
ImgAbril.ImageUrl = "/Imagenes/FlechasAbajo.gif"
|
||||
End If
|
||||
ViewState("Orden") = ViewState("OAbril")
|
||||
CargaGrid(ViewState("Orden").ToString())
|
||||
End Sub
|
||||
|
||||
Protected Sub LbMayo_Click(sender As Object, e As System.EventArgs) Handles LbMayo.Click, ImgMayo.Click
|
||||
If ViewState("OMayo").ToString() = "Mayo DESC" Then
|
||||
ViewState("OMayo") = "Mayo ASC"
|
||||
ImgMayo.ImageUrl = "/Imagenes/FlechasArriba.gif"
|
||||
Else
|
||||
ViewState("OMayo") = "Mayo DESC"
|
||||
ImgMayo.ImageUrl = "/Imagenes/FlechasAbajo.gif"
|
||||
End If
|
||||
ViewState("Orden") = ViewState("OMayo")
|
||||
CargaGrid(ViewState("Orden").ToString())
|
||||
End Sub
|
||||
|
||||
Protected Sub LbJunio_Click(sender As Object, e As System.EventArgs) Handles LbJunio.Click, ImgJunio.Click
|
||||
If ViewState("OJunio").ToString() = "Junio DESC" Then
|
||||
ViewState("OJunio") = "Junio ASC"
|
||||
ImgJunio.ImageUrl = "/Imagenes/FlechasArriba.gif"
|
||||
Else
|
||||
ViewState("OJunio") = "Junio DESC"
|
||||
ImgJunio.ImageUrl = "/Imagenes/FlechasAbajo.gif"
|
||||
End If
|
||||
ViewState("Orden") = ViewState("OJunio")
|
||||
CargaGrid(ViewState("Orden").ToString())
|
||||
End Sub
|
||||
|
||||
Protected Sub LbJulio_Click(sender As Object, e As System.EventArgs) Handles LbJulio.Click, ImgJulio.Click
|
||||
If ViewState("OJulio").ToString() = "Julio DESC" Then
|
||||
ViewState("OJulio") = "Julio ASC"
|
||||
ImgJulio.ImageUrl = "/Imagenes/FlechasArriba.gif"
|
||||
Else
|
||||
ViewState("OJulio") = "Julio DESC"
|
||||
ImgJulio.ImageUrl = "/Imagenes/FlechasAbajo.gif"
|
||||
End If
|
||||
ViewState("Orden") = ViewState("OJulio")
|
||||
CargaGrid(ViewState("Orden").ToString())
|
||||
End Sub
|
||||
|
||||
Protected Sub LbAgosto_Click(sender As Object, e As System.EventArgs) Handles LbAgosto.Click, ImgAgosto.Click
|
||||
If ViewState("OAgosto").ToString() = "Agosto DESC" Then
|
||||
ViewState("OAgosto") = "Agosto ASC"
|
||||
ImgAgosto.ImageUrl = "/Imagenes/FlechasArriba.gif"
|
||||
Else
|
||||
ViewState("OAgosto") = "Agosto DESC"
|
||||
ImgAgosto.ImageUrl = "/Imagenes/FlechasAbajo.gif"
|
||||
End If
|
||||
ViewState("Orden") = ViewState("OAgosto")
|
||||
CargaGrid(ViewState("Orden").ToString())
|
||||
End Sub
|
||||
|
||||
Protected Sub LbSeptiembre_Click(sender As Object, e As System.EventArgs) Handles LbSeptiembre.Click, ImgSeptiembre.Click
|
||||
If ViewState("OSeptiembre").ToString() = "Septiembre DESC" Then
|
||||
ViewState("OSeptiembre") = "Septiembre ASC"
|
||||
ImgSeptiembre.ImageUrl = "/Imagenes/FlechasArriba.gif"
|
||||
Else
|
||||
ViewState("OSeptiembre") = "Septiembre DESC"
|
||||
ImgSeptiembre.ImageUrl = "/Imagenes/FlechasAbajo.gif"
|
||||
End If
|
||||
ViewState("Orden") = ViewState("OSeptiembre")
|
||||
CargaGrid(ViewState("Orden").ToString())
|
||||
End Sub
|
||||
|
||||
Protected Sub LbOctubre_Click(sender As Object, e As System.EventArgs) Handles LbOctubre.Click, ImgOctubre.Click
|
||||
If ViewState("OOctubre").ToString() = "Octubre DESC" Then
|
||||
ViewState("OOctubre") = "Octubre ASC"
|
||||
ImgOctubre.ImageUrl = "/Imagenes/FlechasArriba.gif"
|
||||
Else
|
||||
ViewState("OOctubre") = "Octubre DESC"
|
||||
ImgOctubre.ImageUrl = "/Imagenes/FlechasAbajo.gif"
|
||||
End If
|
||||
ViewState("Orden") = ViewState("OOctubre")
|
||||
CargaGrid(ViewState("Orden").ToString())
|
||||
End Sub
|
||||
|
||||
Protected Sub LbNoviembre_Click(sender As Object, e As System.EventArgs) Handles LbNoviembre.Click, ImgNoviembre.Click
|
||||
If ViewState("ONoviembre").ToString() = "Noviembre DESC" Then
|
||||
ViewState("ONoviembre") = "Noviembre ASC"
|
||||
ImgNoviembre.ImageUrl = "/Imagenes/FlechasArriba.gif"
|
||||
Else
|
||||
ViewState("ONoviembre") = "Noviembre DESC"
|
||||
ImgNoviembre.ImageUrl = "/Imagenes/FlechasAbajo.gif"
|
||||
End If
|
||||
ViewState("Orden") = ViewState("ONoviembre")
|
||||
CargaGrid(ViewState("Orden").ToString())
|
||||
End Sub
|
||||
|
||||
Protected Sub LbDiciembre_Click(sender As Object, e As System.EventArgs) Handles LbDiciembre.Click, ImgDiciembre.Click
|
||||
If ViewState("ODiciembre").ToString() = "Diciembre DESC" Then
|
||||
ViewState("ODiciembre") = "Diciembre ASC"
|
||||
ImgDiciembre.ImageUrl = "/Imagenes/FlechasArriba.gif"
|
||||
Else
|
||||
ViewState("ODiciembre") = "Diciembre DESC"
|
||||
ImgDiciembre.ImageUrl = "/Imagenes/FlechasAbajo.gif"
|
||||
End If
|
||||
ViewState("Orden") = ViewState("ODiciembre")
|
||||
CargaGrid(ViewState("Orden").ToString())
|
||||
End Sub
|
||||
|
||||
Protected Sub LbFechaIng_Click(sender As Object, e As System.EventArgs) Handles LbFechaIng.Click, ImgFechaIng.Click
|
||||
|
||||
If ViewState("OFechaIng").ToString() = "FechaIng DESC" Then
|
||||
ViewState("OFechaIng") = "FechaIng ASC"
|
||||
ImgFechaIng.ImageUrl = "/Imagenes/FlechasArriba.gif"
|
||||
Else
|
||||
ViewState("OFechaIng") = "FechaIng DESC"
|
||||
ImgFechaIng.ImageUrl = "/Imagenes/FlechasAbajo.gif"
|
||||
End If
|
||||
ViewState("Orden") = ViewState("OFechaIng")
|
||||
CargaGrid(ViewState("Orden").ToString())
|
||||
End Sub
|
||||
|
||||
Protected Sub LbUsuario_Click(sender As Object, e As System.EventArgs) Handles LbUsuario.Click, ImgUsuario.Click
|
||||
If ViewState("OUsuario").ToString() = "Usuario DESC" Then
|
||||
ViewState("OUsuario") = "Usuario ASC"
|
||||
ImgUsuario.ImageUrl = "/Imagenes/FlechasArriba.gif"
|
||||
Else
|
||||
ViewState("OUsuario") = "Usuario DESC"
|
||||
ImgUsuario.ImageUrl = "/Imagenes/FlechasAbajo.gif"
|
||||
End If
|
||||
ViewState("Orden") = ViewState("OUsuario")
|
||||
CargaGrid(ViewState("Orden").ToString())
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
Protected Sub GvDatos_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvDatos.RowDataBound
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
If e.Row.RowIndex = 0 Then
|
||||
e.Row.Cells(0).Width = Unit.Pixel(92) 'POA
|
||||
e.Row.Cells(1).Width = Unit.Pixel(112) 'Fuente Finan
|
||||
e.Row.Cells(2).Width = Unit.Pixel(112) 'Tipo de Gasto
|
||||
e.Row.Cells(3).Width = Unit.Pixel(112) 'Unidad Admin
|
||||
e.Row.Cells(4).Width = Unit.Pixel(122) 'COG
|
||||
e.Row.Cells(5).Width = Unit.Pixel(66) 'Tot
|
||||
e.Row.Cells(6).Width = Unit.Pixel(66) 'Ene
|
||||
e.Row.Cells(7).Width = Unit.Pixel(66) 'Feb
|
||||
e.Row.Cells(8).Width = Unit.Pixel(66) 'Mar
|
||||
e.Row.Cells(9).Width = Unit.Pixel(66) 'Abr
|
||||
e.Row.Cells(10).Width = Unit.Pixel(66) 'May
|
||||
e.Row.Cells(11).Width = Unit.Pixel(66) 'Jun
|
||||
e.Row.Cells(12).Width = Unit.Pixel(66) 'Jul
|
||||
e.Row.Cells(13).Width = Unit.Pixel(66) 'Ago
|
||||
e.Row.Cells(14).Width = Unit.Pixel(80) 'Sep
|
||||
e.Row.Cells(15).Width = Unit.Pixel(66) 'Oct
|
||||
e.Row.Cells(16).Width = Unit.Pixel(75) 'Nov
|
||||
e.Row.Cells(17).Width = Unit.Pixel(70) 'Dic
|
||||
e.Row.Cells(18).Width = Unit.Pixel(100) 'Fecha
|
||||
e.Row.Cells(19).Width = Unit.Pixel(100) 'Usuario
|
||||
e.Row.Cells(20).Width = Unit.Pixel(100) 'Editar
|
||||
e.Row.Cells(21).Width = Unit.Pixel(100) 'Eliminar
|
||||
End If
|
||||
e.Row.Cells(0).HorizontalAlign = HorizontalAlign.Left
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Protected Sub GvDatos_RowDeleting(sender As Object, e As System.Web.UI.WebControls.GridViewDeleteEventArgs) Handles GvDatos.RowDeleting
|
||||
Dim ObjPresupuestoEgreso As New ClsAC
|
||||
If ObjPresupuestoEgreso.RemovePresupuestoEgreso(GvDatos.DataKeys(e.RowIndex).Value.ToString.ToEntero) Then
|
||||
GvDatos.EditIndex = -1
|
||||
ViewState("DT_AC_PresupuestosEgresos") = ObjPresupuestoEgreso.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
|
||||
Alert("El Presupuesto de Egresos se eliminó correctamente.", TipoMensaje.MsgInformacion)
|
||||
End If
|
||||
|
||||
ObjPresupuestoEgreso.Dispose()
|
||||
|
||||
If ViewState("Orden").ToString() <> String.Empty Then
|
||||
CargaGrid(ViewState("Orden").ToString())
|
||||
Else
|
||||
CargaGrid("")
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Protected Sub GvDatos_RowCancelingEdit(sender As Object, e As System.Web.UI.WebControls.GridViewCancelEditEventArgs) Handles GvDatos.RowCancelingEdit
|
||||
GvDatos.EditIndex = -1
|
||||
If ViewState("Orden").ToString() <> String.Empty Then
|
||||
CargaGrid(ViewState("Orden").ToString())
|
||||
Else
|
||||
CargaGrid("")
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Protected Sub GvDatos_RowUpdating(sender As Object, e As System.Web.UI.WebControls.GridViewUpdateEventArgs) Handles GvDatos.RowUpdating
|
||||
|
||||
Dim ObjPresupuestoEgreso As New ClsAC
|
||||
|
||||
Dim Departamento As String = DirectCast(GvDatos.Rows(e.RowIndex).FindControl("TxtDepartamento"), TextBox).Text.Trim
|
||||
Dim Estatus As Boolean = GvDatos.Rows(e.RowIndex).FCCheckBox("ChkEstatus").Checked
|
||||
Dim CveDepartamento As Integer = GvDatos.DataKeys(e.RowIndex).Value.ToString.ToEntero
|
||||
|
||||
If ObjPresupuestoEgreso.UpdatePresupuestoEgreso(Departamento, Estatus, CveDepartamento) Then
|
||||
GvDatos.EditIndex = -1
|
||||
ViewState("DT_AC_PresupuestosEgresos") = ObjPresupuestoEgreso.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
|
||||
Alert("Los cambios se guardaron correctamente.", TipoMensaje.MsgInformacion)
|
||||
End If
|
||||
|
||||
ObjPresupuestoEgreso.Dispose()
|
||||
|
||||
If ViewState("Orden").ToString() <> String.Empty Then
|
||||
CargaGrid(ViewState("Orden").ToString())
|
||||
Else
|
||||
CargaGrid("")
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Sub GvDatos_RowEditing(sender As Object, e As System.Web.UI.WebControls.GridViewEditEventArgs) Handles GvDatos.RowEditing
|
||||
GvDatos.EditIndex = e.NewEditIndex
|
||||
|
||||
If ViewState("Orden").ToString() <> String.Empty Then
|
||||
CargaGrid(ViewState("Orden").ToString())
|
||||
Else
|
||||
CargaGrid("")
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub CargaGrid(Orden As String)
|
||||
If Orden <> String.Empty Then
|
||||
Dim DV As New DataView(CType(ViewState("DT_AC_PresupuestosEgresos"), DataTable), "", Orden, DataViewRowState.CurrentRows)
|
||||
GvDatos.DataSource = DV.ToTable()
|
||||
DV.Dispose()
|
||||
Else
|
||||
GvDatos.DataSource = CType(ViewState("DT_AC_PresupuestosEgresos"), DataTable)
|
||||
End If
|
||||
GvDatos.DataBind()
|
||||
UpDatos.Update()
|
||||
End Sub
|
||||
|
||||
Protected Sub BtnAfectarPresupuesto_Click(sender As Object, e As EventArgs) Handles BtnAfectarPresupuesto.Click
|
||||
Dim Conta As New ClsContPAQi(UsuarioActual.Empresa)
|
||||
Conta.IniciaTransacSQL()
|
||||
Dim AC As New ClsAC
|
||||
AC.IniciaTransacSQL()
|
||||
'registro las cuentas prespuestales por cada movimiento, si existe la ignoro
|
||||
Dim dtCuentas As DataTable = Nothing
|
||||
Dim IDPoliza As Integer
|
||||
Dim IdCuentaAprobado, IdCuentaPorEjercer, IdCuentaComprometido, IdCuentaDevengado, IdCuentaEjercido, IdCuentaPagado As Integer
|
||||
Dim Codigo As String
|
||||
Dim TieneError As Boolean = False
|
||||
|
||||
'hay que registrar una poliza de cargo en 821, aprobado contra Ley de egresos, luego registrar o de por ejercer
|
||||
|
||||
If Conta.GetCuentas(-1, "-1", 1) Then
|
||||
dtCuentas = Conta.DtResultados
|
||||
End If
|
||||
|
||||
Dim Total As Double = GvDatos.Rows.Cast(Of GridViewRow)().Sum(Function(gvr) gvr.DataKey("Total").ToDouble)
|
||||
|
||||
IDPoliza = Conta.AddPoliza(123456, 4, "Aprobado", Total, Total, UsuarioActual.CveUsuario, Now)
|
||||
If IDPoliza > 0 Then
|
||||
|
||||
For Each gvr As GridViewRow In GvDatos.Rows
|
||||
|
||||
Codigo = String.Format("{0}-{1}", gvr.DataKey("ClaveProgramaOperativo"), gvr.DataKey("CodigoCOG"))
|
||||
'Registro las cuentas afectables
|
||||
IdCuentaAprobado = FNCIDCuenta(dtCuentas, String.Format("821-{0}", Codigo))
|
||||
If IdCuentaAprobado = 0 Then IdCuentaAprobado = Conta.AddCuenta(String.Format("821-{0}", Codigo), gvr.DataKey("ClasificadorOG"), "K", 0, 0, 1, 1, 602)
|
||||
|
||||
IdCuentaPorEjercer = FNCIDCuenta(dtCuentas, String.Format("822-{0}", Codigo))
|
||||
If IdCuentaPorEjercer = 0 Then IdCuentaPorEjercer = Conta.AddCuenta(String.Format("822-{0}", Codigo), gvr.DataKey("ClasificadorOG"), "K", 0, 0, 1, 1, 603)
|
||||
|
||||
IdCuentaComprometido = FNCIDCuenta(dtCuentas, String.Format("824-{0}", Codigo))
|
||||
If IdCuentaComprometido = 0 Then IdCuentaComprometido = Conta.AddCuenta(String.Format("824-{0}", Codigo), gvr.DataKey("ClasificadorOG"), "K", 0, 0, 1, 1, 605)
|
||||
|
||||
IdCuentaDevengado = FNCIDCuenta(dtCuentas, String.Format("825-{0}", Codigo))
|
||||
If IdCuentaDevengado = 0 Then IdCuentaDevengado = Conta.AddCuenta(String.Format("825-{0}", Codigo), gvr.DataKey("ClasificadorOG"), "K", 0, 0, 1, 1, 606)
|
||||
|
||||
IdCuentaEjercido = FNCIDCuenta(dtCuentas, String.Format("826-{0}", Codigo))
|
||||
If IdCuentaEjercido = 0 Then IdCuentaEjercido = Conta.AddCuenta(String.Format("826-{0}", Codigo), gvr.DataKey("ClasificadorOG"), "K", 0, 0, 1, 1, 607)
|
||||
|
||||
IdCuentaPagado = FNCIDCuenta(dtCuentas, String.Format("827-{0}", Codigo))
|
||||
If IdCuentaPagado = 0 Then IdCuentaPagado = Conta.AddCuenta(String.Format("827-{0}", Codigo), gvr.DataKey("ClasificadorOG"), "K", 0, 0, 1, 1, 608)
|
||||
|
||||
Total = gvr.DataKey("Total").ToDouble
|
||||
If Conta.AddMovimiento(123456, IDPoliza, IdCuentaAprobado, True, Total, "", "", 0, Now, "") Then
|
||||
'actualizo el idcuenta del presupuesto
|
||||
If Not Conta.AddMovimiento(123456, IDPoliza, IdCuentaPorEjercer, False, Total, "", "", 0, Now, "") Then
|
||||
TieneError = True
|
||||
Exit For
|
||||
End If
|
||||
If Not AC.UpdateCuentasPresupuestoEgresos(IdCuentaAprobado, IdCuentaPorEjercer, IdCuentaComprometido, IdCuentaDevengado, IdCuentaEjercido, IdCuentaPagado, gvr.DataKey("CvePresupuestoEgreso").ToEntero) Then
|
||||
TieneError = True
|
||||
Exit For
|
||||
|
||||
End If
|
||||
Else
|
||||
TieneError = True
|
||||
Exit For
|
||||
End If
|
||||
|
||||
Next
|
||||
|
||||
Else
|
||||
TieneError = True
|
||||
|
||||
End If
|
||||
If Not TieneError Then
|
||||
|
||||
'actualizo las cuentas de cadapresupuesto
|
||||
|
||||
AC.Commit()
|
||||
Conta.Commit()
|
||||
Alert("Movimientos Guardados")
|
||||
Else
|
||||
Conta.RollBack()
|
||||
AC.RollBack()
|
||||
End If
|
||||
Conta.Dispose()
|
||||
AC.Dispose()
|
||||
|
||||
End Sub
|
||||
|
||||
Private Function FNCIDCuenta(dt As DataTable, codigo As String) As Integer
|
||||
Dim Retorno As Integer = 0
|
||||
Dim dr As DataRow
|
||||
dr = dt.FiltroPrimero(String.Format("Codigo ='{0}'", codigo))
|
||||
If dr IsNot Nothing Then
|
||||
|
||||
Retorno = dr("Id").ToString.ToEntero
|
||||
End If
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
End Class
|
||||
295
AC/PresupuestoIngresos.aspx
Normal file
295
AC/PresupuestoIngresos.aspx
Normal file
@@ -0,0 +1,295 @@
|
||||
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="PresupuestoIngresos.aspx.vb" Inherits="AC_PresupuestoIngresos" %>
|
||||
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="HB" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="E" runat="Server">
|
||||
Presupuesto Ingresos (Detalle)
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
|
||||
|
||||
|
||||
<asp:UpdatePanel ID="upDatos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-9">
|
||||
<div class="portlet smmallpadding light bordered">
|
||||
<div class="portlet-title">
|
||||
<div class="tools">
|
||||
<a href="javascript;" data-idchekbox="<%= chkexpand.ClientID%>" class=" <%= IIf(chkexpand.Checked = True, "collapse", "expand")%>"></a>
|
||||
<asp:CheckBox ID="chkexpand" Checked="true" CssClass="hidden" runat="server" />
|
||||
</div>
|
||||
<div class="caption uppercase" style="position: relative;">
|
||||
<i class="fa fa-info-circle"></i>Información General
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body" <%= IIf(chkexpand.Checked = True, "", "style=""display:none;""")%>>
|
||||
<table style="width: 100%;">
|
||||
<tr>
|
||||
<td width="200px;">Ejercicio:</td>
|
||||
<td>
|
||||
<asp:DropDownList ID="DdlEjercicio" AutoPostBack="true" CssClass="form-control select2me" runat="server" Width="100px" DataTextField="Ejercicio" DataValueField="Ejercicio"></asp:DropDownList>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Fuente Recaudación:
|
||||
</td>
|
||||
<td>
|
||||
<asp:DropDownList ID="CboFuenteRecaudacion" runat="server" CssClass="form-control select2me" DataTextField="FuenteRecaudacion" DataValueField="CveFuenteRecaudacion" Width="600px"></asp:DropDownList>
|
||||
<asp:RangeValidator ID="RVProgramaOperativo" runat="server" ControlToValidate="CboFuenteRecaudacion" Display="None" Type="Integer" MinimumValue="1" MaximumValue="2147483647" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Programa Operativo''</b> es necesario, por favor seleccione uno." ValidationGroup="GrpGuardar"></asp:RangeValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOProgramaOperativo" runat="server" HighlightCssClass="vco" TargetControlID="RVProgramaOperativo" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Rubro Ingreso:
|
||||
</td>
|
||||
<td>
|
||||
<asp:DropDownList ID="CboRubroIngreso" runat="server" CssClass="form-control select2me" DataTextField="RubroIngresoCodigo" DataValueField="CveRubroIngreso" Width="600px"></asp:DropDownList>
|
||||
<asp:RangeValidator ID="RVFuenteFinanciamiento" runat="server" ControlToValidate="CboRubroIngreso" Display="None" Type="Integer" MinimumValue="1" MaximumValue="2147483647" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fuente de Financiamiento''</b> es necesario, por favor seleccione uno." ValidationGroup="GrpGuardar"></asp:RangeValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOFuenteFinanciamiento" runat="server" HighlightCssClass="vco" TargetControlID="RVFuenteFinanciamiento" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-3">
|
||||
<div class="portlet smmallpadding light bordered">
|
||||
<div class="portlet-title">
|
||||
<div class="tools">
|
||||
<a href="javascript;" data-idchekbox="<%= chkexpand2.ClientID%>" class=" <%= IIf(chkexpand2.Checked = True, "collapse", "expand")%>"></a>
|
||||
<asp:CheckBox ID="chkexpand2" Checked="true" CssClass="hidden" runat="server" />
|
||||
</div>
|
||||
<div class="caption uppercase" style="position: relative;">
|
||||
<i class="fa fa-info-circle"></i>Acciones
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body" <%= IIf(chkexpand2.Checked = True, "", "style=""display:none;""")%>>
|
||||
<table>
|
||||
<tr>
|
||||
<td>
|
||||
<asp:Button ID="BtnCancelar" runat="server" Text="Cancelar" OnClientClick="javascript:document.location.href='/AC/CatPresupuestoIngresos.aspx'; return false;" class="btn btn-default" />
|
||||
</td>
|
||||
<td>
|
||||
<asp:Button ID="btnGuardar" runat="server" Text="Guardar" ValidationGroup="GrpGuardar" Width="150px" class="btn btn-primary" />
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-9">
|
||||
<div class="portlet smmallpadding light bordered">
|
||||
<div class="portlet-title">
|
||||
<div class="caption uppercase" style="position: relative; display: inline-block;">
|
||||
<i class="fa fa-info-circle"></i>Plan de Desarrollo
|
||||
</div>
|
||||
<div class="tools">
|
||||
<a href="javascript;" data-idchekbox="<%= chkexpand3.ClientID%>" class=" <%= IIf(chkexpand3.Checked = True, "collapse", "expand")%>"></a>
|
||||
<asp:CheckBox ID="chkexpand3" Checked="true" CssClass="hidden" runat="server" />
|
||||
</div>
|
||||
<div style="width: 400px; float:right; position: relative; display: inline-block;">
|
||||
<table>
|
||||
<tr>
|
||||
<td style="width: 180px;">Total:
|
||||
<asp:TextBox runat="server" ID="txtTotal" ClientIDMode="Static" Style="margin-left: 10px;" Width="100px" CssClass="alineanum"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVTotal" runat="server" ControlToValidate="txtTotal" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Total''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOTotal1" runat="server" Enabled="True" HighlightCssClass="vco" TargetControlID="RFVTotal" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</td>
|
||||
<td>
|
||||
<asp:RangeValidator ID="RVTotal" runat="server" ControlToValidate="txtTotal" Display="None" Type="Currency" MinimumValue="1" MaximumValue="2147483647" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Total''</b> no tiene el Formato Correcto." ValidationGroup="GrpGuardar"></asp:RangeValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOTotal2" runat="server" HighlightCssClass="vco" TargetControlID="RVTotal" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
<asp:Button ID="btnDividir" runat="server" Text="Dividir entre meses" OnClientClick="return dividir();" class="btn btn-primary" />
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="portlet-body" <%= IIf(chkexpand3.Checked = True, "", "style=""display:none;""")%>>
|
||||
|
||||
<table class="table table-advance ">
|
||||
<tr>
|
||||
<td>Enero</td>
|
||||
<td>
|
||||
<asp:TextBox runat="server" ID="txtEnero" ClientIDMode="Static" CssClass="alineanum"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVEnero" runat="server" ControlToValidate="txtEnero" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Total de Enero''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOEnero1" runat="server" Enabled="True" HighlightCssClass="vco" TargetControlID="RFVEnero" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
|
||||
<asp:RangeValidator ID="RVEnero" runat="server" ControlToValidate="txtEnero" Display="None" Type="Currency" MinimumValue="0" MaximumValue="2147483647" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Total de Enero''</b> no tiene el Formato Correcto." ValidationGroup="GrpGuardar"></asp:RangeValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOEnero2" runat="server" HighlightCssClass="vco" TargetControlID="RVEnero" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
|
||||
</td>
|
||||
<td>Abril</td>
|
||||
<td>
|
||||
<asp:TextBox runat="server" ID="txtAbril" ClientIDMode="Static" CssClass="alineanum"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVAbril" runat="server" ControlToValidate="txtAbril" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Total de Abril''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOAbril1" runat="server" Enabled="True" HighlightCssClass="vco" TargetControlID="RFVAbril" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
|
||||
<asp:RangeValidator ID="RVAbril" runat="server" ControlToValidate="txtAbril" Display="None" Type="Currency" MinimumValue="0" MaximumValue="2147483647" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Total de Abril''</b> no tiene el Formato Correcto." ValidationGroup="GrpGuardar"></asp:RangeValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOAbril2" runat="server" HighlightCssClass="vco" TargetControlID="RVAbril" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</td>
|
||||
<td>Julio</td>
|
||||
<td>
|
||||
<asp:TextBox runat="server" ID="txtJulio" ClientIDMode="Static" CssClass="alineanum"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVJulio" runat="server" ControlToValidate="txtJulio" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Total de Julio''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOJulio1" runat="server" Enabled="True" HighlightCssClass="vco" TargetControlID="RFVJulio" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
|
||||
<asp:RangeValidator ID="RVJulio" runat="server" ControlToValidate="txtJulio" Display="None" Type="Currency" MinimumValue="0" MaximumValue="2147483647" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Total de Julio''</b> no tiene el Formato Correcto." ValidationGroup="GrpGuardar"></asp:RangeValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOJulio2" runat="server" HighlightCssClass="vco" TargetControlID="RVJulio" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</td>
|
||||
<td>Octubre</td>
|
||||
<td>
|
||||
<asp:TextBox runat="server" ID="txtOctubre" ClientIDMode="Static" CssClass="alineanum"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVOctubre" runat="server" ControlToValidate="txtOctubre" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Total de Octubre''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOOctubre1" runat="server" Enabled="True" HighlightCssClass="vco" TargetControlID="RFVOctubre" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
|
||||
<asp:RangeValidator ID="RVOctubre" runat="server" ControlToValidate="txtOctubre" Display="None" Type="Currency" MinimumValue="0" MaximumValue="2147483647" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Total de Octubre''</b> no tiene el Formato Correcto." ValidationGroup="GrpGuardar"></asp:RangeValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOOctubre2" runat="server" HighlightCssClass="vco" TargetControlID="RVOctubre" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Febrero</td>
|
||||
<td>
|
||||
<asp:TextBox runat="server" ID="txtFebrero" ClientIDMode="Static" CssClass="alineanum"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVFebrero" runat="server" ControlToValidate="txtFebrero" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Total de Febrero''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOFebrero1" runat="server" Enabled="True" HighlightCssClass="vco" TargetControlID="RFVFebrero" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
|
||||
<asp:RangeValidator ID="RVFebrero" runat="server" ControlToValidate="txtFebrero" Display="None" Type="Currency" MinimumValue="0" MaximumValue="2147483647" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Total de Febrero''</b> no tiene el Formato Correcto." ValidationGroup="GrpGuardar"></asp:RangeValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOFebrero2" runat="server" HighlightCssClass="vco" TargetControlID="RVFebrero" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</td>
|
||||
<td>Mayo</td>
|
||||
<td>
|
||||
<asp:TextBox runat="server" ID="txtMayo" ClientIDMode="Static" CssClass="alineanum"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVMayo" runat="server" ControlToValidate="txtMayo" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Total de Mayo''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOMayo1" runat="server" Enabled="True" HighlightCssClass="vco" TargetControlID="RFVMayo" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
|
||||
<asp:RangeValidator ID="RVMayo" runat="server" ControlToValidate="txtMayo" Display="None" Type="Currency" MinimumValue="0" MaximumValue="2147483647" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Total de Mayo''</b> no tiene el Formato Correcto." ValidationGroup="GrpGuardar"></asp:RangeValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOMayo2" runat="server" HighlightCssClass="vco" TargetControlID="RVMayo" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</td>
|
||||
|
||||
|
||||
<td>Agosto</td>
|
||||
<td>
|
||||
<asp:TextBox runat="server" ID="txtAgosto" ClientIDMode="Static" CssClass="alineanum"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVAgosto" runat="server" ControlToValidate="txtAgosto" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Total de Agosto''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOAgosto1" runat="server" Enabled="True" HighlightCssClass="vco" TargetControlID="RFVAgosto" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
|
||||
<asp:RangeValidator ID="RVAgosto" runat="server" ControlToValidate="txtAgosto" Display="None" Type="Currency" MinimumValue="0" MaximumValue="2147483647" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Total de Agosto''</b> no tiene el Formato Correcto." ValidationGroup="GrpGuardar"></asp:RangeValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOAgosto2" runat="server" HighlightCssClass="vco" TargetControlID="RVAgosto" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</td>
|
||||
<td>Noviembre</td>
|
||||
<td>
|
||||
<asp:TextBox runat="server" ID="txtNoviembre" ClientIDMode="Static" CssClass="alineanum"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVNoviembre" runat="server" ControlToValidate="txtNoviembre" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Total de Noviembre''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCONoviembre1" runat="server" Enabled="True" HighlightCssClass="vco" TargetControlID="RFVNoviembre" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
|
||||
<asp:RangeValidator ID="RVNoviembre" runat="server" ControlToValidate="txtNoviembre" Display="None" Type="Currency" MinimumValue="0" MaximumValue="2147483647" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Total de Noviembre''</b> no tiene el Formato Correcto." ValidationGroup="GrpGuardar"></asp:RangeValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCONoviembre2" runat="server" HighlightCssClass="vco" TargetControlID="RVNoviembre" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Marzo</td>
|
||||
<td>
|
||||
<asp:TextBox runat="server" ID="txtMarzo" ClientIDMode="Static" CssClass="alineanum"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVMarzo" runat="server" ControlToValidate="txtMarzo" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Total de Marzo''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOMarzo1" runat="server" Enabled="True" HighlightCssClass="vco" TargetControlID="RFVMarzo" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
|
||||
<asp:RangeValidator ID="RVMarzo" runat="server" ControlToValidate="txtMarzo" Display="None" Type="Currency" MinimumValue="0" MaximumValue="2147483647" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Total de Marzo''</b> no tiene el Formato Correcto." ValidationGroup="GrpGuardar"></asp:RangeValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOMarzo2" runat="server" HighlightCssClass="vco" TargetControlID="RVMarzo" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</td>
|
||||
<td>Junio</td>
|
||||
<td>
|
||||
<asp:TextBox runat="server" ID="txtJunio" ClientIDMode="Static" CssClass="alineanum"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVJunio" runat="server" ControlToValidate="txtJunio" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Total de Junio''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOJunio1" runat="server" Enabled="True" HighlightCssClass="vco" TargetControlID="RFVJunio" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
|
||||
<asp:RangeValidator ID="RVJunio" runat="server" ControlToValidate="txtJunio" Display="None" Type="Currency" MinimumValue="0" MaximumValue="2147483647" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Total de Junio''</b> no tiene el Formato Correcto." ValidationGroup="GrpGuardar"></asp:RangeValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOJunio2" runat="server" HighlightCssClass="vco" TargetControlID="RVJunio" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</td>
|
||||
<td>Septiembre</td>
|
||||
<td>
|
||||
<asp:TextBox runat="server" ID="txtSeptiembre" ClientIDMode="Static" CssClass="alineanum"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVSeptiembre" runat="server" ControlToValidate="txtSeptiembre" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Total de Septiembre''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOSeptiembre1" runat="server" Enabled="True" HighlightCssClass="vco" TargetControlID="RFVSeptiembre" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
|
||||
<asp:RangeValidator ID="RVSeptiembre" runat="server" ControlToValidate="txtSeptiembre" Display="None" Type="Currency" MinimumValue="0" MaximumValue="2147483647" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Total de Septiembre''</b> no tiene el Formato Correcto." ValidationGroup="GrpGuardar"></asp:RangeValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOSeptiembre2" runat="server" HighlightCssClass="vco" TargetControlID="RVSeptiembre" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</td>
|
||||
<td>Diciembre</td>
|
||||
<td>
|
||||
<asp:TextBox runat="server" ID="txtDiciembre" ClientIDMode="Static" CssClass="alineanum"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVDiciembre" runat="server" ControlToValidate="txtDiciembre" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Total de Diciembre''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCODiciembre1" runat="server" Enabled="True" HighlightCssClass="vco" TargetControlID="RFVDiciembre" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
|
||||
<asp:RangeValidator ID="RVDiciembre" runat="server" ControlToValidate="txtDiciembre" Display="None" Type="Currency" MinimumValue="0" MaximumValue="2147483647" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Total de Diciembre''</b> no tiene el Formato Correcto." ValidationGroup="GrpGuardar"></asp:RangeValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCODiciembre2" runat="server" HighlightCssClass="vco" TargetControlID="RVDiciembre" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
||||
<script type="text/javascript">
|
||||
function dividir() {
|
||||
var total = $get('txtTotal').value.replace(/,/gi, "");
|
||||
var mensual = (Math.round(total * 100 / 12)) / 100;
|
||||
var dic = total - (mensual * 11);
|
||||
|
||||
$get('txtEnero').value = FormatoNumero(mensual, 2);
|
||||
$get('txtFebrero').value = FormatoNumero(mensual, 2);
|
||||
$get('txtMarzo').value = FormatoNumero(mensual, 2);
|
||||
$get('txtAbril').value = FormatoNumero(mensual, 2);
|
||||
$get('txtMayo').value = FormatoNumero(mensual, 2);
|
||||
$get('txtJunio').value = FormatoNumero(mensual, 2);
|
||||
$get('txtJulio').value = FormatoNumero(mensual, 2);
|
||||
$get('txtAgosto').value = FormatoNumero(mensual, 2);
|
||||
$get('txtSeptiembre').value = FormatoNumero(mensual, 2);
|
||||
$get('txtOctubre').value = FormatoNumero(mensual, 2);
|
||||
$get('txtNoviembre').value = FormatoNumero(mensual, 2);
|
||||
$get('txtDiciembre').value = FormatoNumero(mensual, 2);
|
||||
|
||||
$get('txtTotal').value = FormatoNumero(total * 1, 2);
|
||||
return false;
|
||||
}
|
||||
|
||||
function sumaTotal() {
|
||||
var total = 0;
|
||||
|
||||
total = total + parseFloat($get('txtEnero').value.replace(/,/gi, ""));
|
||||
total = total + parseFloat($get('txtFebrero').value.replace(/,/gi, ""));
|
||||
total = total + parseFloat($get('txtMarzo').value.replace(/,/gi, ""));
|
||||
total = total + parseFloat($get('txtAbril').value.replace(/,/gi, ""));
|
||||
total = total + parseFloat($get('txtMayo').value.replace(/,/gi, ""));
|
||||
total = total + parseFloat($get('txtJunio').value.replace(/,/gi, ""));
|
||||
total = total + parseFloat($get('txtJulio').value.replace(/,/gi, ""));
|
||||
total = total + parseFloat($get('txtAgosto').value.replace(/,/gi, ""));
|
||||
total = total + parseFloat($get('txtSeptiembre').value.replace(/,/gi, ""));
|
||||
total = total + parseFloat($get('txtOctubre').value.replace(/,/gi, ""));
|
||||
total = total + parseFloat($get('txtNoviembre').value.replace(/,/gi, ""));
|
||||
total = total + parseFloat($get('txtDiciembre').value.replace(/,/gi, ""));
|
||||
|
||||
$get('txtTotal').value = FormatoNumero(total, 2);
|
||||
}
|
||||
</script>
|
||||
</asp:Content>
|
||||
236
AC/PresupuestoIngresos.aspx.vb
Normal file
236
AC/PresupuestoIngresos.aspx.vb
Normal file
@@ -0,0 +1,236 @@
|
||||
Option Explicit On
|
||||
Option Strict On
|
||||
|
||||
Imports System.Data
|
||||
Imports System.Linq
|
||||
Imports Extensiones
|
||||
Partial Class AC_PresupuestoIngresos
|
||||
Inherits ClsPaginas
|
||||
|
||||
#Region "PROPIEDADES"
|
||||
Private Property CvePresupuestoIngresos As Integer
|
||||
Get
|
||||
CvePresupuestoIngresos = ViewState("CvePresupuestoIngresos").ToString.ToEntero
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
ViewState("CvePresupuestoIngresos") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private Property EsProyecto As Integer
|
||||
Get
|
||||
EsProyecto = ViewState("EsProyecto").ToString.ToEntero
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
ViewState("EsProyecto") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property Bloqueado As Integer
|
||||
Get
|
||||
Bloqueado = ViewState("Bloqueado").ToString.ToEntero
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
ViewState("Bloqueado") = value
|
||||
End Set
|
||||
End Property
|
||||
#End Region
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||
If Not Page.IsPostBack Then
|
||||
CvePresupuestoIngresos = IfNull(Request("CvePresupuestoIngresos"), "0").ToString.ToEntero
|
||||
EsProyecto = IfNull(Request("EsProyecto"), "0").ToString.ToEntero
|
||||
Bloqueado = IfNull(Request("Bloqueado"), "0").ToString.ToEntero
|
||||
|
||||
CargaDefault()
|
||||
|
||||
If CvePresupuestoIngresos > 0 Then
|
||||
CargaDatos()
|
||||
End If
|
||||
|
||||
If Bloqueado = 1 Then
|
||||
btnGuardar.Visible = False
|
||||
btnDividir.Visible = False
|
||||
|
||||
CboFuenteRecaudacion.Enabled = False
|
||||
CboRubroIngreso.Enabled = False
|
||||
DdlEjercicio.Enabled = False
|
||||
|
||||
txtTotal.Enabled = False
|
||||
txtEnero.Enabled = False
|
||||
txtFebrero.Enabled = False
|
||||
txtMarzo.Enabled = False
|
||||
txtAbril.Enabled = False
|
||||
txtMayo.Enabled = False
|
||||
txtJunio.Enabled = False
|
||||
txtJulio.Enabled = False
|
||||
txtAgosto.Enabled = False
|
||||
txtSeptiembre.Enabled = False
|
||||
txtOctubre.Enabled = False
|
||||
txtNoviembre.Enabled = False
|
||||
txtDiciembre.Enabled = False
|
||||
BtnCancelar.Text = "Regresar"
|
||||
|
||||
If EsProyecto = 0 Then
|
||||
Alert("Este Anteproyecto ya se genero como Presupuesto.", TipoMensaje.MsgInformacion)
|
||||
Else
|
||||
Alert("Este Presupuesto ya se Autorizó.", TipoMensaje.MsgInformacion)
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Public Sub CargaDatos()
|
||||
Dim objAC As New ClsAC
|
||||
|
||||
If objAC.GetPresupuestoIngresos(CvePresupuestoIngresos, -1, CBool(EsProyecto), UsuarioActual.CveEmpresa) Then
|
||||
If objAC.DtResultados.Rows.Count = 1 Then
|
||||
CboFuenteRecaudacion.SelectedValue = objAC.DtResultados.Rows(0)("CveFuenteRecaudacion").ToString
|
||||
CboRubroIngreso.SelectedValue = objAC.DtResultados.Rows(0)("CveRubroIngreso").ToString
|
||||
|
||||
txtTotal.Text = objAC.DtResultados.Rows(0)("Total").ToString.FormatoNumero
|
||||
txtEnero.Text = objAC.DtResultados.Rows(0)("Enero").ToString.FormatoNumero
|
||||
txtFebrero.Text = objAC.DtResultados.Rows(0)("Febrero").ToString.FormatoNumero
|
||||
txtMarzo.Text = objAC.DtResultados.Rows(0)("Marzo").ToString.FormatoNumero
|
||||
txtAbril.Text = objAC.DtResultados.Rows(0)("Abril").ToString.FormatoNumero
|
||||
txtMayo.Text = objAC.DtResultados.Rows(0)("Mayo").ToString.FormatoNumero
|
||||
txtJunio.Text = objAC.DtResultados.Rows(0)("Junio").ToString.FormatoNumero
|
||||
txtJulio.Text = objAC.DtResultados.Rows(0)("Julio").ToString.FormatoNumero
|
||||
txtAgosto.Text = objAC.DtResultados.Rows(0)("Agosto").ToString.FormatoNumero
|
||||
txtSeptiembre.Text = objAC.DtResultados.Rows(0)("Septiembre").ToString.FormatoNumero
|
||||
txtOctubre.Text = objAC.DtResultados.Rows(0)("Octubre").ToString.FormatoNumero
|
||||
txtNoviembre.Text = objAC.DtResultados.Rows(0)("Noviembre").ToString.FormatoNumero
|
||||
txtDiciembre.Text = objAC.DtResultados.Rows(0)("Diciembre").ToString.FormatoNumero
|
||||
DdlEjercicio.SelectedValue = objAC.DtResultados.Rows(0)("Ejercicio").ToString
|
||||
|
||||
End If
|
||||
End If
|
||||
|
||||
objAC.Dispose()
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
#Region " VALORES INICIALES "
|
||||
|
||||
Private Sub CargaDefault()
|
||||
txtEnero.Attributes.Add("onKeyUp", "sumaTotal();")
|
||||
txtFebrero.Attributes.Add("onKeyUp", "sumaTotal();")
|
||||
txtMarzo.Attributes.Add("onKeyUp", "sumaTotal();")
|
||||
txtAbril.Attributes.Add("onKeyUp", "sumaTotal();")
|
||||
txtMayo.Attributes.Add("onKeyUp", "sumaTotal();")
|
||||
txtJunio.Attributes.Add("onKeyUp", "sumaTotal();")
|
||||
txtJulio.Attributes.Add("onKeyUp", "sumaTotal();")
|
||||
txtAgosto.Attributes.Add("onKeyUp", "sumaTotal();")
|
||||
txtSeptiembre.Attributes.Add("onKeyUp", "sumaTotal();")
|
||||
txtOctubre.Attributes.Add("onKeyUp", "sumaTotal();")
|
||||
txtNoviembre.Attributes.Add("onKeyUp", "sumaTotal();")
|
||||
txtDiciembre.Attributes.Add("onKeyUp", "sumaTotal();")
|
||||
|
||||
CargaEjercicios()
|
||||
CargaFuenteRecaudacion()
|
||||
CargaRubroIngreso()
|
||||
End Sub
|
||||
|
||||
|
||||
#Region "COMBOS"
|
||||
Private Sub CargaEjercicios()
|
||||
Dim ClsConta As New ClsContPAQi(UsuarioActual.Empresa)
|
||||
If ClsConta.GetEjercicios() Then
|
||||
DdlEjercicio.DataSource = ClsConta.DtResultados
|
||||
Else
|
||||
DdlEjercicio.DataSource = Nothing
|
||||
End If
|
||||
ClsConta.Dispose()
|
||||
DdlEjercicio.DataBind()
|
||||
|
||||
DdlEjercicio.SelectedValueExist(UsuarioActual.Empresa.EjercicioActual.ToString)
|
||||
End Sub
|
||||
Private Sub CargaFuenteRecaudacion()
|
||||
CboFuenteRecaudacion.DataSource = GlobalDTAC_FuentesRecaudacion(UsuarioActual.CveEmpresa)
|
||||
CboFuenteRecaudacion.DataBind()
|
||||
CboFuenteRecaudacion.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
End Sub
|
||||
|
||||
Private Sub CargaRubroIngreso()
|
||||
CboRubroIngreso.DataSource = GlobalDTAC_MatrizIngresos.FiltraParametros("Caracteristicas = 1")
|
||||
CboRubroIngreso.DataBind()
|
||||
CboRubroIngreso.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
Protected Sub btnGuardar_Click(sender As Object, e As EventArgs) Handles btnGuardar.Click
|
||||
Dim objAC As New ClsAC()
|
||||
|
||||
Dim Total As Double = txtTotal.Text.Replace(",", "").Trim.ToDouble
|
||||
Dim Enero As Double = txtEnero.Text.Replace(",", "").Trim.ToDouble
|
||||
Dim Febrero As Double = txtFebrero.Text.Replace(",", "").Trim.ToDouble
|
||||
Dim Marzo As Double = txtMarzo.Text.Replace(",", "").Trim.ToDouble
|
||||
Dim Abril As Double = txtAbril.Text.Replace(",", "").Trim.ToDouble
|
||||
Dim Mayo As Double = txtMayo.Text.Replace(",", "").Trim.ToDouble
|
||||
Dim Junio As Double = txtJunio.Text.Replace(",", "").Trim.ToDouble
|
||||
Dim Julio As Double = txtJulio.Text.Replace(",", "").Trim.ToDouble
|
||||
Dim Agosto As Double = txtAgosto.Text.Replace(",", "").Trim.ToDouble
|
||||
Dim Septiembre As Double = txtSeptiembre.Text.Replace(",", "").Trim.ToDouble
|
||||
Dim Octubre As Double = txtOctubre.Text.Replace(",", "").Trim.ToDouble
|
||||
Dim Noviembre As Double = txtNoviembre.Text.Replace(",", "").Trim.ToDouble
|
||||
Dim Diciembre As Double = txtDiciembre.Text.Replace(",", "").Trim.ToDouble
|
||||
|
||||
Dim Ejercicio As Integer = DdlEjercicio.SelectedValue.ToEntero
|
||||
Dim CveFuenteRecaudacion As Integer = CboFuenteRecaudacion.SelectedValue.ToString.ToEntero
|
||||
Dim CveRubroIngreso As Integer = CboRubroIngreso.SelectedValue.ToString.ToEntero
|
||||
|
||||
|
||||
If CvePresupuestoIngresos = 0 Then
|
||||
If objAC.AddPresupuestoIngresos(CveFuenteRecaudacion, CveRubroIngreso, Ejercicio, Total, Enero, Febrero, Marzo, Abril, Mayo, Junio, Julio, Agosto, Septiembre, Octubre, Noviembre, Diciembre, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
|
||||
Alert("El Presupuesto de Ingreso se guardo Correctamente", TipoMensaje.MsgInformacion, "document.location.href=""/AC/CatPresupuestoIngresos.aspx""")
|
||||
End If
|
||||
Else
|
||||
If objAC.UpdatePresupuestoIngresos(CvePresupuestoIngresos, CveFuenteRecaudacion, CveRubroIngreso, Total, Enero, Febrero, Marzo, Abril, Mayo, Junio, Julio, Agosto, Septiembre, Octubre, Noviembre, Diciembre) Then
|
||||
Alert("El Presupuesto de Ingreso se actualizo Correctamente", TipoMensaje.MsgInformacion, "document.location.href=""/AC/CatPresupuestoIngresos.aspx""")
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
objAC.Dispose()
|
||||
End Sub
|
||||
|
||||
Protected Sub BtnProyecto_Click(sender As Object, e As EventArgs)
|
||||
Dim AC As New ClsAC
|
||||
|
||||
Dim Total As Double = txtTotal.Text.Replace(",", "").Trim.ToDouble
|
||||
Dim Enero As Double = txtEnero.Text.Replace(",", "").Trim.ToDouble
|
||||
Dim Febrero As Double = txtFebrero.Text.Replace(",", "").Trim.ToDouble
|
||||
Dim Marzo As Double = txtMarzo.Text.Replace(",", "").Trim.ToDouble
|
||||
Dim Abril As Double = txtAbril.Text.Replace(",", "").Trim.ToDouble
|
||||
Dim Mayo As Double = txtMayo.Text.Replace(",", "").Trim.ToDouble
|
||||
Dim Junio As Double = txtJunio.Text.Replace(",", "").Trim.ToDouble
|
||||
Dim Julio As Double = txtJulio.Text.Replace(",", "").Trim.ToDouble
|
||||
Dim Agosto As Double = txtAgosto.Text.Replace(",", "").Trim.ToDouble
|
||||
Dim Septiembre As Double = txtSeptiembre.Text.Replace(",", "").Trim.ToDouble
|
||||
Dim Octubre As Double = txtOctubre.Text.Replace(",", "").Trim.ToDouble
|
||||
Dim Noviembre As Double = txtNoviembre.Text.Replace(",", "").Trim.ToDouble
|
||||
Dim Diciembre As Double = txtDiciembre.Text.Replace(",", "").Trim.ToDouble
|
||||
|
||||
Dim Ejercicio As Integer = 2015
|
||||
Dim CveFuenteRecaudacion As Integer = CboFuenteRecaudacion.SelectedValue.ToString.ToEntero
|
||||
Dim CveRubroIngreso As Integer = CboRubroIngreso.SelectedValue.ToString.ToEntero
|
||||
|
||||
|
||||
|
||||
If CvePresupuestoIngresos > 0 Then
|
||||
If AC.ProyectoPresupuestoIngresos(Ejercicio, CveFuenteRecaudacion, CveRubroIngreso, Total, Enero, Febrero, Marzo, Abril, Mayo, Junio, Julio, Agosto, Septiembre, Octubre, Noviembre, Diciembre, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CvePresupuestoIngresos) Then
|
||||
Alert("El Presupuesto de Ingreso se ACTUALIZO Correctamente como PROYECTO", TipoMensaje.MsgInformacion, "document.location.href=""/AC/CatPresupuestosIngresos.aspx""")
|
||||
End If
|
||||
Else
|
||||
Alert("ERROR", TipoMensaje.MsgError)
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
|
||||
444
AC/ProgramaOperativo.aspx
Normal file
444
AC/ProgramaOperativo.aspx
Normal file
@@ -0,0 +1,444 @@
|
||||
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="ProgramaOperativo.aspx.vb" Inherits="AC_ProgramaOperativo" %>
|
||||
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="HB" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="E" runat="Server">
|
||||
Plan Operativo Anual
|
||||
<asp:Label ID="LblEjercicio" Visible="false" runat="server" Text=""></asp:Label>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
|
||||
<asp:UpdatePanel ID="upDatos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-8">
|
||||
<div class="portlet smmallpadding light bordered">
|
||||
<div class="portlet-title">
|
||||
<div class="tools">
|
||||
<a href="javascript;" data-idchekbox="<%= chkexpand.ClientID%>" class=" <%= IIf(chkexpand.Checked = True, "collapse", "expand")%>"></a>
|
||||
<asp:CheckBox ID="chkexpand" Checked="true" CssClass="hidden" runat="server" />
|
||||
</div>
|
||||
<div class="caption uppercase" style="position: relative;">
|
||||
<i class="fa fa-info-circle"></i>Proyecto/Proceso/Meta
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body" <%= IIf(chkexpand.Checked = True, "", "style=""display:none;""")%>>
|
||||
<table>
|
||||
<tr>
|
||||
<td>Ejercicio:</td>
|
||||
<td>
|
||||
<asp:DropDownList ID="DdlEjercicio" CssClass="form-control select2me" runat="server" Width="100px" DataTextField="Ejercicio" DataValueField="Ejercicio"></asp:DropDownList>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Clave:</td>
|
||||
<td>
|
||||
<asp:TextBox ID="txtClave" runat="server" Width="100px" ValidationGroup="GrpGuardar" />
|
||||
<asp:RequiredFieldValidator ID="RFVClave" runat="server" ControlToValidate="txtClave" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Clave''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCEClave" runat="server" Enabled="True" HighlightCssClass="vco" TargetControlID="RFVClave" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Proyecto/Proceso/Meta</td>
|
||||
<td>
|
||||
<asp:TextBox ID="txtProgramaOperativo" runat="server" Width="550px" TextMode="MultiLine" ValidationGroup="GrpGuardar" />
|
||||
<asp:RequiredFieldValidator ID="RFVProgramaOperativo" runat="server" ControlToValidate="txtProgramaOperativo" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Programa Operativo''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOProgramaOperativo" runat="server" Enabled="True" HighlightCssClass="vco" TargetControlID="RFVProgramaOperativo" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Problemática</td>
|
||||
<td>
|
||||
<asp:TextBox ID="txtProblematica" runat="server" Rows="3" TextMode="MultiLine" Width="550px"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVProblematica" runat="server" ControlToValidate="txtProblematica" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Problemática''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOProblematica" runat="server" Enabled="True" HighlightCssClass="vco" TargetControlID="RFVProblematica" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Causa</td>
|
||||
<td>
|
||||
<asp:TextBox ID="txtCausa" runat="server" Rows="3" TextMode="MultiLine" Width="550px"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVCausa" runat="server" ControlToValidate="txtCausa" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Causa''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOCausa" runat="server" Enabled="True" HighlightCssClass="vco" TargetControlID="RFVCausa" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Efecto</td>
|
||||
<td>
|
||||
<asp:TextBox ID="txtEfecto" runat="server" Rows="3" TextMode="MultiLine" Width="550px"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVEfecto" runat="server" ControlToValidate="txtEfecto" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Efecto''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOEfecto" runat="server" Enabled="True" HighlightCssClass="vco" TargetControlID="RFVEfecto" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="col-md-4">
|
||||
<div class="portlet smmallpadding light bordered">
|
||||
<div class="portlet-title">
|
||||
<div class="tools">
|
||||
<a href="javascript;" data-idchekbox="<%= chkexpand2.ClientID%>" class=" <%= IIf(chkexpand2.Checked = True, "collapse", "expand")%>"></a>
|
||||
<asp:CheckBox ID="chkexpand2" Checked="true" CssClass="hidden" runat="server" />
|
||||
</div>
|
||||
<div class="caption uppercase" style="position: relative;">
|
||||
<i class="fa fa-info-circle"></i>Acciones
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body" <%= IIf(chkexpand2.Checked = True, "", "style=""display:none;""")%>>
|
||||
<table>
|
||||
<%--<tr>
|
||||
<td>
|
||||
<asp:Button ID="BtnProyecto" runat="server" Text="Generar Proyecto" class="btn btn-primary" />
|
||||
</td>
|
||||
</tr>--%>
|
||||
<tr>
|
||||
<td>
|
||||
<asp:Button ID="BtnCancelar" runat="server" Text="Cancelar" OnClientClick="javascript:document.location.href='/AC/RepProgramaOperativo.aspx'; return false;" class="btn btn-default" />
|
||||
</td>
|
||||
<td>
|
||||
<asp:Button ID="btnGuardar" runat="server" Text="Guardar" ValidationGroup="GrpGuardar" Width="120px" class="btn btn-primary" />
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-8">
|
||||
<div class="portlet smmallpadding light bordered">
|
||||
<div class="portlet-title">
|
||||
<div class="tools">
|
||||
<a href="javascript;" data-idchekbox="<%= chkexpand3.ClientID%>" class=" <%= IIf(chkexpand3.Checked = True, "collapse", "expand")%>"></a>
|
||||
<asp:CheckBox ID="chkexpand3" Checked="true" CssClass="hidden" runat="server" />
|
||||
</div>
|
||||
<div class="caption uppercase" style="position: relative;">
|
||||
<i class="fa fa-info-circle"></i>Parámetros CONAC
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body" <%= IIf(chkexpand3.Checked = True, "", "style=""display:none;""")%>>
|
||||
<table>
|
||||
<tr>
|
||||
<td>Programa CONAC</td>
|
||||
<td>
|
||||
<asp:DropDownList ID="CboProgramaCONAC" CssClass="form-control select2me" runat="server" DataTextField="ProgramaCONACNombre" DataValueField="CveProgramaCONAC" Width="550px"></asp:DropDownList>
|
||||
<asp:RangeValidator ID="RVProgramaCONAC" runat="server" ControlToValidate="CboProgramaCONAC" Display="None" Type="Integer" MinimumValue="1" MaximumValue="2147483647" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Programa CONAC''</b> es necesario, por favor seleccione uno." ValidationGroup="GrpGuardar"></asp:RangeValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOProgramaCONAC" runat="server" HighlightCssClass="vco" TargetControlID="RVProgramaCONAC" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Clasificación Geográfica</td>
|
||||
<td>
|
||||
<asp:DropDownList ID="CboClasificacionGeografica" CssClass="form-control select2me" runat="server" DataTextField="ClasificacionGeografica" DataValueField="CveClasificacionGeografica" Width="550px"></asp:DropDownList>
|
||||
<asp:RangeValidator ID="RVClasificacionGeografica" runat="server" ControlToValidate="CboClasificacionGeografica" Display="None" Type="Integer" MinimumValue="1" MaximumValue="2147483647" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Clasificación Geográfica''</b> es necesario, por favor seleccione uno." ValidationGroup="GrpGuardar"></asp:RangeValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOClasificacionGeografica" runat="server" HighlightCssClass="vco" TargetControlID="RVClasificacionGeografica" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Clasificación Funcional</td>
|
||||
<td>
|
||||
<asp:DropDownList ID="CboClasificacionFuncional" CssClass="form-control select2me" runat="server" DataTextField="CodClasificacionFuncional" DataValueField="CveClasificacionFuncional" Width="550px"></asp:DropDownList>
|
||||
<asp:RangeValidator ID="RVClasificacionFuncional" runat="server" ControlToValidate="CboClasificacionFuncional" Display="None" Type="Integer" MinimumValue="1" MaximumValue="2147483647" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Clasificación Funcional''</b> es necesario, por favor seleccione uno." ValidationGroup="GrpGuardar"></asp:RangeValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOClasificacionFuncional" runat="server" HighlightCssClass="vco" TargetControlID="RVClasificacionFuncional" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Clasificación Administrativa</td>
|
||||
<td>
|
||||
<asp:DropDownList ID="CboClasificacionAdministrativa" CssClass="form-control select2me" runat="server" DataTextField="CodClasificacionAdministrativa" DataValueField="CveClasificacionAdministrativa" Width="550px"></asp:DropDownList>
|
||||
<asp:RangeValidator ID="RVClasificacionAdministrativa" runat="server" ControlToValidate="CboClasificacionAdministrativa" Display="None" Type="Integer" MinimumValue="1" MaximumValue="2147483647" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Clasificación Administrativa''</b> es necesario, por favor seleccione uno." ValidationGroup="GrpGuardar"></asp:RangeValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOClasificacionAdministrativa" runat="server" HighlightCssClass="vco" TargetControlID="RVClasificacionAdministrativa" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-4">
|
||||
<div class="portlet smmallpadding light bordered">
|
||||
<div class="portlet-title">
|
||||
<div class="tools">
|
||||
<a href="javascript;" data-idchekbox="<%= chkexpand4.ClientID%>" class=" <%= IIf(chkexpand4.Checked = True, "collapse", "expand")%>"></a>
|
||||
<asp:CheckBox ID="chkexpand4" Checked="true" CssClass="hidden" runat="server" />
|
||||
</div>
|
||||
<div class="caption uppercase" style="position: relative;">
|
||||
<i class="fa fa-info-circle"></i>Plan de desarrollo
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body" <%= IIf(chkexpand4.Checked = True, "", "style=""display:none;""")%>>
|
||||
<table>
|
||||
<tr>
|
||||
<td>Eje Rector</td>
|
||||
<td>
|
||||
<asp:DropDownList ID="CboEjeRector" CssClass="form-control select2me" runat="server" DataTextField="EjeRector" DataValueField="CveEjeRector" Width="200px" AutoPostBack="true"></asp:DropDownList>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Programas</td>
|
||||
<td>
|
||||
<asp:DropDownList ID="CboPrograma" CssClass="form-control select2me" runat="server" DataTextField="Programa" DataValueField="CvePrograma" Width="200px" AutoPostBack="true">
|
||||
<asp:ListItem Value="-1" Text="Seleccione"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Estrategias</td>
|
||||
<td>
|
||||
<asp:DropDownList ID="CboEstrategia" CssClass="form-control select2me" runat="server" DataTextField="Estrategia" DataValueField="CveEstrategia" Width="200px" AutoPostBack="true">
|
||||
<asp:ListItem Value="-1" Text="Seleccione"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Lineas de Acción</td>
|
||||
<td>
|
||||
<asp:DropDownList ID="CboLineaAccion" CssClass="form-control select2me" runat="server" DataTextField="LineaAccion" DataValueField="CveLineaAccion" Width="200px" AutoPostBack="true">
|
||||
<asp:ListItem Value="-1" Text="Seleccione"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Metas</td>
|
||||
<td>
|
||||
<asp:DropDownList ID="CboMeta" CssClass="form-control select2me" runat="server" DataTextField="Meta" DataValueField="CveMeta" Width="200px">
|
||||
<asp:ListItem Value="-1" Text="Seleccione"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
<asp:RangeValidator ID="RVMeta" runat="server" ControlToValidate="CboMeta" Display="None" Type="Integer" MinimumValue="1" MaximumValue="2147483647" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Meta''</b> es necesario, por favor seleccione uno." ValidationGroup="GrpGuardar"></asp:RangeValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOMeta" runat="server" HighlightCssClass="vco" TargetControlID="RVMeta" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Unidad de Medida</td>
|
||||
<td>
|
||||
<asp:DropDownList ID="CboUM" CssClass="form-control select2me" runat="server" DataTextField="UnidadMedida" DataValueField="CveUnidadMedida" Width="200px"></asp:DropDownList>
|
||||
<asp:RangeValidator ID="RVUM" runat="server" ControlToValidate="CboUM" Display="None" Type="Integer" MinimumValue="1" MaximumValue="2147483647" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Unidad de Medida''</b> es necesario, por favor seleccione uno." ValidationGroup="GrpGuardar"></asp:RangeValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOUM" runat="server" HighlightCssClass="vco" TargetControlID="RVUM" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-8">
|
||||
<div class="portlet smmallpadding light bordered">
|
||||
<div class="portlet-title">
|
||||
<div class="caption uppercase" style="position: relative; display: inline-block;">
|
||||
<i class="fa fa-info-circle"></i>Plan de Desarrollo - Mensual
|
||||
</div>
|
||||
<div class="tools">
|
||||
<a href="javascript;" data-idchekbox="<%= chkexpand5.ClientID%>" class=" <%= IIf(chkexpand5.Checked = True, "collapse", "expand")%>"></a>
|
||||
<asp:CheckBox ID="chkexpand5" Checked="true" CssClass="hidden" runat="server" />
|
||||
</div>
|
||||
<div style="width: 400px; float: right; position: relative; display: inline-block;">
|
||||
<table>
|
||||
<tr>
|
||||
<td style="width: 180px;">Total:
|
||||
<asp:TextBox runat="server" ID="txtTotal" ClientIDMode="Static" Style="margin-left: 10px;" Width="100px" CssClass="alineanum"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVTotal" runat="server" ControlToValidate="txtTotal" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Total''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOTotal1" runat="server" Enabled="True" HighlightCssClass="vco" TargetControlID="RFVTotal" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</td>
|
||||
<td>
|
||||
<asp:RangeValidator ID="RVTotal" runat="server" ControlToValidate="txtTotal" Display="None" Type="Currency" MinimumValue="1" MaximumValue="2147483647" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Total''</b> no tiene el Formato Correcto." ValidationGroup="GrpGuardar"></asp:RangeValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOTotal2" runat="server" HighlightCssClass="vco" TargetControlID="RVTotal" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
<asp:Button ID="btnDividir" runat="server" Text="Dividir entre meses" OnClientClick="return dividir();" class="btn btn-primary" />
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="portlet-body" <%= IIf(chkexpand5.Checked = True, "", "style=""display:none;""")%>>
|
||||
|
||||
<table class="table table-advance ">
|
||||
<tr>
|
||||
<td>Enero</td>
|
||||
<td>
|
||||
<asp:TextBox runat="server" ID="txtEnero" ClientIDMode="Static" CssClass="alineanum"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVEnero" runat="server" ControlToValidate="txtEnero" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Total de Enero''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOEnero1" runat="server" Enabled="True" HighlightCssClass="vco" TargetControlID="RFVEnero" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
|
||||
<asp:RangeValidator ID="RVEnero" runat="server" ControlToValidate="txtEnero" Display="None" Type="Currency" MinimumValue="0" MaximumValue="2147483647" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Total de Enero''</b> no tiene el Formato Correcto." ValidationGroup="GrpGuardar"></asp:RangeValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOEnero2" runat="server" HighlightCssClass="vco" TargetControlID="RVEnero" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
|
||||
</td>
|
||||
<td>Abril</td>
|
||||
<td>
|
||||
<asp:TextBox runat="server" ID="txtAbril" ClientIDMode="Static" CssClass="alineanum"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVAbril" runat="server" ControlToValidate="txtAbril" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Total de Abril''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOAbril1" runat="server" Enabled="True" HighlightCssClass="vco" TargetControlID="RFVAbril" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
|
||||
<asp:RangeValidator ID="RVAbril" runat="server" ControlToValidate="txtAbril" Display="None" Type="Currency" MinimumValue="0" MaximumValue="2147483647" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Total de Abril''</b> no tiene el Formato Correcto." ValidationGroup="GrpGuardar"></asp:RangeValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOAbril2" runat="server" HighlightCssClass="vco" TargetControlID="RVAbril" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</td>
|
||||
<td>Julio</td>
|
||||
<td>
|
||||
<asp:TextBox runat="server" ID="txtJulio" ClientIDMode="Static" CssClass="alineanum"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVJulio" runat="server" ControlToValidate="txtJulio" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Total de Julio''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOJulio1" runat="server" Enabled="True" HighlightCssClass="vco" TargetControlID="RFVJulio" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
|
||||
<asp:RangeValidator ID="RVJulio" runat="server" ControlToValidate="txtJulio" Display="None" Type="Currency" MinimumValue="0" MaximumValue="2147483647" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Total de Julio''</b> no tiene el Formato Correcto." ValidationGroup="GrpGuardar"></asp:RangeValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOJulio2" runat="server" HighlightCssClass="vco" TargetControlID="RVJulio" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</td>
|
||||
<td>Octubre</td>
|
||||
<td>
|
||||
<asp:TextBox runat="server" ID="txtOctubre" ClientIDMode="Static" CssClass="alineanum"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVOctubre" runat="server" ControlToValidate="txtOctubre" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Total de Octubre''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOOctubre1" runat="server" Enabled="True" HighlightCssClass="vco" TargetControlID="RFVOctubre" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
|
||||
<asp:RangeValidator ID="RVOctubre" runat="server" ControlToValidate="txtOctubre" Display="None" Type="Currency" MinimumValue="0" MaximumValue="2147483647" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Total de Octubre''</b> no tiene el Formato Correcto." ValidationGroup="GrpGuardar"></asp:RangeValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOOctubre2" runat="server" HighlightCssClass="vco" TargetControlID="RVOctubre" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Febrero</td>
|
||||
<td>
|
||||
<asp:TextBox runat="server" ID="txtFebrero" ClientIDMode="Static" CssClass="alineanum"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVFebrero" runat="server" ControlToValidate="txtFebrero" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Total de Febrero''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOFebrero1" runat="server" Enabled="True" HighlightCssClass="vco" TargetControlID="RFVFebrero" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
|
||||
<asp:RangeValidator ID="RVFebrero" runat="server" ControlToValidate="txtFebrero" Display="None" Type="Currency" MinimumValue="0" MaximumValue="2147483647" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Total de Febrero''</b> no tiene el Formato Correcto." ValidationGroup="GrpGuardar"></asp:RangeValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOFebrero2" runat="server" HighlightCssClass="vco" TargetControlID="RVFebrero" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</td>
|
||||
<td>Mayo</td>
|
||||
<td>
|
||||
<asp:TextBox runat="server" ID="txtMayo" ClientIDMode="Static" CssClass="alineanum"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVMayo" runat="server" ControlToValidate="txtMayo" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Total de Mayo''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOMayo1" runat="server" Enabled="True" HighlightCssClass="vco" TargetControlID="RFVMayo" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
|
||||
<asp:RangeValidator ID="RVMayo" runat="server" ControlToValidate="txtMayo" Display="None" Type="Currency" MinimumValue="0" MaximumValue="2147483647" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Total de Mayo''</b> no tiene el Formato Correcto." ValidationGroup="GrpGuardar"></asp:RangeValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOMayo2" runat="server" HighlightCssClass="vco" TargetControlID="RVMayo" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</td>
|
||||
|
||||
|
||||
<td>Agosto</td>
|
||||
<td>
|
||||
<asp:TextBox runat="server" ID="txtAgosto" ClientIDMode="Static" CssClass="alineanum"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVAgosto" runat="server" ControlToValidate="txtAgosto" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Total de Agosto''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOAgosto1" runat="server" Enabled="True" HighlightCssClass="vco" TargetControlID="RFVAgosto" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
|
||||
<asp:RangeValidator ID="RVAgosto" runat="server" ControlToValidate="txtAgosto" Display="None" Type="Currency" MinimumValue="0" MaximumValue="2147483647" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Total de Agosto''</b> no tiene el Formato Correcto." ValidationGroup="GrpGuardar"></asp:RangeValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOAgosto2" runat="server" HighlightCssClass="vco" TargetControlID="RVAgosto" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</td>
|
||||
<td>Noviembre</td>
|
||||
<td>
|
||||
<asp:TextBox runat="server" ID="txtNoviembre" ClientIDMode="Static" CssClass="alineanum"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVNoviembre" runat="server" ControlToValidate="txtNoviembre" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Total de Noviembre''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCONoviembre1" runat="server" Enabled="True" HighlightCssClass="vco" TargetControlID="RFVNoviembre" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
|
||||
<asp:RangeValidator ID="RVNoviembre" runat="server" ControlToValidate="txtNoviembre" Display="None" Type="Currency" MinimumValue="0" MaximumValue="2147483647" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Total de Noviembre''</b> no tiene el Formato Correcto." ValidationGroup="GrpGuardar"></asp:RangeValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCONoviembre2" runat="server" HighlightCssClass="vco" TargetControlID="RVNoviembre" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Marzo</td>
|
||||
<td>
|
||||
<asp:TextBox runat="server" ID="txtMarzo" ClientIDMode="Static" CssClass="alineanum"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVMarzo" runat="server" ControlToValidate="txtMarzo" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Total de Marzo''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOMarzo1" runat="server" Enabled="True" HighlightCssClass="vco" TargetControlID="RFVMarzo" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
|
||||
<asp:RangeValidator ID="RVMarzo" runat="server" ControlToValidate="txtMarzo" Display="None" Type="Currency" MinimumValue="0" MaximumValue="2147483647" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Total de Marzo''</b> no tiene el Formato Correcto." ValidationGroup="GrpGuardar"></asp:RangeValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOMarzo2" runat="server" HighlightCssClass="vco" TargetControlID="RVMarzo" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</td>
|
||||
<td>Junio</td>
|
||||
<td>
|
||||
<asp:TextBox runat="server" ID="txtJunio" ClientIDMode="Static" CssClass="alineanum"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVJunio" runat="server" ControlToValidate="txtJunio" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Total de Junio''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOJunio1" runat="server" Enabled="True" HighlightCssClass="vco" TargetControlID="RFVJunio" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
|
||||
<asp:RangeValidator ID="RVJunio" runat="server" ControlToValidate="txtJunio" Display="None" Type="Currency" MinimumValue="0" MaximumValue="2147483647" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Total de Junio''</b> no tiene el Formato Correcto." ValidationGroup="GrpGuardar"></asp:RangeValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOJunio2" runat="server" HighlightCssClass="vco" TargetControlID="RVJunio" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</td>
|
||||
<td>Septiembre</td>
|
||||
<td>
|
||||
<asp:TextBox runat="server" ID="txtSeptiembre" ClientIDMode="Static" CssClass="alineanum"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVSeptiembre" runat="server" ControlToValidate="txtSeptiembre" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Total de Septiembre''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOSeptiembre1" runat="server" Enabled="True" HighlightCssClass="vco" TargetControlID="RFVSeptiembre" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
|
||||
<asp:RangeValidator ID="RVSeptiembre" runat="server" ControlToValidate="txtSeptiembre" Display="None" Type="Currency" MinimumValue="0" MaximumValue="2147483647" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Total de Septiembre''</b> no tiene el Formato Correcto." ValidationGroup="GrpGuardar"></asp:RangeValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOSeptiembre2" runat="server" HighlightCssClass="vco" TargetControlID="RVSeptiembre" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</td>
|
||||
<td>Diciembre</td>
|
||||
<td>
|
||||
<asp:TextBox runat="server" ID="txtDiciembre" ClientIDMode="Static" CssClass="alineanum"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVDiciembre" runat="server" ControlToValidate="txtDiciembre" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Total de Diciembre''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCODiciembre1" runat="server" Enabled="True" HighlightCssClass="vco" TargetControlID="RFVDiciembre" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
|
||||
<asp:RangeValidator ID="RVDiciembre" runat="server" ControlToValidate="txtDiciembre" Display="None" Type="Currency" MinimumValue="0" MaximumValue="2147483647" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Total de Diciembre''</b> no tiene el Formato Correcto." ValidationGroup="GrpGuardar"></asp:RangeValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCODiciembre2" runat="server" HighlightCssClass="vco" TargetControlID="RVDiciembre" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
function dividir() {
|
||||
var total = $get('txtTotal').value.replace(",", "");
|
||||
var mensual = (Math.round(total * 100 / 12)) / 100;
|
||||
var dic = total - (mensual * 11);
|
||||
|
||||
$get('txtEnero').value = mensual;
|
||||
$get('txtFebrero').value = mensual;
|
||||
$get('txtMarzo').value = mensual;
|
||||
$get('txtAbril').value = mensual;
|
||||
$get('txtMayo').value = mensual;
|
||||
$get('txtJunio').value = mensual;
|
||||
$get('txtJulio').value = mensual;
|
||||
$get('txtAgosto').value = mensual;
|
||||
$get('txtSeptiembre').value = mensual;
|
||||
$get('txtOctubre').value = mensual;
|
||||
$get('txtNoviembre').value = mensual;
|
||||
$get('txtDiciembre').value = (Math.round(dic * 100)) / 100;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
function sumaTotal() {
|
||||
var total = 0;
|
||||
|
||||
total = total + $get('txtEnero').value.replace(",", "") * 1;
|
||||
total = total + $get('txtFebrero').value.replace(",", "") * 1;
|
||||
total = total + $get('txtMarzo').value.replace(",", "") * 1;
|
||||
total = total + $get('txtAbril').value.replace(",", "") * 1;
|
||||
total = total + $get('txtMayo').value.replace(",", "") * 1;
|
||||
total = total + $get('txtJunio').value.replace(",", "") * 1;
|
||||
total = total + $get('txtJulio').value.replace(",", "") * 1;
|
||||
total = total + $get('txtAgosto').value.replace(",", "") * 1;
|
||||
total = total + $get('txtSeptiembre').value.replace(",", "") * 1;
|
||||
total = total + $get('txtOctubre').value.replace(",", "") * 1;
|
||||
total = total + $get('txtNoviembre').value.replace(",", "") * 1;
|
||||
total = total + $get('txtDiciembre').value.replace(",", "") * 1;
|
||||
|
||||
$get('txtTotal').value = (Math.round(total * 100)) / 100;
|
||||
}
|
||||
</script>
|
||||
|
||||
</asp:Content>
|
||||
377
AC/ProgramaOperativo.aspx.vb
Normal file
377
AC/ProgramaOperativo.aspx.vb
Normal file
@@ -0,0 +1,377 @@
|
||||
Option Explicit On
|
||||
Option Strict On
|
||||
|
||||
Imports Extensiones
|
||||
|
||||
|
||||
Partial Class AC_ProgramaOperativo
|
||||
Inherits ClsPaginas
|
||||
|
||||
#Region "PROPIEDADES"
|
||||
Private Property CveProgramaOperativo As Integer
|
||||
Get
|
||||
CveProgramaOperativo = ViewState("CveProgramaOperativo").ToString.ToEntero
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
ViewState("CveProgramaOperativo") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private Property EsProyecto As Integer
|
||||
Get
|
||||
EsProyecto = ViewState("EsProyecto").ToString.ToEntero
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
ViewState("EsProyecto") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property Bloqueado As Integer
|
||||
Get
|
||||
Bloqueado = ViewState("Bloqueado").ToString.ToEntero
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
ViewState("Bloqueado") = value
|
||||
End Set
|
||||
End Property
|
||||
#End Region
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||
If Not Page.IsPostBack Then
|
||||
CveProgramaOperativo = IfNull(Request("CveProgramaOperativo"), "0").ToString.ToEntero
|
||||
EsProyecto = IfNull(Request("EsProyecto"), "1").ToString.ToEntero
|
||||
Bloqueado = IfNull(Request("Bloqueado"), "0").ToString.ToEntero
|
||||
|
||||
CargaDefault()
|
||||
|
||||
If CveProgramaOperativo > 0 Then
|
||||
CargaDatos()
|
||||
ElseIf CveProgramaOperativo = 0 Then
|
||||
'BtnProyecto.Visible = False
|
||||
End If
|
||||
|
||||
If Bloqueado = 1 Then
|
||||
btnGuardar.Visible = False
|
||||
'BtnProyecto.Visible = False
|
||||
btnDividir.Visible = False
|
||||
|
||||
CboClasificacionAdministrativa.Enabled = False
|
||||
CboClasificacionFuncional.Enabled = False
|
||||
CboClasificacionGeografica.Enabled = False
|
||||
CboEjeRector.Enabled = False
|
||||
CboEstrategia.Enabled = False
|
||||
CboLineaAccion.Enabled = False
|
||||
CboMeta.Enabled = False
|
||||
CboPrograma.Enabled = False
|
||||
CboProgramaCONAC.Enabled = False
|
||||
CboUM.Enabled = False
|
||||
DdlEjercicio.Enabled = False
|
||||
|
||||
txtClave.Enabled = False
|
||||
txtProgramaOperativo.Enabled = False
|
||||
txtProblematica.Enabled = False
|
||||
txtCausa.Enabled = False
|
||||
txtEfecto.Enabled = False
|
||||
|
||||
txtTotal.Enabled = False
|
||||
txtEnero.Enabled = False
|
||||
txtFebrero.Enabled = False
|
||||
txtMarzo.Enabled = False
|
||||
txtAbril.Enabled = False
|
||||
txtMayo.Enabled = False
|
||||
txtJunio.Enabled = False
|
||||
txtJulio.Enabled = False
|
||||
txtAgosto.Enabled = False
|
||||
txtSeptiembre.Enabled = False
|
||||
txtOctubre.Enabled = False
|
||||
txtNoviembre.Enabled = False
|
||||
txtDiciembre.Enabled = False
|
||||
BtnCancelar.Text = "Regresar"
|
||||
|
||||
If EsProyecto = 0 Then
|
||||
Alert("Este ANTEPROYECTO ya se genero como PROYECTO. Nota: Solo se pueden ver los datos", TipoMensaje.MsgInformacion)
|
||||
Else
|
||||
Alert("Este PROYECTO ya se AUTORIZO. Nota: Solo se pueden ver los datos", TipoMensaje.MsgInformacion)
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
If EsProyecto = 1 Then
|
||||
'BtnProyecto.Text = "Bloquear Proyecto"
|
||||
End If
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
#Region " VALORES INICIALES "
|
||||
|
||||
Private Sub CargaDefault()
|
||||
LblEjercicio.Text = String.Format("Periodo: {0}", UsuarioActual.Empresa.EjercicioActual)
|
||||
|
||||
txtEnero.Attributes.Add("onKeyUp", "sumaTotal();")
|
||||
txtFebrero.Attributes.Add("onKeyUp", "sumaTotal();")
|
||||
txtMarzo.Attributes.Add("onKeyUp", "sumaTotal();")
|
||||
txtAbril.Attributes.Add("onKeyUp", "sumaTotal();")
|
||||
txtMayo.Attributes.Add("onKeyUp", "sumaTotal();")
|
||||
txtJunio.Attributes.Add("onKeyUp", "sumaTotal();")
|
||||
txtJulio.Attributes.Add("onKeyUp", "sumaTotal();")
|
||||
txtAgosto.Attributes.Add("onKeyUp", "sumaTotal();")
|
||||
txtSeptiembre.Attributes.Add("onKeyUp", "sumaTotal();")
|
||||
txtOctubre.Attributes.Add("onKeyUp", "sumaTotal();")
|
||||
txtNoviembre.Attributes.Add("onKeyUp", "sumaTotal();")
|
||||
txtDiciembre.Attributes.Add("onKeyUp", "sumaTotal();")
|
||||
|
||||
CargaEjercicios()
|
||||
CargaProgramaCONAC()
|
||||
CargaClasificacionGeografica()
|
||||
CargaClasificacionFuncional()
|
||||
CargaClasificacionAdministrativa()
|
||||
CargaUM()
|
||||
CargaEjeRector()
|
||||
End Sub
|
||||
|
||||
#Region "COMBOS"
|
||||
Private Sub CargaEjercicios()
|
||||
Dim ClsConta As New ClsContPAQi(UsuarioActual.Empresa)
|
||||
If ClsConta.GetEjercicios() Then
|
||||
DdlEjercicio.DataSource = ClsConta.DtResultados
|
||||
Else
|
||||
DdlEjercicio.DataSource = Nothing
|
||||
End If
|
||||
ClsConta.Dispose()
|
||||
DdlEjercicio.DataBind()
|
||||
|
||||
DdlEjercicio.SelectedValueExist(UsuarioActual.Empresa.EjercicioActual.ToString)
|
||||
End Sub
|
||||
Private Sub CargaProgramaCONAC()
|
||||
CboProgramaCONAC.DataSource = GlobalDTAC_ProgramasCONAC
|
||||
CboProgramaCONAC.DataBind()
|
||||
CboProgramaCONAC.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
End Sub
|
||||
|
||||
Private Sub CargaClasificacionGeografica()
|
||||
CboClasificacionGeografica.DataSource = GlobalDTAC_ClasificacionGeografica(UsuarioActual.CveEmpresa)
|
||||
CboClasificacionGeografica.DataBind()
|
||||
CboClasificacionGeografica.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
End Sub
|
||||
|
||||
Private Sub CargaClasificacionFuncional()
|
||||
CboClasificacionFuncional.DataSource = GlobalDTAC_ClasificacionFuncional(UsuarioActual.CveEmpresa).FiltraParametros("", "CodClasificacionFuncional")
|
||||
CboClasificacionFuncional.DataBind()
|
||||
CboClasificacionFuncional.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
End Sub
|
||||
|
||||
Private Sub CargaClasificacionAdministrativa()
|
||||
CboClasificacionAdministrativa.DataSource = GlobalDTAC_ClasificacionAdministrativa(UsuarioActual.CveEmpresa)
|
||||
CboClasificacionAdministrativa.DataBind()
|
||||
CboClasificacionAdministrativa.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
End Sub
|
||||
|
||||
Private Sub CargaEjeRector()
|
||||
CboEjeRector.DataSource = GlobalDTAC_PD_EjeRector(UsuarioActual.CveEmpresa)
|
||||
CboEjeRector.DataBind()
|
||||
CboEjeRector.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
End Sub
|
||||
|
||||
Private Sub CargaProgramas()
|
||||
CboPrograma.Items.Clear()
|
||||
If CboEjeRector.SelectedValue.ToEntero <> -1 Then
|
||||
CboPrograma.DataSource = GlobalDTAC_PD_Programas(CboEjeRector.SelectedValue.ToEntero)
|
||||
CboPrograma.DataBind()
|
||||
End If
|
||||
CboPrograma.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
CboPrograma_SelectedIndexChanged(New Object, New EventArgs)
|
||||
End Sub
|
||||
|
||||
Private Sub CargaEstrategias()
|
||||
CboEstrategia.Items.Clear()
|
||||
If CboPrograma.SelectedValue.ToEntero <> -1 Then
|
||||
CboEstrategia.DataSource = GlobalDTAC_PD_Estrategias(CboPrograma.SelectedValue.ToEntero)
|
||||
CboEstrategia.DataBind()
|
||||
End If
|
||||
CboEstrategia.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
CboEstrategia_SelectedIndexChanged(New Object, New EventArgs)
|
||||
End Sub
|
||||
|
||||
Private Sub CargaLineasAccion()
|
||||
CboLineaAccion.Items.Clear()
|
||||
If CboEstrategia.SelectedValue.ToEntero <> -1 Then
|
||||
CboLineaAccion.DataSource = GlobalDTAC_PD_LineasAccion(CboEstrategia.SelectedValue.ToEntero)
|
||||
CboLineaAccion.DataBind()
|
||||
End If
|
||||
CboLineaAccion.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
CboLineaAccion_SelectedIndexChanged(New Object, New EventArgs)
|
||||
End Sub
|
||||
|
||||
Private Sub CargaMetas()
|
||||
CboMeta.Items.Clear()
|
||||
If CboLineaAccion.SelectedValue.ToEntero <> -1 Then
|
||||
CboMeta.DataSource = GlobalDTAC_PD_Metas(CboLineaAccion.SelectedValue.ToEntero)
|
||||
CboMeta.DataBind()
|
||||
End If
|
||||
CboMeta.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
End Sub
|
||||
|
||||
Private Sub CargaUM()
|
||||
CboUM.DataSource = GlobalDTUnidadesMedida(UsuarioActual.CveEmpresa)
|
||||
CboUM.DataBind()
|
||||
CboUM.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
End Sub
|
||||
|
||||
Protected Sub CboEjeRector_SelectedIndexChanged(sender As Object, e As EventArgs) Handles CboEjeRector.SelectedIndexChanged
|
||||
CargaProgramas()
|
||||
End Sub
|
||||
|
||||
Protected Sub CboPrograma_SelectedIndexChanged(sender As Object, e As EventArgs) Handles CboPrograma.SelectedIndexChanged
|
||||
CargaEstrategias()
|
||||
End Sub
|
||||
|
||||
Protected Sub CboEstrategia_SelectedIndexChanged(sender As Object, e As EventArgs) Handles CboEstrategia.SelectedIndexChanged
|
||||
CargaLineasAccion()
|
||||
End Sub
|
||||
|
||||
Protected Sub CboLineaAccion_SelectedIndexChanged(sender As Object, e As EventArgs) Handles CboLineaAccion.SelectedIndexChanged
|
||||
CargaMetas()
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
#End Region
|
||||
|
||||
Protected Sub CargaDatos()
|
||||
Dim objAC As New ClsAC
|
||||
|
||||
If objAC.GetProgramasOperativos(CveProgramaOperativo, UsuarioActual.CveEmpresa, CBool(EsProyecto)) Then
|
||||
If objAC.DtResultados.Rows.Count = 1 Then
|
||||
txtClave.Text = objAC.DtResultados.Rows(0)("Clave").ToString
|
||||
txtProgramaOperativo.Text = objAC.DtResultados.Rows(0)("ProgramaOperativo").ToString
|
||||
CboClasificacionFuncional.SelectedValue = objAC.DtResultados.Rows(0)("CveClasificacionFuncional").ToString
|
||||
CboClasificacionAdministrativa.SelectedValue = objAC.DtResultados.Rows(0)("CveClasificacionAdministrativa").ToString
|
||||
CboProgramaCONAC.SelectedValue = objAC.DtResultados.Rows(0)("CveProgramaCONAC").ToString
|
||||
CboClasificacionGeografica.SelectedValue = objAC.DtResultados.Rows(0)("CveClasificacionGeografica").ToString
|
||||
txtProblematica.Text = objAC.DtResultados.Rows(0)("Problematica").ToString
|
||||
txtCausa.Text = objAC.DtResultados.Rows(0)("Causa").ToString
|
||||
txtEfecto.Text = objAC.DtResultados.Rows(0)("Efecto").ToString
|
||||
|
||||
DdlEjercicio.SelectedValue = objAC.DtResultados.Rows(0)("Ejercicio").ToString
|
||||
|
||||
CboEjeRector.SelectedValue = objAC.DtResultados.Rows(0)("CveEjeRector").ToString
|
||||
CboEjeRector_SelectedIndexChanged(New Object, New EventArgs)
|
||||
CboPrograma.SelectedValue = objAC.DtResultados.Rows(0)("CvePrograma").ToString
|
||||
CboPrograma_SelectedIndexChanged(New Object, New EventArgs)
|
||||
CboEstrategia.SelectedValue = objAC.DtResultados.Rows(0)("CveEstrategia").ToString
|
||||
CboEstrategia_SelectedIndexChanged(New Object, New EventArgs)
|
||||
CboLineaAccion.SelectedValue = objAC.DtResultados.Rows(0)("CveLineaAccion").ToString
|
||||
CboLineaAccion_SelectedIndexChanged(New Object, New EventArgs)
|
||||
CboMeta.SelectedValue = objAC.DtResultados.Rows(0)("CveMeta").ToString
|
||||
|
||||
CboUM.SelectedValue = objAC.DtResultados.Rows(0)("CveUM").ToString
|
||||
txtTotal.Text = objAC.DtResultados.Rows(0)("Total").ToString.ToDouble.ToString("##############.####")
|
||||
txtEnero.Text = objAC.DtResultados.Rows(0)("Enero").ToString.ToDouble.ToString("##############.####")
|
||||
txtFebrero.Text = objAC.DtResultados.Rows(0)("Febrero").ToString.ToDouble.ToString("##############.####")
|
||||
txtMarzo.Text = objAC.DtResultados.Rows(0)("Marzo").ToString.ToDouble.ToString("##############.####")
|
||||
txtAbril.Text = objAC.DtResultados.Rows(0)("Abril").ToString.ToDouble.ToString("##############.####")
|
||||
txtMayo.Text = objAC.DtResultados.Rows(0)("Mayo").ToString.ToDouble.ToString("##############.####")
|
||||
txtJunio.Text = objAC.DtResultados.Rows(0)("Junio").ToString.ToDouble.ToString("##############.####")
|
||||
txtJulio.Text = objAC.DtResultados.Rows(0)("Julio").ToString.ToDouble.ToString("##############.####")
|
||||
txtAgosto.Text = objAC.DtResultados.Rows(0)("Agosto").ToString.ToDouble.ToString("##############.####")
|
||||
txtSeptiembre.Text = objAC.DtResultados.Rows(0)("Septiembre").ToString.ToDouble.ToString("##############.####")
|
||||
txtOctubre.Text = objAC.DtResultados.Rows(0)("Octubre").ToString.ToDouble.ToString("##############.####")
|
||||
txtNoviembre.Text = objAC.DtResultados.Rows(0)("Noviembre").ToString.ToDouble.ToString("##############.####")
|
||||
txtDiciembre.Text = objAC.DtResultados.Rows(0)("Diciembre").ToString.ToDouble.ToString("##############.####")
|
||||
Else
|
||||
ViewState("CveProgramaOperativo") = 0
|
||||
Alert("No se encontro el Programa Operativo", TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
End If
|
||||
|
||||
objAC.Dispose()
|
||||
End Sub
|
||||
|
||||
Protected Sub btnGuardar_Click(sender As Object, e As EventArgs) Handles btnGuardar.Click
|
||||
Dim objAC As New ClsAC()
|
||||
|
||||
'Valida Ejercicio
|
||||
If objAC.GetEjerciciosProgramasOperativos(UsuarioActual.CveEmpresa) AndAlso objAC.DtResultados.Rows.Count > -1 Then
|
||||
Dim DtEjercicios = objAC.DtResultados.FiltraParametros(String.Format("Ejercicio = {0}", DdlEjercicio.SelectedValue))
|
||||
If DtEjercicios.Rows.Count > 0 AndAlso DtEjercicios.Rows(0)("Bloqueado").ToString = "1" AndAlso txtTotal.Text.ToDecimal > 0 Then
|
||||
Alert("El Plan Operativo Anual del ejercicio seleccionado ya esta bloqueado.", TipoMensaje.MsgAdvertencia)
|
||||
objAC.Dispose()
|
||||
Exit Sub
|
||||
End If
|
||||
Else
|
||||
Alert("Ocurrió un error al verificar el Ejercicio. Por favor vuelva a intentar.", TipoMensaje.MsgError)
|
||||
objAC.Dispose()
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
Dim Total As Double = txtTotal.Text.Replace(",", "").Trim.ToDouble
|
||||
Dim Enero As Double = txtEnero.Text.Replace(",", "").Trim.ToDouble
|
||||
Dim Febrero As Double = txtFebrero.Text.Replace(",", "").Trim.ToDouble
|
||||
Dim Marzo As Double = txtMarzo.Text.Replace(",", "").Trim.ToDouble
|
||||
Dim Abril As Double = txtAbril.Text.Replace(",", "").Trim.ToDouble
|
||||
Dim Mayo As Double = txtMayo.Text.Replace(",", "").Trim.ToDouble
|
||||
Dim Junio As Double = txtJunio.Text.Replace(",", "").Trim.ToDouble
|
||||
Dim Julio As Double = txtJulio.Text.Replace(",", "").Trim.ToDouble
|
||||
Dim Agosto As Double = txtAgosto.Text.Replace(",", "").Trim.ToDouble
|
||||
Dim Septiembre As Double = txtSeptiembre.Text.Replace(",", "").Trim.ToDouble
|
||||
Dim Octubre As Double = txtOctubre.Text.Replace(",", "").Trim.ToDouble
|
||||
Dim Noviembre As Double = txtNoviembre.Text.Replace(",", "").Trim.ToDouble
|
||||
Dim Diciembre As Double = txtDiciembre.Text.Replace(",", "").Trim.ToDouble
|
||||
|
||||
If CveProgramaOperativo = 0 Then
|
||||
If objAC.AddProgramaOperativo(txtClave.Text, txtProgramaOperativo.Text, CboClasificacionFuncional.SelectedValue.ToEntero, CboClasificacionAdministrativa.SelectedValue.ToEntero, CboProgramaCONAC.SelectedValue.ToEntero, CboClasificacionGeografica.SelectedValue.ToEntero,
|
||||
txtProblematica.Text, txtCausa.Text, txtEfecto.Text, CboMeta.SelectedValue.ToEntero, CboUM.SelectedValue.ToEntero, Total,
|
||||
Enero, Febrero, Marzo, Abril, Mayo, Junio, Julio, Agosto, Septiembre, Octubre, Noviembre, Diciembre, DdlEjercicio.SelectedValue.ToEntero, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
|
||||
Alert("El Programa Operativo se guardo Correctamente", TipoMensaje.MsgInformacion, "document.location.href=""/AC/RepProgramaOperativo.aspx""")
|
||||
End If
|
||||
Else
|
||||
If objAC.UpdateProgramaOperativo(CveProgramaOperativo, txtClave.Text, txtProgramaOperativo.Text, CboClasificacionFuncional.SelectedValue.ToEntero, CboClasificacionAdministrativa.SelectedValue.ToEntero, CboProgramaCONAC.SelectedValue.ToEntero, CboClasificacionGeografica.SelectedValue.ToEntero,
|
||||
txtProblematica.Text, txtCausa.Text, txtEfecto.Text, CboMeta.SelectedValue.ToEntero, CboUM.SelectedValue.ToEntero, Total,
|
||||
Enero, Febrero, Marzo, Abril, Mayo, Junio, Julio, Agosto, Septiembre, Octubre, Noviembre, Diciembre, DdlEjercicio.SelectedValue.ToEntero) Then
|
||||
Alert("El Programa Operativo se actualizo Correctamente", TipoMensaje.MsgInformacion, "document.location.href=""/AC/RepProgramaOperativo.aspx""")
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
objAC.Dispose()
|
||||
End Sub
|
||||
|
||||
'Protected Sub BtnProyecto_Click(sender As Object, e As EventArgs) Handles BtnProyecto.Click
|
||||
' Dim objAC As New ClsAC()
|
||||
' Dim Total As Double = txtTotal.Text.Replace(",", "").Trim.ToDouble
|
||||
' Dim Enero As Double = txtEnero.Text.Replace(",", "").Trim.ToDouble
|
||||
' Dim Febrero As Double = txtFebrero.Text.Replace(",", "").Trim.ToDouble
|
||||
' Dim Marzo As Double = txtMarzo.Text.Replace(",", "").Trim.ToDouble
|
||||
' Dim Abril As Double = txtAbril.Text.Replace(",", "").Trim.ToDouble
|
||||
' Dim Mayo As Double = txtMayo.Text.Replace(",", "").Trim.ToDouble
|
||||
' Dim Junio As Double = txtJunio.Text.Replace(",", "").Trim.ToDouble
|
||||
' Dim Julio As Double = txtJulio.Text.Replace(",", "").Trim.ToDouble
|
||||
' Dim Agosto As Double = txtAgosto.Text.Replace(",", "").Trim.ToDouble
|
||||
' Dim Septiembre As Double = txtSeptiembre.Text.Replace(",", "").Trim.ToDouble
|
||||
' Dim Octubre As Double = txtOctubre.Text.Replace(",", "").Trim.ToDouble
|
||||
' Dim Noviembre As Double = txtNoviembre.Text.Replace(",", "").Trim.ToDouble
|
||||
' Dim Diciembre As Double = txtDiciembre.Text.Replace(",", "").Trim.ToDouble
|
||||
|
||||
|
||||
' If CveProgramaOperativo > 0 Then
|
||||
' If objAC.ProyectoProgramaOperativo(txtClave.Text, txtProgramaOperativo.Text, CboClasificacionFuncional.SelectedValue.ToEntero, CboClasificacionAdministrativa.SelectedValue.ToEntero, CboProgramaCONAC.SelectedValue.ToEntero, CboClasificacionGeografica.SelectedValue.ToEntero,
|
||||
' txtProblematica.Text, txtCausa.Text, txtEfecto.Text, CboMeta.SelectedValue.ToEntero, CboUM.SelectedValue.ToEntero, Total,
|
||||
' Enero, Febrero, Marzo, Abril, Mayo, Junio, Julio, Agosto, Septiembre, Octubre, Noviembre, Diciembre, DdlEjercicio.SelectedValue.ToEntero, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveProgramaOperativo) Then
|
||||
' Alert("El Programa Operativo se ACTUALIZO Correctamente como PROYECTO", TipoMensaje.MsgInformacion, "document.location.href=""/AC/RepProgramaOperativo.aspx""")
|
||||
' GlobalDTAC_ProgramaOperativo(-1) = objAC.DtResultados
|
||||
' End If
|
||||
' Else
|
||||
' Alert("ERROR", TipoMensaje.MsgError)
|
||||
' End If
|
||||
|
||||
' If EsProyecto = 1 Then
|
||||
' If objAC.BloquearProgramaOperativo(CveProgramaOperativo) Then
|
||||
' Alert("El Programa Operativo se ACTUALIZO Correctamente como PROYECTO AUTORIZADO", TipoMensaje.MsgInformacion, "document.location.href=""/AC/RepProgramaOperativo.aspx""")
|
||||
' End If
|
||||
' End If
|
||||
|
||||
' objAC.Dispose()
|
||||
'End Sub
|
||||
|
||||
End Class
|
||||
248
AC/RegComprometido.aspx
Normal file
248
AC/RegComprometido.aspx
Normal file
@@ -0,0 +1,248 @@
|
||||
<%@ Page Title="Nómina" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RegComprometido.aspx.vb" Inherits="AC_RegComprometido" %>
|
||||
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="HB" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="E" runat="Server">
|
||||
<asp:Label ID="LbTitulo" runat="server" ClientIDMode="Static" />
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
|
||||
|
||||
|
||||
<asp:UpdatePanel runat="server">
|
||||
<ContentTemplate>
|
||||
<table width="100%" style="position: absolute;">
|
||||
<tr>
|
||||
<td align="right">
|
||||
<h3>Ejercicio:
|
||||
<asp:Literal Text="" ID="LtEjercicio" runat="server" /></h3>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
<ajax:TabContainer runat="server" ActiveTabIndex="0" Width="100%" CssClass="tabBodyOverride">
|
||||
|
||||
<ajax:TabPanel runat="server" HeaderText="Comprometer">
|
||||
<ContentTemplate>
|
||||
|
||||
<asp:UpdatePanel ID="UpComprometer" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-1" style="max-width:80px;">Fecha:</div>
|
||||
<div class="col-md-3">
|
||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 90px !important; padding: 0px;">
|
||||
<asp:TextBox ID="TxtFechaComprometido" CssClass="form-control input-sm ADSMaskDate" Style="width: 88px" runat="server"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton runat="server" ID="imgCalendario" class="btn default"> <i class="fa fa-calendar"></i> </asp:LinkButton>
|
||||
</span>
|
||||
<ajax:MaskedEditExtender ID="MEEFechaComprometido" runat="server" TargetControlID="TxtFechaComprometido" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender runat="server" ID="CEFechaComprometido" TargetControlID="TxtFechaComprometido" PopupButtonID="imgCalendario" PopupPosition="BottomRight" Enabled="True" Format="dd/MM/yyyy"></ajax:CalendarExtender>
|
||||
<asp:RequiredFieldValidator ID="RFVFechaComprometido" runat="server" ControlToValidate="TxtFechaComprometido" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''FechaComprometido Inicio''</b> es necesario, por favor ingréselo." ValidationGroup="GrpComprometer"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCEFechaComprometido" runat="server" HighlightCssClass="vco" TargetControlID="RFVFechaComprometido"></ajax:ValidatorCalloutExtender>
|
||||
<asp:RangeValidator ID="RVFechaComprometido" runat="server" Type="Date" MinimumValue="01/01/2000" MaximumValue="31/12/2000" ErrorMessage="El campo <b>''Fecha''</b> no se encuentra dentro del rango aceptado." ControlToValidate="TxtFechaComprometido" Display="None" ValidationGroup="GrpComprometer"></asp:RangeValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCERVFechaComprometido" runat="server" HighlightCssClass="vco" TargetControlID="RVFechaComprometido" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<br />
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-1" style="max-width:80px;">Concepto:</div>
|
||||
<div class="col-md-3">
|
||||
<asp:TextBox ID="TxtConcepto" Text="" CssClass="form-control input-sm" runat="server" />
|
||||
</div>
|
||||
</div>
|
||||
<br />
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<table style="width: 100%;">
|
||||
<tr class="Titulos TextTab">
|
||||
<th scope="col" style="width: 200px">Meta</th>
|
||||
<th scope="col" style="width: 120px">Unidad Administrativa</th>
|
||||
<th scope="col" style="width: 120px">Fuente Financiamiento</th>
|
||||
<th scope="col" style="width: 120px">Clasificador OG</th>
|
||||
<th scope="col" style="width: 130px">Tipo de Gasto</th>
|
||||
<th scope="col" style="width: 60px">Disponible</th>
|
||||
<th scope="col" style="width: 100px">Importe</th>
|
||||
<th scope="col" style="width: 75px">Comandos</th>
|
||||
</tr>
|
||||
<tr id="trAddDetalle" runat="server" align="center">
|
||||
<td>
|
||||
<asp:DropDownList ID="DdlMeta" runat="server" CssClass="select2me" AppendDataBoundItems="true" AutoPostBack="true" DataTextField="ProgramaOperativo" DataValueField="CveProgramaOperativo" Width="100%" OnSelectedIndexChanged="CargaUnidadAdministrativa"></asp:DropDownList>
|
||||
</td>
|
||||
<td>
|
||||
<asp:DropDownList ID="DdlUnidadAdministrativa" runat="server" CssClass="select2me" AppendDataBoundItems="true" AutoPostBack="true" DataTextField="UnidadAdministrativa" DataValueField="CveUnidadAdministrativa" Width="100%" OnSelectedIndexChanged="CargaFuenteFinanciamiento"></asp:DropDownList>
|
||||
</td>
|
||||
<td>
|
||||
<asp:DropDownList ID="DdlFuenteFinanciamiento" runat="server" CssClass="select2me" AppendDataBoundItems="true" AutoPostBack="true" DataTextField="FuenteFinanciamiento" DataValueField="CveFuenteFinanciamiento" Width="100%" OnSelectedIndexChanged="CargaClasificacionOG"></asp:DropDownList>
|
||||
</td>
|
||||
<td>
|
||||
<asp:DropDownList ID="DdlClasificacionOG" runat="server" CssClass="select2me" AppendDataBoundItems="true" AutoPostBack="true" DataTextField="CodigoClasificacion" DataValueField="CveClasificacion" Width="100%" OnSelectedIndexChanged="CargaTipoGasto"></asp:DropDownList>
|
||||
</td>
|
||||
<td>
|
||||
<asp:DropDownList ID="DdlTipoGasto" runat="server" CssClass="select2me" AppendDataBoundItems="true" AutoPostBack="true" DataTextField="TipoGasto" DataValueField="CveTipoGasto" Width="100%" OnSelectedIndexChanged="CargaDisponible"></asp:DropDownList>
|
||||
</td>
|
||||
<td>
|
||||
<asp:Label ID="LtDisponible" ClientIDMode="Static" runat="server" Text="$" />
|
||||
<asp:HiddenField runat="server" ID="HdnCuentaPorEjercer" ClientIDMode="Static" />
|
||||
<asp:HiddenField runat="server" ID="HdnCuentaComprometido" ClientIDMode="Static" />
|
||||
</td>
|
||||
<td>
|
||||
<asp:TextBox runat="server" ID="TxtImporte" ClientIDMode="Static" Width="100%" CssClass="alineanum" />
|
||||
<asp:RequiredFieldValidator ID="RFVImporte" runat="server" ControlToValidate="TxtImporte" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Importe''</b> es necesario, por favor ingréselo." ValidationGroup="GrpAgregar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCEImporte" runat="server" Enabled="True" HighlightCssClass="vco" TargetControlID="RFVImporte" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
<ajax:FilteredTextBoxExtender ID="SoloNumeros" runat="server" TargetControlID="TxtImporte" FilterType="Custom, Numbers" ValidChars="." />
|
||||
</td>
|
||||
<td>
|
||||
<asp:Button ID="BtnAgregar" runat="server" Text="Agregar" Width="100%" ValidationGroup="GrpAgregar" OnClick="BtnAgregar_click" class="btn btn-primary" />
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div class="col-md-12">
|
||||
<asp:GridView ID="GvD" DataKeyNames="IdCuentaPorEjercer, Importe" runat="server" AutoGenerateColumns="False" TShowHeader="true" CssClass="table table-striped table-hover Widthall ScrollAD" data-sort="false" GridLines="None">
|
||||
<Columns>
|
||||
<asp:BoundField DataField="Meta" HeaderText="Meta" />
|
||||
<asp:BoundField DataField="UnidadAdministrativa" HeaderText="UnidadAdministrativa" />
|
||||
<asp:BoundField DataField="FuenteFinanciamiento" HeaderText="FuenteFinanciamiento" />
|
||||
<asp:BoundField DataField="ClasificadorOG" HeaderText="ClasificadorOG" />
|
||||
<asp:BoundField DataField="TipoGasto" HeaderText="TipoGasto" />
|
||||
<asp:BoundField DataField="Importe" HeaderText="Importe" DataFormatString="{0:N2}" />
|
||||
<asp:TemplateField HeaderText="Eliminar" ItemStyle-Width="70px" ItemStyle-HorizontalAlign="Center">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="imgD" runat="server" AlternateText="Eliminar" CausesValidation="False" CommandName="Delete" CssClass="btn btn-circle btn-xs red" Text="<i class='icon-trash'></i>" data-toggle="confirmation" data-popout="true" data-original-title="Confirmar" data-btn-ok-label="si" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-3 col-md-offset-9">
|
||||
<label>Total: $</label>
|
||||
<asp:Label ID="LbTotal" runat="server" BorderStyle="None" Style="text-align: right;" Text="0.00" Width="45px"></asp:Label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<br />
|
||||
<br />
|
||||
<br />
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12 text-center">
|
||||
<asp:Button runat="server" ID="BtnGuardar" ClientIDMode="Static" Text="Guardar Registro" ValidationGroup="GrpComprometer" OnClick="BtnGuardar_click" class="btn btn-primary" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
</ContentTemplate>
|
||||
</ajax:TabPanel>
|
||||
|
||||
<ajax:TabPanel runat="server" HeaderText="Pagar" Visible="False">
|
||||
<ContentTemplate>
|
||||
|
||||
<asp:UpdatePanel ID="UpPagar" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
|
||||
<div class="portlet-body">
|
||||
<table cellspacing="0" rules="all" border="1" style="border-collapse: collapse;">
|
||||
<tr class="Titulos TextTab">
|
||||
<th scope="col" style="width: 200px">Meta</th>
|
||||
<th scope="col" style="width: 120px">Unidad Administrativa</th>
|
||||
<th scope="col" style="width: 120px">Fuente Financiamiento</th>
|
||||
<th scope="col" style="width: 120px">Clasificador OG</th>
|
||||
<th scope="col" style="width: 130px">Tipo de Gasto</th>
|
||||
<th scope="col" style="width: 60px">Disponible</th>
|
||||
<th scope="col" style="width: 100px">Importe</th>
|
||||
<th scope="col" style="width: 75px">Comandos</th>
|
||||
</tr>
|
||||
<tr id="trAddDetallePagar" runat="server" align="center">
|
||||
<td>
|
||||
<asp:DropDownList ID="DdlMetaPagar" runat="server" AppendDataBoundItems="true" AutoPostBack="true" DataTextField="ProgramaOperativo" DataValueField="CveProgramaOperativo" Width="100%" OnSelectedIndexChanged="CargaUnidadAdministrativaPagar"></asp:DropDownList>
|
||||
</td>
|
||||
<td>
|
||||
<asp:DropDownList ID="DdlUnidadAdministrativaPagar" runat="server" AppendDataBoundItems="true" AutoPostBack="true" DataTextField="UnidadAdministrativa" DataValueField="CveUnidadAdministrativa" Width="100%" OnSelectedIndexChanged="CargaFuenteFinanciamientoPagar"></asp:DropDownList>
|
||||
</td>
|
||||
<td>
|
||||
<asp:DropDownList ID="DdlFuenteFinanciamientoPagar" runat="server" AppendDataBoundItems="true" AutoPostBack="true" DataTextField="FuenteFinanciamiento" DataValueField="CveFuenteFinanciamiento" Width="100%" OnSelectedIndexChanged="CargaClasificacionOGPagar"></asp:DropDownList>
|
||||
</td>
|
||||
<td>
|
||||
<asp:DropDownList ID="DdlClasificacionOGPagar" runat="server" AppendDataBoundItems="true" AutoPostBack="true" DataTextField="CodigoClasificacion" DataValueField="CveClasificacion" Width="100%" OnSelectedIndexChanged="CargaTipoGastoPagar"></asp:DropDownList>
|
||||
</td>
|
||||
<td>
|
||||
<asp:DropDownList ID="DdlTipoGastoPagar" runat="server" AppendDataBoundItems="true" AutoPostBack="true" DataTextField="TipoGasto" DataValueField="CveTipoGasto" Width="100%" OnSelectedIndexChanged="CargaDisponiblePagar"></asp:DropDownList>
|
||||
</td>
|
||||
<td>
|
||||
<asp:Literal ID="LtDisponiblePagar" ClientIDMode="Static" runat="server" Text="$" />
|
||||
<asp:HiddenField runat="server" ID="HdnCuentaComprometidoPagar" ClientIDMode="Static" />
|
||||
<asp:HiddenField runat="server" ID="HdnCuentaDevengadoPagar" ClientIDMode="Static" />
|
||||
<asp:HiddenField runat="server" ID="HdnCuentaEjercidoPagar" ClientIDMode="Static" />
|
||||
<asp:HiddenField runat="server" ID="HdnCuentaPagadoPagar" ClientIDMode="Static" />
|
||||
</td>
|
||||
<td>
|
||||
<asp:TextBox runat="server" ID="TxtImportePagar" ClientIDMode="Static" Width="100%" CssClass="alineanum" />
|
||||
<asp:RequiredFieldValidator ID="RFVImportePagar" runat="server" ControlToValidate="TxtImportePagar" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''ImportePagar''</b> es necesario, por favor ingréselo." ValidationGroup="GrpAgregarPagar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCEImportePagar" runat="server" Enabled="True" HighlightCssClass="vco" TargetControlID="RFVImportePagar" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
<ajax:FilteredTextBoxExtender ID="FilteredTextBoxExtender1" runat="server" TargetControlID="TxtImportePagar" FilterType="Custom, Numbers" ValidChars="." />
|
||||
</td>
|
||||
<td>
|
||||
<asp:Button ID="BtnAgregarPagar" runat="server" Text="Agregar" Width="100%" ValidationGroup="GrpAgregarPagar" OnClick="BtnAgregarPagar_click" class="btn btn-primary" />
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<div style="">
|
||||
<asp:GridView ID="GvDPagar" runat="server" DataKeyNames="IdCuentaComprometido,IdCuentaDevengado,IdCuentaEjercido,IdCuentaPagado, Importe" AutoGenerateColumns="False" TShowHeader="true" CssClass="table table-striped table-advance table-hover Widthall ScrollAD" data-sort="false" BorderWidth="1" BorderColor="#D3D3D3" GridLines="None">
|
||||
<Columns>
|
||||
<asp:BoundField DataField="Meta" HeaderText="Meta" />
|
||||
<asp:BoundField DataField="UnidadAdministrativa" HeaderText="UnidadAdministrativa" />
|
||||
<asp:BoundField DataField="FuenteFinanciamiento" HeaderText="FuenteFinanciamiento" />
|
||||
<asp:BoundField DataField="ClasificadorOG" HeaderText="ClasificadorOG" />
|
||||
<asp:BoundField DataField="TipoGasto" HeaderText="TipoGasto" />
|
||||
<asp:BoundField DataField="Importe" HeaderText="Importe" DataFormatString="{0:N2}" />
|
||||
|
||||
<asp:TemplateField HeaderText="Eliminar" ItemStyle-Width="70px" ItemStyle-HorizontalAlign="Center">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="imgD" runat="server" AlternateText="Eliminar" CausesValidation="False" CommandName="Delete" CssClass="btn btn-circle btn-xs red" Text="<i class='icon-trash'></i>" data-toggle="confirmation" data-popout="true" data-original-title="Confirmar" data-btn-ok-label="si" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
|
||||
</asp:GridView>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-4 col-md-offset-4">
|
||||
<label>Total: $</label>
|
||||
<asp:Label ID="LbTotalPagar" runat="server" BorderStyle="None" Style="text-align: right;" Text="0.00" Width="45px"></asp:Label>
|
||||
<br />
|
||||
<asp:Button runat="server" ID="BtnGuardarPagar" ClientIDMode="Static" Text="Guardar Registro" OnClick="BtnGuardarPagar_click" class="btn btn-primary btn-xs" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</ContentTemplate>
|
||||
</ajax:TabPanel>
|
||||
|
||||
</ajax:TabContainer>
|
||||
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
||||
</asp:Content>
|
||||
654
AC/RegComprometido.aspx.vb
Normal file
654
AC/RegComprometido.aspx.vb
Normal file
@@ -0,0 +1,654 @@
|
||||
Option Explicit On
|
||||
Option Strict On
|
||||
|
||||
Imports System.Data
|
||||
Imports Extensiones
|
||||
Partial Class AC_RegComprometido
|
||||
Inherits ClsPaginas
|
||||
|
||||
#Region "PROPIEDADES"
|
||||
Private Property DtDetalle As DataTable
|
||||
Get
|
||||
DtDetalle = DirectCast(ViewState("DtDetalle"), DataTable)
|
||||
End Get
|
||||
|
||||
Set(ByVal value As DataTable)
|
||||
ViewState("DtDetalle") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property DtDetallePagar As DataTable
|
||||
Get
|
||||
DtDetallePagar = DirectCast(ViewState("DtDetallePagar"), DataTable)
|
||||
End Get
|
||||
|
||||
Set(ByVal value As DataTable)
|
||||
ViewState("DtDetallePagar") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property DtPresupuestos As DataTable
|
||||
Get
|
||||
DtPresupuestos = DirectCast(ViewState("DtPresupuestos"), DataTable)
|
||||
End Get
|
||||
|
||||
Set(ByVal value As DataTable)
|
||||
ViewState("DtPresupuestos") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private Property Opc As String
|
||||
Get
|
||||
Opc = ViewState("Opc").ToString
|
||||
End Get
|
||||
Set(value As String)
|
||||
ViewState("Opc") = value
|
||||
End Set
|
||||
End Property
|
||||
#End Region
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||
If Not Page.IsPostBack Then
|
||||
|
||||
Opc = IfNull(Request("Opc"), "Otro").ToString
|
||||
ViewState("Orden") = ""
|
||||
ViewState("OrdenPagar") = ""
|
||||
|
||||
If Opc.ToUpper = "NOM" Then
|
||||
LbTitulo.Text = "Comprometido Nómina"
|
||||
Else
|
||||
LbTitulo.Text = "Comprometido Otros"
|
||||
End If
|
||||
|
||||
Dim FechaI = $"01/01/{UsuarioActual.Empresa.EjercicioActual.ToString}"
|
||||
Dim FechaF = $"31/12/{UsuarioActual.Empresa.EjercicioActual.ToString}"
|
||||
TxtFechaComprometido.Text = FechaI
|
||||
RVFechaComprometido.MinimumValue = FechaI
|
||||
RVFechaComprometido.MaximumValue = FechaF
|
||||
CEFechaComprometido.StartDate = FechaI.ToDate
|
||||
CEFechaComprometido.EndDate = FechaF.ToDate
|
||||
|
||||
CargaPresupuestos()
|
||||
|
||||
CargaMeta()
|
||||
TxtImporte.Enabled = False
|
||||
CreaDTDetalles()
|
||||
BtnAgregar.Enabled = False
|
||||
|
||||
'CargaMetaPagar()
|
||||
'TxtImportePagar.Enabled = False
|
||||
'CreaDTDetallesPagar()
|
||||
'BtnAgregarPagar.Enabled = False
|
||||
|
||||
LtEjercicio.Text = UsuarioActual.Empresa.EjercicioActual.ToString
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub CargaPresupuestos()
|
||||
Dim AC As New ClsAC
|
||||
|
||||
If AC.GetPresupuestoEgresos(-1, True, UsuarioActual.Empresa.EjercicioActual, UsuarioActual.CveEmpresa) Then
|
||||
DtPresupuestos = AC.DtResultados.Copy
|
||||
Else
|
||||
Alert("Ocurrio un error al cargar los Presupuestos. Por favor vuelva a cargar la página", TipoMensaje.MsgError)
|
||||
End If
|
||||
AC.Dispose()
|
||||
|
||||
If Opc.ToUpper = "NOM" Then
|
||||
DtPresupuestos = DtPresupuestos.FiltraParametros("CodigoCOG like '1%'")
|
||||
Else
|
||||
DtPresupuestos = DtPresupuestos.FiltraParametros("NOT CodigoCOG like '1%'")
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
#Region "C O M P R O M E T E R"
|
||||
|
||||
#Region "CARGA COMBOS EN CASCADA"
|
||||
Private Sub CargaMeta()
|
||||
DdlMeta.DataSource = DtPresupuestos.FiltraParametros("", DistinctColumns:={"CveProgramaOperativo", "ProgramaOperativo"})
|
||||
DdlMeta.DataBind()
|
||||
DdlMeta.Items.Insert(0, New ListItem("Seleccionar", "-1"))
|
||||
End Sub
|
||||
Protected Sub CargaUnidadAdministrativa(sender As Object, e As EventArgs)
|
||||
DdlUnidadAdministrativa.Items.Clear()
|
||||
DdlFuenteFinanciamiento.Items.Clear()
|
||||
DdlClasificacionOG.Items.Clear()
|
||||
DdlTipoGasto.Items.Clear()
|
||||
LtDisponible.Text = "$"
|
||||
TxtImporte.Enabled = False
|
||||
If DdlMeta.SelectedValue.ToEntero > 0 Then
|
||||
Dim Filtro As New StringBuilder
|
||||
Filtro.AppendFormat("CveProgramaOperativo= {0}", DdlMeta.SelectedValue.ToString)
|
||||
|
||||
DdlUnidadAdministrativa.DataSource = (DtPresupuestos.FiltraParametros(Filtro.ToString)).FiltraParametros("", DistinctColumns:={"CveUnidadAdministrativa", "UnidadAdministrativa"})
|
||||
DdlUnidadAdministrativa.DataBind()
|
||||
DdlUnidadAdministrativa.Items.Insert(0, New ListItem("Seleccionar", "-1"))
|
||||
End If
|
||||
End Sub
|
||||
Protected Sub CargaFuenteFinanciamiento(sender As Object, e As EventArgs)
|
||||
DdlFuenteFinanciamiento.Items.Clear()
|
||||
DdlClasificacionOG.Items.Clear()
|
||||
DdlTipoGasto.Items.Clear()
|
||||
LtDisponible.Text = "$"
|
||||
TxtImporte.Enabled = False
|
||||
If DdlUnidadAdministrativa.SelectedValue.ToEntero > 0 Then
|
||||
Dim Filtro As New StringBuilder
|
||||
Filtro.AppendFormat("CveProgramaOperativo= {0} and CveUnidadAdministrativa= {1}", DdlMeta.SelectedValue.ToString, DdlUnidadAdministrativa.SelectedValue.ToString)
|
||||
|
||||
DdlFuenteFinanciamiento.DataSource = (DtPresupuestos.FiltraParametros(Filtro.ToString)).FiltraParametros("", DistinctColumns:={"CveFuenteFinanciamiento", "FuenteFinanciamiento"})
|
||||
DdlFuenteFinanciamiento.DataBind()
|
||||
DdlFuenteFinanciamiento.Items.Insert(0, New ListItem("Seleccionar", "-1"))
|
||||
End If
|
||||
End Sub
|
||||
Protected Sub CargaClasificacionOG(sender As Object, e As EventArgs)
|
||||
DdlClasificacionOG.Items.Clear()
|
||||
DdlTipoGasto.Items.Clear()
|
||||
LtDisponible.Text = "$"
|
||||
TxtImporte.Enabled = False
|
||||
If DdlFuenteFinanciamiento.SelectedValue.ToEntero > 0 Then
|
||||
Dim Filtro As New StringBuilder
|
||||
Filtro.AppendFormat("CveProgramaOperativo= {0} and CveUnidadAdministrativa= {1} and CveFuenteFinanciamiento= {2}", DdlMeta.SelectedValue.ToString, DdlUnidadAdministrativa.SelectedValue.ToString, DdlFuenteFinanciamiento.SelectedValue.ToString)
|
||||
|
||||
DdlClasificacionOG.DataSource = (DtPresupuestos.FiltraParametros(Filtro.ToString)).FiltraParametros("", "CodigoClasificacion", {"CveClasificacion", "CodigoClasificacion"})
|
||||
DdlClasificacionOG.DataBind()
|
||||
DdlClasificacionOG.Items.Insert(0, New ListItem("Seleccionar", "-1"))
|
||||
End If
|
||||
End Sub
|
||||
Protected Sub CargaTipoGasto(sender As Object, e As EventArgs)
|
||||
DdlTipoGasto.Items.Clear()
|
||||
LtDisponible.Text = "$"
|
||||
TxtImporte.Enabled = False
|
||||
If DdlClasificacionOG.SelectedValue.ToEntero > 0 Then
|
||||
Dim Filtro As New StringBuilder
|
||||
Filtro.AppendFormat("CveProgramaOperativo= {0} and CveUnidadAdministrativa= {1} and CveFuenteFinanciamiento= {2} and CveClasificacion= {3}", DdlMeta.SelectedValue.ToString, DdlUnidadAdministrativa.SelectedValue.ToString, DdlFuenteFinanciamiento.SelectedValue.ToString, DdlClasificacionOG.SelectedValue.ToString)
|
||||
|
||||
DdlTipoGasto.DataSource = (DtPresupuestos.FiltraParametros(Filtro.ToString)).FiltraParametros("", DistinctColumns:={"CveTipoGasto", "TipoGasto"})
|
||||
DdlTipoGasto.DataBind()
|
||||
DdlTipoGasto.Items.Insert(0, New ListItem("Seleccionar", "-1"))
|
||||
End If
|
||||
End Sub
|
||||
Protected Sub CargaDisponible(sender As Object, e As EventArgs)
|
||||
CargaDisponible()
|
||||
End Sub
|
||||
Protected Sub CargaDisponible()
|
||||
Dim ContPaq As New ClsContPAQi(UsuarioActual.Empresa)
|
||||
Dim Filtro As New StringBuilder
|
||||
Dim disponible As Double
|
||||
Filtro.AppendFormat("CveProgramaOperativo= {0} and CveUnidadAdministrativa= {1} and CveFuenteFinanciamiento= {2} and CveClasificacion= {3} and CveTipoGasto= {4}", DdlMeta.SelectedValue.ToString, DdlUnidadAdministrativa.SelectedValue.ToString, DdlFuenteFinanciamiento.SelectedValue.ToString, DdlClasificacionOG.SelectedValue.ToString, DdlTipoGasto.SelectedValue.ToString)
|
||||
|
||||
For Each dr As DataRow In DtPresupuestos.FiltraParametros(Filtro.ToString).Rows
|
||||
disponible = ContPaq.GetSaldoCuenta(dr("IdCuentaPorEjercer").ToString.ToEntero, 0, UsuarioActual.Empresa.EjercicioActual)
|
||||
HdnCuentaPorEjercer.Value = dr("IdCuentaPorEjercer").ToString
|
||||
HdnCuentaComprometido.Value = dr("IdCuentaComprometido").ToString
|
||||
Next
|
||||
|
||||
Filtro.Clear()
|
||||
Filtro.AppendFormat("IdCuentaPorEjercer= {0}", HdnCuentaPorEjercer.Value)
|
||||
For Each dr As DataRow In DtDetalle.FiltraParametros(Filtro.ToString).Rows
|
||||
disponible -= dr("Importe").ToString.ToDouble
|
||||
Next
|
||||
|
||||
If disponible <> 0 Then
|
||||
TxtImporte.Enabled = True
|
||||
BtnAgregar.Enabled = True
|
||||
End If
|
||||
LtDisponible.Text = disponible.FormatoNumero()
|
||||
'UpAddComprometer.Update()
|
||||
ContPaq.Dispose()
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
Protected Sub BtnAgregar_click(sender As Object, e As EventArgs)
|
||||
If DtDetalle IsNot Nothing Then
|
||||
If LtDisponible.Text.ToDouble >= TxtImporte.Text.ToDouble Then
|
||||
Dim dr As DataRow = DtDetalle.NewRow
|
||||
dr("Meta") = DdlMeta.SelectedItem.ToString
|
||||
dr("UnidadAdministrativa") = DdlUnidadAdministrativa.SelectedItem.ToString
|
||||
dr("FuenteFinanciamiento") = DdlFuenteFinanciamiento.SelectedItem.ToString
|
||||
dr("ClasificadorOG") = DdlClasificacionOG.SelectedItem.ToString
|
||||
dr("TipoGasto") = DdlTipoGasto.SelectedItem.ToString
|
||||
dr("Disponible") = LtDisponible.Text.ToDouble
|
||||
dr("Importe") = TxtImporte.Text.ToDouble
|
||||
dr("IdCuentaPorEjercer") = HdnCuentaPorEjercer.Value
|
||||
dr("IdCuentaComprometido") = HdnCuentaComprometido.Value
|
||||
DtDetalle.Rows.Add(dr)
|
||||
|
||||
CargaDatosComprometer()
|
||||
Dim total As Double = LbTotal.Text.ToDouble
|
||||
LbTotal.Text = (total + dr("Importe").ToString.ToDouble).ToString.FormatoNumero
|
||||
|
||||
DdlMeta.SelectedIndex = -1
|
||||
DdlUnidadAdministrativa.Items.Clear()
|
||||
DdlFuenteFinanciamiento.Items.Clear()
|
||||
DdlClasificacionOG.Items.Clear()
|
||||
DdlTipoGasto.Items.Clear()
|
||||
LtDisponible.Text = "$"
|
||||
TxtImporte.Text = ""
|
||||
TxtImporte.Enabled = False
|
||||
BtnAgregar.Enabled = False
|
||||
'UpAddComprometer.Update()
|
||||
Else
|
||||
Alert("El importe supera el capital disponible. Por favor de revisar y modificar", TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
Protected Sub BtnGuardar_click(sender As Object, e As EventArgs)
|
||||
If DtDetalle.Rows.Count > 0 Then
|
||||
Dim TieneError As Boolean = False
|
||||
Dim IDPoliza As Integer
|
||||
Dim Conta As New ClsContPAQi(UsuarioActual.Empresa)
|
||||
Conta.IniciaTransacSQL()
|
||||
Dim Total As Double = LbTotal.Text.ToDouble
|
||||
|
||||
IDPoliza = Conta.AddPoliza(4, TxtConcepto.Text.Trim, Total, Total, UsuarioActual.CveUsuario, TxtFechaComprometido.Text.ToDate)
|
||||
If IDPoliza > 0 Then
|
||||
|
||||
For Each dr As DataRow In DtDetalle.Rows
|
||||
Dim Importe = dr("Importe").ToString.ToDouble
|
||||
|
||||
If Conta.AddMovimiento(IDPoliza, dr("IdCuentaPorEjercer").ToString.ToEntero, True, Importe, TxtConcepto.Text.Trim, TxtConcepto.Text.Trim, 0, TxtFechaComprometido.Text.ToDate, "") Then
|
||||
'actualizo el idcuenta del presupuesto
|
||||
If Not Conta.AddMovimiento(IDPoliza, dr("IdCuentaComprometido").ToString.ToEntero, False, Importe, TxtConcepto.Text.Trim, TxtConcepto.Text.Trim, 0, TxtFechaComprometido.Text.ToDate, "") Then
|
||||
TieneError = True
|
||||
Exit For
|
||||
End If
|
||||
Else
|
||||
TieneError = True
|
||||
Exit For
|
||||
End If
|
||||
|
||||
Next
|
||||
Else
|
||||
TieneError = True
|
||||
End If
|
||||
|
||||
If Not TieneError Then
|
||||
Conta.Commit()
|
||||
GvD.DataBind()
|
||||
UpComprometer.Update()
|
||||
|
||||
DdlMetaPagar.SelectedValue = "-1"
|
||||
CargaUnidadAdministrativaPagar(DdlMetaPagar, EventArgs.Empty)
|
||||
UpPagar.Update()
|
||||
|
||||
DtDetalle.Rows.Clear()
|
||||
LbTotal.Text = "0.00"
|
||||
|
||||
|
||||
Dim Descargas As New StringBuilder
|
||||
If IDPoliza > 0 Then Descargas.AppendFormat("<a class=""Texto"" target='_blank' href=""/Contabilidad/RegPoliza.aspx?IdPoliza={0}""> Poliza</a>", IDPoliza)
|
||||
|
||||
Dim Msg As String = String.Format("<br />La poliza se comprometio correctamente.<br /><br /><br />Descargar: {0}", Descargas.ToString) 'TipoMensaje.MsgInformacion
|
||||
|
||||
Msg.Alert(Msg, TipoMensaje.MsgInformacion)
|
||||
Else
|
||||
Conta.RollBack()
|
||||
End If
|
||||
Conta.Dispose()
|
||||
Else
|
||||
Alert("No hay registros que guardar", TipoMensaje.MsgInformacion)
|
||||
End If
|
||||
End Sub
|
||||
Protected Sub GvD_RowDeleting(sender As Object, e As GridViewDeleteEventArgs) Handles GvD.RowDeleting
|
||||
Dim Filtro As New StringBuilder
|
||||
Filtro.AppendFormat("IdCuentaPorEjercer= {0} and Importe= {1}", GvD.Rows(e.RowIndex).DataKey("IdCuentaPorEjercer").ToString.ToEntero, GvD.Rows(e.RowIndex).DataKey("Importe").ToString.ToDouble)
|
||||
Dim dr As DataRow() = DtDetalle.Select(Filtro.ToString)
|
||||
Dim total As Double = LbTotal.Text.ToDouble
|
||||
LbTotal.Text = (total - dr(0).Item("Importe").ToString.ToDouble).ToString.FormatoNumero
|
||||
dr(0).Delete()
|
||||
|
||||
If Not LtDisponible.Text = "$" Then
|
||||
CargaDisponible()
|
||||
End If
|
||||
CargaDatosComprometer()
|
||||
End Sub
|
||||
Private Sub CreaDTDetalles()
|
||||
DtDetalle = New DataTable
|
||||
DtDetalle.Columns.Add("Meta", GetType(String))
|
||||
DtDetalle.Columns.Add("UnidadAdministrativa", GetType(String))
|
||||
DtDetalle.Columns.Add("FuenteFinanciamiento", GetType(String))
|
||||
DtDetalle.Columns.Add("ClasificadorOG", GetType(String))
|
||||
DtDetalle.Columns.Add("CodigoClasificacion", GetType(String))
|
||||
DtDetalle.Columns.Add("TipoGasto", GetType(String))
|
||||
DtDetalle.Columns.Add("Disponible", GetType(Double))
|
||||
DtDetalle.Columns.Add("Importe", GetType(Double))
|
||||
|
||||
DtDetalle.Columns.Add("IdCuentaPorEjercer", GetType(Integer))
|
||||
DtDetalle.Columns.Add("IdCuentaComprometido", GetType(Integer))
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
|
||||
#Region "O R D E N A M I E N T O C O M P R O M E T E R"
|
||||
Private Sub CargaGridComprometer(Orden As String)
|
||||
If Orden <> String.Empty Then
|
||||
Dim DV As New DataView(CType(ViewState("DTComprometer"), DataTable), "", Orden, DataViewRowState.CurrentRows)
|
||||
GvD.DataSource = DV.ToTable()
|
||||
DV.Dispose()
|
||||
Else
|
||||
GvD.DataSource = CType(ViewState("DTComprometer"), DataTable)
|
||||
End If
|
||||
GvD.DataBind()
|
||||
End Sub
|
||||
Protected Sub CargaDatosComprometer()
|
||||
ViewState("DTComprometer") = DtDetalle
|
||||
|
||||
If ViewState("Orden").ToString() <> String.Empty Then
|
||||
CargaGridComprometer(ViewState("Orden").ToString())
|
||||
Else
|
||||
CargaGridComprometer("")
|
||||
End If
|
||||
|
||||
UpComprometer.Update()
|
||||
End Sub
|
||||
Public Sub BtnAgregarComprometer_Click(sender As Object, e As EventArgs)
|
||||
DdlMeta.SelectedIndex = -1
|
||||
DdlUnidadAdministrativa.Items.Clear()
|
||||
DdlFuenteFinanciamiento.Items.Clear()
|
||||
DdlClasificacionOG.Items.Clear()
|
||||
DdlTipoGasto.Items.Clear()
|
||||
LtDisponible.Text = "$"
|
||||
TxtImporte.Text = ""
|
||||
TxtImporte.Enabled = False
|
||||
BtnAgregar.Enabled = False
|
||||
|
||||
'UpAddComprometer.Update()
|
||||
RegistraScript(String.Format("$('#{0}').modal();", "DivAgregarComprometer"))
|
||||
End Sub
|
||||
#End Region
|
||||
#End Region
|
||||
|
||||
|
||||
#Region "P A G A R"
|
||||
|
||||
#Region "CARGA COMBOS EN CASCADA"
|
||||
Private Sub CargaMetaPagar()
|
||||
DdlMetaPagar.DataSource = DtPresupuestos.FiltraParametros("", DistinctColumns:={"CveProgramaOperativo", "ProgramaOperativo"})
|
||||
DdlMetaPagar.DataBind()
|
||||
DdlMetaPagar.Items.Insert(0, New ListItem("Seleccionar", "-1"))
|
||||
End Sub
|
||||
Protected Sub CargaUnidadAdministrativaPagar(sender As Object, e As EventArgs)
|
||||
DdlUnidadAdministrativaPagar.Items.Clear()
|
||||
DdlFuenteFinanciamientoPagar.Items.Clear()
|
||||
DdlClasificacionOGPagar.Items.Clear()
|
||||
DdlTipoGastoPagar.Items.Clear()
|
||||
LtDisponiblePagar.Text = "$"
|
||||
TxtImportePagar.Enabled = False
|
||||
If DdlMetaPagar.SelectedValue.ToEntero > 0 Then
|
||||
Dim Filtro As New StringBuilder
|
||||
Filtro.AppendFormat("CveProgramaOperativo= {0}", DdlMetaPagar.SelectedValue.ToString)
|
||||
|
||||
DdlUnidadAdministrativaPagar.DataSource = (DtPresupuestos.FiltraParametros(Filtro.ToString)).FiltraParametros("", DistinctColumns:={"CveUnidadAdministrativa", "UnidadAdministrativa"})
|
||||
DdlUnidadAdministrativaPagar.DataBind()
|
||||
DdlUnidadAdministrativaPagar.Items.Insert(0, New ListItem("Seleccionar", "-1"))
|
||||
End If
|
||||
End Sub
|
||||
Protected Sub CargaFuenteFinanciamientoPagar(sender As Object, e As EventArgs)
|
||||
DdlFuenteFinanciamientoPagar.Items.Clear()
|
||||
DdlClasificacionOGPagar.Items.Clear()
|
||||
DdlTipoGastoPagar.Items.Clear()
|
||||
LtDisponiblePagar.Text = "$"
|
||||
TxtImportePagar.Enabled = False
|
||||
If DdlUnidadAdministrativaPagar.SelectedValue.ToEntero > 0 Then
|
||||
Dim Filtro As New StringBuilder
|
||||
Filtro.AppendFormat("CveProgramaOperativo= {0} and CveUnidadAdministrativa= {1}", DdlMetaPagar.SelectedValue.ToString, DdlUnidadAdministrativaPagar.SelectedValue.ToString)
|
||||
|
||||
DdlFuenteFinanciamientoPagar.DataSource = (DtPresupuestos.FiltraParametros(Filtro.ToString)).FiltraParametros("", DistinctColumns:={"CveFuenteFinanciamiento", "FuenteFinanciamiento"})
|
||||
DdlFuenteFinanciamientoPagar.DataBind()
|
||||
DdlFuenteFinanciamientoPagar.Items.Insert(0, New ListItem("Seleccionar", "-1"))
|
||||
End If
|
||||
End Sub
|
||||
Protected Sub CargaClasificacionOGPagar(sender As Object, e As EventArgs)
|
||||
DdlClasificacionOGPagar.Items.Clear()
|
||||
DdlTipoGastoPagar.Items.Clear()
|
||||
LtDisponiblePagar.Text = "$"
|
||||
TxtImportePagar.Enabled = False
|
||||
If DdlFuenteFinanciamientoPagar.SelectedValue.ToEntero > 0 Then
|
||||
Dim Filtro As New StringBuilder
|
||||
Filtro.AppendFormat("CveProgramaOperativo= {0} and CveUnidadAdministrativa= {1} and CveFuenteFinanciamiento= {2}", DdlMetaPagar.SelectedValue.ToString, DdlUnidadAdministrativaPagar.SelectedValue.ToString, DdlFuenteFinanciamientoPagar.SelectedValue.ToString)
|
||||
|
||||
DdlClasificacionOGPagar.DataSource = (DtPresupuestos.FiltraParametros(Filtro.ToString)).FiltraParametros("", "CodigoClasificacion", {"CveClasificacion", "CodigoClasificacion"})
|
||||
DdlClasificacionOGPagar.DataBind()
|
||||
DdlClasificacionOGPagar.Items.Insert(0, New ListItem("Seleccionar", "-1"))
|
||||
End If
|
||||
End Sub
|
||||
Protected Sub CargaTipoGastoPagar(sender As Object, e As EventArgs)
|
||||
DdlTipoGastoPagar.Items.Clear()
|
||||
LtDisponiblePagar.Text = "$"
|
||||
TxtImportePagar.Enabled = False
|
||||
If DdlClasificacionOGPagar.SelectedValue.ToEntero > 0 Then
|
||||
Dim Filtro As New StringBuilder
|
||||
Filtro.AppendFormat("CveProgramaOperativo= {0} and CveUnidadAdministrativa= {1} and CveFuenteFinanciamiento= {2} and CveClasificacion= {3}", DdlMetaPagar.SelectedValue.ToString, DdlUnidadAdministrativaPagar.SelectedValue.ToString, DdlFuenteFinanciamientoPagar.SelectedValue.ToString, DdlClasificacionOGPagar.SelectedValue.ToString)
|
||||
|
||||
DdlTipoGastoPagar.DataSource = (DtPresupuestos.FiltraParametros(Filtro.ToString)).FiltraParametros("", DistinctColumns:={"CveTipoGasto", "TipoGasto"})
|
||||
DdlTipoGastoPagar.DataBind()
|
||||
DdlTipoGastoPagar.Items.Insert(0, New ListItem("Seleccionar", "-1"))
|
||||
End If
|
||||
End Sub
|
||||
Protected Sub CargaDisponiblePagar(sender As Object, e As EventArgs)
|
||||
CargaDisponiblePagar()
|
||||
End Sub
|
||||
Protected Sub CargaDisponiblePagar()
|
||||
Dim ContPaq As New ClsContPAQi(UsuarioActual.Empresa)
|
||||
Dim Filtro As New StringBuilder
|
||||
Dim disponible As Double
|
||||
Filtro.AppendFormat("CveProgramaOperativo= {0} and CveUnidadAdministrativa= {1} and CveFuenteFinanciamiento= {2} and CveClasificacion= {3} and CveTipoGasto= {4}", DdlMetaPagar.SelectedValue.ToString, DdlUnidadAdministrativaPagar.SelectedValue.ToString, DdlFuenteFinanciamientoPagar.SelectedValue.ToString, DdlClasificacionOGPagar.SelectedValue.ToString, DdlTipoGastoPagar.SelectedValue.ToString)
|
||||
|
||||
For Each dr As DataRow In DtPresupuestos.FiltraParametros(Filtro.ToString).Rows
|
||||
disponible = ContPaq.GetSaldoCuenta(dr("IdCuentaComprometido").ToString.ToEntero, 0, UsuarioActual.Empresa.EjercicioActual)
|
||||
HdnCuentaComprometidoPagar.Value = dr("IdCuentaComprometido").ToString
|
||||
HdnCuentaDevengadoPagar.Value = dr("IdCuentaDevengado").ToString
|
||||
HdnCuentaEjercidoPagar.Value = dr("IdCuentaEjercido").ToString
|
||||
HdnCuentaPagadoPagar.Value = dr("IdCuentaPagado").ToString
|
||||
Next
|
||||
|
||||
Filtro.Clear()
|
||||
Filtro.AppendFormat("IdCuentaComprometido = {0}", HdnCuentaComprometidoPagar.Value)
|
||||
For Each dr As DataRow In DtDetallePagar.FiltraParametros(Filtro.ToString).Rows
|
||||
disponible -= dr("Importe").ToString.ToDouble
|
||||
Next
|
||||
|
||||
If disponible <> 0 Then
|
||||
TxtImportePagar.Enabled = True
|
||||
BtnAgregarPagar.Enabled = True
|
||||
End If
|
||||
LtDisponiblePagar.Text = disponible.FormatoNumero()
|
||||
ContPaq.Dispose()
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
Protected Sub BtnAgregarPagar_click(sender As Object, e As EventArgs)
|
||||
If DtDetallePagar IsNot Nothing Then
|
||||
If LtDisponiblePagar.Text.ToDouble >= TxtImportePagar.Text.ToDouble Then
|
||||
Dim dr As DataRow = DtDetallePagar.NewRow
|
||||
dr("Meta") = DdlMetaPagar.SelectedItem.ToString
|
||||
dr("UnidadAdministrativa") = DdlUnidadAdministrativaPagar.SelectedItem.ToString
|
||||
dr("FuenteFinanciamiento") = DdlFuenteFinanciamientoPagar.SelectedItem.ToString
|
||||
dr("ClasificadorOG") = DdlClasificacionOGPagar.SelectedItem.ToString
|
||||
dr("TipoGasto") = DdlTipoGastoPagar.SelectedItem.ToString
|
||||
dr("Disponible") = LtDisponiblePagar.Text.ToDouble
|
||||
dr("Importe") = TxtImportePagar.Text.ToDouble
|
||||
|
||||
dr("IdCuentaComprometido") = HdnCuentaComprometidoPagar.Value
|
||||
dr("IdCuentaDevengado") = HdnCuentaDevengadoPagar.Value
|
||||
dr("IdCuentaEjercido") = HdnCuentaEjercidoPagar.Value
|
||||
dr("IdCuentaPagado") = HdnCuentaPagadoPagar.Value
|
||||
|
||||
DtDetallePagar.Rows.Add(dr)
|
||||
CargaDatosPagar()
|
||||
Dim total As Double = LbTotalPagar.Text.ToDouble
|
||||
LbTotalPagar.Text = (total + dr("Importe").ToString.ToDouble).ToString.FormatoNumero
|
||||
|
||||
DdlMetaPagar.SelectedIndex = -1
|
||||
DdlUnidadAdministrativaPagar.Items.Clear()
|
||||
DdlFuenteFinanciamientoPagar.Items.Clear()
|
||||
DdlClasificacionOGPagar.Items.Clear()
|
||||
DdlTipoGastoPagar.Items.Clear()
|
||||
LtDisponiblePagar.Text = "$"
|
||||
TxtImportePagar.Text = ""
|
||||
TxtImportePagar.Enabled = False
|
||||
BtnAgregarPagar.Enabled = False
|
||||
Else
|
||||
Alert("El importe supera el capital disponible. Por favor de revisar y modificar", TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
Protected Sub BtnGuardarPagar_click(sender As Object, e As EventArgs)
|
||||
If DtDetallePagar.Rows.Count > 0 Then
|
||||
Dim TieneError As Boolean = False
|
||||
Dim IDPoliza As Integer
|
||||
Dim Conta As New ClsContPAQi(UsuarioActual.Empresa)
|
||||
Conta.IniciaTransacSQL()
|
||||
Dim Total As Double = LbTotalPagar.Text.ToDouble
|
||||
|
||||
IDPoliza = Conta.AddPoliza(4, "Devengado-Ejercido-Pagado", Total, Total, UsuarioActual.CveUsuario, Now)
|
||||
If IDPoliza > 0 Then
|
||||
|
||||
For Each dr As DataRow In DtDetallePagar.Rows
|
||||
Dim Importe = dr("Importe").ToString.ToDouble
|
||||
|
||||
'Devengado
|
||||
If Conta.AddMovimiento(IDPoliza, dr("IdCuentaComprometido").ToString.ToEntero, True, Importe, "", "", 0, String.Format("01/01/{0}", Now.Year).ToDate, "") Then
|
||||
If Not Conta.AddMovimiento(IDPoliza, dr("IdCuentaDevengado").ToString.ToEntero, False, Importe, "", "", 0, String.Format("01/01/{0}", Now.Year).ToDate, "") Then
|
||||
TieneError = True
|
||||
Exit For
|
||||
End If
|
||||
Else
|
||||
TieneError = True
|
||||
Exit For
|
||||
End If
|
||||
|
||||
'Ejercido
|
||||
If Conta.AddMovimiento(IDPoliza, dr("IdCuentaDevengado").ToString.ToEntero, True, Importe, "", "", 0, Now, "") Then
|
||||
If Not Conta.AddMovimiento(IDPoliza, dr("IdCuentaEjercido").ToString.ToEntero, False, Importe, "", "", 0, Now, "") Then
|
||||
TieneError = True
|
||||
Exit For
|
||||
End If
|
||||
Else
|
||||
TieneError = True
|
||||
Exit For
|
||||
End If
|
||||
|
||||
'Pagado
|
||||
If Conta.AddMovimiento(IDPoliza, dr("IdCuentaEjercido").ToString.ToEntero, True, Importe, "", "", 0, Now, "") Then
|
||||
If Not Conta.AddMovimiento(IDPoliza, dr("IdCuentaPagado").ToString.ToEntero, False, Importe, "", "", 0, Now, "") Then
|
||||
TieneError = True
|
||||
Exit For
|
||||
End If
|
||||
Else
|
||||
TieneError = True
|
||||
Exit For
|
||||
End If
|
||||
|
||||
Next
|
||||
|
||||
Else
|
||||
TieneError = True
|
||||
End If
|
||||
|
||||
If Not TieneError Then
|
||||
Conta.Commit()
|
||||
GvDPagar.DataBind()
|
||||
UpPagar.Update()
|
||||
DtDetallePagar.Rows.Clear()
|
||||
LbTotalPagar.Text = "0.00"
|
||||
|
||||
|
||||
Dim Descargas As New StringBuilder
|
||||
If IDPoliza > 0 Then Descargas.AppendFormat("<a class=""Texto"" target='_blank' href=""/Contabilidad/RegPoliza.aspx?IdPoliza={0}""> Poliza</a>", IDPoliza)
|
||||
|
||||
Dim Msg As String = String.Format("<br />La poliza se pago correctamente.<br /><br /><br />Descargar: {0}", Descargas.ToString) 'TipoMensaje.MsgInformacion
|
||||
|
||||
Msg.Alert(Msg, TipoMensaje.MsgInformacion)
|
||||
Else
|
||||
Conta.RollBack()
|
||||
End If
|
||||
Conta.Dispose()
|
||||
Else
|
||||
Alert("No hay registros que guardar", TipoMensaje.MsgInformacion)
|
||||
End If
|
||||
End Sub
|
||||
Protected Sub GvDPagar_RowDeleting(sender As Object, e As GridViewDeleteEventArgs) Handles GvDPagar.RowDeleting
|
||||
Dim Filtro As New StringBuilder
|
||||
Filtro.AppendFormat("IdCuentaEjercido= {0} and Importe= {1}", GvDPagar.Rows(e.RowIndex).DataKey("IdCuentaEjercido").ToString.ToEntero, GvDPagar.Rows(e.RowIndex).DataKey("Importe").ToString.ToDouble)
|
||||
Dim dr As DataRow() = DtDetallePagar.Select(Filtro.ToString)
|
||||
Dim total As Double = LbTotalPagar.Text.ToDouble
|
||||
LbTotalPagar.Text = (total - dr(0).Item("Importe").ToString.ToDouble).ToString.FormatoNumero
|
||||
dr(0).Delete()
|
||||
|
||||
If Not LtDisponiblePagar.Text = "$" Then
|
||||
CargaDisponiblePagar()
|
||||
End If
|
||||
CargaDatosPagar()
|
||||
End Sub
|
||||
Private Sub CreaDTDetallesPagar()
|
||||
DtDetallePagar = New DataTable
|
||||
DtDetallePagar.Columns.Add("Meta", GetType(String))
|
||||
DtDetallePagar.Columns.Add("UnidadAdministrativa", GetType(String))
|
||||
DtDetallePagar.Columns.Add("FuenteFinanciamiento", GetType(String))
|
||||
DtDetallePagar.Columns.Add("ClasificadorOG", GetType(String))
|
||||
DtDetallePagar.Columns.Add("CodigoClasificacion", GetType(String))
|
||||
DtDetallePagar.Columns.Add("TipoGasto", GetType(String))
|
||||
DtDetallePagar.Columns.Add("Disponible", GetType(Double))
|
||||
DtDetallePagar.Columns.Add("Importe", GetType(Double))
|
||||
|
||||
DtDetallePagar.Columns.Add("IdCuentaComprometido", GetType(Integer)) '8
|
||||
DtDetallePagar.Columns.Add("IdCuentaDevengado", GetType(Integer)) '9
|
||||
DtDetallePagar.Columns.Add("IdCuentaEjercido", GetType(Integer)) '10
|
||||
DtDetallePagar.Columns.Add("IdCuentaPagado", GetType(Integer)) '11
|
||||
End Sub
|
||||
Protected Sub CargaGridPagar()
|
||||
GvDPagar.DataSource = DtDetallePagar
|
||||
GvDPagar.DataBind()
|
||||
UpPagar.Update()
|
||||
End Sub
|
||||
|
||||
|
||||
#Region "O R D E N A M I E N T O P A G A R"
|
||||
Private Sub CargaGridPagar(Orden As String)
|
||||
If Orden <> String.Empty Then
|
||||
Dim DV As New DataView(CType(ViewState("DTPagar"), DataTable), "", Orden, DataViewRowState.CurrentRows)
|
||||
GvDPagar.DataSource = DV.ToTable()
|
||||
DV.Dispose()
|
||||
Else
|
||||
GvDPagar.DataSource = CType(ViewState("DTPagar"), DataTable)
|
||||
End If
|
||||
GvDPagar.DataBind()
|
||||
End Sub
|
||||
Protected Sub CargaDatosPagar()
|
||||
ViewState("DTPagar") = DtDetallePagar
|
||||
|
||||
If ViewState("OrdenPagar").ToString() <> String.Empty Then
|
||||
CargaGridPagar(ViewState("OrdenPagar").ToString())
|
||||
Else
|
||||
CargaGridPagar("")
|
||||
End If
|
||||
|
||||
UpPagar.Update()
|
||||
End Sub
|
||||
Public Sub BtnAddPagar_Click(sender As Object, e As EventArgs)
|
||||
DdlMetaPagar.SelectedIndex = -1
|
||||
DdlUnidadAdministrativaPagar.Items.Clear()
|
||||
DdlFuenteFinanciamientoPagar.Items.Clear()
|
||||
DdlClasificacionOGPagar.Items.Clear()
|
||||
DdlTipoGastoPagar.Items.Clear()
|
||||
LtDisponiblePagar.Text = "$"
|
||||
TxtImportePagar.Text = ""
|
||||
TxtImportePagar.Enabled = False
|
||||
BtnAgregarPagar.Enabled = False
|
||||
|
||||
RegistraScript(String.Format("$('#{0}').modal();", "DivAgregarPagar"))
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
|
||||
|
||||
End Class
|
||||
90
AC/RegDevengadoIngresos.aspx
Normal file
90
AC/RegDevengadoIngresos.aspx
Normal file
@@ -0,0 +1,90 @@
|
||||
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RegDevengadoIngresos.aspx.vb" Inherits="AC_RegDevengadoIngresos" %>
|
||||
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="HB" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="E" runat="Server">
|
||||
Ingreso a Devengar
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
|
||||
<asp:UpdatePanel ID="UPP" UpdateMode="Conditional" runat="server">
|
||||
<ContentTemplate>
|
||||
<table border="0" cellpadding="2" cellspacing="0">
|
||||
<tr>
|
||||
<td style="width: 85px;">Ingreso:</td>
|
||||
<td>
|
||||
<asp:DropDownList ID="CboPresupuesto" runat="server" AutoPostBack="true" AppendDataBoundItems="true" DataTextField="FuenteRecaudacionRubroIngreso" DataValueField="CvePresupuestoIngreso" Width="400px" OnSelectedIndexChanged="CboPresupuesto_SelectedIndexChanged">
|
||||
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RFVPresupuesto" runat="server" ControlToValidate="CboPresupuesto" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Ingreso''</b> es necesario, por favor seleccione uno." InitialValue="-1" ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOPresupuesto" runat="server" HighlightCssClass="vco" TargetControlID="RFVPresupuesto" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Importe:</td>
|
||||
<td>
|
||||
<asp:TextBox ID="TxtImporte" runat="server" Width="130px"></asp:TextBox>
|
||||
<ajax:FilteredTextBoxExtender ID="ftbe" runat="server" TargetControlID="TxtImporte" FilterType="Custom, Numbers" ValidChars="+-.," />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Fecha:</td>
|
||||
<td>
|
||||
<div class="input-group input-sm input-small date date-picker" data-date-format="dd/mm/yyyy" style="width: 130px !important; padding: 0px;">
|
||||
<asp:TextBox ID="TxtFecha" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="ImgCalendario" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
<ajax:MaskedEditExtender ID="MEEFecha" runat="server" TargetControlID="TxtFecha" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender ID="Calendario" runat="server" TargetControlID="TxtFecha" PopupButtonID="ImgCalendario" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
<asp:RequiredFieldValidator ID="RFVFechaDocumento" runat="server" ControlToValidate="TxtFecha" Display="None" ErrorMessage="El campo <b>''FechaDocumento''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<asp:CompareValidator ID="CVFechaDocumento" runat="server" ControlToValidate="TxtFecha" Display="None" ErrorMessage="El campo <b>''FechaDocumento''</b> no tienes 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="VCOFechaDocumento1" runat="server" HighlightCssClass="vco" TargetControlID="RFVFechaDocumento" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOFechaDocumento2" runat="server" HighlightCssClass="vco" TargetControlID="CVFechaDocumento" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Recaudar Automáticamente:</td>
|
||||
<td>
|
||||
<asp:CheckBox CssClass="make-switchsd" ID="ChkDevengar" runat="server" Text="" AutoPostBack="True" /></td>
|
||||
</tr>
|
||||
<tr runat="server" id="TrCuenta" visible="False">
|
||||
<td>Cuenta Bancaria:</td>
|
||||
<td>
|
||||
<asp:DropDownList ID="DdlCuenta" runat="server" AppendDataBoundItems="true" DataTextField="NumCuentaMoneda" DataValueField="IdCtaContable" Width="400px" ValidationGroup="GrpGuardar"></asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RFVCuenta" runat="server" ControlToValidate="DdlCuenta" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cuenta Bancaria''</b> es necesario, por favor seleccione uno." InitialValue="-1" ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOCuenta" runat="server" HighlightCssClass="vco" TargetControlID="RFVCuenta" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" style="text-align: center;">
|
||||
<asp:Button ID="BtnGuardar" runat="server" Text="Guardar" ValidationGroup="GrpGuardar" class="btn btn-primary" /></td>
|
||||
</tr>
|
||||
</table>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
||||
<script type="text/javascript">
|
||||
|
||||
//VALIDAR IMPORTE DEL TEXTBOX
|
||||
var importe = 0;
|
||||
|
||||
function AsignarImporte(imp) {
|
||||
importe = parseFloat(imp);
|
||||
}
|
||||
|
||||
function LimitaImporte(textbox) {
|
||||
if (parseFloat(textbox.value) >= importe) {
|
||||
textbox.value = importe;
|
||||
}
|
||||
}
|
||||
//TERMINA: VALIDAR IMPORTE DEL TEXTBOX
|
||||
</script>
|
||||
</asp:Content>
|
||||
250
AC/RegDevengadoIngresos.aspx.vb
Normal file
250
AC/RegDevengadoIngresos.aspx.vb
Normal file
@@ -0,0 +1,250 @@
|
||||
Imports System.Data
|
||||
Imports Extensiones
|
||||
Partial Class AC_RegDevengadoIngresos
|
||||
Inherits ClsPaginas
|
||||
|
||||
#Region "PROPIEDADES"
|
||||
Private Property DtPresupuestos As DataTable
|
||||
Get
|
||||
DtPresupuestos = DirectCast(ViewState("DtPresupuestos"), DataTable)
|
||||
End Get
|
||||
|
||||
Set(ByVal value As DataTable)
|
||||
ViewState("DtPresupuestos") = value
|
||||
End Set
|
||||
End Property
|
||||
#End Region
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||
If Not Page.IsPostBack Then
|
||||
CargaCuenta()
|
||||
CargaPresupuestos()
|
||||
TxtImporte.Attributes.Add("onkeyup", String.Format("LimitaImporte(this);"))
|
||||
End If
|
||||
End Sub
|
||||
Private Sub CargaCuenta()
|
||||
DdlCuenta.Items.Clear()
|
||||
Dim dt As DataTable = GlobalDTBancosCuentas(UsuarioActual.CveUsuario)
|
||||
'If CveMoneda > 0 Then
|
||||
' dt = dt.FiltraParametros(String.Format("CveMoneda = {0}", CveMoneda))
|
||||
|
||||
'End If
|
||||
DdlCuenta.DataSource = dt
|
||||
DdlCuenta.DataBind()
|
||||
DdlCuenta.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
End Sub
|
||||
Private Sub CargaPresupuestos()
|
||||
Dim AC As New ClsAC
|
||||
If AC.GetPresupuestoIngresos(-1, UsuarioActual.Empresa.EjercicioActual, True, UsuarioActual.CveEmpresa) Then
|
||||
DtPresupuestos = AC.DtResultados.Copy
|
||||
End If
|
||||
AC.Dispose()
|
||||
CboPresupuesto.DataSource = DtPresupuestos
|
||||
CboPresupuesto.DataBind()
|
||||
End Sub
|
||||
Protected Sub BtnGuardar_Click(sender As Object, e As EventArgs) Handles BtnGuardar.Click
|
||||
Dim ErrorMovimientos = False
|
||||
|
||||
If TxtImporte.Text.ToDouble <= 0 Then
|
||||
Alert("El total de la compra debe ser mayor a: 0.00", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
If UsuarioActual.Empresa.UsaAC Then
|
||||
Dim TotalRecaudar = Math.Round(TxtImporte.Text.ToDouble, 2)
|
||||
|
||||
If Not RegistraDevengado() Then
|
||||
If ChkDevengar.Checked Then
|
||||
If RegistraRecaudado() Then
|
||||
ErrorMovimientos = True
|
||||
End If
|
||||
End If
|
||||
Else
|
||||
ErrorMovimientos = True
|
||||
End If
|
||||
|
||||
If Not ErrorMovimientos Then
|
||||
Alert("Movimiento registrado con exito", TipoMensaje.MsgInformacion)
|
||||
Limpiar()
|
||||
Else
|
||||
Alert("Ocurrio un error al registrar el movimiento", TipoMensaje.MsgError)
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub Limpiar()
|
||||
CboPresupuesto.SelectedValue = -1
|
||||
TxtImporte.Text = ""
|
||||
TxtFecha.Text = "__/__/____"
|
||||
ChkDevengar.Checked = False
|
||||
End Sub
|
||||
Private Function RegistraDevengado() As Boolean
|
||||
Dim ObjContaAC As ClsContPAQi = Nothing
|
||||
ObjContaAC = New ClsContPAQi(UsuarioActual.Empresa)
|
||||
ObjContaAC.IniciaTransacSQL()
|
||||
Dim TotalDevengar = Math.Round(TxtImporte.Text.ToDouble, 2)
|
||||
Dim ErrorAC As Boolean = False
|
||||
'Dim Total As Double = GvAC.Rows.Cast(Of GridViewRow)().Sum(Function(gvr) gvr.FCTextBox("TxtImporte").Text.ToDouble)
|
||||
Dim IDPoliza As Integer = ObjContaAC.AddPoliza(4, "Devengado", TotalDevengar * 2, TotalDevengar * 2, UsuarioActual.CveUsuario, TxtFecha.Text.ToDate)
|
||||
|
||||
If IDPoliza > 0 Then
|
||||
Dim dr As DataRow = DtPresupuestos.FiltroPrimero(String.Format("CvePresupuestoIngreso = {0}", CboPresupuesto.SelectedValue))
|
||||
|
||||
If dr IsNot Nothing Then
|
||||
If ObjContaAC.AddMovimiento(IDPoliza, dr("IdCuentaDevengado").ToString.ToEntero, False, TotalDevengar, "", CboPresupuesto.SelectedItem.Text, 0, Now, "") Then
|
||||
If ObjContaAC.AddMovimiento(IDPoliza, dr("IdCuentaPorEjecutar").ToString.ToEntero, True, TotalDevengar, "", CboPresupuesto.SelectedItem.Text, 0, Now, "") Then
|
||||
|
||||
'AFECTAR MATRIZ INGRESOS
|
||||
Dim RegistroMatriz As DataRow = GlobalDTAC_MatrizIngresos.FiltroPrimero(String.Format("CodigoRubroIngreso = {0} ", dr("CodigoRubroIngreso").ToString))
|
||||
If RegistroMatriz IsNot Nothing AndAlso RegistroMatriz("CuentaCargo").ToString.ToEntero > 0 Then
|
||||
Dim DtCuentas As DataTable = Nothing
|
||||
If ObjContaAC.GetCuentas(-1, "-1", -1) Then
|
||||
DtCuentas = ObjContaAC.DtResultados
|
||||
End If
|
||||
Dim CuentaCargo As Integer = DtCuentas.FiltraParametros(String.Format("Codigo = '{0}'", RegistroMatriz("CuentaCargo").ToString)).Rows(0)("Id").ToString.ToEntero
|
||||
Dim CuentaAbono As Integer = DtCuentas.FiltraParametros(String.Format("Codigo = '{0}'", RegistroMatriz("CuentaAbono").ToString)).Rows(0)("Id").ToString.ToEntero
|
||||
If ObjContaAC.AddMovimiento(IDPoliza, CuentaCargo, False, TotalDevengar, "", CboPresupuesto.SelectedItem.Text, 0, Now, "") Then
|
||||
'actualizo el idcuenta del presupuesto
|
||||
If Not ObjContaAC.AddMovimiento(IDPoliza, CuentaAbono, True, TotalDevengar, "", CboPresupuesto.SelectedItem.Text, 0, Now, "") Then
|
||||
ErrorAC = True
|
||||
End If
|
||||
Else
|
||||
ErrorAC = True
|
||||
End If
|
||||
Else
|
||||
ErrorAC = True
|
||||
End If
|
||||
'TERMINA AFECTAR MATRIZ INGRESOS
|
||||
|
||||
Else
|
||||
ErrorAC = True
|
||||
End If
|
||||
Else
|
||||
ErrorAC = True
|
||||
End If
|
||||
End If
|
||||
Else
|
||||
ErrorAC = True
|
||||
End If
|
||||
|
||||
If Not ErrorAC Then
|
||||
ObjContaAC.Commit()
|
||||
Else
|
||||
Alert("Ocurrio un error al devengar", TipoMensaje.MsgError)
|
||||
ObjContaAC.RollBack()
|
||||
End If
|
||||
ObjContaAC.Dispose()
|
||||
|
||||
Return ErrorAC
|
||||
End Function
|
||||
|
||||
Private Function RegistraRecaudado() As Boolean
|
||||
Dim TotalRecaudar = Math.Round(TxtImporte.Text.ToDouble, 2)
|
||||
Dim ErrorAC As Boolean = False
|
||||
|
||||
'registra el movimiento en bancos
|
||||
Dim ObjContaAC As ClsContPAQi = Nothing
|
||||
ObjContaAC = New ClsContPAQi(UsuarioActual.Empresa)
|
||||
Dim ObjIE As New ClsBancos
|
||||
ObjContaAC.IniciaTransacSQL()
|
||||
Dim ObjMov As New ClsContabilidad(ObjIE.IniciaTransacSQL)
|
||||
|
||||
|
||||
Dim IDPoliza As Integer = ObjContaAC.AddPoliza(4, "Recaudado", TotalRecaudar * 2, TotalRecaudar * 2, UsuarioActual.CveUsuario, TxtFecha.Text.ToDate)
|
||||
Dim CvePrePoliza = -1
|
||||
Dim NumPoliza = ObjContaAC.Folio.ToString
|
||||
Dim CveIE = -1
|
||||
|
||||
If IDPoliza > 0 Then
|
||||
Dim Folio As String = ObjIE.GetNextFolio(DdlCuenta.SelectedValue.ToEntero, 2).ToString
|
||||
CvePrePoliza = ObjMov.AddPrePolizas("Vta", 11, TxtImporte.Text.Trim.ToDouble, TxtImporte.Text.Trim.ToDouble, 1, TxtFecha.Text.ToDate, "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
||||
|
||||
If CvePrePoliza > 0 Then
|
||||
CveIE = ObjIE.AddBancos_IE(DdlCuenta.SelectedValue.ToEntero, 2, TxtFecha.Text.Trim.ToDate, Folio, UsuarioActual.Empresa.Empresa, TxtImporte.Text.Trim.ToDouble, 1, 1, "", "", False, True, IDPoliza, CvePrePoliza, "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
||||
Dim IdCuentaContable As Integer = DdlCuenta.SelectedValue.ToEntero
|
||||
|
||||
If CveIE > 0 Then
|
||||
Dim dr As DataRow = DtPresupuestos.FiltroPrimero(String.Format("CvePresupuestoIngreso = {0}", CboPresupuesto.SelectedValue))
|
||||
|
||||
If dr IsNot Nothing Then
|
||||
'registro movimiento a la cuenta 814
|
||||
If ObjContaAC.AddMovimiento(IDPoliza, dr("IdCuentaRecaudado").ToString.ToEntero, False, TotalRecaudar, "", CboPresupuesto.SelectedItem.Text, 0, Now, "") Then
|
||||
'registro movimeinto a la cuenta 815
|
||||
If ObjContaAC.AddMovimiento(IDPoliza, dr("IdCuentaDevengado").ToString.ToEntero, True, TotalRecaudar, "", CboPresupuesto.SelectedItem.Text, 0, Now, "") Then
|
||||
'registro movimiento a donde se donde
|
||||
If Not ObjContaAC.AddMovimiento(IDPoliza, IdCuentaContable, False, TotalRecaudar, "", CboPresupuesto.SelectedItem.Text, 0, Now, "") Then
|
||||
'descuento a la cuenta bancaria
|
||||
If ObjContaAC.AddMovimiento(IDPoliza, dr("IdCuentaDevengado").ToString.ToEntero, True, TotalRecaudar, "", CboPresupuesto.SelectedItem.Text, 0, Now, "") Then
|
||||
ErrorAC = True
|
||||
End If
|
||||
Else
|
||||
ErrorAC = True
|
||||
End If
|
||||
Else
|
||||
ErrorAC = True
|
||||
End If
|
||||
Else
|
||||
ErrorAC = True
|
||||
End If
|
||||
End If
|
||||
|
||||
'Detalles de PrePoliza
|
||||
If Not ErrorAC Then
|
||||
If ObjMov.AddPrePolizasDetalle(CvePrePoliza, True, TxtImporte.Text.ToDouble, "", 30, "", Now, 0, -1, CveIE) Then
|
||||
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, True, TxtImporte.Text.ToDouble, "", 4, "", Now, 0, -1, CveIE) Then
|
||||
ErrorAC = True
|
||||
End If
|
||||
Else
|
||||
ErrorAC = True
|
||||
End If
|
||||
End If
|
||||
|
||||
Else
|
||||
ErrorAC = True
|
||||
End If
|
||||
|
||||
Else
|
||||
ErrorAC = True
|
||||
End If
|
||||
|
||||
Else
|
||||
ErrorAC = True
|
||||
End If
|
||||
|
||||
'Actualiza la CvePrePoliza
|
||||
If Not ErrorAC Then
|
||||
If Not ObjIE.UpdateIEPrePoliza(TxtFecha.Text.ToDate, NumPoliza, IDPoliza, CvePrePoliza, CveIE, -1) Then
|
||||
ErrorAC = True
|
||||
End If
|
||||
End If
|
||||
|
||||
If Not ErrorAC Then
|
||||
Alert("El movimiento se registró correctamente.", TipoMensaje.MsgInformacion)
|
||||
ObjIE.Commit()
|
||||
ObjContaAC.Commit()
|
||||
Else
|
||||
Alert("Ocurrió un error al registrar el movimiento.", TipoMensaje.MsgError)
|
||||
ObjContaAC.RollBack()
|
||||
ObjIE.RollBack()
|
||||
End If
|
||||
ObjContaAC.Dispose()
|
||||
ObjIE.Dispose()
|
||||
|
||||
Return ErrorAC
|
||||
End Function
|
||||
|
||||
|
||||
Protected Sub ChkDevengar_CheckedChanged(sender As Object, e As EventArgs) Handles ChkDevengar.CheckedChanged
|
||||
TrCuenta.Visible = ChkDevengar.Checked
|
||||
End Sub
|
||||
|
||||
Protected Sub CboPresupuesto_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||
Dim ObjConta As New ClsContPAQi(UsuarioActual.Empresa)
|
||||
Dim importe As Double
|
||||
If ObjConta.GetACSaldosIngresos(UsuarioActual.Empresa.EjercicioActual, 2) Then
|
||||
importe = ObjConta.DtResultados.FiltroPrimero(String.Format("CvePresupuestoIngreso = {0}", CboPresupuesto.SelectedValue.ToString))("PorDevengar").ToString.ToDouble
|
||||
End If
|
||||
RegistraScript(String.Format("AsignarImporte({0});", importe))
|
||||
TxtImporte.Text = "0"
|
||||
End Sub
|
||||
End Class
|
||||
388
AC/RegEgresosModificaciones.aspx
Normal file
388
AC/RegEgresosModificaciones.aspx
Normal file
@@ -0,0 +1,388 @@
|
||||
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RegEgresosModificaciones.aspx.vb" Inherits="AC_RegPEAmpRed" %>
|
||||
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="HB" runat="Server">
|
||||
<%--<asp:ImageButton ImageUrl="/Imagenes/BotonAgregar.gif" ID="ImgAddPE" runat="server" Width="20" Height="25" Style="cursor: pointer; margin-right: 15px;" />--%>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="E" runat="Server">
|
||||
Registro de Modificaciones al Presupuestos de Egresos
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
|
||||
<asp:UpdatePanel runat="server">
|
||||
<ContentTemplate>
|
||||
<li>
|
||||
<asp:HyperLink NavigateUrl="#" data-toggle="modal" data-target="#DivAddPE" ID="LblAgregar" runat="server"> <i class="fa fa-plus"></i> Agregar Presupuesto</asp:HyperLink>
|
||||
</li>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
<%-- <asp:UpdatePanel runat="server">
|
||||
<ContentTemplate>
|
||||
<li>
|
||||
<asp:Label runat="server" ID="LblAgregar" Style="cursor: pointer;" onclick="$get('DivAddPE').style.display='';"><i class="fa fa-plus"></i> Agregar Presupuesto</asp:Label>
|
||||
</li>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>--%>
|
||||
</asp:Content>
|
||||
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
|
||||
|
||||
|
||||
<%--<asp:UpdatePanel ID="UPFiltros" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="portlet solid grey-cascade portlet-filter" style="">
|
||||
<div class="portlet-title portlet-filterT" style="">
|
||||
<div class="titlefiltros caption ">
|
||||
<ul class="list-inline">
|
||||
<li>Tipo de Modificación:
|
||||
<asp:DropDownList ID="DdlAccion" runat="server" Width="150px" AutoPostBack="true" OnSelectedIndexChanged="TipoModificacion">
|
||||
<asp:ListItem Text="Ampliación" Value="1"></asp:ListItem>
|
||||
<asp:ListItem Text="Reducción" Value="-1"></asp:ListItem>
|
||||
<asp:ListItem Text="Transferencia" Value="0"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>--%>
|
||||
|
||||
<asp:UpdatePanel ID="UPFiltros" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="portlet solid grey-cascade portlet-filter">
|
||||
<div class="portlet-title portlet-filterT smalltitle">
|
||||
<div class="tools">
|
||||
<asp:Button CssClass="btn btn-primary" ID="BtnConsultar" runat="server" Text="Consultar" Width="100px" />
|
||||
</div>
|
||||
<div class="titlefiltros caption ">
|
||||
<div class="row">
|
||||
<div class="col-md-1" style="width: 150px"><span>Tipo de Modificación:</span></div>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="DdlAccion" runat="server" Width="150px" AutoPostBack="true">
|
||||
<asp:ListItem Text="Ampliación" Value="1"></asp:ListItem>
|
||||
<asp:ListItem Text="Reducción" Value="-1"></asp:ListItem>
|
||||
<asp:ListItem Text="Transferencia" Value="0"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
|
||||
<div class="col-md-1 text-size-12"><span>Ejercicio:</span></div>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="DdlEjercicio" runat="server" Width="100%" DataTextField="Ejercicio" DataValueField="Ejercicio" AutoPostBack="true" OnSelectedIndexChanged="DdlEjercicio_SelectedIndexChanged"></asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
|
||||
<asp:UpdatePanel ID="UpEncabezado" UpdateMode="Conditional" runat="server">
|
||||
<ContentTemplate>
|
||||
<table style="width: 100%;">
|
||||
<tr>
|
||||
<td style="width: 50px;">Fecha:</td>
|
||||
<td>
|
||||
<div class="input-group input-sm input-small date date-picker" data-date-format="dd/mm/yyyy" style="width: 130px !important; padding: 0px;">
|
||||
<asp:TextBox ID="TxtFecha" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="ImgFecha" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
<ajax:MaskedEditExtender ID="MEEFecha" runat="server" TargetControlID="TxtFecha" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender runat="server" ID="CEFecha" TargetControlID="TxtFecha" PopupButtonID="ImgFecha" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
<asp:RequiredFieldValidator ID="RFVFecha" runat="server" ControlToValidate="TxtFecha" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<asp:CompareValidator ID="CVFecha" runat="server" ControlToValidate="TxtFecha" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha''</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="VCOFecha1" runat="server" HighlightCssClass="vco" TargetControlID="RFVFecha" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOFecha2" runat="server" HighlightCssClass="vco" TargetControlID="CVFecha" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</td>
|
||||
<td align="right">
|
||||
<h4>Ejercicio:
|
||||
<asp:Literal Text="" ID="LtEjercicio" runat="server" /></h4>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Concepto:</td>
|
||||
<td>
|
||||
<asp:TextBox ID="TxtConcepto" runat="server" CausesValidation="true" ValidationGroup="GrpGuardar" Width="400px"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVConcepto" runat="server" ControlToValidate="TxtConcepto" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Concepto''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCEConcepto" runat="server" HighlightCssClass="vco" TargetControlID="RFVConcepto" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</td>
|
||||
</tr>
|
||||
<tr runat="server" id="TrMomentos" visible="false">
|
||||
<td>Momentos</td>
|
||||
<td>
|
||||
<asp:DropDownList ID="DdlMomentos" runat="server" AutoPostBack="true">
|
||||
<asp:ListItem Text="-" Value="0" Selected="True"></asp:ListItem>
|
||||
<asp:ListItem Text="Descomprometer-Comprometer" Value="1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
<br />
|
||||
|
||||
|
||||
<asp:UpdatePanel ID="UPPDetalle" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<table style="width: 100%;" class="table table-striped table-advance table-hover">
|
||||
<tr>
|
||||
<td colspan="10">
|
||||
<asp:GridView ID="GvD" runat="server" OnRowDataBound="GvD_RowDataBound" EmptyDataText="No se encontraron Registros" AutoGenerateColumns="False" DataKeyNames="IdCuentaPorEjercer,IdCuentaModificaciones,IdCuentaComprometido" ShowHeader="True" Width="100%" CssClass="table table-striped table-advance table-hover ScrollAD" Style="text-align: center;" GridLines="None">
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderText="Meta">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="Meta" runat="server" Text='<%# Eval("Meta")%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="240px" HorizontalAlign="Left" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Unidad Administrativa">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="UnidadAdministrativa" runat="server" Text='<%# Eval("UnidadAdministrativa")%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="128px" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Fuente Financiamiento">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="FuenteFinanciamiento" runat="server" Text='<%# Eval("FuenteFinanciamiento")%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="120px" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Clasificador OG">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="ClasificadorOG" runat="server" Text='<%# Eval("ClasificadorOG")%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="144px" HorizontalAlign="Left" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Tipo Gasto">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="TipoGasto" runat="server" Text='<%# Eval("TipoGasto")%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="80px" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Saldo">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="Saldo" runat="server" Text='<%# Eval("Saldo", "{0:N2}")%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="60px" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Ampliación">
|
||||
<ItemTemplate>
|
||||
<asp:TextBox ID="TxtAmpliacion" runat="server" Width="90%" CssClass="alineanum"></asp:TextBox>
|
||||
<ajax:FilteredTextBoxExtender ID="SoloNumeros" runat="server" TargetControlID="TxtAmpliacion" FilterType="Custom, Numbers" ValidChars="." />
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="70px" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Reducción">
|
||||
<ItemTemplate>
|
||||
<asp:TextBox ID="TxtReduccion" runat="server" Width="90%" CssClass="alineanum"></asp:TextBox>
|
||||
<ajax:FilteredTextBoxExtender ID="SoloNumeros2" runat="server" TargetControlID="TxtReduccion" FilterType="Custom, Numbers" ValidChars="." />
|
||||
<asp:RangeValidator ID="RVR" Display="Dynamic" ControlToValidate="TxtReduccion" runat="server" MinimumValue="0" MaximumValue="0" Type="Currency" ErrorMessage="*"></asp:RangeValidator>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="70px" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Saldo Final">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LBSF" runat="server"></asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Right" Width="70px" />
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
<%-- <HeaderStyle CssClass="TitulosChico"></HeaderStyle>
|
||||
<RowStyle CssClass="Texto" />
|
||||
<AlternatingRowStyle CssClass="TextoAlterno" />--%>
|
||||
</asp:GridView>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
<asp:UpdatePanel ID="UPTotales" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<table style="width: 100%;" class="table table-striped table-advance table-hover">
|
||||
<tr class="SubTotales">
|
||||
<td style="width: 665px"></td>
|
||||
<td style="float: left; padding-top: 3px; padding-bottom: 3px;" align="right">Totales:
|
||||
<asp:Label runat="server" ID="LbTotalSaldo" ClientIDMode="Static" CssClass="alineanum" Width="60px" Text="0.00"></asp:Label>
|
||||
<asp:Label runat="server" ID="LbTotalAmpliacion" ClientIDMode="Static" Width="60px" Text="0.00"></asp:Label>
|
||||
<asp:Label runat="server" ID="LbTotalReduccion" ClientIDMode="Static" Width="60px" Text="0.00" Visible="false"></asp:Label>
|
||||
</td>
|
||||
<td style="float: right; padding-top: 3px; padding-bottom: 3px;">
|
||||
<asp:Label runat="server" ID="LbTotalSaldoFinal" ClientIDMode="Static" Text="0.00"></asp:Label>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
<asp:UpdatePanel ID="UPComandos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<table style="width: 100%;" class="table table-striped table-advance table-hover">
|
||||
<tr class="SubTotales">
|
||||
<td style="float: right; padding-top: 3px; padding-bottom: 3px; padding-right: 20px;">
|
||||
<asp:Button ID="BtnGuardar" runat="server" ClientIDMode="Static" Text="Guardar Modificaciones" OnClick="BtnGuardar_click" ValidationGroup="GrpGuardar" class="btn btn-primary" />
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
<asp:UpdatePanel runat="server" ID="UPPersonalizar" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div id="DivAddPE" class="modal fade" role="dialog">
|
||||
<div class="modal-dialog">
|
||||
|
||||
<!-- Modal content-->
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||
<h4 class="modal-title">
|
||||
<asp:Label ID="Label1" runat="server" ClientIDMode="Static" Text="AGREGAR PRESUPUESTO DE EGRESOS"></asp:Label></h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
|
||||
<table style="width: 100%;">
|
||||
<tr>
|
||||
<td>Programa Operativo:
|
||||
</td>
|
||||
<td>
|
||||
<asp:DropDownList ID="CboProgramaOperativo" CssClass="select2me" runat="server" DataTextField="ProgramaOperativo" DataValueField="CveProgramaOperativo" Width="450px"></asp:DropDownList>
|
||||
<asp:RangeValidator ID="RVProgramaOperativo" runat="server" ControlToValidate="CboProgramaOperativo" Display="None" Type="Integer" MinimumValue="1" MaximumValue="2147483647" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Programa Operativo''</b> es necesario, por favor seleccione uno." ValidationGroup="GrpGuardarPE"></asp:RangeValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOProgramaOperativo" runat="server" HighlightCssClass="vco" TargetControlID="RVProgramaOperativo" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Fuente de Financiamiento:
|
||||
</td>
|
||||
<td>
|
||||
<asp:DropDownList ID="CboFuenteFinanciamiento" CssClass="select2me" runat="server" DataTextField="FuenteFinanciamiento" DataValueField="CveFuenteFinanciamiento" Width="450px"></asp:DropDownList>
|
||||
<asp:RangeValidator ID="RVFuenteFinanciamiento" runat="server" ControlToValidate="CboFuenteFinanciamiento" Display="None" Type="Integer" MinimumValue="1" MaximumValue="2147483647" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fuente de Financiamiento''</b> es necesario, por favor seleccione uno." ValidationGroup="GrpGuardarPE"></asp:RangeValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOFuenteFinanciamiento" runat="server" HighlightCssClass="vco" TargetControlID="RVFuenteFinanciamiento" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Unidad Administrativa:
|
||||
</td>
|
||||
<td>
|
||||
<asp:DropDownList ID="CboUnidadAdministrativa" CssClass="select2me" runat="server" DataTextField="UnidadAdministrativa" DataValueField="CveUnidadAdministrativa" Width="450px"></asp:DropDownList>
|
||||
<asp:RangeValidator ID="RVUnidadAdministrativa" runat="server" ControlToValidate="CboUnidadAdministrativa" Display="None" Type="Integer" MinimumValue="1" MaximumValue="2147483647" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Unidad Administrativa''</b> es necesario, por favor seleccione uno." ValidationGroup="GrpGuardarPE"></asp:RangeValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOUnidadAdministrativa" runat="server" HighlightCssClass="vco" TargetControlID="RVUnidadAdministrativa" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Tipo de Gasto:
|
||||
</td>
|
||||
<td>
|
||||
<asp:DropDownList ID="CboTipoGasto" CssClass="select2me" runat="server" DataTextField="TipoGasto" DataValueField="CveTipoGasto" Width="450px"></asp:DropDownList>
|
||||
<asp:RangeValidator ID="RVTipoGasto" runat="server" ControlToValidate="CboTipoGasto" Display="None" Type="Integer" MinimumValue="1" MaximumValue="2147483647" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Tipo de Gasto''</b> es necesario, por favor seleccione uno." ValidationGroup="GrpGuardarPE"></asp:RangeValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOTipoGasto" runat="server" HighlightCssClass="vco" TargetControlID="RVTipoGasto" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Clasificación del Objeto de Gasto:
|
||||
</td>
|
||||
<td>
|
||||
<asp:DropDownList ID="CboClasificacionOG" CssClass="select2me" runat="server" DataTextField="CodigoClasificacion" DataValueField="CveClasificacion" Width="450px"></asp:DropDownList>
|
||||
<asp:RangeValidator ID="RVClasificacionOG" runat="server" ControlToValidate="CboClasificacionOG" Display="None" Type="Integer" MinimumValue="1" MaximumValue="2147483647" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Clasificacion del Objeto de Gasto''</b> es necesario, por favor seleccione uno." ValidationGroup="GrpGuardarPE"></asp:RangeValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOClasificacionOG" runat="server" HighlightCssClass="vco" TargetControlID="RVClasificacionOG" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<asp:Button Text="Agregar" ID="BtnAgregarPE" runat="server" OnClick="BtnAgregarPE_Click" ValidationGroup="GrpGuardarPE" class="btn btn-primary" />
|
||||
<%--<button type="button" class="btn btn-success" data-dismiss="modal" onclick="$('#BtnPersonalizar').click();">Personalizar</button>--%>
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">Cancelar</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
||||
<script type="text/javascript">
|
||||
|
||||
function pageLoad() {
|
||||
$(document).ready(function () {
|
||||
//gridviewScroll();
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
<%--function gridviewScroll() {
|
||||
var Tam = TamañoVentana();
|
||||
var Alto = Tam.height - 300;
|
||||
if (Alto < 100) {
|
||||
Alto = 100;
|
||||
}
|
||||
$('#<%=GvD.ClientID%>').gridviewScroll({
|
||||
width: 995,
|
||||
height: Alto
|
||||
});
|
||||
}--%>
|
||||
|
||||
|
||||
|
||||
function CalculaSaldo(s, t, f, Opc, limpia) {
|
||||
|
||||
var Imp = parseFloat(t.value);
|
||||
if (Imp > 0) {
|
||||
if (Opc == 'R') {
|
||||
if (parseFloat(t.value) > s) {
|
||||
t.value = s;
|
||||
}
|
||||
if (Imp > 0 && limpia != '') { //si hay valor en el campo actual, debe de limpiar el otro
|
||||
$get(limpia).value = '';
|
||||
}
|
||||
Imp = parseFloat(-t.value);
|
||||
|
||||
|
||||
}
|
||||
else {
|
||||
if (Imp > 0 && limpia != '') { //si hay valor en el campo actual, debe de limpiar el otro
|
||||
$get(limpia).value = '';
|
||||
}
|
||||
}
|
||||
if (parseFloat(t.value) > 0) $get(f).innerText = FormatoNumero(s + Imp, 2); // si el importe inicial es mayor a cero, hubo cambios
|
||||
}
|
||||
else {
|
||||
$get(f).innerText = FormatoNumero(s, 2);
|
||||
}
|
||||
SumaValores();
|
||||
}
|
||||
function SumaValores() {
|
||||
var Importe = 0;
|
||||
var ImpReduccion = 0;
|
||||
|
||||
var topLevelElem = document.getElementById("form1");
|
||||
var textBoxes = topLevelElem.getElementsByTagName("input");
|
||||
for (var i = 0; i < textBoxes.length; i++) {
|
||||
if (textBoxes[i].type == "text") {
|
||||
if (textBoxes[i].id.indexOf('TxtAmpliacion') >= 0 && textBoxes[i].readOnly == false && textBoxes[i].value != '') {
|
||||
Importe = parseFloat(Importe) + parseFloat(textBoxes[i].value.split(',').join(''));
|
||||
}
|
||||
if (textBoxes[i].id.indexOf('TxtReduccion') >= 0 && textBoxes[i].readOnly == false && textBoxes[i].value != '') {
|
||||
ImpReduccion = parseFloat(ImpReduccion) + parseFloat(textBoxes[i].value.split(',').join(''));
|
||||
}
|
||||
}
|
||||
}
|
||||
debugger;
|
||||
if ($get('LbTotalAmpliacion')) $get('LbTotalAmpliacion').innerText = FormatoNumero(Importe, 2);
|
||||
if ($get('LbTotalReduccion')) $get('LbTotalReduccion').innerText = FormatoNumero(ImpReduccion, 2);
|
||||
if ($get('LbTotalSaldoFinal')) $get('LbTotalSaldoFinal').innerText = FormatoNumero(parseFloat($get('LbTotalSaldo').innerText.replace(/,/g, '')) + Importe - ImpReduccion, 2);
|
||||
|
||||
}
|
||||
</script>
|
||||
</asp:Content>
|
||||
682
AC/RegEgresosModificaciones.aspx.vb
Normal file
682
AC/RegEgresosModificaciones.aspx.vb
Normal file
@@ -0,0 +1,682 @@
|
||||
Option Explicit On
|
||||
Option Strict On
|
||||
|
||||
Imports System.Data
|
||||
Imports Extensiones
|
||||
Imports System.Activities.Statements
|
||||
|
||||
Partial Class AC_RegPEAmpRed
|
||||
Inherits ClsPaginas
|
||||
|
||||
#Region "PROPIEDADES"
|
||||
Private Property DtPresupuestos As DataTable
|
||||
Get
|
||||
DtPresupuestos = DirectCast(ViewState("DtPresupuestos"), DataTable)
|
||||
End Get
|
||||
|
||||
Set(ByVal value As DataTable)
|
||||
ViewState("DtPresupuestos") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property DtDetalle As DataTable
|
||||
Get
|
||||
DtDetalle = DirectCast(ViewState("DtDetalle"), DataTable)
|
||||
End Get
|
||||
|
||||
Set(ByVal value As DataTable)
|
||||
ViewState("DtDetalle") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private Property StrCuentaSaldo As String
|
||||
Get
|
||||
StrCuentaSaldo = ViewState("StrCuentaSaldo").ToString
|
||||
End Get
|
||||
|
||||
Set(ByVal value As String)
|
||||
ViewState("StrCuentaSaldo") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
#End Region
|
||||
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||
If Not Page.IsPostBack Then
|
||||
StrCuentaSaldo = "IdCuentaPorEjercer"
|
||||
CargaEjercicios()
|
||||
GvD.Columns(7).Visible = False
|
||||
CreaDTDetalles()
|
||||
CargaPresupuestos()
|
||||
CargaCombosPE()
|
||||
TxtFecha.Text = Now.ToShortDateString
|
||||
End If
|
||||
End Sub
|
||||
Private Sub CargaPresupuestos()
|
||||
Dim AC As New ClsAC
|
||||
If AC.GetPresupuestoEgresos(-1, True, DdlEjercicio.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, True) Then
|
||||
DtPresupuestos = AC.DtResultados.Copy
|
||||
Else
|
||||
Alert("Ocurrio un error al cargar los Presupuestos. Por favor vuelva a cargar la pagina", TipoMensaje.MsgError)
|
||||
End If
|
||||
AC.Dispose()
|
||||
LtEjercicio.Text = DdlEjercicio.SelectedValue
|
||||
UPTotales.Update()
|
||||
UPComandos.Update()
|
||||
UpEncabezado.Update()
|
||||
LlenaDtDetalles()
|
||||
End Sub
|
||||
Private Sub CargaEjercicios()
|
||||
Dim ClsConta As New ClsContPAQi(UsuarioActual.Empresa)
|
||||
If ClsConta.GetEjercicios() Then
|
||||
DdlEjercicio.DataSource = ClsConta.DtResultados
|
||||
Else
|
||||
DdlEjercicio.DataSource = Nothing
|
||||
End If
|
||||
ClsConta.Dispose()
|
||||
DdlEjercicio.DataBind()
|
||||
|
||||
DdlEjercicio.SelectedValueExist(UsuarioActual.Empresa.EjercicioActual.ToString)
|
||||
|
||||
|
||||
End Sub
|
||||
Protected Sub DdlEjercicio_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||
CargaPresupuestos()
|
||||
CargaProgramaOperativo()
|
||||
End Sub
|
||||
|
||||
Private Sub CreaDTDetalles()
|
||||
DtDetalle = New DataTable
|
||||
DtDetalle.Columns.Add("Meta", GetType(String))
|
||||
DtDetalle.Columns.Add("UnidadAdministrativa", GetType(String))
|
||||
DtDetalle.Columns.Add("FuenteFinanciamiento", GetType(String))
|
||||
DtDetalle.Columns.Add("ClasificadorOG", GetType(String))
|
||||
DtDetalle.Columns.Add("TipoGasto", GetType(String))
|
||||
DtDetalle.Columns.Add("Saldo", GetType(Double))
|
||||
|
||||
DtDetalle.Columns.Add("IdCuentaPorEjercer", GetType(Integer))
|
||||
DtDetalle.Columns.Add("IdCuentaModificaciones", GetType(Integer))
|
||||
DtDetalle.Columns.Add("IdCuentaComprometido", GetType(Integer))
|
||||
|
||||
End Sub
|
||||
Private Sub LlenaDtDetalles()
|
||||
Dim ContPaq As New ClsContPAQi(UsuarioActual.Empresa)
|
||||
DtDetalle.Rows.Clear()
|
||||
Dim totalsaldo As Double
|
||||
|
||||
Select Case DdlMomentos.SelectedValue
|
||||
Case "1" : StrCuentaSaldo = "IdCuentaComprometido"
|
||||
Case Else : StrCuentaSaldo = "IdCuentaPorEjercer"
|
||||
End Select
|
||||
|
||||
For Each drp As DataRow In DtPresupuestos.Rows
|
||||
Dim drt As DataRow = DtDetalle.NewRow
|
||||
drt("Meta") = drp("ProgramaOperativo")
|
||||
drt("UnidadAdministrativa") = drp("UnidadAdministrativa")
|
||||
drt("FuenteFinanciamiento") = drp("FuenteFinanciamiento")
|
||||
drt("ClasificadorOG") = drp("ClasificadorOGRep")
|
||||
drt("TipoGasto") = drp("TipoGasto")
|
||||
drt("Saldo") = ContPaq.GetSaldoCuenta(drp(StrCuentaSaldo).ToString.ToEntero, 0, DdlEjercicio.SelectedValue.ToEntero)
|
||||
|
||||
drt("IdCuentaPorEjercer") = drp("IdCuentaPorEjercer")
|
||||
drt("IdCuentaModificaciones") = drp("IdCuentaModificaciones")
|
||||
drt("IdCuentaComprometido") = drp("IdCuentaComprometido")
|
||||
totalsaldo += drt("saldo").ToString.ToDouble
|
||||
|
||||
DtDetalle.Rows.Add(drt)
|
||||
Next
|
||||
|
||||
LbTotalSaldo.Text = totalsaldo.ToString.FormatoNumero
|
||||
ContPaq.Dispose()
|
||||
CargaDatosDetalles()
|
||||
End Sub
|
||||
Protected Sub CargaDatosDetalles()
|
||||
GvD.DataSource = DtDetalle
|
||||
GvD.DataBind()
|
||||
UPPDetalle.Update()
|
||||
End Sub
|
||||
|
||||
Protected Sub BtnGuardar_click(sender As Object, e As EventArgs)
|
||||
Dim Total As Decimal = 0
|
||||
Dim Accion As Integer = DdlAccion.SelectedValue.ToString.ToEntero
|
||||
Dim IDPoliza As Integer
|
||||
Dim Conta As New ClsContPAQi(UsuarioActual.Empresa)
|
||||
Dim TieneError As Boolean = False
|
||||
Dim NoHaceNada As Boolean = False
|
||||
Dim TransferenciaError As Boolean = False
|
||||
'Dim Concepto As String
|
||||
Dim ampliacion As Decimal
|
||||
Dim reduccion As Decimal
|
||||
Conta.IniciaTransacSQL()
|
||||
|
||||
If Accion = 0 Then
|
||||
For Each gvr As GridViewRow In GvD.Rows
|
||||
If Accion = -1 Then Total += gvr.FCTextBox("TxtReduccion").Text.ToDecimal Else Total += gvr.FCTextBox("TxtAmpliacion").Text.ToDecimal
|
||||
ampliacion += gvr.FCTextBox("TxtAmpliacion").Text.ToDecimal
|
||||
reduccion += gvr.FCTextBox("TxtReduccion").Text.ToDecimal
|
||||
Next
|
||||
If Math.Abs(ampliacion - reduccion) > 0.001 Then Total = -1
|
||||
Else
|
||||
For Each gvr As GridViewRow In GvD.Rows
|
||||
If Accion = -1 Then Total += gvr.FCTextBox("TxtReduccion").Text.ToDecimal Else Total += gvr.FCTextBox("TxtAmpliacion").Text.ToDecimal
|
||||
Next
|
||||
End If
|
||||
|
||||
If Total > 0 Then
|
||||
'Select Case Accion
|
||||
' Case 1
|
||||
' Concepto = "Modificado - Ampliación"
|
||||
' Case -1
|
||||
' Concepto = "Modificado - Reduccción" : Total = 0
|
||||
' Case Else
|
||||
' Concepto = "Modificado - Transferencia"
|
||||
'End Select
|
||||
Total = If(Accion = -1, 0, Total)
|
||||
Dim Fecha As Date = TxtFecha.Text.ToDate
|
||||
IDPoliza = Conta.AddPoliza(4, TxtConcepto.Text, Total, Total, UsuarioActual.CveUsuario, Fecha)
|
||||
|
||||
Dim Importe As Double
|
||||
If IDPoliza > 0 Then
|
||||
For Each gvr As GridViewRow In GvD.Rows
|
||||
|
||||
If DdlAccion.SelectedValue = "0" Then
|
||||
If gvr.FCTextBox("TxtReduccion").Text.ToDouble > 0 Then
|
||||
Importe = gvr.FCTextBox("TxtReduccion").Text.ToDecimal
|
||||
Accion = -1
|
||||
Else
|
||||
Importe = gvr.FCTextBox("TxtAmpliacion").Text.ToDecimal
|
||||
Accion = 1
|
||||
End If
|
||||
Else
|
||||
If Accion = -1 Then Importe = gvr.FCTextBox("TxtReduccion").Text.ToDecimal() Else Importe = gvr.FCTextBox("TxtAmpliacion").Text.ToDecimal()
|
||||
End If
|
||||
|
||||
If Importe > 0 Then
|
||||
If Conta.AddMovimiento(IDPoliza, gvr.DataKey("IdCuentaPorEjercer").ToString.ToEntero, False, Importe * Accion, "", "", 0, Fecha, "") Then
|
||||
'actualizo el idcuenta del presupuesto
|
||||
If Not Conta.AddMovimiento(IDPoliza, gvr.DataKey("IdCuentaModificaciones").ToString.ToEntero, True, Importe * Accion, "", "", 0, Fecha, "") Then TieneError = True : Exit For
|
||||
|
||||
'solo en transferencias
|
||||
If DdlMomentos.SelectedValue.ToEntero >= 1 AndAlso Not Conta.AddMovimiento(IDPoliza, gvr.DataKey("IdCuentaComprometido").ToString.ToEntero, False, Importe * Accion, "", "", 0, Fecha, "") Then TieneError = True : Exit For
|
||||
If DdlMomentos.SelectedValue.ToEntero >= 1 AndAlso Not Conta.AddMovimiento(IDPoliza, gvr.DataKey("IdCuentaPorEjercer").ToString.ToEntero, True, Importe * Accion, "", "", 0, Fecha, "") Then TieneError = True : Exit For
|
||||
|
||||
Else
|
||||
TieneError = True
|
||||
Exit For
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
Else
|
||||
TieneError = True
|
||||
End If
|
||||
Else
|
||||
TieneError = True
|
||||
NoHaceNada = True
|
||||
End If
|
||||
|
||||
If Not TieneError Then
|
||||
|
||||
Conta.AjustaPoliza(IDPoliza)
|
||||
|
||||
Conta.Commit()
|
||||
LbTotalAmpliacion.Text = "0.00"
|
||||
LbTotalReduccion.Text = "0.00"
|
||||
LbTotalSaldoFinal.Text = "0.00"
|
||||
TxtConcepto.Text = ""
|
||||
TxtFecha.Text = "__/__/____"
|
||||
GvD.DataBind()
|
||||
CargaPresupuestos()
|
||||
UPPDetalle.Update()
|
||||
UPTotales.Update()
|
||||
Alert(String.Format("Registros agregados con exito<br/><br/><a href='/Contabilidad/RegPoliza.aspx?IdPoliza={0}' class='Texto' target='_blank'>Ver Poliza</a>", IDPoliza), TipoMensaje.MsgInformacion)
|
||||
Else
|
||||
Conta.RollBack()
|
||||
If Total = -1 Then
|
||||
Alert(String.Format("El total de ampliaciones y reducciones debe ser igual ({0}-{1})", ampliacion, reduccion), TipoMensaje.MsgAdvertencia)
|
||||
Else
|
||||
Alert(If(NoHaceNada, "No se encontraron registros", "Error poliza"), TipoMensaje.MsgError)
|
||||
End If
|
||||
End If
|
||||
Conta.Dispose()
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Sub TipoModificacion(sender As Object, e As EventArgs)
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Sub GvD_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvD.RowDataBound
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
|
||||
Select Case DdlAccion.SelectedValue
|
||||
Case "1"
|
||||
e.Row.FCTextBox("TxtAmpliacion").Attributes.Add("onkeyup", String.Format("CalculaSaldo({0},this,'{1}','A','');", e.Row.DBCampo("Saldo"), e.Row.FCLabel("LBSF").ClientID))
|
||||
Case "-1"
|
||||
e.Row.FCTextBox("TxtReduccion").Attributes.Add("onkeyup", String.Format("CalculaSaldo({0},this,'{1}','R','');", e.Row.DBCampo("Saldo"), e.Row.FCLabel("LBSF").ClientID))
|
||||
Case "0"
|
||||
e.Row.FCTextBox("TxtAmpliacion").Attributes.Add("onkeyup", String.Format("CalculaSaldo({0},this,'{1}','A','{2}');", e.Row.DBCampo("Saldo"), e.Row.FCLabel("LBSF").ClientID, e.Row.FCTextBox("TxtReduccion").ClientID))
|
||||
e.Row.FCTextBox("TxtReduccion").Attributes.Add("onkeyup", String.Format("CalculaSaldo({0},this,'{1}','R','{2}');", e.Row.DBCampo("Saldo"), e.Row.FCLabel("LBSF").ClientID, e.Row.FCTextBox("TxtAmpliacion").ClientID))
|
||||
End Select
|
||||
|
||||
If e.Row.DBCampo("Saldo").ToDouble < 0 Then
|
||||
e.Row.FCRangeValidator("RVR").MaximumValue = "0"
|
||||
e.Row.FCLiteral("Saldo").Text = "0.00"
|
||||
End If
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
|
||||
#Region "P R E S U P U E S T O - E G R E S O S"
|
||||
|
||||
#Region "COMBOS PRESUPUESTO EGRESOS"
|
||||
Private Sub CargaCombosPE()
|
||||
CargaProgramaOperativo()
|
||||
CargaFuenteFinanciamiento()
|
||||
CargaTipoGasto()
|
||||
CargaUnidadAdministrativa()
|
||||
CargaClasificacionOG()
|
||||
End Sub
|
||||
Private Sub CargaProgramaOperativo()
|
||||
CboProgramaOperativo.Items.Clear()
|
||||
CboProgramaOperativo.DataSource = GlobalDTAC_ProgramaOperativo(UsuarioActual.CveEmpresa).FiltraParametros(String.Format("Ejercicio = {0} AND Bloqueado = 1", DdlEjercicio.SelectedValue.ToEntero))
|
||||
CboProgramaOperativo.DataBind()
|
||||
CboProgramaOperativo.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
End Sub
|
||||
|
||||
Private Sub CargaFuenteFinanciamiento()
|
||||
CboFuenteFinanciamiento.DataSource = GlobalDTAC_FuentesFinanciamiento(UsuarioActual.CveEmpresa)
|
||||
CboFuenteFinanciamiento.DataBind()
|
||||
CboFuenteFinanciamiento.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
End Sub
|
||||
|
||||
Private Sub CargaTipoGasto()
|
||||
CboTipoGasto.DataSource = GlobalDTAC_TipoGasto
|
||||
CboTipoGasto.DataBind()
|
||||
CboTipoGasto.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
End Sub
|
||||
|
||||
Private Sub CargaUnidadAdministrativa()
|
||||
CboUnidadAdministrativa.DataSource = GlobalDTAC_UnidadesAdministrativas(UsuarioActual.CveEmpresa)
|
||||
CboUnidadAdministrativa.DataBind()
|
||||
CboUnidadAdministrativa.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
End Sub
|
||||
|
||||
Private Sub CargaClasificacionOG()
|
||||
Dim Filtro As New StringBuilder
|
||||
Filtro.AppendFormat("Afectable = {0}", "True")
|
||||
CboClasificacionOG.DataSource = GlobalDTACClasificadorObjetoGasto(UsuarioActual.CveEmpresa).FiltraParametros(Filtro.ToString, "CodigoClasificacion") 'GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltraParametros(Filtro.ToString, "CodigoClasificacion")
|
||||
CboClasificacionOG.DataBind()
|
||||
CboClasificacionOG.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
Protected Sub BtnAgregarPE_Click(sender As Object, e As EventArgs)
|
||||
|
||||
GenerarCuentasPE()
|
||||
|
||||
'Dim objAC As New ClsAC()
|
||||
|
||||
'Dim CveProgramaOperativo As Integer = CboProgramaOperativo.SelectedValue.ToString.ToEntero
|
||||
'Dim CveFuenteFinanciamiento As Integer = CboFuenteFinanciamiento.SelectedValue.ToString.ToEntero
|
||||
'Dim CveTipoGasto As Integer = CboTipoGasto.SelectedValue.ToString.ToEntero
|
||||
'Dim CveUnidadAdministrativa As Integer = CboUnidadAdministrativa.SelectedValue.ToString.ToEntero
|
||||
'Dim CveClasificacionOG As Integer = CboClasificacionOG.SelectedValue.ToString.ToEntero
|
||||
'Dim TieneError = False
|
||||
'Dim DrPresupuesto As DataRow = Nothing
|
||||
|
||||
'Dim CvePresupuestoEgreso = objAC.AddPresupuestoEgresos(UsuarioActual.Empresa.EjercicioActual, CveProgramaOperativo, CveFuenteFinanciamiento, CveTipoGasto, CveUnidadAdministrativa, CveClasificacionOG, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, 1)
|
||||
|
||||
'If objAC.GetPresupuestoEgresos(CvePresupuestoEgreso, True, UsuarioActual.Empresa.EjercicioActual, UsuarioActual.CveEmpresa) Then
|
||||
' If Not objAC.DtResultados.Rows.Count <> 1 Then
|
||||
' DrPresupuesto = objAC.DtResultados.Rows(0)
|
||||
' Else
|
||||
' TieneError = True
|
||||
' End If
|
||||
'Else
|
||||
' TieneError = True
|
||||
'End If
|
||||
|
||||
'objAC.Dispose()
|
||||
|
||||
'If CvePresupuestoEgreso > 0 AndAlso Not TieneError AndAlso DrPresupuesto IsNot Nothing Then
|
||||
' If GenerarCuentasPE(DrPresupuesto) Then
|
||||
|
||||
' Else
|
||||
' Alert("Ocurrio un error al agregar el Presupuesto de Egreso, Por favor vuelva a intentar.", TipoMensaje.MsgError)
|
||||
' End If
|
||||
'Else
|
||||
' Alert("Ocurrio un error al agregar el Presupuesto de Egreso, Por favor vuelva a intentar.", TipoMensaje.MsgError)
|
||||
'End If
|
||||
|
||||
End Sub
|
||||
|
||||
Private Function GenerarCuentasPE() As Boolean
|
||||
Dim Conta As New ClsContPAQi(UsuarioActual.Empresa)
|
||||
Conta.IniciaTransacSQL()
|
||||
Dim ObjAC As New ClsAC
|
||||
ObjAC.IniciaTransacSQL()
|
||||
|
||||
|
||||
Dim CveProgramaOperativo As Integer = CboProgramaOperativo.SelectedValue.ToString.ToEntero
|
||||
Dim CveFuenteFinanciamiento As Integer = CboFuenteFinanciamiento.SelectedValue.ToString.ToEntero
|
||||
Dim CveTipoGasto As Integer = CboTipoGasto.SelectedValue.ToString.ToEntero
|
||||
Dim CveUnidadAdministrativa As Integer = CboUnidadAdministrativa.SelectedValue.ToString.ToEntero
|
||||
Dim CveClasificacionOG As Integer = CboClasificacionOG.SelectedValue.ToString.ToEntero
|
||||
Dim TieneError As Boolean = False
|
||||
Dim DrPresupuesto As DataRow = Nothing
|
||||
|
||||
Dim CvePresupuestoEgreso = ObjAC.AddPresupuestoEgresos(DdlEjercicio.SelectedValue.ToEntero, CveProgramaOperativo, CveFuenteFinanciamiento, CveTipoGasto, CveUnidadAdministrativa, CveClasificacionOG, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, 1)
|
||||
|
||||
If CvePresupuestoEgreso > 0 Then
|
||||
If ObjAC.GetPresupuestoEgresos(CvePresupuestoEgreso, True, DdlEjercicio.SelectedValue.ToEntero, UsuarioActual.CveEmpresa) Then
|
||||
If Not ObjAC.DtResultados.Rows.Count <> 1 Then
|
||||
DrPresupuesto = ObjAC.DtResultados.Rows(0)
|
||||
Else
|
||||
TieneError = True
|
||||
End If
|
||||
Else
|
||||
TieneError = True
|
||||
End If
|
||||
|
||||
If Not TieneError Then
|
||||
|
||||
'registro las cuentas prespuestales por cada movimiento, si existe la ignoro
|
||||
Dim dtCuentas As DataTable = Nothing
|
||||
'Dim IDPoliza As Integer
|
||||
Dim IdCuentaAprobado, IdCuentaPorEjercer, IdCuentaModificaciones, IdCuentaComprometido, IdCuentaDevengado, IdCuentaEjercido, IdCuentaPagado, IdCuentaMatriz, IdCuentaMatrizAbono As Integer
|
||||
Dim Codigo As String
|
||||
|
||||
Dim IdCuentaAprobadoPadre, IdCuentaPorEjercerPadre, IdCuentaModificacionesPadre, IdCuentaComprometidoPadre, IdCuentaDevengadoPadre, IdCuentaEjercidoPadre, IdCuentaPagadoPadre, IdCuentaMatrizPadre As Integer
|
||||
|
||||
'hay que registrar una poliza de cargo en 821, aprobado contra Ley de egresos, luego registrar o de por ejercer
|
||||
|
||||
If Conta.GetCuentas(-1, "-1", -1) Then
|
||||
dtCuentas = Conta.DtResultados
|
||||
End If
|
||||
|
||||
Dim drPadre As DataRow
|
||||
drPadre = dtCuentas.FiltroPrimero("Nombre = 'PRESUPUESTO DE EGRESOS APROBADO'")
|
||||
IdCuentaAprobadoPadre = If(drPadre IsNot Nothing, drPadre("Id").ToString.ToEntero, 0)
|
||||
|
||||
drPadre = dtCuentas.FiltroPrimero("Nombre = 'PRESUPUESTO DE EGRESOS POR EJERCER'")
|
||||
IdCuentaPorEjercerPadre = If(drPadre IsNot Nothing, drPadre("Id").ToString.ToEntero, 0)
|
||||
|
||||
drPadre = dtCuentas.FiltroPrimero("Nombre = 'MODIFICACIONES AL PRESUPUESTO DE EGRESOS APROBADO'")
|
||||
IdCuentaModificacionesPadre = If(drPadre IsNot Nothing, drPadre("Id").ToString.ToEntero, 0)
|
||||
|
||||
drPadre = dtCuentas.FiltroPrimero("Nombre = 'PRESUPUESTO DE EGRESOS COMPROMETIDO'")
|
||||
IdCuentaComprometidoPadre = If(drPadre IsNot Nothing, drPadre("Id").ToString.ToEntero, 0)
|
||||
|
||||
drPadre = dtCuentas.FiltroPrimero("Nombre = 'PRESUPUESTO DE EGRESOS DEVENGADO'")
|
||||
IdCuentaDevengadoPadre = If(drPadre IsNot Nothing, drPadre("Id").ToString.ToEntero, 0)
|
||||
|
||||
drPadre = dtCuentas.FiltroPrimero("Nombre = 'PRESUPUESTO DE EGRESOS EJERCIDO'")
|
||||
IdCuentaEjercidoPadre = If(drPadre IsNot Nothing, drPadre("Id").ToString.ToEntero, 0)
|
||||
|
||||
drPadre = dtCuentas.FiltroPrimero("Nombre = 'PRESUPUESTO DE EGRESOS PAGADO'")
|
||||
IdCuentaPagadoPadre = If(drPadre IsNot Nothing, drPadre("Id").ToString.ToEntero, 0)
|
||||
|
||||
Dim Total As Double = 0
|
||||
Dim Fecha As Date = String.Format("01/01/{0}", UsuarioActual.Empresa.EjercicioActual).ToDate
|
||||
|
||||
|
||||
'EMPIEZA REGISTRO DE CUENTAS CONTABLES
|
||||
Codigo = String.Format("{0}{1}{2}{3}", DrPresupuesto("CodigoUnidadAdministrativa").ToString.PadLeft(4, "0"c), DrPresupuesto("CodigoFuenteFinanciamiento").ToString.PadLeft(2, "0"c), DrPresupuesto("CveTipoGasto").ToString.PadLeft(2, "0"c), DrPresupuesto("CodigoCOG")).PadLeft(5, "0"c)
|
||||
|
||||
IdCuentaAprobado = FNCIDCuenta(dtCuentas, String.Format("00821{0}", Codigo))
|
||||
If IdCuentaAprobado = 0 Then
|
||||
IdCuentaAprobado = Conta.AddCuenta(String.Format("00821{0}", Codigo), DrPresupuesto("Clasificacion").ToString.ToUpper, "L", 2, 0, 1, 0, "", 1, IdCuentaAprobadoPadre)
|
||||
If IdCuentaAprobado > 0 Then
|
||||
FNCAddCuenta(dtCuentas, IdCuentaAprobado, String.Format("00821{0}", Codigo))
|
||||
Else
|
||||
TieneError = True
|
||||
End If
|
||||
End If
|
||||
|
||||
If Not TieneError Then
|
||||
IdCuentaPorEjercer = FNCIDCuenta(dtCuentas, String.Format("00822{0}", Codigo))
|
||||
If IdCuentaPorEjercer = 0 Then
|
||||
IdCuentaPorEjercer = Conta.AddCuenta(String.Format("00822{0}", Codigo), DrPresupuesto("Clasificacion").ToString.ToUpper, "L", 2, 0, 1, 0, "", 1, IdCuentaPorEjercerPadre)
|
||||
If IdCuentaPorEjercer > 0 Then
|
||||
FNCAddCuenta(dtCuentas, IdCuentaPorEjercer, String.Format("00822{0}", Codigo))
|
||||
Else
|
||||
TieneError = True
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
If Not TieneError Then
|
||||
IdCuentaModificaciones = FNCIDCuenta(dtCuentas, String.Format("00823{0}", Codigo))
|
||||
If IdCuentaModificaciones = 0 Then
|
||||
IdCuentaModificaciones = Conta.AddCuenta(String.Format("00823{0}", Codigo), DrPresupuesto("Clasificacion").ToString.ToUpper, "L", 2, 0, 1, 0, "", 1, IdCuentaModificacionesPadre)
|
||||
If IdCuentaModificaciones > 0 Then
|
||||
FNCAddCuenta(dtCuentas, IdCuentaModificaciones, String.Format("00823{0}", Codigo))
|
||||
Else
|
||||
TieneError = True
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
If Not TieneError Then
|
||||
IdCuentaComprometido = FNCIDCuenta(dtCuentas, String.Format("00824{0}", Codigo))
|
||||
If IdCuentaComprometido = 0 Then
|
||||
IdCuentaComprometido = Conta.AddCuenta(String.Format("00824{0}", Codigo), DrPresupuesto("Clasificacion").ToString.ToUpper, "L", 2, 0, 1, 0, "", 1, IdCuentaComprometidoPadre)
|
||||
If IdCuentaComprometido > 0 Then
|
||||
FNCAddCuenta(dtCuentas, IdCuentaComprometido, String.Format("00824{0}", Codigo))
|
||||
Else
|
||||
TieneError = True
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
If Not TieneError Then
|
||||
IdCuentaDevengado = FNCIDCuenta(dtCuentas, String.Format("00825{0}", Codigo))
|
||||
If IdCuentaDevengado = 0 Then
|
||||
IdCuentaDevengado = Conta.AddCuenta(String.Format("00825{0}", Codigo), DrPresupuesto("Clasificacion").ToString.ToUpper, "L", 2, 0, 1, 0, "", 1, IdCuentaDevengadoPadre)
|
||||
If IdCuentaDevengado > 0 Then
|
||||
FNCAddCuenta(dtCuentas, IdCuentaDevengado, String.Format("00825{0}", Codigo))
|
||||
Else
|
||||
TieneError = True
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
If Not TieneError Then
|
||||
IdCuentaEjercido = FNCIDCuenta(dtCuentas, String.Format("00826{0}", Codigo))
|
||||
If IdCuentaEjercido = 0 Then
|
||||
IdCuentaEjercido = Conta.AddCuenta(String.Format("00826{0}", Codigo), DrPresupuesto("Clasificacion").ToString.ToUpper, "L", 2, 0, 1, 0, "", 1, IdCuentaEjercidoPadre)
|
||||
If IdCuentaEjercido > 0 Then
|
||||
FNCAddCuenta(dtCuentas, IdCuentaEjercido, String.Format("00826{0}", Codigo))
|
||||
Else
|
||||
TieneError = True
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
If Not TieneError Then
|
||||
IdCuentaPagado = FNCIDCuenta(dtCuentas, String.Format("00827{0}", Codigo))
|
||||
If IdCuentaPagado = 0 Then
|
||||
IdCuentaPagado = Conta.AddCuenta(String.Format("00827{0}", Codigo), DrPresupuesto("Clasificacion").ToString.ToUpper, "L", 2, 0, 1, 0, "", 1, IdCuentaPagadoPadre)
|
||||
If IdCuentaAprobado > 0 Then
|
||||
FNCAddCuenta(dtCuentas, IdCuentaPagado, String.Format("00827{0}", Codigo))
|
||||
Else
|
||||
TieneError = True
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
If Not TieneError Then
|
||||
'falta generar y gaurdar la cuenta contable y vincularla
|
||||
Dim filtro As New StringBuilder
|
||||
filtro.AppendFormat("Partida = {0} and TipoGasto = {1}", DrPresupuesto("CodigoCOG").ToString.Substring(0, 4), DrPresupuesto("CveTipoGasto").ToString)
|
||||
|
||||
Dim RegistroMatriz As DataRow = GlobalDTAC_MatrizEgresos.FiltroPrimero(filtro.ToString)
|
||||
filtro.Clear()
|
||||
If RegistroMatriz Is Nothing Then
|
||||
Dim CCOG As String = DrPresupuesto("CodigoCOG").ToString.Substring(0, 3)
|
||||
If CCOG = "161" Then CCOG = "159" ' ajuste manual, porque no hay conversion de estas cuentas
|
||||
RegistroMatriz = GlobalDTAC_MatrizEgresos.FiltroPrimero(String.Format("Partida = {0}0 and TipoGasto = {1}", CCOG, DrPresupuesto("CveTipoGasto").ToString))
|
||||
End If
|
||||
If RegistroMatriz IsNot Nothing AndAlso FnCuentaCargo(RegistroMatriz("CuentaCargo").ToString).ToEntero > 0 Then
|
||||
IdCuentaMatrizPadre = FnCuentaCargo(RegistroMatriz("CuentaCargo").ToString).ToEntero
|
||||
|
||||
Dim CuentaCargo As Integer = dtCuentas.FiltroPrimero(String.Format("Codigo = '{0}'", String.Format("0{0}0000000000000", IdCuentaMatrizPadre)))("Id").ToString.ToEntero
|
||||
|
||||
IdCuentaMatriz = FNCIDCuenta(dtCuentas, String.Format("0{0}{1}", IdCuentaMatrizPadre, Codigo))
|
||||
If IdCuentaMatriz = 0 Then
|
||||
IdCuentaMatriz = Conta.AddCuenta(String.Format("0{0}{1}", IdCuentaMatrizPadre, Codigo), DrPresupuesto("Clasificacion").ToString.ToUpper, "G", 2, 0, 1, 0, "", 1, CuentaCargo)
|
||||
If IdCuentaMatriz > 0 Then
|
||||
FNCAddCuenta(dtCuentas, IdCuentaMatriz, String.Format("0{0}{1}", IdCuentaMatrizPadre, Codigo))
|
||||
Else
|
||||
TieneError = True
|
||||
End If
|
||||
End If
|
||||
|
||||
IdCuentaMatrizAbono = 0
|
||||
'si el COG, es de la 1000, se le ingresa la cuenta abono
|
||||
If DrPresupuesto("CodigoCOG").ToString.Substring(0, 1) = "1" Then
|
||||
|
||||
IdCuentaMatrizPadre = FnCuentaCargo(RegistroMatriz("CuentaAbono").ToString.Substring(0, 4)).ToEntero
|
||||
|
||||
Dim CuentaAbono As Integer = dtCuentas.FiltroPrimero(String.Format("Codigo = '{0}'", String.Format("0{0}0000000000000", IdCuentaMatrizPadre)))("Id").ToString.ToEntero
|
||||
|
||||
IdCuentaMatrizAbono = FNCIDCuenta(dtCuentas, String.Format("0{0}{1}", IdCuentaMatrizPadre, Codigo))
|
||||
If IdCuentaMatrizAbono = 0 Then
|
||||
IdCuentaMatrizAbono = Conta.AddCuenta(String.Format("0{0}{1}", IdCuentaMatrizPadre, Codigo), DrPresupuesto("Clasificacion").ToString.ToUpper, "G", 2, 0, 1, 0, "", 1, CuentaAbono)
|
||||
If IdCuentaMatrizAbono > 0 Then
|
||||
FNCAddCuenta(dtCuentas, IdCuentaMatriz, String.Format("0{0}{1}", IdCuentaMatrizPadre, Codigo))
|
||||
Else
|
||||
TieneError = True
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
'Total = DrPresupuesto("Total").ToString.ToDouble
|
||||
'If Total > 0 Then
|
||||
' If Conta.AddMovimiento(123456, IDPoliza, IdCuentaAprobado, True, Total, "", "", 0, Fecha, "") Then
|
||||
' 'actualizo el idcuenta del presupuesto
|
||||
' If Not Conta.AddMovimiento(123456, IDPoliza, IdCuentaPorEjercer, False, Total, "", "", 0, Fecha, "") Then
|
||||
' TieneError = True
|
||||
' End If
|
||||
|
||||
' Else
|
||||
' TieneError = True
|
||||
' End If
|
||||
'End If
|
||||
|
||||
If Not ObjAC.UpdateCuentasPresupuestoEgresos(IdCuentaAprobado, IdCuentaPorEjercer, IdCuentaModificaciones, IdCuentaComprometido, IdCuentaDevengado, IdCuentaEjercido, IdCuentaPagado, IdCuentaMatriz, IdCuentaMatrizAbono, DrPresupuesto("CvePresupuestoEgreso").ToString.ToEntero) Then
|
||||
TieneError = True
|
||||
End If
|
||||
Else
|
||||
TieneError = True
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
'If Not TieneError Then
|
||||
' If Not ObjAC.UpdateEjercicios(UsuarioActual.Empresa.EjercicioActual, -1, IDPoliza, UsuarioActual.CveEmpresa) Then
|
||||
' TieneError = True
|
||||
' End If
|
||||
'End If
|
||||
|
||||
End If
|
||||
Else
|
||||
TieneError = True
|
||||
End If
|
||||
|
||||
|
||||
If Not TieneError Then
|
||||
ObjAC.Commit()
|
||||
Conta.Commit()
|
||||
CargaPresupuestos()
|
||||
Alert("El Presupuesto de Egreso se genero Correctamente", TipoMensaje.MsgInformacion)
|
||||
RegistraScript("$('#DivAddPE').modal('hide');")
|
||||
'RegistraScript("$get('DivAddPE').style.display='none';")
|
||||
Else
|
||||
Conta.RollBack()
|
||||
ObjAC.RollBack()
|
||||
Alert("Ocurrio un error al agregar el Presupuesto de Egreso, Por favor vuelva a intentar.", TipoMensaje.MsgError)
|
||||
End If
|
||||
|
||||
Conta.Dispose()
|
||||
ObjAC.Dispose()
|
||||
|
||||
Return Not TieneError
|
||||
End Function
|
||||
|
||||
Private Function FNCIDCuenta(dt As DataTable, codigo As String) As Integer
|
||||
Dim Retorno As Integer = 0
|
||||
Dim dr As DataRow
|
||||
dr = dt.FiltroPrimero(String.Format("Codigo ='{0}'", codigo))
|
||||
If dr IsNot Nothing Then
|
||||
|
||||
Retorno = dr("Id").ToString.ToEntero
|
||||
End If
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
Private Function FNCAddCuenta(dt As DataTable, id As Integer, codigo As String) As Integer
|
||||
' se crea una coleccion para grabar las claves y las cuentas que se van insertando, por si se comparten, no marque error de que ya esta registrada y esta en la transaccion todavia
|
||||
Dim Retorno As Integer = 0
|
||||
Dim dr As DataRow = dt.NewRow
|
||||
|
||||
dr("Codigo") = codigo
|
||||
dr("Id") = id
|
||||
|
||||
dt.Rows.Add(dr)
|
||||
dt.AcceptChanges()
|
||||
Return Retorno
|
||||
End Function
|
||||
Private Function FnCuentaCargo(CC As String) As String
|
||||
Return CC.Replace("-1", "").Replace("-2", "").Replace("-3", "").Replace("-4", "").Replace("-5", "").Replace("-6", "").Replace("-7", "").Replace("-8", "").Replace("-9", "")
|
||||
End Function
|
||||
|
||||
Private Sub BtnConsultar_Click(sender As Object, e As EventArgs) Handles BtnConsultar.Click
|
||||
CargaPresupuestos()
|
||||
End Sub
|
||||
|
||||
Private Sub DdlAccion_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlAccion.SelectedIndexChanged
|
||||
|
||||
If DdlAccion.SelectedValue = "0" Then 'TRANSFERENCIA
|
||||
GvD.Columns(6).Visible = True 'TxtAmpliacion
|
||||
GvD.Columns(7).Visible = True 'TxtReduccion
|
||||
LbTotalAmpliacion.Visible = True
|
||||
LbTotalReduccion.Visible = True
|
||||
LblAgregar.Visible = True
|
||||
TrMomentos.Visible = True
|
||||
ElseIf DdlAccion.SelectedValue = "-1" Then 'REDUCCION
|
||||
GvD.Columns(6).Visible = False 'TxtAmpliacion
|
||||
GvD.Columns(7).Visible = True 'TxtReduccion
|
||||
LbTotalAmpliacion.Visible = False
|
||||
LbTotalReduccion.Visible = True
|
||||
LblAgregar.Visible = False
|
||||
TrMomentos.Visible = True
|
||||
|
||||
Else 'AMPLIACION
|
||||
GvD.Columns(6).Visible = True 'TxtAmpliacion
|
||||
GvD.Columns(7).Visible = False 'TxtReduccion
|
||||
LbTotalAmpliacion.Visible = True
|
||||
LbTotalReduccion.Visible = False
|
||||
LblAgregar.Visible = True
|
||||
TrMomentos.Visible = False
|
||||
End If
|
||||
|
||||
CargaPresupuestos()
|
||||
|
||||
UPFiltros.Update()
|
||||
UPPDetalle.Update()
|
||||
UPTotales.Update()
|
||||
End Sub
|
||||
|
||||
Private Sub DdlMomentos_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlMomentos.SelectedIndexChanged
|
||||
CargaPresupuestos()
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
|
||||
|
||||
End Class
|
||||
BIN
AC/RegEgresosModificaciones.aspx.vb - Acceso directo.lnk
Normal file
BIN
AC/RegEgresosModificaciones.aspx.vb - Acceso directo.lnk
Normal file
Binary file not shown.
279
AC/RegIngresosModificaciones.aspx
Normal file
279
AC/RegIngresosModificaciones.aspx
Normal file
@@ -0,0 +1,279 @@
|
||||
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RegIngresosModificaciones.aspx.vb" Inherits="AC_RegIngresosModificaciones" %>
|
||||
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="HB" runat="Server">
|
||||
<%--<asp:ImageButton ID="BtnImprimir" OnClick="BtnImprimir_Click" runat="server" alt="Imprimir" src="/Imagenes/btnImprimir.gif" Style="cursor: pointer; height: 20px" />--%>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="E" runat="Server">
|
||||
Registro de Modificaciones al Presupuestos de Ingresos
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
|
||||
|
||||
<asp:UpdatePanel ID="UPFiltros" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="portlet solid grey-cascade portlet-filter" style="">
|
||||
<div class="portlet-title portlet-filterT smalltitle" style="">
|
||||
<div class="titlefiltros caption ">
|
||||
<ul class="list-inline">
|
||||
<li>Tipo de Modificación:
|
||||
<asp:DropDownList ID="DdlAccion" runat="server" Width="150px" AutoPostBack="true" OnSelectedIndexChanged="TipoModificacion">
|
||||
<asp:ListItem Text="Ampliación" Value="1"></asp:ListItem>
|
||||
<asp:ListItem Text="Reducción" Value="-1"></asp:ListItem>
|
||||
<asp:ListItem Text="Transferencia" Value="0"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
<%-- <asp:UpdatePanel ID="UPFiltros" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<table width="100%" border="0" cellpadding="0" cellspacing="0">
|
||||
<tr class="SubTotales2">
|
||||
<td width="200px">Tipo de Modificación:</td>
|
||||
<td width="150px">
|
||||
<asp:DropDownList ID="DdlAccion" runat="server" Width="150px" AutoPostBack="true" OnSelectedIndexChanged="TipoModificacion">
|
||||
<asp:ListItem Text="Ampliación" Value="1"></asp:ListItem>
|
||||
<asp:ListItem Text="Reducción" Value="-1"></asp:ListItem>
|
||||
<asp:ListItem Text="Transferencia" Value="0"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>--%>
|
||||
|
||||
<asp:UpdatePanel ID="UpEncabezado" UpdateMode="Conditional" runat="server">
|
||||
<ContentTemplate>
|
||||
<table style="width: 100%;" >
|
||||
<tr>
|
||||
<td style="width: 100px;">Fecha:</td>
|
||||
<td>
|
||||
<div class="input-group input-sm input-small date date-picker" data-date-format="dd/mm/yyyy" style="width: 130px !important; padding: 0px;">
|
||||
<asp:TextBox ID="TxtFecha" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="ImgFecha" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
<ajax:MaskedEditExtender ID="MEEFecha" runat="server" TargetControlID="TxtFecha" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender runat="server" ID="CEFecha" TargetControlID="TxtFecha" PopupButtonID="ImgFecha" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
<asp:RequiredFieldValidator ID="RFVFecha" runat="server" ControlToValidate="TxtFecha" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<asp:CompareValidator ID="CVFecha" runat="server" ControlToValidate="TxtFecha" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha''</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="VCOFecha1" runat="server" HighlightCssClass="vco" TargetControlID="RFVFecha" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOFecha2" runat="server" HighlightCssClass="vco" TargetControlID="CVFecha" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</td>
|
||||
<td align="right">
|
||||
<h4>Ejercicio: <asp:Literal Text="" ID="LtEjercicio" runat="server" /></h4>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Concepto:</td>
|
||||
<td>
|
||||
<asp:TextBox ID="TxtConcepto" runat="server" CausesValidation="true" ValidationGroup="GrpGuardar" Width="400px"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVConcepto" runat="server" ControlToValidate="TxtConcepto" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Concepto''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCEConcepto" runat="server" HighlightCssClass="vco" TargetControlID="RFVConcepto" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
<br />
|
||||
|
||||
|
||||
<asp:UpdatePanel ID="UPPDetalle" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<%--<table style="width: 100%;" class="table table-striped table-advance table-hover">
|
||||
<thead>
|
||||
<tr class="Titulos TextTab">
|
||||
<th scope="col" style="width: 250px">Fuente Recaudación</th>
|
||||
<th scope="col" style="width: 100px">Código</th>
|
||||
<th scope="col" style="width: 250px">Rubro Ingreso</th>
|
||||
<th scope="col" style="width: 90px">Saldo</th>
|
||||
<asp:Label runat="server" ID="AmpliacionTitulo" ClientIDMode="Static">
|
||||
<th scope="col" style="width: 90px">Ampliación</th>
|
||||
</asp:Label>
|
||||
<asp:Label runat="server" ID="ReduccionTitulo" ClientIDMode="Static" Visible="false">
|
||||
<th scope="col" style="width: 90px">Reducción</th>
|
||||
</asp:Label>
|
||||
<th scope="col">Saldo Final</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tr>
|
||||
<td colspan="10">--%>
|
||||
|
||||
<asp:GridView ID="GvD" runat="server" OnRowDataBound="GvD_RowDataBound" AutoGenerateColumns="False" DataKeyNames="IdCuentaPorEjecutar, IdCuentaModificado" Width="100%" CssClass="table table-striped table-hover" GridLines="None">
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderText="FuenteRecaudación">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="FuenteRecaudacion" runat="server" Text='<%# Eval("FuenteRecaudacion")%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="20%" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Codigo">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="Codigo" runat="server" Text='<%# Eval("CodigoRubroIngreso")%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="10%" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="RubroIngreso">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="RubroIngreso" runat="server" Text='<%# Eval("RubroIngreso")%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="20%" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Saldo">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="Saldo" runat="server" Text='<%# Eval("Saldo", "{0:N2}")%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="15%" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Ampliación">
|
||||
<ItemTemplate>
|
||||
<asp:TextBox ID="TxtAmpliacion" runat="server" Width="90%" CssClass="alineanum"></asp:TextBox>
|
||||
<ajax:FilteredTextBoxExtender ID="SoloNumeros" runat="server" TargetControlID="TxtAmpliacion" FilterType="Custom, Numbers" ValidChars="." />
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="10%" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Reducción" Visible="False">
|
||||
<ItemTemplate>
|
||||
<asp:TextBox ID="TxtReduccion" runat="server" Width="90%" CssClass="alineanum"></asp:TextBox>
|
||||
<ajax:FilteredTextBoxExtender ID="SoloNumeros2" runat="server" TargetControlID="TxtReduccion" FilterType="Custom, Numbers" ValidChars="." />
|
||||
<asp:RangeValidator ID="RV" Enabled="False" Display="Dynamic" ControlToValidate="TxtReduccion" runat="server" MinimumValue="0" MaximumValue="0" Type="Currency" ErrorMessage="*"></asp:RangeValidator>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="10%" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="SaldoFinal">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LBSF" runat="server"></asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Right" Width="15%" />
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
|
||||
<%-- </td>
|
||||
</tr>
|
||||
</table>--%>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
<asp:UpdatePanel ID="UPTotales" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<table style="width: 100%;" class="table table-striped table-advance table-hover">
|
||||
<tr class="SubTotales">
|
||||
<td style="width: 50%"></td>
|
||||
<td style="width: 15%; text-align:right;">
|
||||
<asp:Label runat="server" ID="LbTotalSaldo" ClientIDMode="Static" CssClass="alineanum" Width="95px" Text="0.00"></asp:Label>
|
||||
</td>
|
||||
<td style="width: 10%; text-align:right;" runat="server" id="TdAmpliacion">
|
||||
<asp:Label runat="server" ID="LbTotalAmpliacion" ClientIDMode="Static" Width="90px" Text="0.00"></asp:Label>
|
||||
</td>
|
||||
<td style="width: 10%; text-align:right;" runat="server" id="TdReduccion" visible="false">
|
||||
<asp:Label runat="server" ID="LbTotalReduccion" ClientIDMode="Static" Width="90px" Text="0.00" Visible="false"></asp:Label>
|
||||
</td>
|
||||
<td style="width: 15%; text-align:right;">
|
||||
<asp:Label runat="server" ID="LbTotalSaldoFinal" ClientIDMode="Static" Text="0.00"></asp:Label>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
<asp:UpdatePanel ID="UPComandos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<table style="width: 100%;" class="table table-striped table-advance table-hover">
|
||||
<tr class="SubTotales">
|
||||
<td style="float: right; padding-top: 3px; padding-bottom: 3px; padding-right: 20px;">
|
||||
<asp:Button ID="BtnGuardar" runat="server" ClientIDMode="Static" Text="Guardar Modificaciones" ValidationGroup="GrpGuardar" OnClick="BtnGuardar_click" class="btn btn-primary" />
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
||||
<script type="text/javascript">
|
||||
|
||||
|
||||
function pageLoad() {
|
||||
$(document).ready(function () {
|
||||
//gridviewScroll();
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
<%-- function gridviewScroll() {
|
||||
var Tam = TamañoVentana();
|
||||
var Alto = Tam.height - 300;
|
||||
if (Alto < 100) {
|
||||
Alto = 100;
|
||||
}
|
||||
$('#<%=GvD.ClientID%>').gridviewScroll({
|
||||
width: 995,
|
||||
height: Alto
|
||||
|
||||
});
|
||||
}--%>
|
||||
|
||||
|
||||
function CalculaSaldo(s, t, f, Opc, limpia) {
|
||||
|
||||
var Imp = parseFloat(t.value);
|
||||
if (Imp > 0) {
|
||||
if (Opc == 'R') {
|
||||
if (parseFloat(t.value) > s) {
|
||||
t.value = s;
|
||||
}
|
||||
if (Imp > 0 && limpia != '') { //si hay valor en el campo actual, debe de limpiar el otro
|
||||
$get(limpia).value = '';
|
||||
}
|
||||
Imp = parseFloat(-t.value);
|
||||
|
||||
|
||||
}
|
||||
else {
|
||||
if (Imp > 0 && limpia != '') { //si hay valor en el campo actual, debe de limpiar el otro
|
||||
$get(limpia).value = '';
|
||||
}
|
||||
}
|
||||
if (parseFloat(t.value) > 0) $get(f).innerText = FormatoNumero(s + Imp, 2); // si el importe inicial es mayor a cero, hubo cambios
|
||||
}
|
||||
else {
|
||||
$get(f).innerText = FormatoNumero(s, 2);
|
||||
}
|
||||
SumaValores();
|
||||
}
|
||||
function SumaValores() {
|
||||
var Importe = 0;
|
||||
var ImpReduccion = 0;
|
||||
|
||||
var topLevelElem = document.getElementById("form1");
|
||||
var textBoxes = topLevelElem.getElementsByTagName("input");
|
||||
for (var i = 0; i < textBoxes.length; i++) {
|
||||
if (textBoxes[i].type == "text") {
|
||||
if (textBoxes[i].id.indexOf('TxtAmpliacion') >= 0 && textBoxes[i].readOnly == false && textBoxes[i].value != '') {
|
||||
Importe = parseFloat(Importe) + parseFloat(textBoxes[i].value.split(',').join(''));
|
||||
}
|
||||
if (textBoxes[i].id.indexOf('TxtReduccion') >= 0 && textBoxes[i].readOnly == false && textBoxes[i].value != '') {
|
||||
ImpReduccion = parseFloat(ImpReduccion) + parseFloat(textBoxes[i].value.split(',').join(''));
|
||||
}
|
||||
}
|
||||
}
|
||||
debugger;
|
||||
if ($get('LbTotalAmpliacion')) $get('LbTotalAmpliacion').innerText = FormatoNumero(Importe, 2);
|
||||
if ($get('LbTotalReduccion')) $get('LbTotalReduccion').innerText = FormatoNumero(ImpReduccion, 2);
|
||||
if ($get('LbTotalSaldoFinal')) $get('LbTotalSaldoFinal').innerText = FormatoNumero(parseFloat($get('LbTotalSaldo').innerText.replace(/,/g, '')) + Importe - ImpReduccion, 2);
|
||||
|
||||
|
||||
}
|
||||
</script>
|
||||
</asp:Content>
|
||||
297
AC/RegIngresosModificaciones.aspx.vb
Normal file
297
AC/RegIngresosModificaciones.aspx.vb
Normal file
@@ -0,0 +1,297 @@
|
||||
Option Explicit On
|
||||
Option Strict On
|
||||
|
||||
Imports System.Data
|
||||
Imports Extensiones
|
||||
Imports System.Activities.Statements
|
||||
Imports Microsoft.Reporting.WebForms
|
||||
|
||||
Partial Class AC_RegIngresosModificaciones
|
||||
Inherits ClsPaginas
|
||||
|
||||
#Region "PROPIEDADES"
|
||||
Private Property DtPresupuestos As DataTable
|
||||
Get
|
||||
DtPresupuestos = DirectCast(ViewState("DtPresupuestos"), DataTable)
|
||||
End Get
|
||||
|
||||
Set(ByVal value As DataTable)
|
||||
ViewState("DtPresupuestos") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property DtDetalle As DataTable
|
||||
Get
|
||||
DtDetalle = DirectCast(ViewState("DtDetalle"), DataTable)
|
||||
End Get
|
||||
|
||||
Set(ByVal value As DataTable)
|
||||
ViewState("DtDetalle") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private Property pSaldo As String
|
||||
Get
|
||||
Return CType(ViewState("pSaldo"), String)
|
||||
End Get
|
||||
Set(value As String)
|
||||
ViewState("pSaldo") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property pAmpliacion As String
|
||||
Get
|
||||
Return CType(ViewState("pAmpliacion"), String)
|
||||
End Get
|
||||
Set(value As String)
|
||||
ViewState("pAmpliacion") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property pSaldoFinal As String
|
||||
Get
|
||||
Return CType(ViewState("pSaldoFinal"), String)
|
||||
End Get
|
||||
Set(value As String)
|
||||
ViewState("pSaldoFinal") = value
|
||||
End Set
|
||||
End Property
|
||||
#End Region
|
||||
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||
If Not Page.IsPostBack Then
|
||||
GvD.Columns(5).Visible = False
|
||||
CreaDTDetalles()
|
||||
CargaPresupuestos()
|
||||
|
||||
TxtFecha.Text = Now.ToShortDateString
|
||||
|
||||
LtEjercicio.Text = UsuarioActual.Empresa.EjercicioActual.ToString
|
||||
|
||||
End If
|
||||
End Sub
|
||||
Private Sub CargaPresupuestos()
|
||||
Dim AC As New ClsAC
|
||||
If AC.GetPresupuestoIngresos(-1, UsuarioActual.Empresa.EjercicioActual, True, UsuarioActual.CveEmpresa) Then
|
||||
DtPresupuestos = AC.DtResultados.Copy
|
||||
Else
|
||||
Alert("Ocurrió un error al cargar los Presupuestos. Por favor vuelva a cargar la pagina", TipoMensaje.MsgError)
|
||||
End If
|
||||
AC.Dispose()
|
||||
LlenaDtDetalles()
|
||||
End Sub
|
||||
Private Sub CreaDTDetalles()
|
||||
DtDetalle = New DataTable
|
||||
DtDetalle.Columns.Add("FuenteRecaudacion", GetType(String))
|
||||
DtDetalle.Columns.Add("CodigoRubroIngreso", GetType(String))
|
||||
DtDetalle.Columns.Add("RubroIngreso", GetType(String))
|
||||
DtDetalle.Columns.Add("Saldo", GetType(Double))
|
||||
|
||||
DtDetalle.Columns.Add("IdCuentaPorEjecutar", GetType(Integer))
|
||||
DtDetalle.Columns.Add("IdCuentaModificado", GetType(Integer))
|
||||
|
||||
End Sub
|
||||
Private Sub LlenaDtDetalles()
|
||||
Dim ContPaq As New ClsContPAQi(UsuarioActual.Empresa)
|
||||
DtDetalle.Rows.Clear()
|
||||
Dim totalsaldo As Double
|
||||
For Each drp As DataRow In DtPresupuestos.Rows
|
||||
Dim drt As DataRow = DtDetalle.NewRow
|
||||
drt("FuenteRecaudacion") = drp("FuenteRecaudacion")
|
||||
drt("CodigoRubroIngreso") = drp("CodigoRubroIngreso")
|
||||
drt("RubroIngreso") = drp("RubroIngreso")
|
||||
drt("Saldo") = ContPaq.GetSaldoCuenta(drp("IdCuentaPorEjecutar").ToString.ToEntero, 1, UsuarioActual.Empresa.EjercicioActual)
|
||||
|
||||
drt("IdCuentaPorEjecutar") = drp("IdCuentaPorEjecutar")
|
||||
drt("IdCuentaModificado") = drp("IdCuentaModificado")
|
||||
totalsaldo += drt("saldo").ToString.ToDouble
|
||||
|
||||
DtDetalle.Rows.Add(drt)
|
||||
Next
|
||||
|
||||
LbTotalSaldo.Text = totalsaldo.ToString.FormatoNumero
|
||||
pSaldo = totalsaldo.ToString.FormatoNumero
|
||||
ContPaq.Dispose()
|
||||
CargaDatosDetalles()
|
||||
End Sub
|
||||
Protected Sub CargaDatosDetalles()
|
||||
GvD.DataSource = DtDetalle.FiltraParametros("", "", {"FuenteRecaudacion", "CodigoRubroIngreso", "RubroIngreso", "Saldo", "IdCuentaPorEjecutar", "IdCuentaModificado"})
|
||||
GvD.DataBind()
|
||||
UPPDetalle.Update()
|
||||
End Sub
|
||||
|
||||
Protected Sub BtnGuardar_click(sender As Object, e As EventArgs)
|
||||
Dim Total As Double = 0
|
||||
Dim Accion As Integer = DdlAccion.SelectedValue.ToString.ToEntero
|
||||
Dim IDPoliza As Integer
|
||||
Dim Conta As New ClsContPAQi(UsuarioActual.Empresa)
|
||||
Dim TieneError As Boolean = False
|
||||
Dim NoHaceNada As Boolean = False
|
||||
Dim TransferenciaError As Boolean = False
|
||||
'Dim Concepto As String
|
||||
Dim ampliacion As Double
|
||||
Dim reduccion As Double
|
||||
Conta.IniciaTransacSQL()
|
||||
Dim Fecha As Date = Now
|
||||
|
||||
If Accion = 0 Then
|
||||
For Each gvr As GridViewRow In GvD.Rows
|
||||
If Accion = -1 Then Total += gvr.FCTextBox("TxtReduccion").Text.ToDouble Else Total += gvr.FCTextBox("TxtAmpliacion").Text.ToDouble
|
||||
ampliacion += gvr.FCTextBox("TxtAmpliacion").Text.ToDouble
|
||||
reduccion += gvr.FCTextBox("TxtReduccion").Text.ToDouble
|
||||
Next
|
||||
pAmpliacion = ampliacion.ToString
|
||||
If ampliacion <> reduccion Then Total = -1
|
||||
Else
|
||||
For Each gvr As GridViewRow In GvD.Rows
|
||||
If Accion = -1 Then Total += gvr.FCTextBox("TxtReduccion").Text.ToDouble Else Total += gvr.FCTextBox("TxtAmpliacion").Text.ToDouble
|
||||
Next
|
||||
End If
|
||||
|
||||
If Total > 0 Then
|
||||
'Select Case Accion
|
||||
' Case 1
|
||||
' Concepto = "Modificado - Ampliación"
|
||||
' Case -1
|
||||
' Concepto = "Modificado - Reduccción" : Total = 0
|
||||
' Case Else
|
||||
' Concepto = "Modificado - Transferencia"
|
||||
'End Select
|
||||
Total = If(Accion = -1, 0, Total)
|
||||
Fecha = TxtFecha.Text.ToDate
|
||||
IDPoliza = Conta.AddPoliza(4, TxtConcepto.Text, Total, Total, UsuarioActual.CveUsuario, Fecha)
|
||||
|
||||
Dim Importe As Double
|
||||
If IDPoliza > 0 Then
|
||||
For Each gvr As GridViewRow In GvD.Rows
|
||||
|
||||
If DdlAccion.SelectedValue = "0" Then
|
||||
If gvr.FCTextBox("TxtReduccion").Text.ToDouble > 0 Then
|
||||
Importe = gvr.FCTextBox("TxtReduccion").Text.ToDouble
|
||||
Accion = -1
|
||||
Else
|
||||
Importe = gvr.FCTextBox("TxtAmpliacion").Text.ToDouble
|
||||
Accion = 1
|
||||
End If
|
||||
Else
|
||||
If Accion = -1 Then Importe = gvr.FCTextBox("TxtReduccion").Text.ToDouble() Else Importe = gvr.FCTextBox("TxtAmpliacion").Text.ToDouble()
|
||||
End If
|
||||
|
||||
If Importe > 0 Then
|
||||
If Conta.AddMovimiento(IDPoliza, gvr.DataKey("IdCuentaPorEjecutar").ToString.ToEntero, True, Importe * Accion, "", "", 0, Fecha, "") Then
|
||||
'actualizo el idcuenta del presupuesto
|
||||
If Not Conta.AddMovimiento(IDPoliza, gvr.DataKey("IdCuentaModificado").ToString.ToEntero, False, Importe * Accion, "", "", 0, Fecha, "") Then
|
||||
TieneError = True
|
||||
Exit For
|
||||
End If
|
||||
Else
|
||||
TieneError = True
|
||||
Exit For
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
Else
|
||||
TieneError = True
|
||||
End If
|
||||
Else
|
||||
TieneError = True
|
||||
NoHaceNada = True
|
||||
End If
|
||||
|
||||
If Not TieneError Then
|
||||
Conta.AjustaPoliza(IDPoliza)
|
||||
Conta.Commit()
|
||||
LbTotalAmpliacion.Text = "0.00"
|
||||
LbTotalReduccion.Text = "0.00"
|
||||
LbTotalSaldoFinal.Text = "0.00"
|
||||
TxtConcepto.Text = ""
|
||||
TxtFecha.Text = "__/__/____"
|
||||
GvD.DataBind()
|
||||
CargaPresupuestos()
|
||||
UPPDetalle.Update()
|
||||
UPTotales.Update()
|
||||
Alert(String.Format("Registros agregados con exito<br/><br/><a href='/Contabilidad/RegPoliza.aspx?IdPoliza={0}'>Ver Poliza</a>", IDPoliza), TipoMensaje.MsgInformacion)
|
||||
Else
|
||||
Conta.RollBack()
|
||||
If Total = -1 Then
|
||||
Alert("El total de ampliaciones y reducciones debe ser igual.", TipoMensaje.MsgAdvertencia)
|
||||
Else
|
||||
Alert(If(NoHaceNada, "No se encontraron registros", "Error poliza"), TipoMensaje.MsgError)
|
||||
End If
|
||||
End If
|
||||
Conta.Dispose()
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Sub TipoModificacion(sender As Object, e As EventArgs)
|
||||
If DdlAccion.SelectedValue = "0" Then 'TRANSFERENCIA
|
||||
GvD.Columns(4).Visible = True 'TxtAmpliacion
|
||||
GvD.Columns(5).Visible = True 'TxtReduccion
|
||||
TdAmpliacion.Visible = True
|
||||
LbTotalAmpliacion.Visible = True
|
||||
TdReduccion.Visible = True
|
||||
LbTotalReduccion.Visible = True
|
||||
ElseIf DdlAccion.SelectedValue = "-1" Then 'REDUCCION
|
||||
GvD.Columns(4).Visible = False 'TxtAmpliacion
|
||||
GvD.Columns(5).Visible = True 'TxtReduccion
|
||||
TdAmpliacion.Visible = False
|
||||
LbTotalAmpliacion.Visible = False
|
||||
TdReduccion.Visible = True
|
||||
LbTotalReduccion.Visible = True
|
||||
Else 'AMPLIACION
|
||||
GvD.Columns(4).Visible = True 'TxtAmpliacion
|
||||
GvD.Columns(5).Visible = False 'TxtReduccion
|
||||
TdAmpliacion.Visible = True
|
||||
LbTotalAmpliacion.Visible = True
|
||||
TdReduccion.Visible = False
|
||||
LbTotalReduccion.Visible = False
|
||||
End If
|
||||
|
||||
CargaPresupuestos()
|
||||
|
||||
UPFiltros.Update()
|
||||
UPPDetalle.Update()
|
||||
UPTotales.Update()
|
||||
End Sub
|
||||
|
||||
Protected Sub GvD_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvD.RowDataBound
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
|
||||
Select Case DdlAccion.SelectedValue
|
||||
Case "1"
|
||||
e.Row.FCTextBox("TxtAmpliacion").Attributes.Add("onkeyup", String.Format("CalculaSaldo({0},this,'{1}','A','');", e.Row.DBCampo("Saldo"), e.Row.FCLabel("LBSF").ClientID))
|
||||
Case "-1"
|
||||
e.Row.FCTextBox("TxtReduccion").Attributes.Add("onkeyup", String.Format("CalculaSaldo({0},this,'{1}','R','');", e.Row.DBCampo("Saldo"), e.Row.FCLabel("LBSF").ClientID))
|
||||
Case "0"
|
||||
e.Row.FCTextBox("TxtAmpliacion").Attributes.Add("onkeyup", String.Format("CalculaSaldo({0},this,'{1}','A','{2}');", e.Row.DBCampo("Saldo"), e.Row.FCLabel("LBSF").ClientID, e.Row.FCTextBox("TxtReduccion").ClientID))
|
||||
e.Row.FCTextBox("TxtReduccion").Attributes.Add("onkeyup", String.Format("CalculaSaldo({0},this,'{1}','R','{2}');", e.Row.DBCampo("Saldo"), e.Row.FCLabel("LBSF").ClientID, e.Row.FCTextBox("TxtAmpliacion").ClientID))
|
||||
'e.Row.FCRangeValidator("RV").MaximumValue = e.Row.DBCampo("Saldo").ToDouble.ToString
|
||||
e.Row.FCRangeValidator("RV").Enabled = True
|
||||
'rv
|
||||
'MaximumValue='<%# Eval("Saldo") %>'
|
||||
End Select
|
||||
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
#Region "I M P R I M I R "
|
||||
|
||||
Protected Sub BtnImprimir_Click(sender As Object, e As ImageClickEventArgs)
|
||||
ImprimirReporte()
|
||||
End Sub
|
||||
|
||||
Protected Sub ImprimirReporte()
|
||||
'nombre del archivo a generar
|
||||
Dim fileName As String = "ReporteModificacionesPresupuestosIngresos"
|
||||
'ubicacion del rdlc
|
||||
Dim reportpath As String = "AC/Reportes/RepModificacionesPresupuestosIngresos.rdlc"
|
||||
|
||||
'parametros a enviar al reporte
|
||||
Dim params As New List(Of ReportParameter)
|
||||
params.Add(New ReportParameter("pEmp", UsuarioActual.Empresa.Empresa))
|
||||
params.Add(New ReportParameter("pImg", New Uri(Server.MapPath(String.Format("~/Empresas/{0}/Logo.png", UsuarioActual.CveEmpresa))).AbsoluteUri))
|
||||
params.Add(New ReportParameter("pEjercicio", UsuarioActual.Empresa.Empresa))
|
||||
params.Add(New ReportParameter("pSaldo", pSaldo))
|
||||
params.Add(New ReportParameter("pAmpliacion", pAmpliacion))
|
||||
params.Add(New ReportParameter("pSaldoFinal", pSaldoFinal))
|
||||
ImprimirPDF(reportpath, DtPresupuestos, params, fileName)
|
||||
End Sub
|
||||
#End Region
|
||||
End Class
|
||||
247
AC/RegNomina.aspx
Normal file
247
AC/RegNomina.aspx
Normal file
@@ -0,0 +1,247 @@
|
||||
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RegNomina.aspx.vb" Inherits="AC_RegNomina" %>
|
||||
|
||||
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="HB" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="E" runat="Server">
|
||||
<asp:Label ID="LbTitulo" runat="server" ClientIDMode="Static" Text="Nómina" />
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
|
||||
|
||||
|
||||
<asp:UpdatePanel runat="server">
|
||||
<ContentTemplate>
|
||||
<table width="100%">
|
||||
<tr>
|
||||
<td align="right">
|
||||
<h4>Ejercicio: <asp:Literal Text="" ID="LtEjercicio" runat="server" /></h4>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
<asp:UpdatePanel ID="UPPDetalle" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
|
||||
<table style="width: 100%;">
|
||||
<tr>
|
||||
<td>
|
||||
<table style="width: 100%;">
|
||||
<tr>
|
||||
<td>Fecha:</td>
|
||||
<td>
|
||||
<div class="input-group input-sm input-small date date-picker" data-date-format="dd/mm/yyyy" style="width: 150px !important; padding: 0px;">
|
||||
<asp:TextBox ID="TxtFecha" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="ImgFecha" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
<ajax:MaskedEditExtender ID="MEEFecha" runat="server" TargetControlID="TxtFecha" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender runat="server" ID="CEFecha" TargetControlID="TxtFecha" PopupButtonID="ImgFecha" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
<asp:RequiredFieldValidator ID="RFVFecha" runat="server" ControlToValidate="TxtFecha" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<asp:CompareValidator ID="CVFecha" runat="server" ControlToValidate="TxtFecha" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha''</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="VCOFecha1" runat="server" HighlightCssClass="vco" TargetControlID="RFVFecha" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOFecha2" runat="server" HighlightCssClass="vco" TargetControlID="CVFecha" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Concepto:</td>
|
||||
<td>
|
||||
<asp:TextBox ID="TxtConcepto" runat="server" CausesValidation="true" ValidationGroup="GrpGuardar" CssClass="col-md-6"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVConcepto" runat="server" ControlToValidate="TxtConcepto" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Concepto''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCEConcepto" runat="server" HighlightCssClass="vco" TargetControlID="RFVConcepto" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr id="trGasto" runat="server">
|
||||
<td>Opciones:
|
||||
</td>
|
||||
<td>
|
||||
Devengar:<asp:CheckBox CssClass="make-switchsd" style="margin-left:10px;" Width="120px" ID="ChkDevengar" runat="server" Text="" Checked="True" />
|
||||
Ejercer:<asp:CheckBox CssClass="make-switchsd" style="margin-left:10px;" Width="120px" ID="ChkEjercer" runat="server" Text="" Checked="True" />
|
||||
Pagar:<asp:CheckBox CssClass="make-switchsd" style="margin-left:10px;" Width="120px" ID="ChkPagar" runat="server" Text="" Checked="True" />
|
||||
</td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
<td style="vertical-align:top;">
|
||||
<asp:RadioButtonList ID="RBLPago" runat="server" RepeatDirection="Horizontal" AutoPostBack="true">
|
||||
<asp:ListItem Text="Pago Nómina" Value="1" Selected="True"></asp:ListItem>
|
||||
<asp:ListItem Text="Registro Finiquito" Value="2"></asp:ListItem>
|
||||
<asp:ListItem Text="Cobro Finiquito" Value="3"></asp:ListItem>
|
||||
<asp:ListItem Text="Pago Finiquito a Personal" Value="4"></asp:ListItem>
|
||||
</asp:RadioButtonList>
|
||||
|
||||
<asp:Panel ID="PnlNomina" runat="server">
|
||||
<table><tr><td>ISPT</td>
|
||||
<td>
|
||||
<asp:TextBox ID="TxtISPT" runat="server" Width="75px"></asp:TextBox></td>
|
||||
|
||||
</tr><tr> <td>Crédito al Salario</td>
|
||||
<td>
|
||||
<asp:TextBox ID="TxtCredSalario" runat="server" Width="75px"></asp:TextBox></td></tr></table>
|
||||
</asp:Panel>
|
||||
<asp:Panel ID="PnlFiniquito" runat="server" Visible="false">
|
||||
<table>
|
||||
<tr><td>Personal:</td><td><asp:DropDownList CssClass="select2me" ID="DdlNominaPersonal" DataTextField="Nombre" DataValueField="CvePersonal" runat="server" Width="200px"> </asp:DropDownList></td></tr>
|
||||
</table>
|
||||
<table border="0" id="TbIE" runat="server" visible="false">
|
||||
<tr><td>Movimiento:</td><td><asp:DropDownList ID="DdlTipoTransaccion" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" AutoPostBack="true" DataTextField="TipoTransaccion" DataValueField="CveTipoTransaccion" ValidationGroup="GrpGuardar" Width="250px"></asp:DropDownList></td></tr>
|
||||
<tr><td>Cuenta Bancaria:</td><td><asp:DropDownList ID="DdlCuenta" CssClass="form-control input-sm select2me" Width="250px" runat="server" AppendDataBoundItems="true" AutoPostBack="true" DataTextField="NumCuentaMoneda" DataValueField="CveCuenta" ValidationGroup="GrpGuardar"></asp:DropDownList></td></tr>
|
||||
<tr><td>Folio:</td><td><asp:TextBox ID="TxtFolio" runat="server" MaxLength="14" class="form-control input-sm" Width="70px"></asp:TextBox></td></tr>
|
||||
<tr id="trImporte" runat="server"><td>Importe:</td><td><asp:TextBox ID="TxtTotal" runat="server" b class="form-control input-sm" Width="70px"></asp:TextBox></td></tr>
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
|
||||
</asp:Panel>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<table style="width: 100%;" id="tbGeneral" runat="server">
|
||||
<tr class="Titulos TextTab">
|
||||
<th scope="col" style="width: 240px">Meta</th>
|
||||
<th scope="col" style="width: 100px">Unidad Administrativa</th>
|
||||
<th scope="col" style="width: 120px">Fuente Financiamiento</th>
|
||||
<th scope="col" style="width: 120px">Clasificador OG</th>
|
||||
<th scope="col" style="width: 130px">Tipo de Gasto</th>
|
||||
<th scope="col" style="width: 40px">Disponible</th>
|
||||
<th scope="col" style="width: 40px">Importe</th>
|
||||
<th scope="col" style="width: 40px">Comandos</th>
|
||||
</tr>
|
||||
<tr id="trAddDetalle" runat="server" align="center">
|
||||
<td>
|
||||
<asp:DropDownList ID="CboMeta" runat="server" CssClass="select2me" AppendDataBoundItems="true" AutoPostBack="true" DataTextField="ProgramaOperativo" DataValueField="CveProgramaOperativo" Width="240px" OnSelectedIndexChanged="CargaUnidadAdministrativa"></asp:DropDownList>
|
||||
</td>
|
||||
<td>
|
||||
<asp:DropDownList ID="CboUnidadAdministrativa" runat="server" CssClass="select2me" AppendDataBoundItems="true" AutoPostBack="true" DataTextField="UnidadAdministrativa" DataValueField="CveUnidadAdministrativa" Width="120px" OnSelectedIndexChanged="CargaFuenteFinanciamiento"></asp:DropDownList>
|
||||
</td>
|
||||
<td>
|
||||
<asp:DropDownList ID="CboFuenteFinanciamiento" runat="server" CssClass="select2me" AppendDataBoundItems="true" AutoPostBack="true" DataTextField="FuenteFinanciamiento" DataValueField="CveFuenteFinanciamiento" Width="120px" OnSelectedIndexChanged="CargaClasificacionOG"></asp:DropDownList>
|
||||
</td>
|
||||
<td>
|
||||
<asp:DropDownList ID="CboClasificacionOG" runat="server" CssClass="select2me" AppendDataBoundItems="true" AutoPostBack="true" DataTextField="CodigoClasificacion" DataValueField="CveClasificacion" Width="120px" OnSelectedIndexChanged="CargaTipoGasto"></asp:DropDownList>
|
||||
</td>
|
||||
<td>
|
||||
<asp:DropDownList ID="CboTipoGasto" runat="server" CssClass="select2me" AppendDataBoundItems="true" AutoPostBack="true" DataTextField="TipoGasto" DataValueField="CveTipoGasto" Width="130px" OnSelectedIndexChanged="CargaDisponible"></asp:DropDownList>
|
||||
</td>
|
||||
<td>
|
||||
<asp:Literal ID="LtDisponible" ClientIDMode="Static" runat="server" Text="$" />
|
||||
<asp:HiddenField runat="server" ID="HdnCvePresupuestoEgreso" ClientIDMode="Static" />
|
||||
<asp:HiddenField runat="server" ID="HdnCuentaPorEjercer" ClientIDMode="Static" />
|
||||
<asp:HiddenField runat="server" ID="HdnCuentaComprometido" ClientIDMode="Static" />
|
||||
<asp:HiddenField runat="server" ID="HdnCuentaDevengado" ClientIDMode="Static" />
|
||||
<asp:HiddenField runat="server" ID="HdnCuentaEjercido" ClientIDMode="Static" />
|
||||
<asp:HiddenField runat="server" ID="HdnCuentaPagado" ClientIDMode="Static" />
|
||||
</td>
|
||||
<td>
|
||||
<asp:TextBox runat="server" ID="TxtImporte" ClientIDMode="Static" Width="90px" CssClass="alineanum" />
|
||||
<asp:RequiredFieldValidator ID="RFVImporte" runat="server" ControlToValidate="TxtImporte" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Importe''</b> es necesario, por favor ingréselo." ValidationGroup="GrpAgregar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCEImporte" runat="server" Enabled="True" HighlightCssClass="vco" TargetControlID="RFVImporte" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
<ajax:FilteredTextBoxExtender ID="SoloNumeros" runat="server" TargetControlID="TxtImporte" FilterType="Custom, Numbers" ValidChars="." />
|
||||
</td>
|
||||
<td>
|
||||
<asp:Button ID="BtnAgregar" runat="server" Text="Agregar" Width="75px" ValidationGroup="GrpAgregar" OnClick="BtnAgregar_click" class="btn btn-primary" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="10">
|
||||
<asp:GridView ID="GvD" runat="server" AutoGenerateColumns="False" DataKeyNames="IdCuentaPorEjercer, Importe" ShowHeader="False" Width="100%" CssClass="table table-striped table-advance table-hover" Style="margin-top: -10px; text-align: center;" GridLines="None">
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderText="Meta">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="Meta" runat="server" Text='<%# Eval("Meta")%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="240px" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="UnidadAdministrativa">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="UnidadAdministrativa" runat="server" Text='<%# Eval("UnidadAdministrativa")%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="100px" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="FuenteFinanciamiento">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="FuenteFinanciamiento" runat="server" Text='<%# Eval("FuenteFinanciamiento")%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="120px" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="ClasificadorOG">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="ClasificadorOG" runat="server" Text='<%# Eval("ClasificadorOG")%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="120px" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="TipoGasto">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="TipoGasto" runat="server" Text='<%# Eval("TipoGasto")%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="130px" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Importe">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="Importe" runat="server" Text='<%# Eval("Importe", "{0:N2}") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="180px" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Comandos">
|
||||
<ItemTemplate>
|
||||
<asp:ImageButton ID="ImgDelete" runat="server" CausesValidation="False" OnClientClick="return confirm('Está seguro que desea eliminar el movimiento?')" CommandName="Delete" ImageUrl="/Imagenes/Btn_Delete.png" Text="Edit" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
<HeaderStyle CssClass="TitulosChico"></HeaderStyle>
|
||||
<RowStyle CssClass="Texto" />
|
||||
<AlternatingRowStyle CssClass="TextoAlterno" />
|
||||
</asp:GridView>
|
||||
|
||||
|
||||
<table style="width: 100%;">
|
||||
<tr align="right">
|
||||
<td width="665px">Total:</td>
|
||||
<td>
|
||||
<asp:Label ID="LbTotal" runat="server" BorderStyle="None" Style="text-align: right;" Text="0.00" Width="45px"></asp:Label></td>
|
||||
<td width="90px"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr align="right">
|
||||
<td></td>
|
||||
<td>
|
||||
|
||||
</td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<asp:Button runat="server" ID="BtnGuardar" ClientIDMode="Static" Text="Guardar Registro" ValidationGroup="GrpGuardar" class="btn btn-primary" />
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
||||
</asp:Content>
|
||||
600
AC/RegNomina.aspx.vb
Normal file
600
AC/RegNomina.aspx.vb
Normal file
@@ -0,0 +1,600 @@
|
||||
Option Explicit On
|
||||
Option Strict On
|
||||
|
||||
Imports System.Data
|
||||
Imports Extensiones
|
||||
Imports System.Activities.Statements
|
||||
Partial Class AC_RegNomina
|
||||
Inherits ClsPaginas
|
||||
|
||||
#Region "PROPIEDADES"
|
||||
Private Property DtDetalle As DataTable
|
||||
Get
|
||||
DtDetalle = DirectCast(ViewState("DtDetalle"), DataTable)
|
||||
End Get
|
||||
|
||||
Set(ByVal value As DataTable)
|
||||
ViewState("DtDetalle") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property DtPresupuestos As DataTable
|
||||
Get
|
||||
DtPresupuestos = DirectCast(ViewState("DtPresupuestos"), DataTable)
|
||||
End Get
|
||||
|
||||
Set(ByVal value As DataTable)
|
||||
ViewState("DtPresupuestos") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private Property Opc As String
|
||||
Get
|
||||
Opc = ViewState("Opc").ToString
|
||||
End Get
|
||||
Set(value As String)
|
||||
ViewState("Opc") = value
|
||||
End Set
|
||||
End Property
|
||||
#End Region
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||
If Not Page.IsPostBack Then
|
||||
'Opc = IfNull(Request("Opc"), "Otro").ToString
|
||||
Opc = "Nom"
|
||||
|
||||
'If Opc = "Nom" Then
|
||||
' LbTitulo.Text = "Nómina"
|
||||
'Else
|
||||
' LbTitulo.Text = "Comprometido Otros"
|
||||
'End If
|
||||
TxtFecha.Text = Now.ToShortDateString
|
||||
|
||||
CargaPresupuestos()
|
||||
CargaMeta()
|
||||
TxtImporte.Enabled = False
|
||||
CreaDTDetalles()
|
||||
BtnAgregar.Enabled = False
|
||||
|
||||
LtEjercicio.Text = UsuarioActual.Empresa.EjercicioActual.ToString
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub CreaDTDetalles()
|
||||
DtDetalle = New DataTable
|
||||
DtDetalle.Columns.Add("Meta", GetType(String))
|
||||
DtDetalle.Columns.Add("UnidadAdministrativa", GetType(String))
|
||||
DtDetalle.Columns.Add("FuenteFinanciamiento", GetType(String))
|
||||
DtDetalle.Columns.Add("ClasificadorOG", GetType(String))
|
||||
DtDetalle.Columns.Add("CodigoClasificacion", GetType(String))
|
||||
DtDetalle.Columns.Add("TipoGasto", GetType(String))
|
||||
DtDetalle.Columns.Add("Disponible", GetType(Double))
|
||||
DtDetalle.Columns.Add("Importe", GetType(Double))
|
||||
|
||||
DtDetalle.Columns.Add("CvePresupuestoEgreso", GetType(Integer))
|
||||
DtDetalle.Columns.Add("IdCuentaPorEjercer", GetType(Integer))
|
||||
DtDetalle.Columns.Add("IdCuentaComprometido", GetType(Integer))
|
||||
DtDetalle.Columns.Add("IdCuentaDevengado", GetType(Integer))
|
||||
DtDetalle.Columns.Add("IdCuentaEjercido", GetType(Integer))
|
||||
DtDetalle.Columns.Add("IdCuentaPagado", GetType(Integer))
|
||||
|
||||
End Sub
|
||||
Protected Sub CargaDatosDetalles()
|
||||
GvD.DataSource = DtDetalle
|
||||
GvD.DataBind()
|
||||
UPPDetalle.Update()
|
||||
End Sub
|
||||
|
||||
Private Sub CargaPresupuestos()
|
||||
Dim AC As New ClsAC
|
||||
|
||||
If AC.GetPresupuestoEgresos(-1, True, UsuarioActual.Empresa.EjercicioActual, UsuarioActual.CveEmpresa) Then
|
||||
DtPresupuestos = AC.DtResultados.Copy
|
||||
Else
|
||||
Alert("Ocurrio un error al cargar los Presupuestos. Por favor vuelva a cargar la página", TipoMensaje.MsgError)
|
||||
End If
|
||||
AC.Dispose()
|
||||
|
||||
If Opc = "Nom" Then
|
||||
DtPresupuestos = DtPresupuestos.FiltraParametros("CodigoCOG like '1%'")
|
||||
Else
|
||||
DtPresupuestos = DtPresupuestos.FiltraParametros("NOT CodigoCOG like '1%'")
|
||||
End If
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
#Region "CARGA COMBOS EN CASCADA"
|
||||
Private Sub CargaMeta()
|
||||
CboMeta.DataSource = DtPresupuestos.FiltraParametros("", DistinctColumns:={"CveProgramaOperativo", "ProgramaOperativo"})
|
||||
CboMeta.DataBind()
|
||||
CboMeta.Items.Insert(0, New ListItem("Seleccionar", "-1"))
|
||||
End Sub
|
||||
Protected Sub CargaUnidadAdministrativa(sender As Object, e As EventArgs)
|
||||
CboUnidadAdministrativa.Items.Clear()
|
||||
CboFuenteFinanciamiento.Items.Clear()
|
||||
CboClasificacionOG.Items.Clear()
|
||||
CboTipoGasto.Items.Clear()
|
||||
LtDisponible.Text = "$"
|
||||
TxtImporte.Enabled = False
|
||||
If CboMeta.SelectedValue.ToEntero > 0 Then
|
||||
Dim Filtro As New StringBuilder
|
||||
Filtro.AppendFormat("CveProgramaOperativo= {0}", CboMeta.SelectedValue.ToString)
|
||||
|
||||
CboUnidadAdministrativa.DataSource = (DtPresupuestos.FiltraParametros(Filtro.ToString)).FiltraParametros("", DistinctColumns:={"CveUnidadAdministrativa", "UnidadAdministrativa"})
|
||||
CboUnidadAdministrativa.DataBind()
|
||||
CboUnidadAdministrativa.Items.Insert(0, New ListItem("Seleccionar", "-1"))
|
||||
End If
|
||||
End Sub
|
||||
Protected Sub CargaFuenteFinanciamiento(sender As Object, e As EventArgs)
|
||||
CboFuenteFinanciamiento.Items.Clear()
|
||||
CboClasificacionOG.Items.Clear()
|
||||
CboTipoGasto.Items.Clear()
|
||||
LtDisponible.Text = "$"
|
||||
TxtImporte.Enabled = False
|
||||
If CboUnidadAdministrativa.SelectedValue.ToEntero > 0 Then
|
||||
Dim Filtro As New StringBuilder
|
||||
Filtro.AppendFormat("CveProgramaOperativo= {0} and CveUnidadAdministrativa= {1}", CboMeta.SelectedValue.ToString, CboUnidadAdministrativa.SelectedValue.ToString)
|
||||
|
||||
CboFuenteFinanciamiento.DataSource = (DtPresupuestos.FiltraParametros(Filtro.ToString)).FiltraParametros("", DistinctColumns:={"CveFuenteFinanciamiento", "FuenteFinanciamiento"})
|
||||
CboFuenteFinanciamiento.DataBind()
|
||||
CboFuenteFinanciamiento.Items.Insert(0, New ListItem("Seleccionar", "-1"))
|
||||
End If
|
||||
End Sub
|
||||
Protected Sub CargaClasificacionOG(sender As Object, e As EventArgs)
|
||||
CboClasificacionOG.Items.Clear()
|
||||
CboTipoGasto.Items.Clear()
|
||||
LtDisponible.Text = "$"
|
||||
TxtImporte.Enabled = False
|
||||
If CboFuenteFinanciamiento.SelectedValue.ToEntero > 0 Then
|
||||
Dim Filtro As New StringBuilder
|
||||
Filtro.AppendFormat("CveProgramaOperativo= {0} and CveUnidadAdministrativa= {1} and CveFuenteFinanciamiento= {2}", CboMeta.SelectedValue.ToString, CboUnidadAdministrativa.SelectedValue.ToString, CboFuenteFinanciamiento.SelectedValue.ToString)
|
||||
|
||||
CboClasificacionOG.DataSource = (DtPresupuestos.FiltraParametros(Filtro.ToString)).FiltraParametros("", "CodigoClasificacion", {"CveClasificacion", "CodigoClasificacion"})
|
||||
CboClasificacionOG.DataBind()
|
||||
CboClasificacionOG.Items.Insert(0, New ListItem("Seleccionar", "-1"))
|
||||
End If
|
||||
End Sub
|
||||
Protected Sub CargaTipoGasto(sender As Object, e As EventArgs)
|
||||
CboTipoGasto.Items.Clear()
|
||||
LtDisponible.Text = "$"
|
||||
TxtImporte.Enabled = False
|
||||
If CboClasificacionOG.SelectedValue.ToEntero > 0 Then
|
||||
Dim Filtro As New StringBuilder
|
||||
Filtro.AppendFormat("CveProgramaOperativo= {0} and CveUnidadAdministrativa= {1} and CveFuenteFinanciamiento= {2} and CveClasificacion= {3}", CboMeta.SelectedValue.ToString, CboUnidadAdministrativa.SelectedValue.ToString, CboFuenteFinanciamiento.SelectedValue.ToString, CboClasificacionOG.SelectedValue.ToString)
|
||||
|
||||
CboTipoGasto.DataSource = (DtPresupuestos.FiltraParametros(Filtro.ToString)).FiltraParametros("", DistinctColumns:={"CveTipoGasto", "TipoGasto"})
|
||||
CboTipoGasto.DataBind()
|
||||
CboTipoGasto.Items.Insert(0, New ListItem("Seleccionar", "-1"))
|
||||
End If
|
||||
End Sub
|
||||
Protected Sub CargaDisponible(sender As Object, e As EventArgs)
|
||||
CargaDisponible()
|
||||
End Sub
|
||||
|
||||
Protected Sub CargaDisponible()
|
||||
Dim ContPaq As New ClsContPAQi(UsuarioActual.Empresa)
|
||||
Dim Filtro As New StringBuilder
|
||||
Dim disponible As Double
|
||||
Dim ColumnaSaldo As String = "IdCuentaComprometido"
|
||||
Filtro.AppendFormat("CveProgramaOperativo= {0} and CveUnidadAdministrativa= {1} and CveFuenteFinanciamiento= {2} and CveClasificacion= {3} and CveTipoGasto= {4}", CboMeta.SelectedValue.ToString, CboUnidadAdministrativa.SelectedValue.ToString, CboFuenteFinanciamiento.SelectedValue.ToString, CboClasificacionOG.SelectedValue.ToString, CboTipoGasto.SelectedValue.ToString)
|
||||
|
||||
'cuando se esta pagando al personal, toma el saldo del devengado, proque ya esta comprometido
|
||||
If RBLPago.SelectedValue = "4" Then ColumnaSaldo = "IdCuentaDevengado"
|
||||
|
||||
|
||||
For Each dr As DataRow In DtPresupuestos.FiltraParametros(Filtro.ToString).Rows
|
||||
disponible = ContPaq.GetSaldoCuenta(dr(ColumnaSaldo).ToString.ToEntero, 0, TxtFecha.Text.ToDate.Year)
|
||||
HdnCuentaPorEjercer.Value = dr("IdCuentaPorEjercer").ToString
|
||||
HdnCuentaComprometido.Value = dr("IdCuentaComprometido").ToString
|
||||
HdnCuentaDevengado.Value = dr("IdCuentaDevengado").ToString
|
||||
HdnCuentaEjercido.Value = dr("IdCuentaEjercido").ToString
|
||||
HdnCuentaPagado.Value = dr("IdCuentaPagado").ToString
|
||||
HdnCvePresupuestoEgreso.Value = dr("CvePresupuestoEgreso").ToString
|
||||
Next
|
||||
|
||||
Filtro.Clear()
|
||||
Filtro.AppendFormat("IdCuentaComprometido= {0}", HdnCuentaPorEjercer.Value)
|
||||
For Each dr As DataRow In DtDetalle.FiltraParametros(Filtro.ToString).Rows
|
||||
disponible -= dr("Importe").ToString.ToDouble
|
||||
Next
|
||||
|
||||
If disponible <> 0 Then
|
||||
TxtImporte.Enabled = True
|
||||
BtnAgregar.Enabled = True
|
||||
End If
|
||||
LtDisponible.Text = disponible.FormatoNumero()
|
||||
ContPaq.Dispose()
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
Protected Sub BtnAgregar_click(sender As Object, e As EventArgs)
|
||||
If DtDetalle IsNot Nothing Then
|
||||
If LtDisponible.Text.ToDouble >= TxtImporte.Text.ToDouble Then
|
||||
Dim dr As DataRow = DtDetalle.NewRow
|
||||
dr("Meta") = CboMeta.SelectedItem.ToString
|
||||
dr("UnidadAdministrativa") = CboUnidadAdministrativa.SelectedItem.ToString
|
||||
dr("FuenteFinanciamiento") = CboFuenteFinanciamiento.SelectedItem.ToString
|
||||
dr("ClasificadorOG") = CboClasificacionOG.SelectedItem.ToString
|
||||
dr("TipoGasto") = CboTipoGasto.SelectedItem.ToString
|
||||
dr("Disponible") = LtDisponible.Text.ToDouble
|
||||
dr("Importe") = TxtImporte.Text.ToDouble
|
||||
dr("IdCuentaPorEjercer") = HdnCuentaPorEjercer.Value
|
||||
dr("IdCuentaComprometido") = HdnCuentaComprometido.Value
|
||||
dr("IdCuentaDevengado") = HdnCuentaDevengado.Value
|
||||
dr("IdCuentaEjercido") = HdnCuentaEjercido.Value
|
||||
dr("IdCuentaPagado") = HdnCuentaPagado.Value
|
||||
dr("CvePresupuestoEgreso") = HdnCvePresupuestoEgreso.Value
|
||||
|
||||
DtDetalle.Rows.Add(dr)
|
||||
CargaDatosDetalles()
|
||||
Dim total As Double = LbTotal.Text.ToDouble
|
||||
LbTotal.Text = (total + dr("Importe").ToString.ToDouble).ToString.FormatoNumero
|
||||
|
||||
CboMeta.SelectedIndex = -1
|
||||
CboUnidadAdministrativa.Items.Clear()
|
||||
CboFuenteFinanciamiento.Items.Clear()
|
||||
CboClasificacionOG.Items.Clear()
|
||||
CboTipoGasto.Items.Clear()
|
||||
LtDisponible.Text = "$"
|
||||
TxtImporte.Text = ""
|
||||
TxtImporte.Enabled = False
|
||||
BtnAgregar.Enabled = False
|
||||
Else
|
||||
Alert("El importe supera el capital disponible. Por favor de revisar y modificar", TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
|
||||
Protected Sub GvD_RowDeleting(sender As Object, e As GridViewDeleteEventArgs) Handles GvD.RowDeleting
|
||||
Dim Filtro As New StringBuilder
|
||||
Filtro.AppendFormat("IdCuentaPorEjercer= {0} and Importe= {1}", GvD.Rows(e.RowIndex).DataKey("IdCuentaPorEjercer").ToString.ToEntero, GvD.Rows(e.RowIndex).DataKey("Importe").ToString.ToDouble)
|
||||
Dim dr As DataRow() = DtDetalle.Select(Filtro.ToString)
|
||||
Dim total As Double = LbTotal.Text.ToDouble
|
||||
LbTotal.Text = (total - dr(0).Item("Importe").ToString.ToDouble).ToString.FormatoNumero
|
||||
dr(0).Delete()
|
||||
|
||||
If Not LtDisponible.Text = "$" Then
|
||||
CargaDisponible()
|
||||
End If
|
||||
CargaDatosDetalles()
|
||||
End Sub
|
||||
|
||||
Private Sub RBLPago_SelectedIndexChanged(sender As Object, e As EventArgs) Handles RBLPago.SelectedIndexChanged
|
||||
|
||||
Select Case RBLPago.SelectedValue
|
||||
Case "1"
|
||||
PnlNomina.Visible = True : PnlFiniquito.Visible = False
|
||||
ChkDevengar.Checked = True : ChkEjercer.Checked = True : ChkPagar.Checked = True
|
||||
ChkEjercer.Enabled = True : ChkPagar.Enabled = True
|
||||
tbGeneral.Visible = True
|
||||
Case "2"
|
||||
PnlNomina.Visible = False : PnlFiniquito.Visible = True
|
||||
ChkEjercer.Checked = False : ChkEjercer.Enabled = False
|
||||
ChkPagar.Checked = False : ChkPagar.Enabled = False
|
||||
|
||||
ChkDevengar.Checked = True
|
||||
trGasto.Visible = True
|
||||
tbGeneral.Visible = True
|
||||
|
||||
DdlNominaPersonal.DataSource = GlobalDTRHPersonal(UsuarioActual.CveEmpresa).FiltraParametros("IdCtaContPersonal > 0")
|
||||
DdlNominaPersonal.DataBind()
|
||||
TbIE.Visible = False
|
||||
Case "3", "4"
|
||||
PnlNomina.Visible = False : PnlFiniquito.Visible = True
|
||||
ChkDevengar.Checked = True : ChkEjercer.Checked = True : ChkPagar.Checked = True
|
||||
trGasto.Visible = False
|
||||
tbGeneral.Visible = False
|
||||
|
||||
DdlTipoTransaccion.Items.Clear()
|
||||
DdlTipoTransaccion.DataSource = GlobalDTTipoTransacciones.FiltraParametros(String.Format("Tipo = '{0}'", If(RBLPago.SelectedValue = "3", "Ing", "Egs")))
|
||||
DdlTipoTransaccion.DataBind()
|
||||
|
||||
DdlNominaPersonal.DataSource = GlobalDTRHPersonal(UsuarioActual.CveEmpresa).FiltraParametros("IdCtaContPersonal > 0")
|
||||
DdlNominaPersonal.DataBind()
|
||||
|
||||
DdlCuenta.Items.Clear()
|
||||
Dim dt As DataTable = GlobalDTBancosCuentas(UsuarioActual.CveUsuario).FiltraParametros("CveTipoCuenta <> 1") ' quito las cajas chicas
|
||||
DdlCuenta.DataSource = dt
|
||||
DdlCuenta.DataBind()
|
||||
TbIE.Visible = True
|
||||
|
||||
If RBLPago.SelectedValue = "4" Then
|
||||
trGasto.Visible = True
|
||||
tbGeneral.Visible = True
|
||||
ChkDevengar.Checked = False : ChkDevengar.Enabled = False
|
||||
End If
|
||||
|
||||
End Select
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Sub DdlTipoTransaccion_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlTipoTransaccion.SelectedIndexChanged
|
||||
'Dim valor As Integer = DirectCast(sender, DropDownList).SelectedValue.ToEntero
|
||||
'Dim dr As DataRow = GlobalDTTipoTransacciones.FiltroPrimero(String.Format("CveTipoTransaccion = {0}", DdlTipoTransaccion.SelectedValue)) 'Egs o Ing
|
||||
|
||||
Dim Folio As Long
|
||||
Dim Banco As New ClsBancos
|
||||
Folio = Banco.GetNextFolio(DdlCuenta.SelectedValue.ToEntero, DdlTipoTransaccion.SelectedValue.ToEntero)
|
||||
Banco.Dispose()
|
||||
TxtFolio.Text = Folio.ToString
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Sub DdlCuenta_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlCuenta.SelectedIndexChanged
|
||||
|
||||
'si solo es de egreso el movimiento debe de generar el siguiente folio.
|
||||
Dim Folio As Long
|
||||
Dim Banco As New ClsBancos
|
||||
Folio = Banco.GetNextFolio(DdlCuenta.SelectedValue.ToEntero, DdlTipoTransaccion.SelectedValue.ToEntero)
|
||||
Banco.Dispose()
|
||||
TxtFolio.Text = (Folio + 1).ToString
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub BtnGuardar_Click(sender As Object, e As EventArgs) Handles BtnGuardar.Click
|
||||
Dim Seleccion As String = RBLPago.SelectedValue
|
||||
|
||||
If DtDetalle.Rows.Count = 0 And Seleccion.Contiene("1", "2") Then
|
||||
Alert("No hay registros que guardar", TipoMensaje.MsgInformacion)
|
||||
Exit Sub
|
||||
End If
|
||||
Dim TieneError As Boolean = False
|
||||
Dim MensajeError = ""
|
||||
Dim IDPoliza As Integer
|
||||
Dim objAC As New ClsContPAQi(UsuarioActual.Empresa) : objAC.IniciaTransacSQL()
|
||||
Dim ObjIE As ClsBancos = Nothing
|
||||
Dim Total As Decimal = DtDetalle.SUMD("Importe")
|
||||
Dim Fecha As Date = TxtFecha.Text.ToDate
|
||||
Dim Concepto As String = TxtConcepto.Text.Trim
|
||||
|
||||
Dim IdCtaISPT As Integer = 640
|
||||
Dim IdCtaCreditoSalario As Integer = 635
|
||||
Dim IdCtaDevolucionISPT As Integer = 1745
|
||||
Dim IdCtaMatriz As Integer
|
||||
|
||||
Dim Importe As Double
|
||||
Dim MsgError As String = ""
|
||||
'sumo la cantidad de esos movimientos
|
||||
'If ChkEjercer.Checked Then Total += LbTotal.Text.ToDouble
|
||||
'If ChkPagar.Checked Then Total += LbTotal.Text.ToDouble
|
||||
|
||||
|
||||
Dim CtaCliente As Integer = 634 ' Municipio de hermosillo
|
||||
Dim CvePresupuestoIngreso As Integer = 195 ' 2015: 12, 2016: 152, 2017: 160, 2018: 183
|
||||
Dim CtaPuente As Integer = 1774 ' INGRESO RECAUDADO PARA NOMINA EN MUNICIPIO, fijo
|
||||
Dim CtaServiciosPersonales As Integer = 1778 ' 2111 -- fijo
|
||||
Dim IdCtaPersonal As Integer = 0
|
||||
Dim IdCtaBancaria As Integer = 0
|
||||
Dim CveIE As Integer = 0
|
||||
|
||||
|
||||
If Seleccion.Contiene("2", "3", "4") Then
|
||||
|
||||
Dim dr As DataRow = GlobalDTRHPersonal(UsuarioActual.CveEmpresa).FiltroPrimero(String.Format("CvePersonal = {0}", DdlNominaPersonal.SelectedValue))
|
||||
If dr IsNot Nothing Then
|
||||
IdCtaPersonal = dr("IdCtaContPersonal").ToString.ToEntero
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
If Seleccion.Contiene("3", "4") Then
|
||||
|
||||
Dim dr As DataRow
|
||||
dr = GlobalDTBancosCuentas(UsuarioActual.CveUsuario).FiltroPrimero(String.Format("CveCuenta={0}", DdlCuenta.SelectedValue))
|
||||
If dr IsNot Nothing Then
|
||||
'DdlMoneda.SelectedValue = dr("CveMoneda").ToString
|
||||
IdCtaBancaria = dr("IdCtaContable").ToString.ToEntero
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
Dim drt As DataRow
|
||||
|
||||
IDPoliza = objAC.AddPoliza(3, TxtConcepto.Text.Trim, 0, 0, UsuarioActual.CveUsuario, Fecha)
|
||||
If IDPoliza > 0 Then
|
||||
|
||||
|
||||
For Each dr As DataRow In DtDetalle.Rows
|
||||
|
||||
'registro el movimiento contable
|
||||
|
||||
Importe = dr("Importe").ToString.ToDouble
|
||||
Dim drp As DataRow = DtPresupuestos.FiltroPrimero(String.Format("CvePresupuestoEgreso = {0}", dr("CvePresupuestoEgreso")))
|
||||
|
||||
If ChkDevengar.Checked Then
|
||||
|
||||
If drp IsNot Nothing Then IdCtaMatriz = drp("IdCuentaMatriz").ToString.ToEntero
|
||||
|
||||
If Not objAC.AddMovimiento(IDPoliza, dr("IdCuentaComprometido").ToString.ToEntero, True, Importe, "", Concepto, 0, Fecha, "") Then TieneError = True : Exit For
|
||||
'actualizo el idcuenta del presupuesto
|
||||
If Not objAC.AddMovimiento(IDPoliza, dr("IdCuentaDevengado").ToString.ToEntero, False, Importe, "", Concepto, 0, Fecha, "") Then TieneError = True : Exit For
|
||||
|
||||
If RBLPago.SelectedValue = "1" AndAlso Not objAC.AddMovimiento(IDPoliza, drp("IdCuentaMatrizAbono").ToString.ToEntero, True, Importe, "", Concepto, 0, Fecha, "") Then TieneError = True : Exit For ' CtaServiciosPersonales
|
||||
|
||||
If Not objAC.AddMovimiento(IDPoliza, IdCtaMatriz, False, Importe, "", Concepto, 0, Fecha, "") Then TieneError = True : Exit For
|
||||
|
||||
End If
|
||||
|
||||
|
||||
If ChkEjercer.Checked Then
|
||||
If Not objAC.AddMovimiento(IDPoliza, dr("IdCuentaDevengado").ToString.ToEntero, True, Importe, "", Concepto, 0, Fecha, "") Then TieneError = True : Exit For
|
||||
'actualizo el idcuenta del presupuesto
|
||||
If Not objAC.AddMovimiento(IDPoliza, dr("IdCuentaEjercido").ToString.ToEntero, False, Importe, "", Concepto, 0, Fecha, "") Then TieneError = True : Exit For
|
||||
|
||||
End If
|
||||
|
||||
If ChkPagar.Checked Then
|
||||
If Not objAC.AddMovimiento(IDPoliza, dr("IdCuentaEjercido").ToString.ToEntero, True, Importe, "", Concepto, 0, Fecha, "") Then TieneError = True : Exit For
|
||||
'actualizo el idcuenta del presupuesto
|
||||
If Not objAC.AddMovimiento(IDPoliza, dr("IdCuentaPagado").ToString.ToEntero, False, Importe, "", Concepto, 0, Fecha, "") Then TieneError = True : Exit For
|
||||
|
||||
If Seleccion = "1" AndAlso Not objAC.AddMovimiento(IDPoliza, drp("IdCuentaMatrizAbono").ToString.ToEntero, False, Importe, "", Concepto, 0, Fecha, "") Then TieneError = True : Exit For ' CtaServiciosPersonales
|
||||
|
||||
End If
|
||||
Next
|
||||
|
||||
If TieneError Then MensajeError = "Error Tipo 1"
|
||||
|
||||
If Seleccion.Contiene("1", "2", "3") Then
|
||||
|
||||
Total = DtDetalle.SUMD("Importe")
|
||||
If Seleccion = "3" Then Total = TxtTotal.Text.ToDecimal
|
||||
Dim objACPI As New ClsAC()
|
||||
|
||||
If objACPI.GetPresupuestoIngresos(CvePresupuestoIngreso, UsuarioActual.Empresa.EjercicioActual, True, UsuarioActual.CveEmpresa) Then
|
||||
If objACPI.DtResultados.Rows.Count > 0 Then
|
||||
drt = objACPI.DtResultados.Rows(0)
|
||||
|
||||
If RBLPago.SelectedValue.Contiene("1", "2") Then
|
||||
|
||||
'se debe de registrar el ingreso
|
||||
'DEVENGO EL INGRESO
|
||||
If Not objAC.AddMovimiento(IDPoliza, drt("IdCuentaPorEjecutar").ToString.ToEntero, False, Total, "", Concepto, 0, Fecha, "") Then TieneError = True
|
||||
|
||||
If Not objAC.AddMovimiento(IDPoliza, drt("IdCuentaDevengado").ToString.ToEntero, True, Total, "", Concepto, 0, Fecha, "") Then TieneError = True
|
||||
|
||||
'CARGO la deuda del cliente
|
||||
'If Not objAC.AddMovimiento(IDPoliza, CtaCliente, False, Total, "", Concepto, 0, Fecha, "") Then TieneError = True
|
||||
'abono,
|
||||
|
||||
If Not objAC.AddMovimiento(IDPoliza, CtaCliente, False, Total, "", Concepto, 0, Fecha, "") Then TieneError = True
|
||||
|
||||
If Not objAC.AddMovimiento(IDPoliza, drt("IdCuentaMatriz").ToString.ToEntero, True, Total, "", Concepto, 0, Fecha, "") Then TieneError = True
|
||||
|
||||
|
||||
|
||||
End If
|
||||
If RBLPago.SelectedValue.Contiene("1", "3") Then
|
||||
'RECAUDO EL INGRESO
|
||||
If Not objAC.AddMovimiento(IDPoliza, drt("IdCuentaDevengado").ToString.ToEntero, False, Total, "", Concepto, 0, Fecha, "") Then TieneError = True
|
||||
|
||||
If Not objAC.AddMovimiento(IDPoliza, drt("IdCuentaRecaudado").ToString.ToEntero, True, Total, "", Concepto, 0, Fecha, "") Then TieneError = True
|
||||
|
||||
If Seleccion = "1" AndAlso Not objAC.AddMovimiento(IDPoliza, CtaPuente, False, Total, "", Concepto, 0, Fecha, "") Then TieneError = True
|
||||
|
||||
If Not objAC.AddMovimiento(IDPoliza, CtaCliente, True, Total, "", Concepto, 0, Fecha, "") Then TieneError = True
|
||||
|
||||
End If
|
||||
|
||||
Else
|
||||
TieneError = True
|
||||
End If
|
||||
Else
|
||||
TieneError = True
|
||||
End If
|
||||
|
||||
objACPI.Dispose()
|
||||
|
||||
End If
|
||||
|
||||
If IdCtaPersonal > 0 Then
|
||||
|
||||
'registro los movimientos de cobro de cliente y que estan pendientes de pagarse al FyE
|
||||
Importe = DtDetalle.SUM("Importe")
|
||||
'cuando es el pago a personal, se carga, los demas casos se abona
|
||||
If Seleccion.Contiene("1", "2", "4") Then If Not objAC.AddMovimiento(IDPoliza, IdCtaPersonal, If(Seleccion = "4", False, True), Importe, "", Concepto, 0, Fecha, "") Then TieneError = True
|
||||
CtaPuente = 0 ' para que no se inserte mas abajo
|
||||
|
||||
If Seleccion.Contiene("3", "4") Then
|
||||
'registro un IE
|
||||
ObjIE = New ClsBancos
|
||||
ObjIE.IniciaTransacSQL()
|
||||
Dim ObjMov As New ClsContabilidad(ObjIE.IniciaTransacSQL)
|
||||
Dim CvePrePoliza = ObjMov.AddPrePolizas("Banc", 2, Importe, Importe, 1, Fecha, TxtConcepto.Text.Trim, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
||||
Dim Obs As String = TxtConcepto.Text
|
||||
Dim Folio As String
|
||||
|
||||
Folio = TxtFolio.Text.Trim
|
||||
Dim CveConceptoCargo As Integer = 30
|
||||
Dim CveConceptoAbono As Integer = 28
|
||||
Total = TxtTotal.Text.ToDecimal
|
||||
|
||||
If Seleccion = "4" Then Total = DtDetalle.SUMD("Importe")
|
||||
|
||||
'cuando saco el egreso invierto los concepto
|
||||
If Seleccion = "3" Then
|
||||
CveConceptoCargo = 29
|
||||
CveConceptoAbono = 30
|
||||
End If
|
||||
|
||||
'lo envia como transferencia recibida
|
||||
CveIE = ObjIE.AddBancos_IE(DdlCuenta.SelectedValue.ToEntero, DdlTipoTransaccion.SelectedValue.ToEntero, Fecha, Folio, Obs, Total, 1, 1.0, Obs, "", True, True, -1, CvePrePoliza, "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
||||
|
||||
If CveIE > 0 Then
|
||||
If ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, Total, "", CveConceptoCargo, Obs, Fecha, 0, -1, CveIE, CvePersonal:=DdlNominaPersonal.SelectedValue.ToEntero, ImporteMX:=Total) Then
|
||||
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, True, Total, "", CveConceptoAbono, Obs, Fecha, 0, -1, CveIE, CvePersonal:=DdlNominaPersonal.SelectedValue.ToEntero, ImporteMX:=Total) Then
|
||||
MsgError = "no se pudo insertar el detalle de la póliza 2"
|
||||
End If
|
||||
Else
|
||||
MsgError = "no se pudo insertar el detalle de la póliza"
|
||||
End If
|
||||
|
||||
ObjIE.UpdateIEPrePoliza(Fecha, objAC.Folio.ToString, IDPoliza, CvePrePoliza, CveIE, -1)
|
||||
Else
|
||||
TieneError = True
|
||||
End If
|
||||
|
||||
'Registra el movimiento total
|
||||
If Not objAC.AddMovimiento(IDPoliza, IdCtaBancaria, If(Seleccion = "3", False, True), Total, "", Concepto, 0, Fecha, "") Then TieneError = True
|
||||
|
||||
End If
|
||||
|
||||
|
||||
|
||||
End If
|
||||
|
||||
'Registra el movimiento total
|
||||
Importe = DtDetalle.SUM("Importe")
|
||||
If CtaPuente > 0 AndAlso Not objAC.AddMovimiento(IDPoliza, CtaPuente, True, Importe, "", Concepto, 0, Fecha, "") Then TieneError = True
|
||||
|
||||
'Registra el movimiento de ISPT
|
||||
Importe = TxtISPT.Text.ToDouble
|
||||
If Importe > 0 AndAlso Not objAC.AddMovimiento(IDPoliza, IdCtaISPT, True, Importe, "", Concepto, 0, Fecha, "") Then TieneError = True
|
||||
|
||||
|
||||
'Registro mov. credito al salario
|
||||
Importe = TxtCredSalario.Text.ToDouble
|
||||
If Importe > 0 AndAlso Not objAC.AddMovimiento(IDPoliza, IdCtaCreditoSalario, False, Importe, "", Concepto, 0, Fecha, "") Then TieneError = True
|
||||
|
||||
|
||||
'Registro del Mov Devolución
|
||||
Importe = TxtISPT.Text.ToDouble - TxtCredSalario.Text.ToDouble
|
||||
If Importe <> 0 AndAlso Not objAC.AddMovimiento(IDPoliza, IdCtaDevolucionISPT, If(Importe > 0, False, True), Math.Abs(Importe), "", Concepto, 0, Fecha, "") Then TieneError = True
|
||||
|
||||
|
||||
Else
|
||||
TieneError = True
|
||||
End If
|
||||
|
||||
If Not TieneError Then
|
||||
objAC.AjustaPoliza(IDPoliza)
|
||||
|
||||
objAC.Commit()
|
||||
If ObjIE IsNot Nothing Then ObjIE.Commit()
|
||||
GvD.DataBind()
|
||||
UPPDetalle.Update()
|
||||
DtDetalle.Rows.Clear()
|
||||
LbTotal.Text = "0.00"
|
||||
|
||||
|
||||
Dim Descargas As New StringBuilder
|
||||
If IDPoliza > 0 Then Descargas.AppendFormat("<br /><a class=""Texto"" target='_blank' href=""/Contabilidad/RegPoliza.aspx?IdPoliza={0}""> Ver Poliza</a>", IDPoliza)
|
||||
If CveIE > 0 Then Descargas.AppendFormat("<br /><a class=""Texto"" target='_blank' href=""/Bancos/IE.aspx?CveIE={0}""> Movimiento Bancario</a>", CveIE)
|
||||
|
||||
Dim Msg As String = String.Format("<br />La poliza se registró correctamente.<br /> {0}", Descargas.ToString) 'TipoMensaje.MsgInformacion
|
||||
|
||||
Msg.Alert(Msg, TipoMensaje.MsgInformacion)
|
||||
Else
|
||||
Alert("Error al agregar los Movimientos. Agregar presupuesto del año siguiente (LN 368)." & MensajeError, TipoMensaje.MsgError)
|
||||
objAC.RollBack()
|
||||
If ObjIE IsNot Nothing Then ObjIE.RollBack()
|
||||
End If
|
||||
objAC.Dispose()
|
||||
If ObjIE IsNot Nothing Then ObjIE.Dispose()
|
||||
End Sub
|
||||
End Class
|
||||
89
AC/RegRecaudado.aspx
Normal file
89
AC/RegRecaudado.aspx
Normal file
@@ -0,0 +1,89 @@
|
||||
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RegRecaudado.aspx.vb" Inherits="AC_RegRecaudado" %>
|
||||
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="HB" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="E" runat="Server">
|
||||
Ingreso a Devengar - Recaudar
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
|
||||
<asp:UpdatePanel ID="UPPDatos" UpdateMode="Conditional" runat="server">
|
||||
<ContentTemplate>
|
||||
<table style="width: 100%;" class="table table-striped table-advance table-hover">
|
||||
<tr>
|
||||
<td style="width: 90px">Concepto:</td>
|
||||
<td>
|
||||
<asp:TextBox ID="TxtConcepto" runat="server" Width="300px"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVConcepto" runat="server" ControlToValidate="TxtConcepto" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Concepto''</b> es necesario, por favor seleccione uno." InitialValue="-1" ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCEConcepto" runat="server" HighlightCssClass="vco" TargetControlID="RFVConcepto" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Cliente:</td>
|
||||
<td>
|
||||
<ajax:ListSearchExtender ID="LSECtaContCliente" runat="server" TargetControlID="DdlCliente" PromptCssClass="Titulos" PromptText="Escriba el Nombre o código del cliente" QueryPattern="Contains" PromptPosition="Top" IsSorted="false" QueryTimeout="0"></ajax:ListSearchExtender>
|
||||
<asp:DropDownList ID="DdlCliente" runat="server" AppendDataBoundItems="true" DataTextField="NombreComercial" DataValueField="CveCliente" Width="400px">
|
||||
</asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RFVCliente" runat="server" ControlToValidate="DdlCliente" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cliente''</b> es necesario, por favor seleccione uno." InitialValue="-1" ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCECliente" runat="server" HighlightCssClass="vco" TargetControlID="RFVCliente" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Ingreso:</td>
|
||||
<td>
|
||||
<asp:DropDownList ID="CboPresupuesto" runat="server" AppendDataBoundItems="true" DataTextField="FuenteRecaudacion" DataValueField="CvePresupuestoIngreso" Width="400px">
|
||||
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RFVPresupuesto" runat="server" ControlToValidate="CboPresupuesto" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Ingreso''</b> es necesario, por favor seleccione uno." InitialValue="-1" ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOPresupuesto" runat="server" HighlightCssClass="vco" TargetControlID="RFVPresupuesto" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Fecha:</td>
|
||||
<td>
|
||||
<div class="input-group input-sm input-small date date-picker" data-date-format="dd/mm/yyyy" style="width: 150px !important; padding: 0px;">
|
||||
<asp:TextBox ID="TxtFecha" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="ImgCalendario" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
<ajax:MaskedEditExtender ID="MEEFecha" runat="server" TargetControlID="TxtFecha" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender ID="Calendario" runat="server" TargetControlID="TxtFecha" PopupButtonID="ImgCalendario" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
<asp:RequiredFieldValidator ID="RFVFechaDocumento" runat="server" ControlToValidate="TxtFecha" Display="None" ErrorMessage="El campo <b>''FechaDocumento''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<asp:CompareValidator ID="CVFechaDocumento" runat="server" ControlToValidate="TxtFecha" Display="None" ErrorMessage="El campo <b>''FechaDocumento''</b> no tienes 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="VCOFechaDocumento1" runat="server" HighlightCssClass="vco" TargetControlID="RFVFechaDocumento" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOFechaDocumento2" runat="server" HighlightCssClass="vco" TargetControlID="CVFechaDocumento" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Importe:</td>
|
||||
<td>
|
||||
<asp:TextBox ID="TxtImporte" runat="server" Width="80px"></asp:TextBox>
|
||||
<ajax:FilteredTextBoxExtender ID="ftbe" runat="server" TargetControlID="TxtImporte" FilterType="Custom, Numbers" ValidChars="+-.," />
|
||||
|
||||
Recaudar Automáticamente:<asp:CheckBox CssClass="make-switchsd" ID="ChkRecaudar" runat="server" Text="" AutoPostBack="True" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr id="TrCuentaBancaria" runat="server" visible="False">
|
||||
<td>Cuenta Bancaria:</td>
|
||||
<td>
|
||||
<asp:DropDownList ID="DdlCuenta" runat="server" AppendDataBoundItems="true" DataTextField="NumCuentaMoneda" DataValueField="CveCuenta" Width="400px" ValidationGroup="GrpGuardar"></asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RFVCuenta" runat="server" ControlToValidate="DdlCuenta" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cuenta Bancaria''</b> es necesario, por favor seleccione uno." InitialValue="-1" ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOCuenta" runat="server" HighlightCssClass="vco" TargetControlID="RFVCuenta" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" style="text-align: center;">
|
||||
<asp:Button ID="BtnGuardar" runat="server" Text="Guardar" ValidationGroup="GrpGuardar" class="btn btn-primary" /></td>
|
||||
</tr>
|
||||
</table>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
||||
</asp:Content>
|
||||
226
AC/RegRecaudado.aspx.vb
Normal file
226
AC/RegRecaudado.aspx.vb
Normal file
@@ -0,0 +1,226 @@
|
||||
Imports System.Data
|
||||
Imports Extensiones
|
||||
Partial Class AC_RegRecaudado
|
||||
Inherits ClsPaginas
|
||||
|
||||
#Region "PROPIEDADES"
|
||||
Private Property DtPresupuestos As DataTable
|
||||
Get
|
||||
DtPresupuestos = DirectCast(ViewState("DtPresupuestos"), DataTable)
|
||||
End Get
|
||||
|
||||
Set(ByVal value As DataTable)
|
||||
ViewState("DtPresupuestos") = value
|
||||
End Set
|
||||
End Property
|
||||
#End Region
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||
If Not Page.IsPostBack Then
|
||||
'carga clientes
|
||||
|
||||
DdlCliente.DataSource = GlobalDTCliente(UsuarioActual.CveEmpresa)
|
||||
DdlCliente.DataBind()
|
||||
|
||||
CargaCuenta()
|
||||
CargaPresupuestos()
|
||||
End If
|
||||
End Sub
|
||||
Private Sub CargaCuenta()
|
||||
DdlCuenta.Items.Clear()
|
||||
Dim dt As DataTable = GlobalDTBancosCuentas(UsuarioActual.CveUsuario)
|
||||
'If CveMoneda > 0 Then
|
||||
' dt = dt.FiltraParametros(String.Format("CveMoneda = {0}", CveMoneda))
|
||||
|
||||
'End If
|
||||
DdlCuenta.DataSource = dt
|
||||
DdlCuenta.DataBind()
|
||||
' DdlCuenta.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
End Sub
|
||||
Private Sub CargaPresupuestos()
|
||||
Dim AC As New ClsAC
|
||||
If AC.GetPresupuestoIngresos(-1, UsuarioActual.Empresa.EjercicioActual, True, UsuarioActual.CveEmpresa) Then
|
||||
DtPresupuestos = AC.DtResultados.Copy
|
||||
End If
|
||||
AC.Dispose()
|
||||
CboPresupuesto.DataSource = DtPresupuestos
|
||||
CboPresupuesto.DataBind()
|
||||
End Sub
|
||||
Protected Sub BtnGuardar_Click(sender As Object, e As EventArgs) Handles BtnGuardar.Click
|
||||
If TxtImporte.Text.ToDouble <= 0 Then
|
||||
Alert("El total de la compra debe ser mayor a: 0.00", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
If UsuarioActual.Empresa.UsaAC Then
|
||||
Dim ObjContaAC As ClsContPAQi = Nothing
|
||||
ObjContaAC = New ClsContPAQi(UsuarioActual.Empresa)
|
||||
ObjContaAC.IniciaTransacSQL()
|
||||
Dim TotalRecaudar = Math.Round(TxtImporte.Text.ToDouble, 2)
|
||||
Dim ErrorAC As Boolean = False
|
||||
Dim Fecha As Date = TxtFecha.Text.ToDate
|
||||
Dim ObjIE As New ClsBancos
|
||||
Dim ObjCliente As New ClsClientes(ObjIE.IniciaTransacSQL())
|
||||
Dim ObjMov As New ClsContabilidad(ObjIE.IniciaTransacSQL)
|
||||
Dim Titulo As String = TxtConcepto.Text
|
||||
|
||||
'If ChkRecaudar.Checked Then
|
||||
' Titulo = "Devengado-Recaudado"
|
||||
'End If
|
||||
|
||||
|
||||
'Dim Total As Double = GvAC.Rows.Cast(Of GridViewRow)().Sum(Function(gvr) gvr.FCTextBox("TxtImporte").Text.ToDouble)
|
||||
Dim IDPoliza As Integer = ObjContaAC.AddPoliza(4, Titulo, TotalRecaudar, TotalRecaudar, UsuarioActual.CveUsuario, Fecha)
|
||||
Dim NumPoliza = ObjContaAC.Folio.ToString
|
||||
Dim CvePrePoliza = -1
|
||||
Dim CveIE = -1
|
||||
|
||||
If IDPoliza > 0 Then
|
||||
Dim dr As DataRow = DtPresupuestos.FiltroPrimero(String.Format("CvePresupuestoIngreso = {0}", CboPresupuesto.SelectedValue))
|
||||
|
||||
If dr IsNot Nothing Then
|
||||
'registro movimiento a la cuenta 814
|
||||
If ObjContaAC.AddMovimiento(IDPoliza, dr("IdCuentaPorEjecutar").ToString.ToEntero, True, TotalRecaudar, "", CboPresupuesto.SelectedItem.Text, 0, Fecha, "") Then
|
||||
'registro movimeinto a la cuenta 815
|
||||
If ObjContaAC.AddMovimiento(IDPoliza, dr("IdCuentaDevengado").ToString.ToEntero, False, TotalRecaudar, "", CboPresupuesto.SelectedItem.Text, 0, Fecha, "") Then
|
||||
|
||||
''CUENTA CLIENTE
|
||||
|
||||
Dim CtaCliente, CveCliente As Integer
|
||||
CveCliente = DdlCliente.SelectedValue.ToEntero
|
||||
|
||||
If ObjCliente.GetClientes(CveCliente, "-1", "-1", "-1", "-1", "-1", "-1", -1, UsuarioActual.CveEmpresa, -1) Then
|
||||
CtaCliente = ObjCliente.IdCtaContClientes
|
||||
End If
|
||||
|
||||
|
||||
Dim CuentaAbono As Integer
|
||||
If CtaCliente <= 0 Then
|
||||
|
||||
If ObjContaAC.GetCuentas(-1, "011220000000000000", -1) Then
|
||||
Dim drCuenta As DataRow = ObjContaAC.DtResultados.FiltroPrimero("")
|
||||
If drCuenta IsNot Nothing Then
|
||||
|
||||
CuentaAbono = drCuenta("Id").ToString.ToEntero
|
||||
Dim FolioProveedor = ObjContaAC.GetFolioProveedores("011220000000000000").ToString
|
||||
CtaCliente = ObjContaAC.AddCuenta(String.Format("01122{0}000000000", FolioProveedor.PadLeft(4, "0"c)), DdlCliente.SelectedItem.Text, "A", 2, 0, 1, 0, "", 1, CuentaAbono)
|
||||
ObjCliente.UpdateClienteIdCuenta(CveCliente, CtaCliente)
|
||||
|
||||
Else
|
||||
ErrorAC = True
|
||||
End If
|
||||
Else
|
||||
ErrorAC = True
|
||||
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
'CARGO la deuda del cliente
|
||||
If ObjContaAC.AddMovimiento(IDPoliza, CtaCliente, False, TotalRecaudar, "", CboPresupuesto.SelectedItem.Text, 0, Fecha, "") Then
|
||||
'abono,
|
||||
If Not ObjContaAC.AddMovimiento(IDPoliza, dr("IdCuentaMatriz").ToString.ToEntero, True, TotalRecaudar, "", CboPresupuesto.SelectedItem.Text, 0, Fecha, "") Then
|
||||
ErrorAC = True
|
||||
End If
|
||||
Else
|
||||
ErrorAC = True
|
||||
End If
|
||||
|
||||
If ChkRecaudar.Checked AndAlso Not ErrorAC Then
|
||||
|
||||
Dim Folio As String = ObjIE.GetNextFolio(DdlCuenta.SelectedValue.ToEntero, 2).ToString
|
||||
CvePrePoliza = ObjMov.AddPrePolizas("Vta", 11, TxtImporte.Text.Trim.ToDouble, TxtImporte.Text.Trim.ToDouble, 1, TxtFecha.Text.ToDate, TxtConcepto.Text, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
||||
|
||||
If CvePrePoliza > 0 Then
|
||||
|
||||
CveIE = ObjIE.AddBancos_IE(DdlCuenta.SelectedValue.ToEntero, 2, Fecha, Folio, UsuarioActual.Empresa.Empresa, TxtImporte.Text.Trim.ToDouble, 1, 1, "", "", False, True, IDPoliza, CvePrePoliza, "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
||||
|
||||
Dim IdCtaConCuentaBancaria As Integer = 0
|
||||
|
||||
Dim drcb As DataRow = GlobalDTBancosCuentas(-1, DdlCuenta.SelectedValue.ToEntero).FiltroPrimero("")
|
||||
If drcb IsNot Nothing Then
|
||||
IdCtaConCuentaBancaria = drcb("IdCtaContable").ToString.ToEntero
|
||||
End If
|
||||
|
||||
If CveIE > 0 AndAlso IdCtaConCuentaBancaria > 0 Then
|
||||
|
||||
If ObjContaAC.AddMovimiento(IDPoliza, dr("IdCuentaDevengado").ToString.ToEntero, True, TotalRecaudar, "", CboPresupuesto.SelectedItem.Text, 0, Fecha, "") Then
|
||||
'registro movimeinto a la cuenta 815
|
||||
If ObjContaAC.AddMovimiento(IDPoliza, dr("IdCuentaRecaudado").ToString.ToEntero, False, TotalRecaudar, "", CboPresupuesto.SelectedItem.Text, 0, Fecha, "") Then
|
||||
'registro movimiento a donde se donde
|
||||
If ObjContaAC.AddMovimiento(IDPoliza, CtaCliente, True, TotalRecaudar, "", CboPresupuesto.SelectedItem.Text, 0, Fecha, "") Then
|
||||
'descuento a la cuenta bancaria
|
||||
If Not ObjContaAC.AddMovimiento(IDPoliza, IdCtaConCuentaBancaria, False, TotalRecaudar, "", CboPresupuesto.SelectedItem.Text, 0, Fecha, "") Then
|
||||
ErrorAC = True
|
||||
End If
|
||||
Else
|
||||
ErrorAC = True
|
||||
End If
|
||||
Else
|
||||
ErrorAC = True
|
||||
End If
|
||||
Else
|
||||
ErrorAC = True
|
||||
End If
|
||||
|
||||
'Detalles de PrePoliza
|
||||
If Not ErrorAC Then
|
||||
If ObjMov.AddPrePolizasDetalle(CvePrePoliza, True, TxtImporte.Text.ToDouble, "", 30, "", Fecha, 0, -1, CveIE, CveCliente:=CveCliente) Then
|
||||
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, True, TxtImporte.Text.ToDouble, "", 4, "", Fecha, 0, -1, CveIE, CveCliente:=CveCliente) Then
|
||||
ErrorAC = True
|
||||
End If
|
||||
Else
|
||||
ErrorAC = True
|
||||
End If
|
||||
End If
|
||||
|
||||
Else
|
||||
ErrorAC = True
|
||||
End If
|
||||
|
||||
Else
|
||||
ErrorAC = True
|
||||
End If
|
||||
|
||||
|
||||
End If
|
||||
|
||||
Else
|
||||
ErrorAC = True
|
||||
End If
|
||||
Else
|
||||
ErrorAC = True
|
||||
End If
|
||||
End If
|
||||
Else
|
||||
ErrorAC = True
|
||||
End If
|
||||
|
||||
'Actualiza la CvePrePoliza
|
||||
If Not ErrorAC Then
|
||||
If Not ObjIE.UpdateIEPrePoliza(TxtFecha.Text.ToDate, NumPoliza, IDPoliza, CvePrePoliza, CveIE, -1) Then
|
||||
ErrorAC = True
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
If Not ErrorAC Then
|
||||
ObjContaAC.AjustaPoliza(IDPoliza)
|
||||
ObjContaAC.Commit()
|
||||
ObjIE.Commit()
|
||||
Alert("El Movimiento se realizó correctamente", TipoMensaje.MsgInformacion, "document.location.href=""/AC/RegRecaudado.aspx"";")
|
||||
Else
|
||||
Alert("Ocurrió un error al devengar", TipoMensaje.MsgError)
|
||||
ObjContaAC.RollBack()
|
||||
ObjIE.RollBack()
|
||||
End If
|
||||
ObjContaAC.Dispose()
|
||||
ObjIE.Dispose()
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Protected Sub ChkRecaudar_CheckedChanged(sender As Object, e As EventArgs) Handles ChkRecaudar.CheckedChanged
|
||||
TrCuentaBancaria.Visible = ChkRecaudar.Checked
|
||||
End Sub
|
||||
End Class
|
||||
106
AC/RepAnaliticoDeudaPublica.aspx
Normal file
106
AC/RepAnaliticoDeudaPublica.aspx
Normal file
@@ -0,0 +1,106 @@
|
||||
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RepAnaliticoDeudaPublica.aspx.vb" Inherits="AC_RepAnaliticoDeudaPublica" %>
|
||||
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="H" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="JS" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="CP" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="CSS" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="HB" runat="Server">
|
||||
|
||||
<li>
|
||||
<asp:LinkButton ID="ImgExcel" runat="server"><i class="fa fa-ad-excel"></i> Exporta Excel</asp:LinkButton>
|
||||
</li>
|
||||
<li>
|
||||
<asp:LinkButton ID="BtnImprimir" runat="server"><i class="fa fa-print"></i> Imprimir</asp:LinkButton>
|
||||
</li>
|
||||
|
||||
<%--<img src="/Imagenes/separador02.gif" alt="" />
|
||||
<asp:ImageButton ID="ImgExcel" runat="server" ImageUrl="/Imagenes/IconoExcel.gif" Width="20px" Height="20px" />
|
||||
<img src="/Imagenes/separador02.gif" alt="" />
|
||||
<asp:ImageButton ID="BtnImprimir" runat="server" alt="Imprimir" src="/Imagenes/btnImprimir.gif" Style="cursor: pointer; height: 20px" /> --%>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="E" runat="Server">
|
||||
Reporte Analítico de Deuda Pública
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="C" runat="Server">
|
||||
<asp:UpdatePanel ID="UPFiltros" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="portlet solid grey-cascade portlet-filter">
|
||||
<div class="portlet-title portlet-filterT smalltitle">
|
||||
<div class="tools">
|
||||
<asp:Button ID="BtnConsultar" runat="server" Text="Consultar" CssClass="btn btn-default" Enabled="false"/>
|
||||
</div>
|
||||
<div class="titlefiltros caption ">
|
||||
<div class="row" style="margin-left:5px">
|
||||
<div class="col-md-1 "><span>Fecha Inicio:</span></div>
|
||||
<div class="col-md-2 ">
|
||||
<div class="input-group input-sm input-small date date-picker" data-date-format="dd/mm/yyyy" style="width: 130px !important; padding: 0px;">
|
||||
<asp:TextBox Width="90%" ID="TxtFechaInicio" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="ImgCalendarioDel" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton></span>
|
||||
<ajax:MaskedEditExtender ID="MEEFechaDel" runat="server" TargetControlID="TxtFechaInicio" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender ID="CalendarioInicio" runat="server" TargetControlID="TxtFechaInicio" PopupButtonID="ImgCalendarioDel" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-1 "><span>Fecha Fin:</span></div>
|
||||
<div class="col-md-2 ">
|
||||
<div class="input-group input-sm input-small date date-picker" data-date-format="dd/mm/yyyy" style="width: 130px !important; padding: 0px;">
|
||||
<asp:TextBox Width="90%" ID="TxtFechaFin" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="ImgCalendarioAl" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton></span>
|
||||
<ajax:MaskedEditExtender ID="MEEFechaAl" runat="server" TargetControlID="TxtFechaFin" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender ID="CalendarioFin" runat="server" TargetControlID="TxtFechaFin" PopupButtonID="ImgCalendarioAl" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-1"><span>Divisor:</span></div>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList Width="100%" ID="DdlDivisor" runat="server" Height="28px">
|
||||
<asp:ListItem Text="1">1</asp:ListItem>
|
||||
<asp:ListItem Text="1,000">1000</asp:ListItem>
|
||||
<asp:ListItem Text="1,000,000">1000000</asp:ListItem>
|
||||
</asp:DropDownList></td>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
<br />
|
||||
<br />
|
||||
<asp:UpdatePanel ID="Pnl" runat="server">
|
||||
<ContentTemplate>
|
||||
<asp:GridView ID="Gv" runat="server" CssClass="table table-advance table-hover tablenobottomborder" AutoGenerateColumns="False" GridLines="None" ShowFooter="True">
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderText="Denominación de las deudas">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlEspacio" runat="server"></asp:Literal><asp:Label ID="Lbl" runat="server" Text='<%# Eval("Concepto") %>'></asp:Label>
|
||||
<asp:Literal ID="LtlFin" runat="server"></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="250px" />
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField HeaderText="Moneda de contratación">
|
||||
<ItemStyle Width="100px" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField HeaderText="Institución o País Acreedor">
|
||||
<ItemStyle Width="100px" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField DataField="SaldoInicial" DataFormatString="{0:N2}" HeaderText="Saldo Inicial del Periodo">
|
||||
<ItemStyle Width="100px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField DataField="SaldoFinal" DataFormatString="{0:N2}" HeaderText="Saldo Final del Periodo">
|
||||
<ItemStyle Width="100px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
</Columns>
|
||||
<%-- <HeaderStyle CssClass="Titulos" BorderStyle="Solid" BorderWidth="1px"></HeaderStyle>--%>
|
||||
<%--<RowStyle Height="20px"></RowStyle>--%>
|
||||
</asp:GridView>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
</asp:Content>
|
||||
|
||||
228
AC/RepAnaliticoDeudaPublica.aspx.vb
Normal file
228
AC/RepAnaliticoDeudaPublica.aspx.vb
Normal file
@@ -0,0 +1,228 @@
|
||||
Imports Extensiones
|
||||
Imports Microsoft.Reporting.WebForms
|
||||
Imports System.Data
|
||||
|
||||
Partial Class AC_RepAnaliticoDeudaPublica
|
||||
Inherits ClsPaginas
|
||||
#Region "propiedades"
|
||||
|
||||
Private Property FechaDel As String
|
||||
Get
|
||||
FechaDel = ViewState("FechaDel").ToString
|
||||
End Get
|
||||
Set(value As String)
|
||||
ViewState("FechaDel") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private Property FechaAl As String
|
||||
Get
|
||||
FechaAl = ViewState("FechaAl").ToString
|
||||
End Get
|
||||
Set(value As String)
|
||||
ViewState("FechaAl") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property DtDatos As DataTable
|
||||
Get
|
||||
DtDatos = DirectCast(ViewState("DtDatos"), DataTable)
|
||||
End Get
|
||||
|
||||
Set(ByVal value As DataTable)
|
||||
ViewState("DtDatos") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
#End Region
|
||||
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||
If Not Page.IsPostBack Then
|
||||
If UsuarioActual.Empresa.UsaAC Then
|
||||
|
||||
TxtFechaInicio.Text = String.Format("01/01/{0}", UsuarioActual.Empresa.EjercicioActual)
|
||||
CalendarioInicio.StartDate = TxtFechaInicio.Text.ToDate
|
||||
TxtFechaFin.Text = String.Format("{0}/{1}/{2}", Now.Day, Now.Month, UsuarioActual.Empresa.EjercicioActual)
|
||||
CalendarioFin.EndDate = String.Format("31/12/{0}", UsuarioActual.Empresa.EjercicioActual).ToDate
|
||||
CargaDatos()
|
||||
|
||||
BtnConsultar.Enabled = True
|
||||
Else
|
||||
Alert("La empresa no usa Armonización Contable", TipoMensaje.MsgError)
|
||||
End If
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub CargaDatos()
|
||||
Dim AC As New ClsContPAQi(UsuarioActual.Empresa)
|
||||
|
||||
If AC.GetAnaliticoDeudaPublica(TxtFechaInicio.Text.ToDate, TxtFechaFin.Text.ToDate, DdlDivisor.SelectedValue.ToEntero) Then
|
||||
Gv.DataSource = AC.DtResultados
|
||||
DtDatos = AC.DtResultados
|
||||
End If
|
||||
AC.Dispose()
|
||||
FechaDel = TxtFechaInicio.Text
|
||||
FechaAl = TxtFechaFin.Text
|
||||
' Gv.Caption = String.Format("<table class='Titulos' style='width:100%'><tr><td>Estado Analítico de la Deuda y Otros Pasivos<br/>Del {0} al {1}</td></table>", TxtFechaInicio.Text, TxtFechaFin.Text)
|
||||
|
||||
Gv.DataBind()
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
Protected Sub Gv_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles Gv.RowDataBound
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
|
||||
If e.Row.RowIndex = 0 Then
|
||||
e.Row.FCLiteral("LtlEspacio").Text = "<b>DEUDA PÚBLICA:<br/><br/>Corto Plazo:<br/><br/></b>"
|
||||
e.Row.Cells(3).Style.Add("vertical-align", "bottom")
|
||||
e.Row.Cells(4).Style.Add("vertical-align", "bottom")
|
||||
End If
|
||||
|
||||
If e.Row.DBCampo("Id") = "" Then
|
||||
e.Row.Font.Bold = True
|
||||
Else
|
||||
If e.Row.DBCampo("Id") <> "" Then
|
||||
e.Row.FCLiteral("LtlEspacio").Text = " "
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
|
||||
'subtotales
|
||||
If e.Row.DBCampo("DPublica") = "" AndAlso e.Row.DBCampo("CP") <> "" Then
|
||||
|
||||
e.Row.Font.Italic = True
|
||||
e.Row.FCLabel("Lbl").Text = String.Format("SubTotal {0}", e.Row.FCLabel("Lbl").Text)
|
||||
e.Row.Cells(3).Style.Add("vertical-align", "top")
|
||||
e.Row.Cells(4).Style.Add("vertical-align", "top")
|
||||
If e.Row.DBCampo("CP") = "1" Then
|
||||
e.Row.FCLiteral("LtlFin").Text = "<br/><br/><b>Largo Plazo</b><br/><br/>"
|
||||
End If
|
||||
End If
|
||||
|
||||
If e.Row.DBCampo("Plazo") = "" Then
|
||||
'total general
|
||||
e.Row.Height = Unit.Pixel(25)
|
||||
End If
|
||||
|
||||
If e.Row.DBCampo("Cta").Contiene("02142", "02232") Then
|
||||
e.Row.Height = Unit.Pixel(35)
|
||||
e.Row.FCLiteral("LtlEspacio").Text = "Deuda Bilateral:<br/> "
|
||||
e.Row.Cells(3).Style.Add("vertical-align", "bottom")
|
||||
e.Row.Cells(4).Style.Add("vertical-align", "bottom")
|
||||
End If
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Protected Sub BtnConsultar_Click(sender As Object, e As EventArgs) Handles BtnConsultar.Click
|
||||
CargaDatos()
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
Protected Sub BtnImprimir_Click(sender As Object, e As EventArgs) Handles BtnImprimir.Click
|
||||
If Not IsNothing(DtDatos) Then
|
||||
ImprimirReporte() 'Descarga reporte en PDF
|
||||
Else
|
||||
Alert("No se ha encontrado información para el reporte", TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
'MasterReporteador.Visible = True
|
||||
'DirectCast(Master.FindControl("UpdatePanel1"), UpdatePanel).Update()
|
||||
|
||||
'showreport(reportpath, AC.DtResultados, params, True)
|
||||
|
||||
|
||||
'Using sw As New StringWriter()
|
||||
' Using hw As New HtmlTextWriter(sw)
|
||||
|
||||
' Dim style As StringBuilder = New StringBuilder()
|
||||
' style.Append("<style> ")
|
||||
' style.Append(File.ReadAllText(AppDomain.CurrentDomain.BaseDirectory & "Styles\EstilosExcel.css"))
|
||||
' style.Append(" </style> ")
|
||||
' 'To Export all pages
|
||||
' 'Gv.AllowPaging = False
|
||||
' 'Gv.DataBind()
|
||||
' Tbl.RenderControl(hw)
|
||||
' Dim sr As New StringReader(sw.ToString())
|
||||
' Dim pdfDoc As New Document(PageSize.A2, 10.0F, 10.0F, 10.0F, 0.0F)
|
||||
' Dim htmlparser As New HTMLWorker(pdfDoc)
|
||||
' PdfWriter.GetInstance(pdfDoc, Response.OutputStream)
|
||||
' pdfDoc.Open()
|
||||
' htmlparser.Parse(sr)
|
||||
' pdfDoc.Close()
|
||||
|
||||
' Response.ContentType = "application/pdf"
|
||||
' Response.AddHeader("content-disposition", "attachment;filename=FlujoDeEfectivo.pdf")
|
||||
' Response.Cache.SetCacheability(HttpCacheability.NoCache)
|
||||
' Response.Write(style.ToString)
|
||||
' Response.Write(pdfDoc)
|
||||
' Response.[End]()
|
||||
' End Using
|
||||
'End Using
|
||||
End Sub
|
||||
'No quitar porque no funciona el exporta PDF
|
||||
Public Overrides Sub VerifyRenderingInServerForm(control As Control)
|
||||
' Verifies that the control is rendered
|
||||
End Sub
|
||||
|
||||
'Protected Sub GvDatos_RowCreated(sender As Object, e As GridViewRowEventArgs) Handles Gv.RowCreated
|
||||
' If (e.Row.RowType = DataControlRowType.Header) Then
|
||||
' Dim HeaderGrid As GridView = DirectCast(sender, GridView)
|
||||
' Dim HeaderGridRow As GridViewRow = New GridViewRow(0, 0, DataControlRowType.Header, DataControlRowState.Insert)
|
||||
' Dim HeaderCell As TableCell = New TableCell()
|
||||
' HeaderCell.Text = String.Format("<table class='Titulos' style='width:100%'><tr><td>Estado Analítico de la Deuda y Otros Pasivos<br/>Del {0} al {1}</td></table>", FechaDel, FechaAl)
|
||||
' HeaderCell.ColumnSpan = Gv.Columns.Count
|
||||
' HeaderCell.HorizontalAlign = HorizontalAlign.Center
|
||||
' HeaderGridRow.Cells.Add(HeaderCell)
|
||||
|
||||
|
||||
' Gv.Controls(0).Controls.AddAt(0, HeaderGridRow)
|
||||
' End If
|
||||
|
||||
' If (e.Row.RowType = DataControlRowType.Footer) Then
|
||||
' Dim HeaderGrid As GridView = DirectCast(sender, GridView)
|
||||
' Dim HeaderGridRow As GridViewRow = New GridViewRow(0, 0, DataControlRowType.Footer, DataControlRowState.Insert)
|
||||
' Dim HeaderCell As TableCell = New TableCell()
|
||||
' HeaderCell.Text = "<table><tr> <td colspan='3' style='height:30px;'> <br/><br/><br/><br/></td></tr><tr><td >_________________________________<br/>C.P. Izelda Angulo Peraza</td><td style='width:75px'> </td><td > _________________________________<br/>Lic. Juan Fortino Leon Robinson</td></tr><tr><td>Subdirector de Contabilidad</td><td style='width:75px'> </td><td>Director General</td></table>"
|
||||
' HeaderCell.ColumnSpan = Gv.Columns.Count
|
||||
' HeaderCell.HorizontalAlign = HorizontalAlign.Center
|
||||
' HeaderGridRow.Cells.Add(HeaderCell)
|
||||
|
||||
' e.Row.Cells.Clear()
|
||||
' e.Row.Cells.Add(HeaderCell)
|
||||
|
||||
' End If
|
||||
|
||||
'End Sub
|
||||
|
||||
Protected Sub ImgExcel_Click(sender As Object, e As EventArgs) Handles ImgExcel.Click
|
||||
'Gv.ExportToExcel("Estado analitico" & Now.ToShortDateString)
|
||||
If Not IsNothing(DtDatos) Then
|
||||
ImprimirReporte("Excel") 'Descarga reporte en Excel
|
||||
Else
|
||||
Alert("No se ha encontrado información para el reporte", TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
'MasterReporteador.Visible = True
|
||||
'DirectCast(Master.FindControl("UpdatePanel1"), UpdatePanel).Update()
|
||||
End Sub
|
||||
|
||||
Private Sub ImprimirReporte(Optional Formato As String = "PDF")
|
||||
'ubicacion del rdlc
|
||||
Dim reportpath As String = "AC/Reportes/RepAnaliticoDeudaPublica.rdlc"
|
||||
|
||||
Dim fileName As String = "EdoAnaliticoDeudaPublica"
|
||||
'parametros a enviar al reporte
|
||||
Dim params As New List(Of ReportParameter)
|
||||
|
||||
params.Add(New ReportParameter("pEmp", UsuarioActual.Empresa.Empresa))
|
||||
params.Add(New ReportParameter("pImg", New Uri(Server.MapPath(String.Format("~/Empresas/{0}/Logo.png", UsuarioActual.CveEmpresa))).AbsoluteUri))
|
||||
params.Add(New ReportParameter("pFechaIni", FechaDel))
|
||||
params.Add(New ReportParameter("pFechaFin", FechaAl))
|
||||
params.Add(New ReportParameter("pFirma1", String.Format("ING. Soraida Mesinas Reyes{0} Subdirector de Contabilidad", vbCrLf)))
|
||||
params.Add(New ReportParameter("pFirma2", String.Format("ING. Soraida Mesinas Reyes{0} Director General", vbCrLf)))
|
||||
ImprimirPDF(reportpath, DtDatos, params, fileName, Formato)
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
118
AC/RepCambiosSituacionFinanciera.aspx
Normal file
118
AC/RepCambiosSituacionFinanciera.aspx
Normal file
@@ -0,0 +1,118 @@
|
||||
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RepCambiosSituacionFinanciera.aspx.vb" Inherits="AC_RepCambiosSituacionFinanciera" %>
|
||||
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="HB" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="E" runat="Server">
|
||||
Estado de Cambio de Situación Financiera
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
|
||||
<li>
|
||||
<asp:LinkButton ID="ImgExcel" runat="server"><i class="fa fa-ad-excel"></i> Exporta Excel</asp:LinkButton>
|
||||
</li>
|
||||
<li>
|
||||
<asp:LinkButton ID="BtnImprimir" runat="server"><i class="fa fa-print"></i> Imprimir</asp:LinkButton>
|
||||
</li>
|
||||
|
||||
<%--<img src="/Imagenes/separador02.gif" alt="" />
|
||||
<asp:ImageButton ID="ImgExcel" runat="server" ImageUrl="/Imagenes/IconoExcel.gif" Width="20px" Height="20px" />
|
||||
<img src="/Imagenes/separador02.gif" alt="" />
|
||||
<asp:ImageButton ID="BtnImprimir" runat="server" alt="Imprimir" src="/Imagenes/btnImprimir.gif" Style="cursor: pointer; height: 20px" /> --%>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
|
||||
|
||||
<asp:UpdatePanel ID="UPFiltros" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="portlet solid grey-cascade portlet-filter">
|
||||
<div class="portlet-title portlet-filterT smalltitle">
|
||||
<div class="tools">
|
||||
<asp:Button ID="BtnConsultar" runat="server" Text="Consultar" CssClass="btn btn-default" Enabled="false" />
|
||||
</div>
|
||||
<div class="titlefiltros caption ">
|
||||
<div class="row">
|
||||
<%-- <td width="90px">Fecha Inicio:</td>
|
||||
<td width="120px">
|
||||
<asp:TextBox ID="TxtFechaDel" Text="" runat="server" TabIndex="1" Width="70px"></asp:TextBox>
|
||||
<asp:ImageButton runat="server" ID="ImgCalendarioDel" ImageUrl="/Imagenes/calendar.png" ImageAlign="AbsMiddle" Width="16px" Height="16px" AlternateText="Click para ver el Calendario" />
|
||||
<ajax:MaskedEditExtender ID="MEEFechaDel" runat="server" TargetControlID="TxtFechaDel" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender ID="CalendarioDel" runat="server" TargetControlID="TxtFechaDel" PopupButtonID="ImgCalendarioDel" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
</td>
|
||||
<td width="80px">Fecha Fin:</td>
|
||||
<td width="120px">
|
||||
<asp:TextBox ID="TxtFechaAl" Text="" runat="server" TabIndex="2" Width="70px"></asp:TextBox>
|
||||
<asp:ImageButton runat="server" ID="ImgCalendarioAl" ImageUrl="/Imagenes/calendar.png" ImageAlign="AbsMiddle" Width="16px" Height="16px" AlternateText="Click para ver el Calendario" />
|
||||
<ajax:MaskedEditExtender ID="MEEFechaAl" runat="server" TargetControlID="TxtFechaAl" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender ID="CalendarioAl" runat="server" TargetControlID="TxtFechaAl" PopupButtonID="ImgCalendarioAl" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
</td>--%>
|
||||
<div class="col-md-1" style="text-align: right; font-size: 14px;"><span>Ejercicio:</span></div>
|
||||
<div class="col-md-2 text-size-12">
|
||||
<asp:DropDownList Font-Size="14px" runat="server" ID="DdlEjercicio" Width="100%">
|
||||
<asp:ListItem Text="2015" Value="2015" Selected="True" />
|
||||
<asp:ListItem Text="2014" Value="2014" />
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
<div class="col-md-1 " style="text-align: right; font-size: 14px;"><span>Divisor:</span></div>
|
||||
<div class="col-md-2 ">
|
||||
<asp:DropDownList Font-Size="14px" runat="server" ID="DdlUnidad" Width="100%">
|
||||
<asp:ListItem Text="1" Value="1" Selected="True" />
|
||||
<asp:ListItem Text="1,000" Value="1000" />
|
||||
<asp:ListItem Text="1,000,000" Value="1000000" />
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
<br />
|
||||
<br />
|
||||
|
||||
<%--PARA REPORTE--%>
|
||||
<rvweb:ReportViewer ID="rvReporteador" Visible="false" runat="server" Width="100%" Height="600"></rvweb:ReportViewer>
|
||||
|
||||
<asp:UpdatePanel ID="UpDatos" UpdateMode="Conditional" runat="server">
|
||||
<ContentTemplate>
|
||||
|
||||
<asp:GridView ID="GvDatos" runat="server" CssClass="table table-advance table-hover tablenobottomborder" AutoGenerateColumns="False" GridLines="None" DataKeyNames="" OnRowDataBound="GvDatos_RowDataBound" ShowFooter="True">
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderText="">
|
||||
<ItemTemplate>
|
||||
<div id="Concepto" runat="server">
|
||||
<asp:Literal ID="LtNombre" Text='<%# Eval("Nombre", "{0:N2}")%>' runat="server" />
|
||||
</div>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="500px" HorizontalAlign="Left" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Origen">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LbActual" Text='<%# If(Eval("TipoSaldo").ToString = "1", Eval("Saldo", "{0:N2}"), "0") %>' runat="server" />
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="100px" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Aplicación">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LbAnterior" Text='<%# If(Eval("TipoSaldo").ToString = "2", Eval("Saldo", "{0:N2}"), "0") %>' runat="server" />
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="100px" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
|
||||
|
||||
<%-- <asp:BoundField DataField="Nombre" HeaderText="Cuenta" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="300px"/>
|
||||
<asp:BoundField DataField="ImporteActual" DataFormatString="{0:N2}" HeaderText="ImporteActual" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="150px"/>
|
||||
<asp:BoundField DataField="ImporteAnterior" DataFormatString="{0:N2}" HeaderText="ImporteAnterior" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="150px"/>--%>
|
||||
</Columns>
|
||||
<%--<AlternatingRowStyle CssClass="TextoAlterno" />--%>
|
||||
</asp:GridView>
|
||||
<br />
|
||||
<br />
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
||||
</asp:Content>
|
||||
263
AC/RepCambiosSituacionFinanciera.aspx.vb
Normal file
263
AC/RepCambiosSituacionFinanciera.aspx.vb
Normal file
@@ -0,0 +1,263 @@
|
||||
Option Explicit On
|
||||
Option Strict On
|
||||
|
||||
Imports System.Data
|
||||
Imports Extensiones
|
||||
Imports System.IO
|
||||
Imports Microsoft.Reporting.WebForms
|
||||
Imports iTextSharp.text
|
||||
Imports iTextSharp.text.html.simpleparser
|
||||
Imports iTextSharp.text.pdf
|
||||
|
||||
Partial Class AC_RepCambiosSituacionFinanciera
|
||||
Inherits ClsPaginas
|
||||
|
||||
#Region "PROPIEDADES"
|
||||
Private Property DtDatos As DataTable
|
||||
Get
|
||||
DtDatos = DirectCast(ViewState("DtDatos"), DataTable)
|
||||
End Get
|
||||
|
||||
Set(ByVal value As DataTable)
|
||||
ViewState("DtDatos") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property TotalActivoActual As Double
|
||||
Get
|
||||
TotalActivoActual = ViewState("TotalActivoActual").ToString.ToDouble
|
||||
End Get
|
||||
Set(value As Double)
|
||||
ViewState("TotalActivoActual") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property TotalActivoAnterior As Double
|
||||
Get
|
||||
TotalActivoAnterior = ViewState("TotalActivoAnterior").ToString.ToDouble
|
||||
End Get
|
||||
Set(value As Double)
|
||||
ViewState("TotalActivoAnterior") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property TotalPasivoActual As Double
|
||||
Get
|
||||
TotalPasivoActual = ViewState("TotalPasivoActual").ToString.ToDouble
|
||||
End Get
|
||||
Set(value As Double)
|
||||
ViewState("TotalPasivoActual") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property TotalPasivoAnterior As Double
|
||||
Get
|
||||
TotalPasivoAnterior = ViewState("TotalPasivoAnterior").ToString.ToDouble
|
||||
End Get
|
||||
Set(value As Double)
|
||||
ViewState("TotalPasivoAnterior") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property TotalPatrimonioActual As Double
|
||||
Get
|
||||
TotalPatrimonioActual = ViewState("TotalPatrimonioActual").ToString.ToDouble
|
||||
End Get
|
||||
Set(value As Double)
|
||||
ViewState("TotalPatrimonioActual") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property TotalPatrimonioAnterior As Double
|
||||
Get
|
||||
TotalPatrimonioAnterior = ViewState("TotalPatrimonioAnterior").ToString.ToDouble
|
||||
End Get
|
||||
Set(value As Double)
|
||||
ViewState("TotalPatrimonioAnterior") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property TotalPasivoPatrimonioActual As Double
|
||||
Get
|
||||
TotalPasivoPatrimonioActual = ViewState("TotalPasivoPatrimonioActual").ToString.ToDouble
|
||||
End Get
|
||||
Set(value As Double)
|
||||
ViewState("TotalPasivoPatrimonioActual") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property TotalPasivoPatrimonioAnterior As Double
|
||||
Get
|
||||
TotalPasivoPatrimonioAnterior = ViewState("TotalPasivoPatrimonioAnterior").ToString.ToDouble
|
||||
End Get
|
||||
Set(value As Double)
|
||||
ViewState("TotalPasivoPatrimonioAnterior") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private Property FechaInicioActual As Date
|
||||
Get
|
||||
FechaInicioActual = ViewState("FechaInicioActual").ToString.ToDate
|
||||
End Get
|
||||
Set(value As Date)
|
||||
ViewState("FechaInicioActual") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property FechaFinActual As Date
|
||||
Get
|
||||
FechaFinActual = ViewState("FechaFinActual").ToString.ToDate
|
||||
End Get
|
||||
Set(value As Date)
|
||||
ViewState("FechaFinActual") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property FechaInicioAnterior As Date
|
||||
Get
|
||||
FechaInicioAnterior = ViewState("FechaInicioAnterior").ToString.ToDate
|
||||
End Get
|
||||
Set(value As Date)
|
||||
ViewState("FechaInicioAnterior") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property FechaFinAnterior As Date
|
||||
Get
|
||||
FechaFinAnterior = ViewState("FechaFinAnterior").ToString.ToDate
|
||||
End Get
|
||||
Set(value As Date)
|
||||
ViewState("FechaFinAnterior") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
#End Region
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||
If Not Page.IsPostBack Then
|
||||
If UsuarioActual.Empresa.UsaAC Then
|
||||
|
||||
'TxtFechaDel.Text = DateSerial(Year(Now), Month(Now), 1).ToShortDateString
|
||||
'TxtFechaAl.Text = Date.Now.ToShortDateString
|
||||
|
||||
CargaDatos()
|
||||
|
||||
BtnConsultar.Enabled = True
|
||||
Else
|
||||
Alert("La empresa no usa Armonización Contable", TipoMensaje.MsgError)
|
||||
End If
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
#Region "CARGA DATOS Y GRID"
|
||||
Private Sub CargaDatos()
|
||||
Dim ObjConta As New ClsContPAQi(UsuarioActual.Empresa)
|
||||
|
||||
Dim FechaInicio = String.Format("01/01/{0}", DdlEjercicio.SelectedValue).ToDate
|
||||
Dim FechaFin = String.Format("31/12/{0}", DdlEjercicio.SelectedValue).ToDate
|
||||
|
||||
|
||||
If ObjConta.GetCambioSituacionFinanciera(FechaInicio, FechaFin, DdlUnidad.SelectedValue.ToEntero) Then
|
||||
DtDatos = ObjConta.DtResultados
|
||||
Else
|
||||
DtDatos = Nothing
|
||||
Alert("Ocurrio un error al cargar los datos del Estado de Cambio de Situación Financiera.", TipoMensaje.MsgError)
|
||||
End If
|
||||
|
||||
ObjConta.Dispose()
|
||||
|
||||
|
||||
CargaGrid()
|
||||
|
||||
End Sub
|
||||
Private Sub CargaGrid()
|
||||
GvDatos.DataSource = DtDatos
|
||||
GvDatos.DataBind()
|
||||
UpDatos.Update()
|
||||
' GvDatos.Caption = String.Format("<div class='Titulos' style='width:100%; height:45px;'>{0}<br/>Estado de Cambios en la Situación Financiera<br/>Al {1}</div>", UsuarioActual.Empresa.Empresa, DdlEjercicio.SelectedValue)
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
Protected Sub BtnConsultar_Click(sender As Object, e As EventArgs)
|
||||
CargaDatos()
|
||||
End Sub
|
||||
|
||||
|
||||
Protected Sub GvDatos_RowDataBound(sender As Object, e As GridViewRowEventArgs)
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
|
||||
If e.Row.DBCampo("Level") = "1" Then
|
||||
CType(e.Row.FindControl("Concepto"), HtmlControl).Attributes.Add("style", "font-weight: bold;")
|
||||
e.Row.FCLiteral("LtNombre").Text = String.Format("<br/><br/>{0}", e.Row.DBCampo("Nombre"))
|
||||
End If
|
||||
|
||||
If e.Row.DBCampo("Level") = "2" Then
|
||||
CType(e.Row.FindControl("Concepto"), HtmlControl).Attributes.Add("style", "font-weight: bold;")
|
||||
e.Row.FCLiteral("LtNombre").Text = String.Format("<br/>{0}{0}{0}{1}", " ", e.Row.DBCampo("Nombre"))
|
||||
End If
|
||||
|
||||
If e.Row.DBCampo("Level") = "1" Or e.Row.DBCampo("Level") = "2" Then
|
||||
e.Row.FCLabel("LbActual").Font.Bold = True
|
||||
e.Row.FCLabel("LbAnterior").Font.Bold = True
|
||||
|
||||
End If
|
||||
|
||||
If e.Row.DBCampo("Level") = "3" Then
|
||||
'CType(e.Row.FindControl("Concepto"), HtmlControl).Attributes.Add("style", "margin-left:60px;")
|
||||
e.Row.FCLiteral("LtNombre").Text = String.Format("{0}{0}{0}{0}{0}{0}{0}{0}{1}", " ", e.Row.DBCampo("Nombre"))
|
||||
End If
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Protected Sub BtnImprimir_Click(sender As Object, e As EventArgs) Handles BtnImprimir.Click
|
||||
If Not IsNothing(DtDatos) Then
|
||||
ImprimirReporte()
|
||||
Else
|
||||
Alert("No se ha encontrado información para el reporte", TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
End Sub
|
||||
'No quitar porque no funciona el exporta PDF
|
||||
Public Overrides Sub VerifyRenderingInServerForm(control As Control)
|
||||
' Verifies that the control is rendered
|
||||
End Sub
|
||||
|
||||
'Protected Sub GvDatos_RowCreated(sender As Object, e As GridViewRowEventArgs) Handles GvDatos.RowCreated
|
||||
' If (e.Row.RowType = DataControlRowType.Header) Then
|
||||
' Dim HeaderGrid As GridView = DirectCast(sender, GridView)
|
||||
' Dim HeaderGridRow As GridViewRow = New GridViewRow(0, 0, DataControlRowType.Header, DataControlRowState.Insert)
|
||||
' Dim HeaderCell As TableCell = New TableCell()
|
||||
' HeaderCell.Text = String.Format("<div class='Titulos' style='width:100%; height:45px;'>{0}<br/>Estado de Cambios en la Situación Financiera<br/>Al {1}</div>", UsuarioActual.Empresa.Empresa, DdlEjercicio.SelectedValue)
|
||||
' HeaderCell.ColumnSpan = GvDatos.Columns.Count
|
||||
' HeaderCell.HorizontalAlign = HorizontalAlign.Center
|
||||
' HeaderGridRow.Cells.Add(HeaderCell)
|
||||
|
||||
|
||||
' GvDatos.Controls(0).Controls.AddAt(0, HeaderGridRow)
|
||||
' End If
|
||||
|
||||
' If (e.Row.RowType = DataControlRowType.Footer) Then
|
||||
' Dim HeaderGrid As GridView = DirectCast(sender, GridView)
|
||||
' Dim HeaderGridRow As GridViewRow = New GridViewRow(0, 0, DataControlRowType.Footer, DataControlRowState.Insert)
|
||||
' Dim HeaderCell As TableCell = New TableCell()
|
||||
' HeaderCell.Text = "<table><tr> <td colspan='3' style='height:30px;'> <br/><br/><br/><br/></td></tr><tr><td >_________________________________<br/>C.P. Izelda Angulo Peraza</td><td style='width:75px'> </td><td > _________________________________<br/>Lic. Juan Fortino Leon Robinson</td></tr><tr><td>Subdirector de Contabilidad</td><td style='width:75px'> </td><td>Director General</td></table>"
|
||||
' HeaderCell.ColumnSpan = GvDatos.Columns.Count
|
||||
' HeaderCell.HorizontalAlign = HorizontalAlign.Center
|
||||
' HeaderGridRow.Cells.Add(HeaderCell)
|
||||
|
||||
' e.Row.Cells.Clear()
|
||||
' e.Row.Cells.Add(HeaderCell)
|
||||
|
||||
' End If
|
||||
|
||||
'End Sub
|
||||
|
||||
Protected Sub ImgExcel_Click(sender As Object, e As EventArgs) Handles ImgExcel.Click
|
||||
If Not IsNothing(DtDatos) Then
|
||||
ImprimirReporte("Excel")
|
||||
Else
|
||||
Alert("No se ha encontrado información para el reporte", TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub ImprimirReporte(Optional Formato As String = "PDF")
|
||||
Dim params As New List(Of ReportParameter)
|
||||
params.Add(New ReportParameter("pEmp", UsuarioActual.Empresa.Empresa))
|
||||
params.Add(New ReportParameter("pImg", New Uri(Server.MapPath(String.Format("~/Empresas/{0}/Logo.png", UsuarioActual.CveEmpresa))).AbsoluteUri))
|
||||
params.Add(New ReportParameter("pEjercicio", DdlEjercicio.SelectedValue.ToString))
|
||||
params.Add(New ReportParameter("pFirma1", String.Format("Lic. Damian A. Benitez Alcantar{0} Director Administrativo", vbCrLf)))
|
||||
params.Add(New ReportParameter("pFirma2", String.Format("ING. Soraida Mesinas Reyes{0} Director General", vbCrLf)))
|
||||
ImprimirPDF("AC/Reportes/RepCambiosSituacionFinanciera.rdlc", DtDatos, params, "EdoCambiosSituacionFinanciera", Formato)
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
331
AC/RepEstadoActividades.aspx
Normal file
331
AC/RepEstadoActividades.aspx
Normal file
@@ -0,0 +1,331 @@
|
||||
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RepEstadoActividades.aspx.vb" Inherits="AC_RepEstadoActividades" %>
|
||||
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="HB" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="E" runat="Server">
|
||||
<asp:Literal ID="LtTitulo" Text="Estado de Actividades" runat="server" />
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
|
||||
<li>
|
||||
<asp:LinkButton ID="ImgExcel" runat="server"><i class="fa fa-ad-excel"></i> Exporta Excel</asp:LinkButton>
|
||||
<%--<img src="/Imagenes/separador02.gif" alt="" />
|
||||
<asp:ImageButton ID="ImgExcel" runat="server" ImageUrl="/Imagenes/IconoExcel.gif" Width="20px" Height="20px" /> --%>
|
||||
</li>
|
||||
<li>
|
||||
<asp:LinkButton ID="Imprimir" runat="server"><i class="fa fa-print"></i> Imprimir</asp:LinkButton>
|
||||
<%-- <img src="/Imagenes/separador02.gif" alt="" />
|
||||
<asp:ImageButton ID="Imprimir" runat="server" alt="Imprimir" src="/Imagenes/btnImprimir.gif" Style="cursor: pointer; height: 20px;" /> --%>
|
||||
</li>
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
|
||||
|
||||
<%--<asp:UpdatePanel runat="server" ID="UpFiltros" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="portlet solid grey-cascade portlet-filter" style="">
|
||||
<div class="portlet-title portlet-filterT" style="">
|
||||
<div class="titlefiltros caption ">
|
||||
<ul class="list-inline">
|
||||
<<li>FechaInicio:
|
||||
<asp:TextBox ID="TxtFechaInicio" runat="server" Width="70px"></asp:TextBox>
|
||||
<asp:ImageButton runat="server" ID="imgFechaInicio" ImageUrl="/Imagenes/calendar.png" ImageAlign="AbsMiddle" Width="16px" Height="16px" AlternateText="Click para ver el Calendario" />
|
||||
<ajax:MaskedEditExtender ID="MEEFechaInicio" runat="server" TargetControlID="TxtFechaInicio" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender runat="server" ID="CalendarExtender1" TargetControlID="TxtFechaInicio" PopupButtonID="ImgFechaInicio" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
<asp:RequiredFieldValidator ID="RFVFechaInicio" runat="server" ControlToValidate="TxtFechaInicio" InitialValue="__/__/____" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha Corte''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCEFechaInicio" runat="server" HighlightCssClass="vco" TargetControlID="RFVFechaInicio" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</li>
|
||||
<li>FechaFin:
|
||||
<asp:TextBox ID="TxtFechaFin" runat="server" Width="70px"></asp:TextBox>
|
||||
<asp:ImageButton runat="server" ID="imgFechaFin" ImageUrl="/Imagenes/calendar.png" ImageAlign="AbsMiddle" Width="16px" Height="16px" AlternateText="Click para ver el Calendario" />
|
||||
<ajax:MaskedEditExtender ID="MEEFechaFin" runat="server" TargetControlID="TxtFechaFin" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender runat="server" ID="Calendario" TargetControlID="TxtFechaFin" PopupButtonID="ImgFechaFin" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
<asp:RequiredFieldValidator ID="RFVFechaFin" runat="server" ControlToValidate="TxtFechaFin" InitialValue="__/__/____" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha Corte''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCEFechaFin" runat="server" HighlightCssClass="vco" TargetControlID="RFVFechaFin" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</li>
|
||||
<li>Ejercicio:
|
||||
<asp:DropDownList ID="DdlEjercicio" runat="server" Width="100px">
|
||||
<asp:ListItem Text="2014" Value="2014"></asp:ListItem>
|
||||
<asp:ListItem Text="2015" Value="2015"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</li>
|
||||
<li>Periodo:
|
||||
<asp:DropDownList ID="DdlPeriodo" runat="server" Width="100px">
|
||||
<asp:ListItem Text="Enero" Value="1"></asp:ListItem>
|
||||
<asp:ListItem Text="Febrero" Value="2"></asp:ListItem>
|
||||
<asp:ListItem Text="Marzo" Value="3"></asp:ListItem>
|
||||
<asp:ListItem Text="Abril" Value="4"></asp:ListItem>
|
||||
<asp:ListItem Text="Mayo" Value="5"></asp:ListItem>
|
||||
<asp:ListItem Text="Junio" Value="6"></asp:ListItem>
|
||||
<asp:ListItem Text="Julio" Value="7"></asp:ListItem>
|
||||
<asp:ListItem Text="Agosto" Value="8"></asp:ListItem>
|
||||
<asp:ListItem Text="Septiembre" Value="9"></asp:ListItem>
|
||||
<asp:ListItem Text="Octubre" Value="10"></asp:ListItem>
|
||||
<asp:ListItem Text="Noviembre" Value="11"></asp:ListItem>
|
||||
<asp:ListItem Text="Diciembre" Value="12"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</li>
|
||||
<li>Firma:
|
||||
<asp:CheckBox ID="ChkFirma" runat="server" />
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="tools">
|
||||
<asp:UpdatePanel runat="server">
|
||||
<ContentTemplate>
|
||||
<asp:Button ID="BtnConsultar" runat="server" Text="Filtrar" class="btn btn-primary" OnClick="BtnConsultar_Click" />
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>--%>
|
||||
|
||||
<asp:UpdatePanel runat="server" ID="UpFiltros" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="portlet solid grey-cascade portlet-filter">
|
||||
<div class="portlet-title portlet-filterT smalltitle">
|
||||
<div class="tools">
|
||||
<asp:Button ID="BtnConsultar" Text="Consultar" CssClass="btn btn-primary" runat="server" OnClick="BtnConsultar_Click" />
|
||||
</div>
|
||||
<div class="titlefiltros caption ">
|
||||
<div class="row">
|
||||
|
||||
|
||||
<%-- <label class="col-md-1" style="width: 70px;margin-left:10px;">Ejercicio:</label>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="DdlEjercicio" runat="server" CssClass="select2me" DataTextField="Ejercicio" DataValueField="Ejercicio" Width="100px">
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
<label class="col-md-1" style="width: 70px;">Periodo:</label>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="DdlPeriodo" runat="server" Width="150px" CssClass="select2me">
|
||||
<asp:ListItem Text="Enero" Value="1"></asp:ListItem>
|
||||
<asp:ListItem Text="Febrero" Value="2"></asp:ListItem>
|
||||
<asp:ListItem Text="Marzo" Value="3"></asp:ListItem>
|
||||
<asp:ListItem Text="Abril" Value="4"></asp:ListItem>
|
||||
<asp:ListItem Text="Mayo" Value="5"></asp:ListItem>
|
||||
<asp:ListItem Text="Junio" Value="6"></asp:ListItem>
|
||||
<asp:ListItem Text="Julio" Value="7"></asp:ListItem>
|
||||
<asp:ListItem Text="Agosto" Value="8"></asp:ListItem>
|
||||
<asp:ListItem Text="Septiembre" Value="9"></asp:ListItem>
|
||||
<asp:ListItem Text="Octubre" Value="10"></asp:ListItem>
|
||||
<asp:ListItem Text="Noviembre" Value="11"></asp:ListItem>
|
||||
<asp:ListItem Text="Diciembre" Value="12"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
<label class="col-md-1" runat="server" id="liTipoReporte" visible="false" style="width: 70px;">Tipo:</label>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="DdlTipoReporte" runat="server" Width="160px" Height="28px" Visible="false">
|
||||
<asp:ListItem Text="Contable" Value="1"></asp:ListItem>
|
||||
<asp:ListItem Text="Contable y Complementario" Value="3"></asp:ListItem>
|
||||
<asp:ListItem Text="Complementario" Value="2"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
<label class="col-md-1" style="width: 70px;">Firma:</label>
|
||||
<div class="col-md-2">
|
||||
<asp:CheckBox CssClass="make-switchsd" ID="ChkFirma" data-size="small" runat="server"/>
|
||||
</div>--%>
|
||||
|
||||
|
||||
|
||||
<table style="margin-left:20px">
|
||||
<tr>
|
||||
<td>Ejercicio:</td>
|
||||
<td>
|
||||
<asp:DropDownList ID="DdlEjercicio" runat="server" CssClass="select2me" DataTextField="Ejercicio" DataValueField="Ejercicio" Width="100px">
|
||||
</asp:DropDownList>
|
||||
</td>
|
||||
<td>Periodo:</td>
|
||||
<td>
|
||||
<asp:DropDownList ID="DdlPeriodo" runat="server" Width="100px" Height="28px">
|
||||
<asp:ListItem Text="Enero" Value="1"></asp:ListItem>
|
||||
<asp:ListItem Text="Febrero" Value="2"></asp:ListItem>
|
||||
<asp:ListItem Text="Marzo" Value="3"></asp:ListItem>
|
||||
<asp:ListItem Text="Abril" Value="4"></asp:ListItem>
|
||||
<asp:ListItem Text="Mayo" Value="5"></asp:ListItem>
|
||||
<asp:ListItem Text="Junio" Value="6"></asp:ListItem>
|
||||
<asp:ListItem Text="Julio" Value="7"></asp:ListItem>
|
||||
<asp:ListItem Text="Agosto" Value="8"></asp:ListItem>
|
||||
<asp:ListItem Text="Septiembre" Value="9"></asp:ListItem>
|
||||
<asp:ListItem Text="Octubre" Value="10"></asp:ListItem>
|
||||
<asp:ListItem Text="Noviembre" Value="11"></asp:ListItem>
|
||||
<asp:ListItem Text="Diciembre" Value="12"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</td>
|
||||
<td runat="server" id="liTipoReporte" visible="false">Tipo:</td>
|
||||
<td>
|
||||
<asp:DropDownList ID="DdlTipoReporte" runat="server" Width="160px" Height="28px" Visible="false">
|
||||
<asp:ListItem Text="Contable" Value="1"></asp:ListItem>
|
||||
<asp:ListItem Text="Contable y Complementario" Value="3"></asp:ListItem>
|
||||
<asp:ListItem Text="Complementario" Value="2"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</td>
|
||||
<%--<tr>--%>
|
||||
<td>Firma:</td>
|
||||
<td>
|
||||
<asp:CheckBox CssClass="make-switchsd" ID="ChkFirma" data-size="small" runat="server"/>
|
||||
</td>
|
||||
<%--</tr>--%>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
<%-- <ul class="list-inline text-size-12" style="margin-left:10px">
|
||||
<li>Ejercicio:
|
||||
</li>
|
||||
<li>
|
||||
<asp:DropDownList ID="DdlEjercicio" runat="server" CssClass="select2me" DataTextField="Ejercicio" DataValueField="Ejercicio" Width="100px">
|
||||
</asp:DropDownList>
|
||||
</li>
|
||||
<li>Periodo:
|
||||
</li>
|
||||
<li>
|
||||
<asp:DropDownList ID="DdlPeriodo" runat="server" Width="150px" CssClass="select2me">
|
||||
<asp:ListItem Text="Enero" Value="1"></asp:ListItem>
|
||||
<asp:ListItem Text="Febrero" Value="2"></asp:ListItem>
|
||||
<asp:ListItem Text="Marzo" Value="3"></asp:ListItem>
|
||||
<asp:ListItem Text="Abril" Value="4"></asp:ListItem>
|
||||
<asp:ListItem Text="Mayo" Value="5"></asp:ListItem>
|
||||
<asp:ListItem Text="Junio" Value="6"></asp:ListItem>
|
||||
<asp:ListItem Text="Julio" Value="7"></asp:ListItem>
|
||||
<asp:ListItem Text="Agosto" Value="8"></asp:ListItem>
|
||||
<asp:ListItem Text="Septiembre" Value="9"></asp:ListItem>
|
||||
<asp:ListItem Text="Octubre" Value="10"></asp:ListItem>
|
||||
<asp:ListItem Text="Noviembre" Value="11"></asp:ListItem>
|
||||
<asp:ListItem Text="Diciembre" Value="12"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</li>
|
||||
<li runat="server" id="liTipoReporte" visible="false">Tipo:
|
||||
</li>
|
||||
<li>
|
||||
<asp:DropDownList ID="DdlTipoReporte" runat="server" Width="160px" Height="28px" Visible="false">
|
||||
<asp:ListItem Text="Contable" Value="1"></asp:ListItem>
|
||||
<asp:ListItem Text="Contable y Complementario" Value="3"></asp:ListItem>
|
||||
<asp:ListItem Text="Complementario" Value="2"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</li>
|
||||
<li>Firma:
|
||||
</li>
|
||||
<li>
|
||||
<asp:CheckBox CssClass="make-switchsd" ID="ChkFirma" data-size="small" runat="server"/>
|
||||
</li>
|
||||
</ul>--%>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
<br />
|
||||
<br />
|
||||
|
||||
<table style="width: 100%;" class="table table-striped table-advance table-hover">
|
||||
<tr>
|
||||
<td width="100%" padding="0">
|
||||
<asp:UpdatePanel ID="UpDatos" UpdateMode="Conditional" runat="server">
|
||||
<ContentTemplate>
|
||||
<asp:GridView ID="GvIngresos" runat="server" AutoGenerateColumns="False" DataKeyNames="" OnRowDataBound="GvIngresos_RowDataBound" ShowHeaderWhenEmpty="true" CssClass="table table-striped table-hover Widthall" Style="margin-top: -10px; text-align: center;" GridLines="None">
|
||||
<Columns>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LbNombre" runat="server" Text='<%# Eval("Nombre")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Left" />
|
||||
<HeaderTemplate>
|
||||
<asp:Label ID="LbTitulo" runat="server" Style="padding-left: 20px;" Font-Size="14px" Text="INGRESOS Y OTROS BENEFICIOS"></asp:Label>
|
||||
</HeaderTemplate>
|
||||
<HeaderStyle HorizontalAlign="Left" Width="400px" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Periodo Actual">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLActual" runat="server" Text='<%# Eval("ImporteActual", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
<%--<asp:Label ID="LbActual" runat="server" Text='<%# Eval("ImporteActual", "{0:N2}")%>'></asp:Label>--%>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="150px" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField HeaderText="%" DataField="PorcentajeActual" DataFormatString="{0:N2}" ItemStyle-Width="100px" />
|
||||
<asp:TemplateField HeaderText="Periodo Acumulado">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLAnterior" runat="server" Text='<%# Eval("ImporteAcumulado", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
<%--<asp:Label ID="LbAnterior" runat="server" Text='<%# Eval("ImporteAnterior", "{0:N2}")%>'></asp:Label>--%>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="150px" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField HeaderText="%" DataField="PorcentajeAcumulado" DataFormatString="{0:N2}" ItemStyle-Width="100px" />
|
||||
</Columns>
|
||||
<%--<HeaderStyle CssClass="TitulosChico"></HeaderStyle>
|
||||
<RowStyle CssClass="Texto" />
|
||||
<AlternatingRowStyle CssClass="TextoAlterno" />--%>
|
||||
</asp:GridView>
|
||||
<br />
|
||||
<br />
|
||||
<asp:GridView ID="GvGastos" runat="server" AutoGenerateColumns="False" DataKeyNames="" OnRowDataBound="GvGastos_RowDataBound" ShowHeaderWhenEmpty="true" CssClass="table table-striped table-hover Widthall" Style="margin-top: -10px; text-align: center;" GridLines="None">
|
||||
<Columns>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LbNombre" runat="server" Text='<%# Eval("Nombre")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Left" />
|
||||
<HeaderTemplate>
|
||||
<asp:Label ID="LbTitulo" runat="server" Style="padding-left: 20px;" Font-Size="14px" Text="GASTOS Y OTRAS PÉRDIDAS"></asp:Label>
|
||||
</HeaderTemplate>
|
||||
<HeaderStyle HorizontalAlign="Left" Width="400px" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Periodo Actual">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLActual" runat="server" Text='<%# Eval("ImporteActual", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
<%--<asp:Label ID="LbActual" runat="server" Text='<%# Eval("ImporteActual", "{0:N2}")%>'></asp:Label>--%>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="150px" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField HeaderText="%" DataField="PorcentajeActual" DataFormatString="{0:N2}" ItemStyle-Width="100px" />
|
||||
<asp:TemplateField HeaderText="Periodo Acumulado">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLAnterior" runat="server" Text='<%# Eval("ImporteAcumulado", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
<%--<asp:Label ID="LbAnterior" runat="server" Text='<%# Eval("ImporteAnterior", "{0:N2}")%>'></asp:Label>--%>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="150px" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField HeaderText="%" DataField="PorcentajeAcumulado" DataFormatString="{0:N2}" ItemStyle-Width="100px" />
|
||||
</Columns>
|
||||
<%--<HeaderStyle CssClass="TitulosChico"></HeaderStyle>
|
||||
<RowStyle CssClass="Texto" />
|
||||
<AlternatingRowStyle CssClass="TextoAlterno" />--%>
|
||||
</asp:GridView>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<asp:UpdatePanel ID="UPPTotal" runat="server">
|
||||
<ContentTemplate>
|
||||
<table class="table table-striped table-hover Widthall">
|
||||
<tr>
|
||||
<td align="center">
|
||||
<h4>Resultados del Ejercicio (Ahorro/Desahorro):</h4>
|
||||
</td>
|
||||
<td width="30%" align="right">
|
||||
<asp:Label runat="server" Font-Bold="true" ID="LbTotalActual"></asp:Label>
|
||||
</td>
|
||||
<td width="30%" align="right">
|
||||
<asp:Label runat="server" Font-Bold="true" ID="LbTotalAnterior"></asp:Label>
|
||||
</td>
|
||||
<td width="12%" align="right">
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
||||
</asp:Content>
|
||||
346
AC/RepEstadoActividades.aspx.vb
Normal file
346
AC/RepEstadoActividades.aspx.vb
Normal file
@@ -0,0 +1,346 @@
|
||||
Option Explicit On
|
||||
Option Strict On
|
||||
|
||||
Imports System.Data
|
||||
Imports System.Drawing
|
||||
Imports Extensiones
|
||||
Imports Microsoft.Reporting.WebForms
|
||||
|
||||
Partial Class AC_RepEstadoActividades
|
||||
Inherits ClsPaginas
|
||||
|
||||
#Region "PROPIEDADES"
|
||||
Private Property DtDatos As DataTable
|
||||
Get
|
||||
DtDatos = DirectCast(ViewState("DtDatos"), DataTable)
|
||||
End Get
|
||||
|
||||
Set(ByVal value As DataTable)
|
||||
ViewState("DtDatos") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property DtIngresos As DataTable
|
||||
Get
|
||||
DtIngresos = DirectCast(ViewState("DtIngresos"), DataTable)
|
||||
End Get
|
||||
|
||||
Set(ByVal value As DataTable)
|
||||
ViewState("DtIngresos") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property DtGastos As DataTable
|
||||
Get
|
||||
DtGastos = DirectCast(ViewState("DtGastos"), DataTable)
|
||||
End Get
|
||||
|
||||
Set(ByVal value As DataTable)
|
||||
ViewState("DtGastos") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property TotalActual As Double
|
||||
Get
|
||||
TotalActual = ViewState("TotalActual").ToString.ToDouble
|
||||
End Get
|
||||
Set(value As Double)
|
||||
ViewState("TotalActual") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property TotalAnterior As Double
|
||||
Get
|
||||
TotalAnterior = ViewState("TotalAnterior").ToString.ToDouble
|
||||
End Get
|
||||
Set(value As Double)
|
||||
ViewState("TotalAnterior") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property FechaI As String
|
||||
Get
|
||||
Return ViewState("FechaI").ToString
|
||||
End Get
|
||||
Set(value As String)
|
||||
ViewState("FechaI") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property FechaF As String
|
||||
Get
|
||||
Return ViewState("FechaF").ToString
|
||||
End Get
|
||||
Set(value As String)
|
||||
ViewState("FechaF") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property ReporteComplementario As Boolean
|
||||
Get
|
||||
ReporteComplementario = CBool(ViewState("ReporteComplementario").ToString)
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
ViewState("ReporteComplementario") = value
|
||||
End Set
|
||||
End Property
|
||||
#End Region
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||
If Not Page.IsPostBack Then
|
||||
|
||||
If UsuarioActual.Empresa.UsaAC Then
|
||||
ReporteComplementario = False
|
||||
Else
|
||||
ReporteComplementario = True
|
||||
liTipoReporte.Visible = True
|
||||
DdlTipoReporte.Visible = True
|
||||
LtTitulo.Text = "Estado de Resultados"
|
||||
End If
|
||||
|
||||
TotalActual = 0
|
||||
TotalAnterior = 0
|
||||
'TxtFechaInicio.Text = DateSerial(Year(Date.Now), 1, 1).ToShortDateString
|
||||
'TxtFechaFin.Text = Date.Now.ToShortDateString
|
||||
CargaEjercicios()
|
||||
|
||||
CargaDatos()
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub CargaEjercicios()
|
||||
Dim ClsConta As New ClsContPAQi(UsuarioActual.Empresa)
|
||||
If ClsConta.GetEjercicios() Then
|
||||
DdlEjercicio.DataSource = ClsConta.DtResultados
|
||||
Else
|
||||
DdlEjercicio.DataSource = Nothing
|
||||
End If
|
||||
ClsConta.Dispose()
|
||||
DdlEjercicio.DataBind()
|
||||
|
||||
DdlEjercicio.SelectedValueExist(UsuarioActual.Empresa.EjercicioActual.ToString)
|
||||
DdlPeriodo.SelectedValue = Now.Month.ToString
|
||||
End Sub
|
||||
|
||||
Private Sub CargaDatos()
|
||||
|
||||
|
||||
FechaI = String.Format("01/{0}/{1}", DdlPeriodo.SelectedValue.PadLeft(2, CChar("0")), DdlEjercicio.SelectedValue)
|
||||
FechaF = DateAdd(DateInterval.Day, -1, DateAdd(DateInterval.Month, 1, CDate(FechaI))).ToString("dd/MM/yyyy")
|
||||
Dim TipoReporte = If(ReporteComplementario, DdlTipoReporte.SelectedValue.ToEntero, -1)
|
||||
|
||||
Dim ObjConta As New ClsContPAQi(UsuarioActual.Empresa)
|
||||
If ObjConta.GetEstadoActividades(FechaI.ToDate, FechaF.ToDate, TipoReporte, UsuarioActual.Empresa.UsaAC) Then
|
||||
DtDatos = ObjConta.DtResultados.FiltraParametros("(ImporteActual <> 0 OR ImporteAcumulado <> 0)")
|
||||
Else
|
||||
DtDatos = Nothing
|
||||
Alert("Ocurrio un error al cargar los datos del Estado de Actividades", TipoMensaje.MsgError)
|
||||
End If
|
||||
ObjConta.Dispose()
|
||||
|
||||
If DtDatos IsNot Nothing Then
|
||||
CargaGrids()
|
||||
SumaTotales()
|
||||
End If
|
||||
|
||||
End Sub
|
||||
Private Sub CargaGrids()
|
||||
|
||||
Dim CtasIngresos As String = "Orden Like '00004%'"
|
||||
Dim CtasGastos As String = "Orden Like '00005%'"
|
||||
|
||||
Select Case UsuarioActual.CveEmpresa
|
||||
Case 120
|
||||
CtasIngresos = "Orden Like '04%'"
|
||||
CtasGastos = "Orden Like '05%'"
|
||||
End Select
|
||||
DtIngresos = DtDatos.FiltraParametros(CtasIngresos)
|
||||
DtGastos = DtDatos.FiltraParametros(CtasGastos)
|
||||
Dim Row As DataRow = DtIngresos.NewRow
|
||||
|
||||
|
||||
Dim TotalActual = 0.0, TotalAnterior = 0.0
|
||||
If DtIngresos.Rows.Count > 0 Then
|
||||
|
||||
For Each dr As DataRow In DtIngresos.FiltraParametros("CtaMayor = 3").Rows
|
||||
TotalActual += dr("ImporteActual").ToString.ToDouble
|
||||
TotalAnterior += dr("ImporteAcumulado").ToString.ToDouble
|
||||
Next
|
||||
|
||||
Row.Item("Nombre") = "TOTAL INGRESOS "
|
||||
Row.Item("ImporteActual") = TotalActual.ToString
|
||||
Row.Item("PorcentajeActual") = "100.00"
|
||||
Row.Item("ImporteAcumulado") = TotalAnterior.ToString
|
||||
Row.Item("PorcentajeAcumulado") = "100.00"
|
||||
Row.Item("CtaMayor") = -1
|
||||
DtIngresos.Rows.Add(Row)
|
||||
Else
|
||||
Row.Item("Nombre") = "TOTAL INGRESOS "
|
||||
Row.Item("ImporteActual") = "0.00"
|
||||
Row.Item("ImporteAcumulado") = "0.00"
|
||||
Row.Item("CtaMayor") = -1
|
||||
DtIngresos.Rows.Add(Row)
|
||||
End If
|
||||
|
||||
Dim T1 = TotalActual, T2 = TotalAnterior
|
||||
|
||||
TotalActual = 0
|
||||
TotalAnterior = 0
|
||||
|
||||
Row = DtGastos.NewRow
|
||||
If DtGastos.Rows.Count > 0 Then
|
||||
|
||||
For Each dr As DataRow In DtGastos.FiltraParametros("CtaMayor = 3").Rows
|
||||
TotalActual += dr("ImporteActual").ToString.ToDouble
|
||||
TotalAnterior += dr("ImporteAcumulado").ToString.ToDouble
|
||||
Next
|
||||
|
||||
Row.Item("Nombre") = "TOTAL GASTOS"
|
||||
Row.Item("ImporteActual") = TotalActual
|
||||
Row.Item("PorcentajeActual") = If(T1 > 0, (TotalActual * 100 / T1).ToString, "0").FormatoNumero
|
||||
Row.Item("ImporteAcumulado") = TotalAnterior.ToString
|
||||
Row.Item("PorcentajeAcumulado") = If(T2 > 0, (TotalAnterior * 100 / T2).ToString, "0").FormatoNumero
|
||||
Row.Item("CtaMayor") = -1
|
||||
DtGastos.Rows.Add(Row)
|
||||
Else
|
||||
Row.Item("Nombre") = "TOTAL GASTOS"
|
||||
Row.Item("ImporteActual") = "0.00"
|
||||
Row.Item("ImporteAcumulado") = "0.00"
|
||||
Row.Item("CtaMayor") = -1
|
||||
DtGastos.Rows.Add(Row)
|
||||
End If
|
||||
|
||||
|
||||
GvIngresos.DataSource = DtIngresos
|
||||
GvIngresos.DataBind()
|
||||
|
||||
GvGastos.DataSource = DtGastos
|
||||
GvGastos.DataBind()
|
||||
|
||||
UpDatos.Update()
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Sub Imprimir_click(sender As Object, e As EventArgs) Handles Imprimir.Click
|
||||
If Not IsNothing(DtDatos) Then
|
||||
ImprimirReporte()
|
||||
Else
|
||||
Alert("No se econtró información para el reporte.", TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub SumaTotales()
|
||||
'Llena Lb´s Totales
|
||||
LbTotalActual.Text = TotalActual.ToString.FormatoNumero
|
||||
LbTotalAnterior.Text = TotalAnterior.ToString.FormatoNumero
|
||||
|
||||
LbTotalActual.ForeColor = If(TotalActual < 0, Drawing.Color.Red, Color.Black)
|
||||
|
||||
LbTotalAnterior.ForeColor = If(TotalAnterior < 0, Drawing.Color.Red, Color.Black)
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Sub BtnConsultar_Click(sender As Object, e As EventArgs)
|
||||
TotalActual = 0
|
||||
TotalAnterior = 0
|
||||
|
||||
CargaDatos()
|
||||
End Sub
|
||||
|
||||
|
||||
#Region "GV´S ROW DATA BOUND"
|
||||
|
||||
Protected Sub GvIngresos_RowDataBound(sender As Object, e As GridViewRowEventArgs)
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
If e.Row.DBCampo("CtaMayor").ToString.ToEntero < 0 Then
|
||||
TotalActual += e.Row.DBCampo("ImporteActual").ToString.ToDouble
|
||||
TotalAnterior += e.Row.DBCampo("ImporteAcumulado").ToString.ToDouble
|
||||
'e.Row.ControlStyle.BackColor = Drawing.Color.LightGray
|
||||
'e.Row.ControlStyle.ForeColor = Drawing.Color.White
|
||||
e.Row.ControlStyle.Font.Bold = True
|
||||
ElseIf e.Row.DBCampo("CtaMayor").ToString.ToEntero = 3 Then
|
||||
'e.Row.CssClass = "SubTotales3"
|
||||
e.Row.ControlStyle.Font.Bold = True
|
||||
End If
|
||||
|
||||
If e.Row.DBCampo("CtaMayor").ToString.ToEntero > 0 Then
|
||||
e.Row.FCHyperLink("HLActual").NavigateUrl = String.Format("/Contabilidad/RepAnexoCatalogo.aspx?ID={0}&FF={1}", e.Row.DBCampo("Id"), e.Row.DBCampo("FechaFActual").ToDate.ToShortDateString)
|
||||
e.Row.FCHyperLink("HLAnterior").NavigateUrl = String.Format("/Contabilidad/RepAnexoCatalogo.aspx?ID={0}&FF={1}", e.Row.DBCampo("Id"), e.Row.DBCampo("FechaFActual").ToDate.ToShortDateString)
|
||||
End If
|
||||
|
||||
|
||||
|
||||
If e.Row.DBCampo("ImporteActual").ToString.ToDouble < 0 Then
|
||||
e.Row.FCHyperLink("HLActual").ForeColor = Drawing.Color.Red
|
||||
End If
|
||||
If e.Row.DBCampo("ImporteAcumulado").ToString.ToDouble < 0 Then
|
||||
e.Row.FCHyperLink("HLAnterior").ForeColor = Drawing.Color.Red
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Protected Sub GvGastos_RowDataBound(sender As Object, e As GridViewRowEventArgs)
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
If e.Row.DBCampo("CtaMayor").ToString.ToEntero < 0 Then
|
||||
TotalActual -= e.Row.DBCampo("ImporteActual").ToString.ToDouble
|
||||
TotalAnterior -= e.Row.DBCampo("ImporteAcumulado").ToString.ToDouble
|
||||
'e.Row.ControlStyle.BackColor = Drawing.Color.LightGray
|
||||
'e.Row.ControlStyle.ForeColor = Drawing.Color.White
|
||||
e.Row.ControlStyle.Font.Bold = True
|
||||
ElseIf e.Row.DBCampo("CtaMayor").ToString.ToEntero = 3 Then
|
||||
'e.Row.CssClass = "SubTotales"
|
||||
e.Row.ControlStyle.Font.Bold = True
|
||||
End If
|
||||
|
||||
If e.Row.DBCampo("CtaMayor").ToString.ToEntero > 0 Then
|
||||
e.Row.FCHyperLink("HLActual").NavigateUrl = String.Format("/Contabilidad/RepAnexoCatalogo.aspx?ID={0}&FF={1}", e.Row.DBCampo("Id"), e.Row.DBCampo("FechaFActual").ToDate.ToShortDateString)
|
||||
e.Row.FCHyperLink("HLAnterior").NavigateUrl = String.Format("/Contabilidad/RepAnexoCatalogo.aspx?ID={0}&FF={1}", e.Row.DBCampo("Id"), e.Row.DBCampo("FechaFActual").ToDate.ToShortDateString)
|
||||
End If
|
||||
|
||||
If e.Row.DBCampo("ImporteActual").ToString.ToDouble < 0 Then
|
||||
e.Row.FCHyperLink("HLActual").ForeColor = Drawing.Color.Red
|
||||
End If
|
||||
If e.Row.DBCampo("ImporteAcumulado").ToString.ToDouble < 0 Then
|
||||
e.Row.FCHyperLink("HLAnterior").ForeColor = Drawing.Color.Red
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
Protected Sub ImgExcel_Click(sender As Object, e As EventArgs) Handles ImgExcel.Click
|
||||
If Not IsNothing(DtDatos) Then
|
||||
ImprimirReporte("Excel")
|
||||
Else
|
||||
Alert("No se econtró información para el reporte.", TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub ImprimirReporte(Optional Formato As String = "PDF")
|
||||
Dim lrds As New List(Of ReportDataSource)
|
||||
Dim rds As New ReportDataSource
|
||||
rds.Name = "DataSet1"
|
||||
rds.Value = DtIngresos
|
||||
Dim rds2 As New ReportDataSource
|
||||
rds2.Name = "DataSet2"
|
||||
rds2.Value = DtGastos
|
||||
lrds.Add(rds)
|
||||
lrds.Add(rds2)
|
||||
|
||||
Dim params As New List(Of ReportParameter)
|
||||
params.Add(New ReportParameter("TotalActual", TotalActual.ToString))
|
||||
params.Add(New ReportParameter("TotalAnterior", TotalAnterior.ToString))
|
||||
params.Add(New ReportParameter("lbTotalActual", LbTotalActual.Text))
|
||||
params.Add(New ReportParameter("lbTotalAnterior", LbTotalAnterior.Text))
|
||||
params.Add(New ReportParameter("pEmp", UsuarioActual.Empresa.Empresa))
|
||||
params.Add(New ReportParameter("pImg", New Uri(Server.MapPath(String.Format("~/Empresas/{0}/Logo.png", UsuarioActual.CveEmpresa))).AbsoluteUri))
|
||||
If (UsuarioActual.CveEmpresa = 48 And ChkFirma.Checked) Then
|
||||
params.Add(New ReportParameter("pFirma1", String.Format("Lic. Damian A. Benitez Alcantar{0}Director Administrativo", vbCrLf)))
|
||||
params.Add(New ReportParameter("pFirma2", String.Format("Ing. Soraida Mesinas Reyes{0}Director General", vbCrLf)))
|
||||
ElseIf (ChkFirma.Checked) Then
|
||||
params.Add(New ReportParameter("pFirma1", String.Format("C.P. Izelda Angulo Peraza{0} Subdirector de Contabilidad", vbCrLf)))
|
||||
params.Add(New ReportParameter("pFirma2", String.Format("ING. Soraida Mesinas Reyes{0} Director General", vbCrLf)))
|
||||
Else
|
||||
params.Add(New ReportParameter("pFirma1", ""))
|
||||
params.Add(New ReportParameter("pFirma2", ""))
|
||||
End If
|
||||
params.Add(New ReportParameter("pFechaFin", String.Format("{0} al {1}", FechaI, FechaF)))
|
||||
ImprimirPDF("AC/Reportes/RepEstadoActividades.rdlc", lrds, params, "EstadoActividades", Formato)
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
118
AC/RepEstadoAnaliticoActivo.aspx
Normal file
118
AC/RepEstadoAnaliticoActivo.aspx
Normal file
@@ -0,0 +1,118 @@
|
||||
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RepEstadoAnaliticoActivo.aspx.vb" Inherits="AC_RepEstadoAnaliticoActivo" %>
|
||||
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="HB" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="E" runat="Server">
|
||||
Estado Analítico del Activo
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
|
||||
<li>
|
||||
<asp:LinkButton ID="ImgExcel" runat="server"><i class="fa fa-ad-excel"></i> Exporta Excel</asp:LinkButton>
|
||||
</li>
|
||||
<li>
|
||||
<asp:LinkButton ID="BtnImprimir" runat="server"><i class="fa fa-print"></i> Imprimir</asp:LinkButton>
|
||||
</li>
|
||||
|
||||
<%--<img src="/Imagenes/separador02.gif" alt="" />
|
||||
<asp:ImageButton ID="ImgExcel" runat="server" ImageUrl="/Imagenes/IconoExcel.gif" Width="20px" Height="20px" />
|
||||
<img src="/Imagenes/separador02.gif" alt="" />
|
||||
<asp:ImageButton ID="BtnImprimir" runat="server" alt="Imprimir" src="/Imagenes/btnImprimir.gif" Style="cursor: pointer; height: 20px" /> --%>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
|
||||
<asp:UpdatePanel runat="server" ID="UpFiltros" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="portlet solid grey-cascade portlet-filter" style="">
|
||||
<div class="portlet-title portlet-filterT smalltitle" style="">
|
||||
<%--smalltitle--%>
|
||||
<div class="tools">
|
||||
<asp:Button ID="BtnConsultar" runat="server" Text="Consultar" class="btn btn-primary" OnClick="BtnConsultar_Click" />
|
||||
</div>
|
||||
<div class="titlefiltros caption ">
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-1"><span>Ejercicio:</span></div>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="DdlEjercicio" runat="server" Width="100px" DataTextField="Ejercicio" DataValueField="Ejercicio" Class="table-group-action-input form-control input-inline input-small input-sm ">
|
||||
<%--<asp:ListItem Text="2014" Value="2014"></asp:ListItem>
|
||||
<asp:ListItem Text="2015" Value="2015"></asp:ListItem>--%>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
<div class="col-md-1"><span>Periodo:</span></div>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="DdlPeriodo" runat="server" Width="100px" Class="table-group-action-input form-control input-inline input-small input-sm">
|
||||
<asp:ListItem Text="Enero" Value="1"></asp:ListItem>
|
||||
<asp:ListItem Text="Febrero" Value="2"></asp:ListItem>
|
||||
<asp:ListItem Text="Marzo" Value="3"></asp:ListItem>
|
||||
<asp:ListItem Text="Abril" Value="4"></asp:ListItem>
|
||||
<asp:ListItem Text="Mayo" Value="5"></asp:ListItem>
|
||||
<asp:ListItem Text="Junio" Value="6"></asp:ListItem>
|
||||
<asp:ListItem Text="Julio" Value="7"></asp:ListItem>
|
||||
<asp:ListItem Text="Agosto" Value="8"></asp:ListItem>
|
||||
<asp:ListItem Text="Septiembre" Value="9"></asp:ListItem>
|
||||
<asp:ListItem Text="Octubre" Value="10"></asp:ListItem>
|
||||
<asp:ListItem Text="Noviembre" Value="11"></asp:ListItem>
|
||||
<asp:ListItem Text="Diciembre" Value="12"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
|
||||
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" OnRowDataBound="GvDatos_RowDataBound" EmptyDataText="No se encontraron Registros" CssClass="table table-striped table-advance table-hover" Style="margin-top: -10px; text-align: center;" GridLines="None">
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderText="Concepto">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LbNombre" runat="server" Text='<%# Eval("Nombre")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="275" HorizontalAlign="Left" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Saldo Inicial">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LbSaldoInicial" runat="server" Text='<%# Eval("SaldoInicial", "{0:N2}")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="100" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Cargos del Periodo">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LbCargos" runat="server" Text='<%# Eval("Cargos", "{0:N2}")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="100" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Abonos del Periodo">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LbAbonos" runat="server" Text='<%# Eval("Abonos", "{0:N2}")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="100" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Saldo Final">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LbSaldoFinal" runat="server" Text='<%# Eval("SaldoFinal", "{0:N2}")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="100" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Variacion del Periodo">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LbVariacion" runat="server" Text='<%# Eval("Variacion", "{0:N2}")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="100" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
<%--<HeaderStyle CssClass="TitulosChico"></HeaderStyle>
|
||||
<RowStyle CssClass="Texto" />
|
||||
<AlternatingRowStyle CssClass="TextoAlterno" />--%>
|
||||
</asp:GridView>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
||||
</asp:Content>
|
||||
125
AC/RepEstadoAnaliticoActivo.aspx.vb
Normal file
125
AC/RepEstadoAnaliticoActivo.aspx.vb
Normal file
@@ -0,0 +1,125 @@
|
||||
Option Explicit On
|
||||
Option Strict On
|
||||
|
||||
Imports System.Data
|
||||
Imports Extensiones
|
||||
Imports Microsoft.Reporting.WebForms
|
||||
|
||||
Partial Class AC_RepEstadoAnaliticoActivo
|
||||
Inherits ClsPaginas
|
||||
|
||||
|
||||
#Region "PROPIEDADES"
|
||||
Private Property DtDatos As DataTable
|
||||
Get
|
||||
DtDatos = DirectCast(ViewState("DtDatos"), DataTable)
|
||||
End Get
|
||||
|
||||
Set(ByVal value As DataTable)
|
||||
ViewState("DtDatos") = value
|
||||
End Set
|
||||
End Property
|
||||
#End Region
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||
If Not Page.IsPostBack Then
|
||||
|
||||
Dim FechaI = DateSerial(DdlEjercicio.SelectedValue.ToEntero, DdlPeriodo.SelectedValue.ToEntero, 1)
|
||||
Dim FechaF = LastDayOfMonth(FechaI)
|
||||
CargaDatos(FechaI, FechaF)
|
||||
CargaDatosEjercicio()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub CargaDatos(FechaI As Date, FechaF As Date)
|
||||
Dim ObjConta As New ClsContPAQi(UsuarioActual.Empresa)
|
||||
|
||||
If ObjConta.GetEstadoAnaliticoActivo(FechaI, FechaF) Then
|
||||
DtDatos = ObjConta.DtResultados
|
||||
Else
|
||||
DtDatos = Nothing
|
||||
Alert("Ocurrio un error al cargar los datos del Estado Analítico del Activo", TipoMensaje.MsgError)
|
||||
End If
|
||||
|
||||
|
||||
ObjConta.Dispose()
|
||||
|
||||
CargaGrid()
|
||||
End Sub
|
||||
|
||||
Private Sub CargaDatosEjercicio()
|
||||
Dim ObjConta As New ClsContPAQi(UsuarioActual.Empresa)
|
||||
If ObjConta.GetEjercicios() Then
|
||||
DdlEjercicio.DataSource = ObjConta.DtResultados
|
||||
Else
|
||||
DdlEjercicio.DataSource = Nothing
|
||||
End If
|
||||
|
||||
ObjConta.Dispose()
|
||||
DdlEjercicio.DataBind()
|
||||
End Sub
|
||||
|
||||
Private Sub CargaGrid()
|
||||
GvDatos.DataSource = DtDatos
|
||||
GvDatos.DataBind()
|
||||
UpDatos.Update()
|
||||
End Sub
|
||||
|
||||
Protected Sub BtnConsultar_Click(sender As Object, e As EventArgs)
|
||||
Dim FechaI = DateSerial(DdlEjercicio.SelectedValue.ToEntero, DdlPeriodo.SelectedValue.ToEntero, 1)
|
||||
Dim FechaF = LastDayOfMonth(FechaI)
|
||||
CargaDatos(FechaI, FechaF)
|
||||
End Sub
|
||||
|
||||
Protected Sub GvDatos_RowDataBound(sender As Object, e As GridViewRowEventArgs)
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
If e.Row.DBCampo("CtaMayor").ToString.ToEntero = 3 Then
|
||||
e.Row.ControlStyle.Font.Bold = True
|
||||
End If
|
||||
|
||||
If e.Row.DBCampo("SaldoInicial").ToString.ToDouble < 0 Then
|
||||
e.Row.FCLabel("LbSaldoInicial").ForeColor = Drawing.Color.Red
|
||||
End If
|
||||
If e.Row.DBCampo("Cargos").ToString.ToDouble < 0 Then
|
||||
e.Row.FCLabel("LbCargos").ForeColor = Drawing.Color.Red
|
||||
End If
|
||||
If e.Row.DBCampo("Abonos").ToString.ToDouble < 0 Then
|
||||
e.Row.FCLabel("LbAbonos").ForeColor = Drawing.Color.Red
|
||||
End If
|
||||
If e.Row.DBCampo("SaldoFinal").ToString.ToDouble < 0 Then
|
||||
e.Row.FCLabel("LbSaldoFinal").ForeColor = Drawing.Color.Red
|
||||
End If
|
||||
If e.Row.DBCampo("Variacion").ToString.ToDouble < 0 Then
|
||||
e.Row.FCLabel("LbVariacion").ForeColor = Drawing.Color.Red
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Protected Sub BtnImprimir_Click(sender As Object, e As EventArgs) Handles BtnImprimir.Click
|
||||
ImprimirReporte() 'Descarga reporte en PDF
|
||||
End Sub
|
||||
|
||||
Protected Sub ImgExcel_Click(sender As Object, e As EventArgs) Handles ImgExcel.Click
|
||||
'GvDatos.ExportToExcel("Estado analitico" & Now.ToShortDateString)
|
||||
ImprimirReporte("Excel") 'Descarga reporte en Excel
|
||||
End Sub
|
||||
|
||||
Private Sub ImprimirReporte(Optional Formato As String = "PDF")
|
||||
'ubicacion del rdlc
|
||||
Dim reportpath As String = "AC/Reportes/RepEstadoAnaliticoActivo.rdlc"
|
||||
|
||||
Dim fileName As String = "EdoAnaliticoActivo"
|
||||
'parametros a enviar al reporte
|
||||
Dim params As New List(Of ReportParameter)
|
||||
|
||||
params.Add(New ReportParameter("pEmp", UsuarioActual.Empresa.Empresa))
|
||||
params.Add(New ReportParameter("pImg", New Uri(Server.MapPath(String.Format("~/Empresas/{0}/Logo.png", UsuarioActual.CveEmpresa))).AbsoluteUri))
|
||||
params.Add(New ReportParameter("pFechaIni", DdlEjercicio.SelectedItem.ToString))
|
||||
params.Add(New ReportParameter("pFechaFin", DdlPeriodo.SelectedItem.ToString))
|
||||
params.Add(New ReportParameter("pFirma1", String.Format("ING. Soraida Mesinas Reyes{0} Subdirector de Contabilidad", vbCrLf)))
|
||||
params.Add(New ReportParameter("pFirma2", String.Format("ING. Soraida Mesinas Reyes{0} Director General", vbCrLf)))
|
||||
ImprimirPDF(reportpath, DtDatos, params, fileName, Formato)
|
||||
'MasterReporteador.Visible = True
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
124
AC/RepFlujoEfectivo.aspx
Normal file
124
AC/RepFlujoEfectivo.aspx
Normal file
@@ -0,0 +1,124 @@
|
||||
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RepFlujoEfectivo.aspx.vb" Inherits="AC_RepFlujoEfectivo" %>
|
||||
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="HB" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="E" runat="Server">
|
||||
Estado de Flujo de Efectivo
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
|
||||
<li>
|
||||
<asp:LinkButton ID="ImgExcel" runat="server"><i class="fa fa-ad-excel"></i> Exporta Excel</asp:LinkButton>
|
||||
</li>
|
||||
<li>
|
||||
<asp:LinkButton ID="BtnImprimir" runat="server"><i class="fa fa-print"></i> Imprimir</asp:LinkButton>
|
||||
</li>
|
||||
|
||||
<%--<img src="/Imagenes/separador02.gif" alt="" /> --%>
|
||||
<%--<img src="/Imagenes/separador02.gif" alt="" />
|
||||
<asp:ImageButton ID="ImgExcel" runat="server" ImageUrl="/Imagenes/IconoExcel.gif" Width="20px" Height="20px" />
|
||||
<img src="/Imagenes/separador02.gif" alt="" />
|
||||
<asp:ImageButton ID="BtnImprimir" runat="server" alt="Imprimir" src="/Imagenes/btnImprimir.gif" Style="cursor: pointer; height: 20px" /> --%>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
|
||||
|
||||
<asp:UpdatePanel ID="UPFiltros" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="portlet solid grey-cascade portlet-filter">
|
||||
<div class="portlet-title portlet-filterT smalltitle">
|
||||
<div class="tools">
|
||||
<asp:Button ID="BtnConsultar" runat="server" Text="Consultar" class="btn btn-default" CssClass="btn btn-default" Enabled="false" />
|
||||
</div>
|
||||
<div class="titlefiltros caption ">
|
||||
<div class="row">
|
||||
<div class="col-md-1 "><span>Fecha Inicio:</span></div>
|
||||
<div class="col-md-2 ">
|
||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 100% !important; padding: 0px;">
|
||||
<asp:TextBox Width="80%" ID="TxtFechaDel" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="ImgCalendarioDel" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
<ajax:MaskedEditExtender ID="MEEFechaDel" runat="server" TargetControlID="TxtFechaDel" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender ID="CalendarioDel" runat="server" TargetControlID="TxtFechaDel" PopupButtonID="ImgCalendarioDel" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-1 "><span>Fecha Fin:</span></div>
|
||||
<div class="col-md-2 ">
|
||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 100% !important; padding: 0px;">
|
||||
<asp:TextBox Width="80%" ID="TxtFechaAl" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="ImgCalendarioAl" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
<ajax:MaskedEditExtender ID="MEEFechaAl" runat="server" TargetControlID="TxtFechaAl" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender ID="CalendarioAl" runat="server" TargetControlID="TxtFechaAl" PopupButtonID="ImgCalendarioAl" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-1 "><span>Divisor:</span></div>
|
||||
<div class="col-md-2 ">
|
||||
<asp:DropDownList runat="server" ID="DdlUnidad" CssClass="form-control input-sm">
|
||||
<asp:ListItem Text="1" Value="1" Selected="True" />
|
||||
<asp:ListItem Text="1,000" Value="1000" />
|
||||
<asp:ListItem Text="1,000,000" Value="1000000" />
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
<br />
|
||||
<br />
|
||||
<asp:UpdatePanel ID="UpDatos" UpdateMode="Conditional" runat="server">
|
||||
<ContentTemplate>
|
||||
|
||||
<asp:GridView ID="GvDatos" runat="server" CssClass="table table-advance table-hover tablenobottomborder" AutoGenerateColumns="False" GridLines="None" DataKeyNames="" OnRowDataBound="GvDatos_RowDataBound" ShowFooter="True">
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderText="Concepto">
|
||||
<ItemTemplate>
|
||||
<div id="Concepto" runat="server">
|
||||
<asp:Literal ID="LtNombre" Text='<%# Eval("Nombre", "{0:N2}")%>' runat="server" />
|
||||
</div>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="500px" HorizontalAlign="Left" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LbActual" Text='<%# Eval("ImporteActual", "{0:N2}")%>' runat="server" />
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="100px" HorizontalAlign="Right" />
|
||||
<HeaderTemplate>
|
||||
<asp:Label ID="LbPeriodoActual" runat="server" />
|
||||
</HeaderTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LbAnterior" Text='<%# Eval("ImporteAnterior", "{0:N2}")%>' runat="server" />
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="100px" HorizontalAlign="Right" />
|
||||
<HeaderTemplate>
|
||||
<asp:Label ID="LbPeriodoAnterior" runat="server" />
|
||||
</HeaderTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
|
||||
<%-- <asp:BoundField DataField="Nombre" HeaderText="Cuenta" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="300px"/>
|
||||
<asp:BoundField DataField="ImporteActual" DataFormatString="{0:N2}" HeaderText="ImporteActual" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="150px"/>
|
||||
<asp:BoundField DataField="ImporteAnterior" DataFormatString="{0:N2}" HeaderText="ImporteAnterior" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="150px"/>--%>
|
||||
</Columns>
|
||||
<%--<AlternatingRowStyle CssClass="TextoAlterno" />--%>
|
||||
</asp:GridView>
|
||||
<br />
|
||||
<br />
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
||||
</asp:Content>
|
||||
|
||||
238
AC/RepFlujoEfectivo.aspx.vb
Normal file
238
AC/RepFlujoEfectivo.aspx.vb
Normal file
@@ -0,0 +1,238 @@
|
||||
Option Explicit On
|
||||
Option Strict On
|
||||
|
||||
Imports System.Data
|
||||
Imports Extensiones
|
||||
Imports Microsoft.Reporting.WebForms
|
||||
Imports System.IO
|
||||
Imports iTextSharp.text
|
||||
Imports iTextSharp.text.html.simpleparser
|
||||
Imports iTextSharp.text.pdf
|
||||
|
||||
Partial Class AC_RepFlujoEfectivo
|
||||
Inherits ClsPaginas
|
||||
|
||||
#Region "PROPIEDADES"
|
||||
Private Property DtDatos As DataTable
|
||||
Get
|
||||
DtDatos = DirectCast(ViewState("DtDatos"), DataTable)
|
||||
End Get
|
||||
|
||||
Set(ByVal value As DataTable)
|
||||
ViewState("DtDatos") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property TotalActual As Double
|
||||
Get
|
||||
TotalActual = ViewState("TotalActual").ToString.ToDouble
|
||||
End Get
|
||||
Set(value As Double)
|
||||
ViewState("TotalActual") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property TotalAnterior As Double
|
||||
Get
|
||||
TotalAnterior = ViewState("TotalAnterior").ToString.ToDouble
|
||||
End Get
|
||||
Set(value As Double)
|
||||
ViewState("TotalAnterior") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private Property FechaAl As String
|
||||
Get
|
||||
FechaAl = ViewState("FechaAl").ToString
|
||||
End Get
|
||||
Set(value As String)
|
||||
ViewState("FechaAl") = value
|
||||
End Set
|
||||
End Property
|
||||
#End Region
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||
If Not Page.IsPostBack Then
|
||||
If UsuarioActual.Empresa.UsaAC Then
|
||||
|
||||
TxtFechaDel.Text = DateSerial(Year(Now), Month(Now), 1).ToShortDateString
|
||||
TxtFechaAl.Text = Date.Now.ToShortDateString
|
||||
|
||||
CargaDatos()
|
||||
|
||||
BtnConsultar.Enabled = True
|
||||
Else
|
||||
Alert("La empresa no usa Armonización Contable", TipoMensaje.MsgError)
|
||||
End If
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
#Region "CARGA DATOS Y GRID"
|
||||
Private Sub CargaDatos()
|
||||
Dim ObjConta As New ClsContPAQi(UsuarioActual.Empresa)
|
||||
|
||||
Dim FechaInicio = If(TxtFechaDel.Text = "" Or TxtFechaDel.Text = "__/__/____", Date.Now, TxtFechaDel.Text.ToDate)
|
||||
Dim FechaFin = If(TxtFechaAl.Text = "" Or TxtFechaAl.Text = "__/__/____", Date.Now, TxtFechaAl.Text.ToDate)
|
||||
FechaAl = TxtFechaAl.Text
|
||||
If ObjConta.GetFlujoEfectivo(FechaInicio, FechaFin, DdlUnidad.SelectedValue.ToEntero) Then
|
||||
DtDatos = ObjConta.DtResultados
|
||||
Else
|
||||
DtDatos = Nothing
|
||||
Alert("Ocurrio un error al cargar los datos del Estado de Flujo de Efectivo", TipoMensaje.MsgError)
|
||||
End If
|
||||
|
||||
ObjConta.Dispose()
|
||||
|
||||
'OBTENEMOS TOTALES NETOS DE OPERACIONES PARA INSERTAR DIRECTO
|
||||
If DtDatos IsNot Nothing Then
|
||||
TotalActual = DtDatos.FiltraParametros("Codigo = '000040000000000000'").Rows(0)("ImporteActual").ToString.ToDouble - DtDatos.FiltraParametros("Codigo = '000050000000000000'").Rows(0)("ImporteActual").ToString.ToDouble
|
||||
TotalAnterior = DtDatos.FiltraParametros("Codigo = '000040000000000000'").Rows(0)("ImporteAnterior").ToString.ToDouble - DtDatos.FiltraParametros("Codigo = '000050000000000000'").Rows(0)("ImporteAnterior").ToString.ToDouble
|
||||
End If
|
||||
|
||||
CargaGrid()
|
||||
|
||||
End Sub
|
||||
Private Sub CargaGrid()
|
||||
GvDatos.DataSource = DtDatos
|
||||
GvDatos.DataBind()
|
||||
UpDatos.Update()
|
||||
|
||||
' GvDatos.Caption = String.Format("<div class='Titulos' style='width:100%; height:45px;'>{0}<br/>Estado de Flujo de Efectivo<br/>Al {1}</div>", UsuarioActual.Empresa.Empresa, TxtFechaAl.Text)
|
||||
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
Protected Sub BtnConsultar_Click(sender As Object, e As EventArgs)
|
||||
CargaDatos()
|
||||
End Sub
|
||||
|
||||
|
||||
Protected Sub GvDatos_RowDataBound(sender As Object, e As GridViewRowEventArgs)
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
|
||||
'PARA PONER AÑO EN HEADER
|
||||
If e.Row.RowIndex = 0 Then
|
||||
GvDatos.HeaderRow.FCLabel("LbPeriodoActual").Text = e.Row.DBCampo("Actual")
|
||||
GvDatos.HeaderRow.FCLabel("LbPeriodoAnterior").Text = e.Row.DBCampo("Anterior")
|
||||
End If
|
||||
|
||||
'TITULO DE BLOQUE (CABECERAS Y TOTALES)
|
||||
If e.Row.DBCampo("Level") = "-1" Then
|
||||
CType(e.Row.FindControl("Concepto"), HtmlControl).Attributes.Add("style", "margin-top:20px; ")
|
||||
e.Row.Font.Bold = True
|
||||
|
||||
'CABCERA
|
||||
If e.Row.DBCampo("Id") = "12" Then
|
||||
e.Row.FCLabel("LbActual").Text = ""
|
||||
e.Row.FCLabel("LbAnterior").Text = ""
|
||||
End If
|
||||
|
||||
'TOTAL OPERACIONES
|
||||
If e.Row.DBCampo("Id") = "123" Then
|
||||
e.Row.FCLabel("LbActual").Text = TotalActual.ToString.FormatoNumero
|
||||
e.Row.FCLabel("LbAnterior").Text = TotalAnterior.ToString.FormatoNumero
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
'ORIGEN Y APLICACION
|
||||
If e.Row.DBCampo("Level") = "0" Then
|
||||
CType(e.Row.FindControl("Concepto"), HtmlControl).Attributes.Add("style", "margin-left:30px; margin-top:15px")
|
||||
e.Row.Font.Bold = True
|
||||
End If
|
||||
|
||||
'PAPAS
|
||||
If e.Row.DBCampo("Level") = "2" Then
|
||||
CType(e.Row.FindControl("Concepto"), HtmlControl).Attributes.Add("style", "margin-left: 60px; margin-top:5px;")
|
||||
End If
|
||||
|
||||
'HIJOS
|
||||
If e.Row.DBCampo("Level") = "3" Then
|
||||
CType(e.Row.FindControl("Concepto"), HtmlControl).Attributes.Add("style", "margin-left:90px;")
|
||||
End If
|
||||
|
||||
'INGRESOS -> ORIGEN
|
||||
If e.Row.DBCampo("Codigo").ToString.Substring(0, 5) = "00004" Then e.Row.FCLiteral("LtNombre").Text = "ORIGEN"
|
||||
|
||||
'GASTOS -> APLICACION
|
||||
If e.Row.DBCampo("Codigo").ToString.Substring(0, 5) = "00005" Then e.Row.FCLiteral("LtNombre").Text = "APLICACION"
|
||||
|
||||
|
||||
|
||||
'ACTIVIDADES DE OPERACION
|
||||
If e.Row.DBCampo("Sup").ToString <> "" Then
|
||||
If e.Row.DBCampo("ImporteAnterior").ToString.ToDecimal = 0 Then
|
||||
e.Row.FCLabel("LbAnterior").Text = ""
|
||||
End If
|
||||
If e.Row.DBCampo("ImporteActual").ToString.ToDecimal = 0 Then
|
||||
e.Row.FCLabel("LbActual").Text = ""
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Protected Sub BtnImprimir_Click(sender As Object, e As EventArgs) Handles BtnImprimir.Click
|
||||
If Not IsNothing(DtDatos) Then
|
||||
ImprimirReporte()
|
||||
Else
|
||||
Alert("Primero debe consultar el Estado de Flujo de Efectivo", TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
End Sub
|
||||
'No quitar porque no funciona el exporta PDF
|
||||
Public Overrides Sub VerifyRenderingInServerForm(control As Control)
|
||||
' Verifies that the control is rendered
|
||||
End Sub
|
||||
|
||||
'Protected Sub GvDatos_RowCreated(sender As Object, e As GridViewRowEventArgs) Handles GvDatos.RowCreated
|
||||
' If (e.Row.RowType = DataControlRowType.Header) Then
|
||||
' Dim HeaderGrid As GridView = DirectCast(sender, GridView)
|
||||
' Dim HeaderGridRow As GridViewRow = New GridViewRow(0, 0, DataControlRowType.Header, DataControlRowState.Insert)
|
||||
' Dim HeaderCell As TableCell = New TableCell()
|
||||
' HeaderCell.Text = String.Format("<div class='Titulos' style='width:100%; height:45px;'>{0}<br/>Estado de Flujo de Efectivo<br/>Al {1}</div>", UsuarioActual.Empresa.Empresa, FechaAl)
|
||||
' HeaderCell.ColumnSpan = GvDatos.Columns.Count
|
||||
' HeaderCell.HorizontalAlign = HorizontalAlign.Center
|
||||
' HeaderGridRow.Cells.Add(HeaderCell)
|
||||
|
||||
|
||||
' GvDatos.Controls(0).Controls.AddAt(0, HeaderGridRow)
|
||||
' End If
|
||||
|
||||
' If (e.Row.RowType = DataControlRowType.Footer) Then
|
||||
' Dim HeaderGrid As GridView = DirectCast(sender, GridView)
|
||||
' Dim HeaderGridRow As GridViewRow = New GridViewRow(0, 0, DataControlRowType.Footer, DataControlRowState.Insert)
|
||||
' Dim HeaderCell As TableCell = New TableCell()
|
||||
' HeaderCell.Text = "<table><tr> <td colspan='3' style='height:30px;'> <br/><br/><br/><br/></td></tr><tr><td >_________________________________<br/>C.P. Izelda Angulo Peraza</td><td style='width:75px'> </td><td > _________________________________<br/>Lic. Juan Fortino Leon Robinson</td></tr><tr><td>Subdirector de Contabilidad</td><td style='width:75px'> </td><td>Director General</td></table>"
|
||||
' HeaderCell.ColumnSpan = GvDatos.Columns.Count
|
||||
' HeaderCell.HorizontalAlign = HorizontalAlign.Center
|
||||
' HeaderGridRow.Cells.Add(HeaderCell)
|
||||
|
||||
' e.Row.Cells.Clear()
|
||||
' e.Row.Cells.Add(HeaderCell)
|
||||
|
||||
' End If
|
||||
|
||||
'End Sub
|
||||
|
||||
Protected Sub ImgExcel_Click(sender As Object, e As EventArgs) Handles ImgExcel.Click
|
||||
'GvDatos.ExportToExcel("ReporteFlujoEfectivo" & Now.ToShortDateString)
|
||||
If Not IsNothing(DtDatos) Then
|
||||
ImprimirReporte("Excel")
|
||||
Else
|
||||
Alert("Primero debe consultar el Estado de Flujo de Efectivo", TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub ImprimirReporte(Optional Formato As String = "PDF")
|
||||
Dim params As New List(Of ReportParameter)
|
||||
params.Add(New ReportParameter("pEmp", UsuarioActual.Empresa.Empresa))
|
||||
params.Add(New ReportParameter("pImg", New Uri(Server.MapPath(String.Format("~/Empresas/{0}/Logo.png", UsuarioActual.CveEmpresa))).AbsoluteUri))
|
||||
params.Add(New ReportParameter("pAl", FechaAl))
|
||||
params.Add(New ReportParameter("pTotalActual", TotalActual.ToString.FormatoNumero))
|
||||
params.Add(New ReportParameter("pTotalAnterior", TotalAnterior.ToString.FormatoNumero))
|
||||
params.Add(New ReportParameter("pFirma1", String.Format("C.P. Izelda Angulo Peraza{0} Subdirector de Contabilidad", vbCrLf)))
|
||||
params.Add(New ReportParameter("pFirma2", String.Format("Lic. Juan Fortino Leon Robinson{0} Director General", vbCrLf)))
|
||||
ImprimirPDF("AC/Reportes/RepFlujoEfectivo.rdlc", DtDatos, params, "EdoFlujoEfectivo", Formato)
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
144
AC/RepIngresos.aspx.exclude
Normal file
144
AC/RepIngresos.aspx.exclude
Normal file
@@ -0,0 +1,144 @@
|
||||
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RepIngresos.aspx.vb" Inherits="AC_RepIngresos" %>
|
||||
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="HB" runat="Server">
|
||||
<asp:ImageButton ID="BtnImprimir" OnClick="BtnImprimir_Click" runat="server" alt="Imprimir" src="/Imagenes/btnImprimir.gif" Style="cursor: pointer; height: 20px" />
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="E" runat="Server">
|
||||
Reporte de Ingresos
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
|
||||
<asp:UpdatePanel runat="server" ID="UpFiltros" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="portlet solid grey-cascade portlet-filter" style="">
|
||||
<div class="portlet-title portlet-filterT" style="">
|
||||
<div class="titlefiltros caption ">
|
||||
<ul class="list-inline">
|
||||
<%--<td width="150px">Momento Contable</td>
|
||||
<td width="250px">
|
||||
<asp:DropDownList AutoPostBack="true" ID="DdlMomentoContable" runat="server" Width="200px">
|
||||
<asp:ListItem Text="Estimados" Value="1" Selected="True"></asp:ListItem>
|
||||
<asp:ListItem Text="Ampliaciones|Reducciones" Value="2"></asp:ListItem>
|
||||
<asp:ListItem Text="Modificados" Value="3"></asp:ListItem>
|
||||
<asp:ListItem Text="Devengados" Value="4"></asp:ListItem>
|
||||
<asp:ListItem Text="Recaudados" Value="5"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</td>--%>
|
||||
<li>Fecha de Corte:
|
||||
<asp:TextBox ID="TxtFechaCorte" runat="server" Width="70px"></asp:TextBox>
|
||||
<asp:ImageButton runat="server" ID="imgCalendario" ImageUrl="/Imagenes/calendar.png" ImageAlign="AbsMiddle" Width="16px" Height="16px" AlternateText="Click para ver el Calendario" />
|
||||
<ajax:MaskedEditExtender ID="MEEFechaVencimiento" runat="server" TargetControlID="TxtFechaCorte" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender runat="server" ID="Calendario" TargetControlID="TxtFechaCorte" PopupButtonID="ImgCalendario" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
<asp:RequiredFieldValidator ID="RFVFechaCorte" runat="server" ControlToValidate="TxtFechaCorte" InitialValue="__/__/____" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha Corte''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCEFechaCorte" runat="server" HighlightCssClass="vco" TargetControlID="RFVFechaCorte" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</li>
|
||||
<li></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="tools">
|
||||
<asp:UpdatePanel runat="server">
|
||||
<ContentTemplate>
|
||||
<asp:Button ID="BtnConsultar" runat="server" Text="Consultar" class="btn btn-primary" OnClick="BtnConsultar_Click" />
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
<asp:UpdatePanel runat="server" ID="UpIngresos" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:GridView ID="GvIngresos" Width="" runat="server" AutoGenerateColumns="False" EmptyDataText="No se encontraron presupuesto de Ingresos" ToolTip="Listado de Presupuetos de Ingresos" CssClass="table table-striped table-advance table-hover" Style="margin-top: -10px; text-align: center;" GridLines="None">
|
||||
<Columns>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>
|
||||
<asp:LinkButton ID="LbFuenteRecaudacion" runat="server" CausesValidation="False" Text="Fuente de Ingresos" CommandArgument="FuenteRecaudacion" OnClick="LbOrden_Click">
|
||||
Fuente de Ingresos <asp:Literal ID="ImgFuenteRecaudacion" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
||||
</asp:LinkButton>
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LabelFuenteRecaudacion" runat="server" Text='<%# Eval("FuenteRecaudacion")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="250" HorizontalAlign="Left" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>
|
||||
<asp:LinkButton ID="LbTotal" runat="server" CausesValidation="False" Text="" CommandArgument="Total" OnClick="LbOrden_Click">
|
||||
Total del Presupuesto <asp:Literal ID="ImgTotal" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
||||
</asp:LinkButton>
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LabelTotal" runat="server" Text='<%# Eval("Total", "{0:N2}")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="100" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>
|
||||
<asp:LinkButton ID="LbEstimado" runat="server" CausesValidation="False" Text="" CommandArgument="Estimado" OnClick="LbOrden_Click">
|
||||
Estimado <asp:Literal ID="ImgEstimado" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
||||
</asp:LinkButton>
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LabelEstimado" runat="server" Text='<%# Eval("Estimado", "{0:N2}")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="100" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>
|
||||
<asp:LinkButton ID="LbModificado" runat="server" CausesValidation="False" Text="" CommandArgument="Modificado" OnClick="LbOrden_Click">
|
||||
Modificado <asp:Literal ID="ImgModificado" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
||||
</asp:LinkButton>
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LabelModificado" runat="server" Text='<%# Eval("Modificado", "{0:N2}")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="100" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>
|
||||
<asp:LinkButton ID="LbDevengado" runat="server" CausesValidation="False" Text="" CommandArgument="Devengado" OnClick="LbOrden_Click">
|
||||
Devengado <asp:Literal ID="ImgDevengado" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
||||
</asp:LinkButton>
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LabelDevengado" runat="server" Text='<%# Eval("Devengado", "{0:N2}")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="100" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>
|
||||
<asp:LinkButton ID="LbRecaudado" runat="server" CausesValidation="False" Text="" CommandArgument="Recaudado" OnClick="LbOrden_Click">
|
||||
Recaudado <asp:Literal ID="ImgRecaudado" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
||||
</asp:LinkButton>
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LabelRecaudado" runat="server" Text='<%# Eval("Recaudado", "{0:N2}")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="100" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>
|
||||
<asp:LinkButton ID="LbPorRecaudar" runat="server" CausesValidation="False" Text="" CommandArgument="PorRecaudar" OnClick="LbOrden_Click">
|
||||
Devengado Por Recaudar <asp:Literal ID="ImgPorRecaudar" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
||||
</asp:LinkButton>
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LabelPorRecaudar" runat="server" Text='<%# Eval("PorRecaudar", "{0:N2}")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="100" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
<RowStyle CssClass="Texto" />
|
||||
<AlternatingRowStyle CssClass="TextoAlterno" />
|
||||
<HeaderStyle CssClass="Titulos" />
|
||||
</asp:GridView>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
||||
</asp:Content>
|
||||
120
AC/RepIngresos.aspx.vb.exclude
Normal file
120
AC/RepIngresos.aspx.vb.exclude
Normal file
@@ -0,0 +1,120 @@
|
||||
Imports System.Data
|
||||
Imports Extensiones
|
||||
Imports Microsoft.Reporting.WebForms
|
||||
|
||||
Partial Class AC_RepIngresos
|
||||
Inherits ClsPaginas
|
||||
|
||||
|
||||
#Region "PROPIEDADES"
|
||||
Private Property DtIngresos As DataTable
|
||||
Get
|
||||
Return CType(ViewState("DtIngresos"), DataTable)
|
||||
End Get
|
||||
Set(value As DataTable)
|
||||
ViewState("DtIngresos") = value
|
||||
End Set
|
||||
End Property
|
||||
#End Region
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||
If Not Page.IsPostBack Then
|
||||
|
||||
TxtFechaCorte.Text = Date.Now.ToShortDateString
|
||||
|
||||
CargaDatos()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub CargaDatos()
|
||||
Dim ObjAC As New ClsContPAQi(UsuarioActual.Empresa)
|
||||
|
||||
Dim Fecha = TxtFechaCorte.Text.ToDate.ToShortDateString
|
||||
|
||||
If ObjAC.GetPresupuestoIngresosRep(UsuarioActual.Empresa.EjercicioActual, Fecha) Then
|
||||
DtIngresos = ObjAC.DtResultados
|
||||
Else
|
||||
DtIngresos = Nothing
|
||||
Alert("Ocurrio un error al cargar los datos del reporte.", TipoMensaje.MsgError)
|
||||
End If
|
||||
|
||||
ObjAC.Dispose()
|
||||
|
||||
GvIngresos.DataSource = DtIngresos
|
||||
GvIngresos.DataBind()
|
||||
UpIngresos.Update()
|
||||
End Sub
|
||||
|
||||
Protected Sub BtnConsultar_Click(sender As Object, e As EventArgs)
|
||||
CargaDatos()
|
||||
End Sub
|
||||
|
||||
#Region "I M P R I M I R "
|
||||
Protected Sub BtnImprimir_Click(sender As Object, e As ImageClickEventArgs)
|
||||
ImprimiReporte()
|
||||
End Sub
|
||||
|
||||
Protected Sub ImprimiReporte()
|
||||
Dim params As New List(Of ReportParameter)
|
||||
params.Add(New ReportParameter("pEmp", UsuarioActual.Empresa.Empresa))
|
||||
params.Add(New ReportParameter("pImg", New Uri(Server.MapPath(String.Format("~/Empresas/{0}/Logo.png", UsuarioActual.CveEmpresa))).AbsoluteUri))
|
||||
|
||||
ImprimirPDF("AC/Reportes/RepPresupuestoIngresos.rdlc", DtIngresos, params, "ReporteIngresos")
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
#Region "O R D E N A M I E N T O"
|
||||
Protected Sub LbOrden_Click(ByVal sender As Object, ByVal e As EventArgs)
|
||||
Dim Orden As String = ""
|
||||
Dim Campo As String = ""
|
||||
Dim Literal As Literal = Nothing
|
||||
Const OrdenInicial As String = ""
|
||||
Dim Arg(2) As String
|
||||
|
||||
Arg = CType(sender, LinkButton).CommandArgument().ToString.Split(";"c)
|
||||
Campo = Arg(0)
|
||||
Literal = CType(CType(sender, LinkButton).NamingContainer.FindControl("Img" & Campo.Replace(",", "_")), Literal)
|
||||
|
||||
If ViewState(String.Format("O{0}", Campo)) IsNot Nothing AndAlso ViewState(String.Format("O{0}", Campo)).ToString = String.Format("{0} DESC", Campo) Then
|
||||
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>")
|
||||
End If
|
||||
Orden = OrdenInicial & ViewState(String.Format("O{0}", Campo)).ToString
|
||||
ViewState("Orden") = Orden
|
||||
CargaGrid(Orden)
|
||||
End Sub
|
||||
|
||||
Protected Sub CargaGrid(Orden As String)
|
||||
Dim DV As DataView = Nothing
|
||||
DV = New DataView(DtIngresos, "", Orden, DataViewRowState.CurrentRows)
|
||||
If Orden <> String.Empty Then
|
||||
GvIngresos.DataSource = DV.ToTable()
|
||||
GvIngresos.DataBind()
|
||||
Else
|
||||
GvIngresos.DataSource = DtIngresos
|
||||
End If
|
||||
DV.Dispose()
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
Protected Sub GvIngresos_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvIngresos.RowDataBound
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
If e.Row.DBCampo("CvePresupuestoIngreso") = "" Then
|
||||
e.Row.FCLabel("LabelFuenteRecaudacion").Text = "Total"
|
||||
e.Row.ControlStyle.BackColor = Drawing.Color.LightGray
|
||||
e.Row.Cells(0).HorizontalAlign = HorizontalAlign.Center
|
||||
e.Row.Cells(0).Font.Bold() = True
|
||||
e.Row.Cells(1).Font.Bold() = True
|
||||
e.Row.Cells(2).Font.Bold() = True
|
||||
e.Row.Cells(3).Font.Bold() = True
|
||||
e.Row.Cells(4).Font.Bold() = True
|
||||
e.Row.Cells(5).Font.Bold() = True
|
||||
e.Row.Cells(6).Font.Bold() = True
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
End Class
|
||||
120
AC/RepMatrizEgresos.aspx
Normal file
120
AC/RepMatrizEgresos.aspx
Normal file
@@ -0,0 +1,120 @@
|
||||
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RepMatrizEgresos.aspx.vb" Inherits="AC_RepMatrizEgresos" %>
|
||||
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="HB" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="E" runat="Server">
|
||||
Reporte Matriz de Egresos
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
<img src="/Imagenes/separador02.gif" alt="" />
|
||||
<asp:ImageButton ID="ImgExcel" OnClick="ImgExcel_Click" runat="server" ImageUrl="/Imagenes/IconoExcel.gif" Width="17px" Height="17px" />
|
||||
<img src="/Imagenes/separador02.gif" alt="" />
|
||||
|
||||
<asp:ImageButton ID="BtnImprimir" OnClick="BtnImprimir_Click" runat="server" alt="Imprimir" src="/Imagenes/btnImprimir.gif" Style="cursor: pointer; height: 20px" />
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
|
||||
<asp:UpdatePanel ID="UpTitulos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<table class="table table-hover table-hover Widthall"><%--table-striped table-advance--%>
|
||||
<thead>
|
||||
<tr class="Titulos">
|
||||
<th width="90px">
|
||||
<asp:LinkButton ID="LbPartida" runat="server" CausesValidation="false" Text="" CommandArgument="Partida" OnClick="LbOrden_Click">
|
||||
Partida
|
||||
<asp:Literal ID="ImgPartida" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
||||
</asp:LinkButton>
|
||||
</th>
|
||||
<th width="220px">
|
||||
<asp:LinkButton ID="LbNombrePartida" runat="server" CausesValidation="false" Text="" CommandArgument="NombrePartida" OnClick="LbOrden_Click">
|
||||
Nombre de Partida
|
||||
<asp:Literal ID="ImgNombrePartida" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
||||
</asp:LinkButton>
|
||||
</th>
|
||||
<th width="100px">
|
||||
<asp:LinkButton ID="LbTipoGasto" runat="server" CausesValidation="false" Text="" CommandArgument="TipoGasto" OnClick="LbOrden_Click">
|
||||
Tipo de Gasto
|
||||
<asp:Literal ID="ImgTipoGasto" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
||||
</asp:LinkButton>
|
||||
</th>
|
||||
<th width="70px">
|
||||
<asp:LinkButton ID="LbCuentaCargo" runat="server" CausesValidation="false" Text="" CommandArgument="CuentaCargo" OnClick="LbOrden_Click">
|
||||
Cuenta Cargo<asp:Literal ID="ImgCuentaCargo" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
||||
</asp:LinkButton>
|
||||
</th>
|
||||
<th width="250px">
|
||||
<asp:LinkButton ID="LbNombreCuentaCargo" runat="server" CausesValidation="false" Text="" CommandArgument="NombreCuentaCargo" OnClick="LbOrden_Click">
|
||||
Nombre Cuenta Cargo
|
||||
<asp:Literal ID="ImgNombreCuentaCargo" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
||||
</asp:LinkButton>
|
||||
</th>
|
||||
<th width="90px">
|
||||
<asp:LinkButton ID="LbCuentaAbono" runat="server" CausesValidation="false" Text="" CommandArgument="CuentaAbono" OnClick="LbOrden_Click">
|
||||
Cuenta Abono
|
||||
<asp:Literal ID="ImgCuentaAbono" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
||||
</asp:LinkButton>
|
||||
</th>
|
||||
<th width="250px">
|
||||
<asp:LinkButton ID="LbNombreCuentaAbono" runat="server" CausesValidation="false" Text="" CommandArgument="NombreCuentaAbono" OnClick="LbOrden_Click">
|
||||
Nombre Cuenta Abono
|
||||
<asp:Literal ID="ImgNombreCuentaAbono" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
||||
</asp:LinkButton>
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
<asp:UpdatePanel ID="UPDatos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate><%--table-striped--%>
|
||||
<asp:GridView ID="Gv" runat="server" DataKeyNames="Partida" ShowHeader="false" AutoGenerateColumns="False" EmptyDataText="No se encontraron Registros" CssClass="table table-advance table-hover Widthall" Style="text-align: center;" GridLines="None">
|
||||
<Columns>
|
||||
<asp:BoundField DataField="Partida" ItemStyle-Width="90px" ControlStyle-CssClass="Texto" />
|
||||
<asp:BoundField DataField="NombrePartida" ItemStyle-Width="220px" ControlStyle-CssClass="Texto" />
|
||||
<asp:BoundField DataField="TipoGasto" ItemStyle-Width="100px" ControlStyle-CssClass="Texto" />
|
||||
<asp:BoundField DataField="CuentaCargo" ItemStyle-Width="70px" ControlStyle-CssClass="Texto" />
|
||||
<asp:BoundField DataField="NombreCuentaCargo" ItemStyle-Width="250px" ControlStyle-CssClass="Texto" />
|
||||
<asp:BoundField DataField="CuentaAbono" ItemStyle-Width="90px" ControlStyle-CssClass="Texto" />
|
||||
<asp:BoundField DataField="NombreCuentaAbono" ItemStyle-Width="250px" ControlStyle-CssClass="Texto" />
|
||||
</Columns>
|
||||
<%--<HeaderStyle CssClass="Titulos"></HeaderStyle>--%>
|
||||
<%--<AlternatingRowStyle CssClass="TextoAlterno"></AlternatingRowStyle>--%>
|
||||
<%--<RowStyle CssClass="Texto"></RowStyle>--%>
|
||||
</asp:GridView>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
<table runat="server" id="Tbl" style="display:none">
|
||||
<tr>
|
||||
<td>
|
||||
<asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" GridLines="None">
|
||||
<Columns>
|
||||
<asp:BoundField HeaderText="Partida" DataField="Partida" ItemStyle-Width="90px" ControlStyle-CssClass="Texto" />
|
||||
<asp:BoundField HeaderText="Nombre de Partida" DataField="NombrePartida" ItemStyle-Width="220px" ControlStyle-CssClass="Texto" />
|
||||
<asp:BoundField HeaderText="Tipo de Gasto" DataField="TipoGasto" ItemStyle-Width="100px" ControlStyle-CssClass="Texto" />
|
||||
<asp:BoundField HeaderText="Cuenta Cargo" DataField="CuentaCargo" ItemStyle-Width="70px" ControlStyle-CssClass="Texto" />
|
||||
<asp:BoundField HeaderText="Nombre Cuenta Cargo" DataField="NombreCuentaCargo" ItemStyle-Width="250px" ControlStyle-CssClass="Texto" />
|
||||
<asp:BoundField HeaderText="Cuenta Abono" DataField="CuentaAbono" ItemStyle-Width="90px" ControlStyle-CssClass="Texto" />
|
||||
<asp:BoundField HeaderText="Nombre Cuenta Abono" DataField="NombreCuentaAbono" ItemStyle-Width="250px" ControlStyle-CssClass="Texto" />
|
||||
</Columns>
|
||||
<HeaderStyle CssClass="Titulos"></HeaderStyle>
|
||||
<AlternatingRowStyle CssClass="TextoAlterno"></AlternatingRowStyle>
|
||||
<RowStyle CssClass="Texto"></RowStyle>
|
||||
</asp:GridView>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
||||
</asp:Content>
|
||||
105
AC/RepMatrizEgresos.aspx.vb
Normal file
105
AC/RepMatrizEgresos.aspx.vb
Normal file
@@ -0,0 +1,105 @@
|
||||
Option Strict On
|
||||
Option Explicit On
|
||||
|
||||
Imports System.Data
|
||||
Imports System.Linq
|
||||
Imports Extensiones
|
||||
Imports Microsoft.Reporting.WebForms
|
||||
|
||||
Partial Class AC_RepMatrizEgresos
|
||||
Inherits ClsPaginas
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||
|
||||
If Not Page.IsPostBack Then
|
||||
ViewState("Orden") = ""
|
||||
CargaDatos()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub CargaDatos()
|
||||
Dim AC As New ClsAC
|
||||
UPDatos.Update()
|
||||
Gv.DataBind()
|
||||
|
||||
If AC.GetMatrizGD() Then
|
||||
ViewState("DTMatrizEgresos") = AC.DtResultados
|
||||
GlobalDTAC_MatrizEgresos = AC.DtResultados
|
||||
End If
|
||||
|
||||
AC.Dispose()
|
||||
|
||||
If ViewState("Orden").ToString() <> String.Empty Then
|
||||
CargaGrid(ViewState("Orden").ToString())
|
||||
Else
|
||||
CargaGrid("")
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
#Region "O R D E N A M I E N T O"
|
||||
Protected Sub LbOrden_Click(ByVal sender As Object, ByVal e As EventArgs)
|
||||
Dim Orden As String = ""
|
||||
Dim Campo As String = ""
|
||||
Dim Literal As Literal = Nothing
|
||||
Const OrdenInicial As String = ""
|
||||
Dim Arg(2) As String
|
||||
|
||||
Arg = CType(sender, LinkButton).CommandArgument().ToString.Split(";"c)
|
||||
Campo = Arg(0)
|
||||
Literal = CType(CType(sender, LinkButton).NamingContainer.FindControl("Img" & Campo.Replace(",", "_")), Literal)
|
||||
|
||||
If ViewState(String.Format("O{0}", Campo)) IsNot Nothing AndAlso ViewState(String.Format("O{0}", Campo)).ToString = String.Format("{0} DESC", Campo) Then
|
||||
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>")
|
||||
End If
|
||||
Orden = OrdenInicial & ViewState(String.Format("O{0}", Campo)).ToString
|
||||
ViewState("Orden") = Orden
|
||||
CargaGrid(Orden)
|
||||
End Sub
|
||||
|
||||
Private Sub CargaGrid(Orden As String)
|
||||
If Orden <> String.Empty Then
|
||||
Dim DV As New DataView(CType(ViewState("DTMatrizEgresos"), DataTable), "", Orden, DataViewRowState.CurrentRows)
|
||||
Gv.DataSource = DV.ToTable()
|
||||
GvDatos.DataSource = DV.ToTable()
|
||||
DV.Dispose()
|
||||
Else
|
||||
Gv.DataSource = CType(ViewState("DTMatrizEgresos"), DataTable)
|
||||
GvDatos.DataSource = CType(ViewState("DTMatrizEgresos"), DataTable)
|
||||
End If
|
||||
Gv.DataBind()
|
||||
GvDatos.DataBind()
|
||||
UPDatos.Update()
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
#Region " EXPORTAR - PDF - EXCEL "
|
||||
Protected Sub ImgExcel_Click(sender As Object, e As ImageClickEventArgs)
|
||||
Tbl.ExportToExcel("Reporte Matriz de Egresos")
|
||||
End Sub
|
||||
|
||||
Protected Sub BtnImprimir_Click(sender As Object, e As ImageClickEventArgs)
|
||||
ImprimiReporte()
|
||||
End Sub
|
||||
'No quitar porque no funciona el exporta PDF
|
||||
Public Overrides Sub VerifyRenderingInServerForm(control As Control)
|
||||
' Verifies that the control is rendered
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
#Region "I M P R I M I R "
|
||||
|
||||
Protected Sub ImprimiReporte()
|
||||
Dim params As New List(Of ReportParameter)
|
||||
params.Add(New ReportParameter("pEmp", UsuarioActual.Empresa.Empresa))
|
||||
params.Add(New ReportParameter("pImg", New Uri(Server.MapPath(String.Format("~/Empresas/{0}/Logo.png", UsuarioActual.CveEmpresa))).AbsoluteUri))
|
||||
|
||||
ImprimirPDF("AC/Reportes/RepMatrizEgresos.rdlc", GlobalDTAC_MatrizEgresos, params, "RepMatrizEgresos")
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
End Class
|
||||
111
AC/RepMatrizIngresos.aspx
Normal file
111
AC/RepMatrizIngresos.aspx
Normal file
@@ -0,0 +1,111 @@
|
||||
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RepMatrizIngresos.aspx.vb" Inherits="AC_RepMatrizIngresos" %>
|
||||
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="HB" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="E" runat="Server">
|
||||
Reporte Matriz de Ingresos
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
<img src="/Imagenes/separador02.gif" alt="" />
|
||||
<asp:ImageButton ID="ImgExcel" OnClick="ImgExcel_Click" runat="server" ImageUrl="/Imagenes/IconoExcel.gif" Width="17px" Height="17px" />
|
||||
<img src="/Imagenes/separador02.gif" alt="" />
|
||||
|
||||
<asp:ImageButton ID="BtnImprimir" OnClick="BtnImprimir_Click" runat="server" alt="Imprimir" src="/Imagenes/btnImprimir.gif" Style="cursor: pointer; height: 20px" />
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
|
||||
<asp:UpdatePanel ID="UpTitulos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<table class="table table-hover table-advance Widthall">
|
||||
<thead>
|
||||
<tr class="Titulos">
|
||||
<th width="120px">
|
||||
<asp:LinkButton ID="LbCodigoRubroIngreso" runat="server" CausesValidation="false" Text="" CommandArgument="CodigoRubroIngreso" OnClick="LbOrden_Click">
|
||||
Código Rubro Ingreso
|
||||
<asp:Literal ID="ImgCodigoRubroIngreso" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
||||
</asp:LinkButton>
|
||||
</th>
|
||||
<th width="130px">
|
||||
<asp:LinkButton ID="LbCaracteristicas" runat="server" CausesValidation="false" Text="" CommandArgument="Caracteristicas" OnClick="LbOrden_Click">
|
||||
Características
|
||||
<asp:Literal ID="ImgCaracteristicas" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
||||
</asp:LinkButton>
|
||||
</th>
|
||||
<th width="100px">
|
||||
<asp:LinkButton ID="LbCuentaCargo" runat="server" CausesValidation="false" Text="" CommandArgument="CuentaCargo" OnClick="LbOrden_Click">
|
||||
Cuenta Cargo
|
||||
<asp:Literal ID="ImgCuentaCargo" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
||||
</asp:LinkButton>
|
||||
</th>
|
||||
<th width="300px">
|
||||
<asp:LinkButton ID="LbNombreCuentaCargo" runat="server" CausesValidation="false" Text="" CommandArgument="NombreCuentaCargo" OnClick="LbOrden_Click">
|
||||
Nombre Cuenta Cargo
|
||||
<asp:Literal ID="ImgNombreCuentaCargo" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
||||
</asp:LinkButton>
|
||||
</th>
|
||||
<th width="100px">
|
||||
<asp:LinkButton ID="LbCuentaAbono" runat="server" CausesValidation="false" Text="" CommandArgument="CuentaAbono" OnClick="LbOrden_Click">
|
||||
Cuenta Abono
|
||||
<asp:Literal ID="ImgCuentaAbono" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
||||
</asp:LinkButton>
|
||||
</th>
|
||||
<th width="330px">
|
||||
<asp:LinkButton ID="LbNombreCuentaAbono" runat="server" CausesValidation="false" Text="" CommandArgument="NombreCuentaAbono" OnClick="LbOrden_Click">
|
||||
Nombre Cuenta Abono
|
||||
<asp:Literal ID="ImgNombreCuentaAbono" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
||||
</asp:LinkButton>
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
<asp:UpdatePanel ID="UPDatos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate><%--table-striped--%>
|
||||
<asp:GridView ID="Gv" runat="server" DataKeyNames="CodigoRubroIngreso" ShowHeader="false" AutoGenerateColumns="False" EmptyDataText="No se encontraron Registros" CssClass="table table-advance table-hover Widthall" Style="text-align: center;" GridLines="None">
|
||||
<Columns>
|
||||
<asp:BoundField DataField="CodigoRubroIngreso" ItemStyle-Width="120px" ControlStyle-CssClass="Texto" />
|
||||
<asp:BoundField DataField="Caracteristicas" ItemStyle-Width="130px" ControlStyle-CssClass="Texto" />
|
||||
<asp:BoundField DataField="CuentaCargo" ItemStyle-Width="100px" ControlStyle-CssClass="Texto" />
|
||||
<asp:BoundField DataField="NombreCuentaCargo" ItemStyle-Width="300px" ControlStyle-CssClass="Texto" />
|
||||
<asp:BoundField DataField="CuentaAbono" ItemStyle-Width="100px" ControlStyle-CssClass="Texto" />
|
||||
<asp:BoundField DataField="NombreCuentaAbono" ItemStyle-Width="330px" ControlStyle-CssClass="Texto" />
|
||||
</Columns>
|
||||
<%-- <HeaderStyle CssClass="Titulos"></HeaderStyle>
|
||||
<AlternatingRowStyle CssClass="TextoAlterno"></AlternatingRowStyle>
|
||||
<RowStyle CssClass="Texto"></RowStyle>--%>
|
||||
</asp:GridView>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
<table runat="server" id="Tbl" style="display: none">
|
||||
<tr>
|
||||
<td>
|
||||
<asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" GridLines="None">
|
||||
<Columns>
|
||||
<asp:BoundField HeaderText="Código Rubro Ingreso" DataField="CodigoRubroIngreso" ItemStyle-Width="120px" ControlStyle-CssClass="Texto" />
|
||||
<asp:BoundField HeaderText="Características" DataField="Caracteristicas" ItemStyle-Width="130px" ControlStyle-CssClass="Texto" />
|
||||
<asp:BoundField HeaderText="Cuenta Cargo" DataField="CuentaCargo" ItemStyle-Width="100px" ControlStyle-CssClass="Texto" />
|
||||
<asp:BoundField HeaderText="Nombre Cuenta Cargo" DataField="NombreCuentaCargo" ItemStyle-Width="300px" ControlStyle-CssClass="Texto" />
|
||||
<asp:BoundField HeaderText="Cuenta Abono" DataField="CuentaAbono" ItemStyle-Width="100px" ControlStyle-CssClass="Texto" />
|
||||
<asp:BoundField HeaderText="Nombre Cuenta Abono" DataField="NombreCuentaAbono" ItemStyle-Width="330px" ControlStyle-CssClass="Texto" />
|
||||
</Columns>
|
||||
<HeaderStyle CssClass="Titulos"></HeaderStyle>
|
||||
<AlternatingRowStyle CssClass="TextoAlterno"></AlternatingRowStyle>
|
||||
<RowStyle CssClass="Texto"></RowStyle>
|
||||
</asp:GridView>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
||||
</asp:Content>
|
||||
101
AC/RepMatrizIngresos.aspx.vb
Normal file
101
AC/RepMatrizIngresos.aspx.vb
Normal file
@@ -0,0 +1,101 @@
|
||||
Option Strict On
|
||||
Option Explicit On
|
||||
|
||||
Imports System.Data
|
||||
Imports System.Linq
|
||||
Imports Extensiones
|
||||
Imports Microsoft.Reporting.WebForms
|
||||
|
||||
Partial Class AC_RepMatrizIngresos
|
||||
Inherits ClsPaginas
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||
If Not Page.IsPostBack Then
|
||||
ViewState("Orden") = ""
|
||||
CargaDatos()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub CargaDatos()
|
||||
Dim AC As New ClsAC
|
||||
UPDatos.Update()
|
||||
Gv.DataBind()
|
||||
|
||||
If AC.GetMatrizID() Then
|
||||
ViewState("DTMatrizIngresos") = AC.DtResultados
|
||||
GlobalDTAC_MatrizIngresos = AC.DtResultados
|
||||
End If
|
||||
|
||||
AC.Dispose()
|
||||
|
||||
If ViewState("Orden").ToString() <> String.Empty Then
|
||||
CargaGrid(ViewState("Orden").ToString())
|
||||
Else
|
||||
CargaGrid("")
|
||||
End If
|
||||
End Sub
|
||||
|
||||
#Region "O R D E N A M I E N T O"
|
||||
Protected Sub LbOrden_Click(ByVal sender As Object, ByVal e As EventArgs)
|
||||
Dim Orden As String = ""
|
||||
Dim Campo As String = ""
|
||||
Dim Literal As Literal = Nothing
|
||||
Const OrdenInicial As String = ""
|
||||
Dim Arg(2) As String
|
||||
|
||||
Arg = CType(sender, LinkButton).CommandArgument().ToString.Split(";"c)
|
||||
Campo = Arg(0)
|
||||
Literal = CType(CType(sender, LinkButton).NamingContainer.FindControl("Img" & Campo.Replace(",", "_")), Literal)
|
||||
|
||||
If ViewState(String.Format("O{0}", Campo)) IsNot Nothing AndAlso ViewState(String.Format("O{0}", Campo)).ToString = String.Format("{0} DESC", Campo) Then
|
||||
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>")
|
||||
End If
|
||||
Orden = OrdenInicial & ViewState(String.Format("O{0}", Campo)).ToString
|
||||
ViewState("Orden") = Orden
|
||||
CargaGrid(Orden)
|
||||
End Sub
|
||||
|
||||
Private Sub CargaGrid(Orden As String)
|
||||
If Orden <> String.Empty Then
|
||||
Dim DV As New DataView(CType(ViewState("DTMatrizIngresos"), DataTable), "", Orden, DataViewRowState.CurrentRows)
|
||||
Gv.DataSource = DV.ToTable()
|
||||
GvDatos.DataSource = DV.ToTable()
|
||||
DV.Dispose()
|
||||
Else
|
||||
Gv.DataSource = CType(ViewState("DTMatrizIngresos"), DataTable)
|
||||
GvDatos.DataSource = CType(ViewState("DTMatrizIngresos"), DataTable)
|
||||
End If
|
||||
Gv.DataBind()
|
||||
GvDatos.DataBind()
|
||||
UPDatos.Update()
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
#Region " EXPORTAR - PDF - EXCEL "
|
||||
Protected Sub ImgExcel_Click(sender As Object, e As ImageClickEventArgs)
|
||||
Tbl.ExportToExcel("Reporte Matriz de Egresos")
|
||||
End Sub
|
||||
|
||||
Protected Sub BtnImprimir_Click(sender As Object, e As ImageClickEventArgs)
|
||||
ImprimiReporte()
|
||||
End Sub
|
||||
'No quitar porque no funciona el exporta PDF
|
||||
Public Overrides Sub VerifyRenderingInServerForm(control As Control)
|
||||
' Verifies that the control is rendered
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
#Region "I M P R I M I R "
|
||||
Protected Sub ImprimiReporte()
|
||||
Dim params As New List(Of ReportParameter)
|
||||
params.Add(New ReportParameter("pEmp", UsuarioActual.Empresa.Empresa))
|
||||
params.Add(New ReportParameter("pImg", New Uri(Server.MapPath(String.Format("~/Empresas/{0}/Logo.png", UsuarioActual.CveEmpresa))).AbsoluteUri))
|
||||
|
||||
ImprimirPDF("AC/Reportes/RepMatrizIngresos.rdlc", GlobalDTAC_MatrizIngresos, params, "ReporteMatrizEgresos")
|
||||
End Sub
|
||||
#End Region
|
||||
End Class
|
||||
368
AC/RepPresupuestoEgresos.aspx
Normal file
368
AC/RepPresupuestoEgresos.aspx
Normal file
@@ -0,0 +1,368 @@
|
||||
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RepPresupuestoEgresos.aspx.vb" Inherits="AC_RepPresupuestoEgresos" %>
|
||||
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="HB" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="E" runat="Server">
|
||||
Estado del Ejercicio del Presupuesto de Egresos
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
|
||||
<li>
|
||||
<asp:LinkButton ID="ImgExcel" OnClick="ImgExcel_Click" runat="server"><i class="fa fa-ad-excel"></i> Exporta Excel</asp:LinkButton>
|
||||
</li>
|
||||
<li>
|
||||
<asp:LinkButton ID="BtnImprimir" OnClick="BtnImprimir_Click" runat="server"><i class="fa fa-print"></i> Imprimir</asp:LinkButton>
|
||||
</li>
|
||||
|
||||
<%--<img src="/Imagenes/separador02.gif" alt="" />
|
||||
<asp:ImageButton ID="ImgExcel" OnClick="ImgExcel_Click" runat="server" ImageUrl="/Imagenes/IconoExcel.gif" Width="17px" Height="17px" />
|
||||
<img src="/Imagenes/separador02.gif" alt="" />
|
||||
<asp:ImageButton ID="BtnImprimir" OnClick="BtnImprimir_Click" runat="server" alt="Imprimir" src="/Imagenes/btnImprimir.gif" Style="cursor: pointer; height: 20px" /> --%>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
|
||||
|
||||
<%--<asp:UpdatePanel ID="UPFiltros" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="portlet solid grey-cascade portlet-filter" style="">
|
||||
<div class="portlet-title portlet-filterT" style="">
|
||||
<div class="titlefiltros caption ">
|
||||
<ul class="list-inline">
|
||||
<li>Cap. Objeto del Gasto:
|
||||
<asp:DropDownList ID="DdlCapituloClasificaciones" runat="server" AppendDataBoundItems="true" DataTextField="CodigoClasificacion" DataValueField="CveClasificacion" Width="150px">
|
||||
<asp:ListItem Selected="True" Text="Todas" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</li>
|
||||
<li>Programa Operativo:
|
||||
<asp:DropDownList ID="DdlProgramaOperativo" runat="server" AppendDataBoundItems="true" DataTextField="ProgramaOperativo" DataValueField="CveProgramaOperativo" Width="150px">
|
||||
<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</li>
|
||||
<li>Fecha Corte:
|
||||
<asp:TextBox ID="txtFechaF" runat="server" Width="65px"></asp:TextBox>
|
||||
<asp:ImageButton runat="server" ID="imgCalendarioF" ImageUrl="/Imagenes/calendar.png" ImageAlign="AbsMiddle" Width="16px" Height="16px" AlternateText="Click para ver el Calendario" />
|
||||
<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="Calendario2" TargetControlID="txtFechaF" PopupButtonID="imgCalendarioF" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
<asp:RequiredFieldValidator ID="rfvFechaF" runat="server" ControlToValidate="txtFechaF" Display="None" ErrorMessage="El campo <b>''Fecha Final''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="Valida"></asp:RequiredFieldValidator>
|
||||
<asp:CompareValidator ID="cvFechaF" runat="server" ControlToValidate="txtFechaF" Display="None" ErrorMessage="El campo <b>''Fecha Final''</b> no tienes el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="Valida"></asp:CompareValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="vcoRfvFF" runat="server" HighlightCssClass="vco" TargetControlID="rfvFechaF" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
<ajax:ValidatorCalloutExtender ID="vcoCvFF" runat="server" HighlightCssClass="vco" TargetControlID="cvFechaF" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</li>
|
||||
<li>
|
||||
<asp:DropDownList ID="DdlOrden" runat="server" Width="150px">
|
||||
<asp:ListItem Selected="True" Text="Objeto del Gasto" Value="1"></asp:ListItem>
|
||||
<asp:ListItem Text="Fuente de Financiamiento" Value="2"></asp:ListItem>
|
||||
<asp:ListItem Text="Proyecto / Proceso" Value="3"></asp:ListItem>
|
||||
<asp:ListItem Text="Unidad Administrativa" Value="4"></asp:ListItem>
|
||||
<asp:ListItem Text="Proyecto / Proceso - F. Financiamiento" Value="5"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="tools">
|
||||
<asp:Button ID="consultar" runat="server" Text="Consultar" class="btn btn-primary" OnClick="consultar_Click" />
|
||||
<a href="javascript:;" class="expand"></a>
|
||||
<a onclick="document.getElementById('C_consultar').click();" class="reload"></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body" style="display: none;">
|
||||
<ul class="list-inline">
|
||||
<li>Objeto del Gasto:
|
||||
<asp:DropDownList ID="DdlClasificaciones" runat="server" AppendDataBoundItems="true" DataTextField="CodigoClasificacion" DataValueField="CveClasificacion" Width="150px">
|
||||
<asp:ListItem Selected="True" Text="Todas" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</li>
|
||||
<li>Unidad Administrativa:
|
||||
<asp:DropDownList ID="DdlUnidadAdministrativa" runat="server" AppendDataBoundItems="true" DataTextField="UnidadAdministrativa" DataValueField="CveUnidadAdministrativa" Width="150px">
|
||||
<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</li>
|
||||
<li>Ejercicio:
|
||||
<asp:DropDownList ID="DdlEjercicio" runat="server" Width="80px">
|
||||
<asp:ListItem Text="2014" Value="2014"></asp:ListItem>
|
||||
<asp:ListItem Text="2015" Value="2015"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</li>
|
||||
<li>
|
||||
<asp:DropDownList ID="DdlGrupo" runat="server" Width="80px" Visible="false">
|
||||
<asp:ListItem Selected="True" Text="Año/Mes" Value="3"></asp:ListItem>
|
||||
<asp:ListItem Text="Fecha" Value="4"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</li>
|
||||
</ul>
|
||||
<ul class="list-inline">
|
||||
<li>Fuente de Financiamiento:
|
||||
<asp:DropDownList ID="DdlFuenteFinanciamiento" runat="server" AppendDataBoundItems="true" DataTextField="FuenteFinanciamiento" DataValueField="CveFuenteFinanciamiento" Width="150px">
|
||||
<asp:ListItem Selected="True" Text="Todas" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</li>
|
||||
<li>
|
||||
<asp:DropDownList ID="DropDownList2" runat="server" Visible="false" Width="150px">
|
||||
<asp:ListItem Text="Presupuesto" Value="1"></asp:ListItem>
|
||||
<asp:ListItem Text="AnteProyecto" Value="2"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>--%>
|
||||
|
||||
<asp:UpdatePanel ID="UPFiltros" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="portlet solid grey-cascade portlet-filter">
|
||||
<div class="portlet-title portlet-filterT smalltitle">
|
||||
<div class="tools">
|
||||
<asp:Button ID="consultar" runat="server" Text="Consultar" CssClass="btn btn-primary" OnClick="consultar_Click" />
|
||||
<a href="javascript;" class="expand" data-original-title="" title=""></a>
|
||||
</div>
|
||||
<div class="titlefiltros caption ">
|
||||
<div class="row">
|
||||
<div class="col-md-1 ">
|
||||
<label class="truncate text-size-12">Cap. Objeto del Gasto:</label>
|
||||
</div>
|
||||
<div class="col-md-2 ">
|
||||
<asp:DropDownList ID="DdlCapituloClasificaciones" CssClass="form-control input-sm select2me " runat="server" AppendDataBoundItems="true" DataTextField="CodigoClasificacion" DataValueField="CveClasificacion" OnSelectedIndexChanged="DdlCapituloClasificaciones_SelectedIndexChanged" AutoPostBack="true" Width="100%">
|
||||
<asp:ListItem Selected="True" Text="Todas" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
<div class="col-md-1 ">
|
||||
<label class="truncate text-size-12">Programa Operativo:</label>
|
||||
</div>
|
||||
<div class="col-md-2 ">
|
||||
<asp:DropDownList ID="DdlProgramaOperativo" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" DataTextField="ProgramaOperativo" DataValueField="CveProgramaOperativo" Width="100%">
|
||||
<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
<div class="col-md-1 ">
|
||||
<label class="truncate text-size-12">Fecha Corte:</label>
|
||||
</div>
|
||||
<div class="col-md-2 ">
|
||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 100% !important; padding: 0px;">
|
||||
<asp:TextBox Width="80%" ID="txtFechaF" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="imgCalendarioF" class="btn default " Text="<i class='fa fa-calendar'></i>" 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="Calendario2" TargetControlID="txtFechaF" PopupButtonID="imgCalendarioF" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
<asp:RequiredFieldValidator ID="rfvFechaF" runat="server" ControlToValidate="txtFechaF" Display="None" ErrorMessage="El campo <b>''Fecha Final''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="Valida"></asp:RequiredFieldValidator>
|
||||
<asp:CompareValidator ID="cvFechaF" runat="server" ControlToValidate="txtFechaF" Display="None" ErrorMessage="El campo <b>''Fecha Final''</b> no tienes el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="Valida"></asp:CompareValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="vcoRfvFF" runat="server" HighlightCssClass="vco" TargetControlID="rfvFechaF" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
<ajax:ValidatorCalloutExtender ID="vcoCvFF" runat="server" HighlightCssClass="vco" TargetControlID="cvFechaF" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
|
||||
<%--<asp:CompareValidator ID="CVFechaFinal" runat="server" ControlToValidate="txtFechaF" Display="None" ErrorMessage="El campo <b>''Fecha Final''</b> no debe ser mayor al Ejercicio seleccionado, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="LessThan" Type="Date" ValidationGroup="Valida"></asp:CompareValidator>--%>
|
||||
<asp:RangeValidator ID="RVFechaFinal" ErrorMessage="El campo <b>''Fecha Final''</b> no debe ser mayor al Ejercicio seleccionado, por favor intente de nuevo." ControlToValidate="txtFechaF" MaximumValue="31/12/2016" MinimumValue="01/01/2000" Type="Date" runat="server" Display="None"/>
|
||||
<ajax:ValidatorCalloutExtender ID="VCEFechaFinal" runat="server" HighlightCssClass="vco" TargetControlID="RVFechaFinal" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body" style="display: none;">
|
||||
<div class="row">
|
||||
<label class="col-md-1 truncate text-size-12">Objeto del Gasto:</label>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="DdlClasificaciones" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" DataTextField="CodigoClasificacion" DataValueField="CveClasificacion" Width="100%">
|
||||
<asp:ListItem Selected="True" Text="Todas" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
<label class="col-md-1 truncate text-size-12">Unidad Administrativa:</label>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="DdlUnidadAdministrativa" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" DataTextField="UnidadAdministrativa" DataValueField="CveUnidadAdministrativa" Width="100%">
|
||||
<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
<label class="col-md-1 truncate text-size-12">Ejercicio:</label>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="DdlEjercicio" AutoPostBack="true" CssClass="select2me" OnSelectedIndexChanged="DdlEjercicio_SelectedIndexChanged" runat="server" Width="100%" DataTextField="Ejercicio" DataValueField="Ejercicio"></asp:DropDownList>
|
||||
</div>
|
||||
<div class="col-md-1"></div>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="DdlOrden" CssClass="form-control input-sm" runat="server" Width="100%">
|
||||
<asp:ListItem Selected="True" Text="Objeto del Gasto" Value="1"></asp:ListItem>
|
||||
<asp:ListItem Text="Objeto del Gasto - Proyecto / Proceso" Value="6"></asp:ListItem>
|
||||
<asp:ListItem Text="Fuente de Financiamiento" Value="2"></asp:ListItem>
|
||||
<asp:ListItem Text="Proyecto / Proceso" Value="3"></asp:ListItem>
|
||||
<asp:ListItem Text="Unidad Administrativa" Value="4"></asp:ListItem>
|
||||
<asp:ListItem Text="Proyecto / Proceso - F. Financiamiento" Value="5"></asp:ListItem>
|
||||
<asp:ListItem Text="Tipo Gasto" Value="7"></asp:ListItem>
|
||||
<asp:ListItem Text="Clasificación Funcional" Value="8"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<label class="col-md-1 truncate text-size-12">Fuente de Financiamiento:</label>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="DdlFuenteFinanciamiento" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" DataTextField="FuenteFinanciamiento" DataValueField="CveFuenteFinanciamiento" Width="100%">
|
||||
<asp:ListItem Selected="True" Text="Todas" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
<label class="col-md-1 truncate text-size-12">Tipo Gasto:</label>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="DdlTipoGasto" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" DataTextField="TipoGasto" DataValueField="CveTipoGasto" Width="100%">
|
||||
<asp:ListItem Selected="True" Text="Todas" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
<div class="col-md-1"></div>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="DdlGrupo" CssClass="form-control input-sm" runat="server" Width="100%" Visible="false">
|
||||
<asp:ListItem Selected="True" Text="Año/Mes" Value="3"></asp:ListItem>
|
||||
<asp:ListItem Text="Fecha" Value="4"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
<div class="col-md-1"></div>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="DropDownList2" CssClass="form-control input-sm" runat="server" Visible="false" Width="100%">
|
||||
<asp:ListItem Text="Presupuesto" Value="1"></asp:ListItem>
|
||||
<asp:ListItem Text="AnteProyecto" Value="2"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
<br />
|
||||
|
||||
<table runat="server" id="Tbl">
|
||||
<tr>
|
||||
<td>
|
||||
<asp:UpdatePanel ID="UPPDatos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
|
||||
<asp:GridView ID="Gv" ClientIDMode="Static" runat="server" AutoGenerateColumns="False" Width="100%" EmptyDataText="No se encontraron Registros de Presupuesto de Egresos del Ejercicio" CssClass="table table-striped table-advance table-hover ScrollAD" data-freezerows="1" Style="text-align: center;" GridLines="None">
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderText="Cuenta">
|
||||
<HeaderTemplate>
|
||||
Grupo
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlGrupo" runat="server" Text='<%# Eval("GPO").ToString%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="320px" HorizontalAlign="Left" />
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField DataField="Aprobado" HeaderText="Aprobado" DataFormatString="{0:N2}" ItemStyle-Width="120px" ItemStyle-HorizontalAlign="Right"></asp:BoundField>
|
||||
<asp:BoundField DataField="Modificado" HeaderText="Modificado" DataFormatString="{0:N2}" ItemStyle-Width="120px" ItemStyle-HorizontalAlign="Right"></asp:BoundField>
|
||||
<asp:BoundField DataField="Vigente" HeaderText="Vigente" DataFormatString="{0:N2}" ItemStyle-Width="120px" ItemStyle-HorizontalAlign="Right"></asp:BoundField>
|
||||
<asp:TemplateField HeaderText="Comprometido">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLComprometido" Text='<%# CDbl(Eval("Comprometido").ToString).ToString("N2") %>' Target="_blank" runat="server" />
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Right" Width="120px" />
|
||||
</asp:TemplateField>
|
||||
<%--<asp:BoundField DataField="Comprometido" HeaderText="Comprometido" DataFormatString="{0:N2}" ItemStyle-Width="70px" ItemStyle-HorizontalAlign="Right">
|
||||
<ItemStyle HorizontalAlign="Right" Width="100px" />
|
||||
</asp:BoundField>--%>
|
||||
<asp:TemplateField HeaderText="Por Comprometer">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="lblXComprometer" runat="server" Text='<%# (CDbl(Eval("Vigente").ToString) - CDbl(Eval("Comprometido").ToString)).ToString("N2")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Right" Width="120px" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Devengado">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLDevengado" Text='<%# CDbl(Eval("Devengado").ToString).ToString("N2") %>' Target="_blank" runat="server" />
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Right" Width="120px" />
|
||||
</asp:TemplateField>
|
||||
<%-- <asp:BoundField DataField="Devengado" HeaderText="Devengado" DataFormatString="{0:N2}" ItemStyle-Width="70px" ItemStyle-HorizontalAlign="Right">
|
||||
<ItemStyle HorizontalAlign="Right" Width="100px" />
|
||||
</asp:BoundField>--%>
|
||||
<asp:TemplateField HeaderText="Por Devengar">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="lblXDevengar" runat="server" Text='<%# (CDbl(Eval("Comprometido").ToString) - CDbl(Eval("Devengado").ToString)).ToString("N2")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Right" Width="120px" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Ejercido">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLEjercido" Text='<%# CDbl(Eval("Ejercido").ToString).ToString("N2") %>' Target="_blank" runat="server" />
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Right" Width="120px" />
|
||||
</asp:TemplateField>
|
||||
<%-- <asp:BoundField DataField="Ejercido" HeaderText="Ejercido" DataFormatString="{0:N2}" ItemStyle-Width="70px" ItemStyle-HorizontalAlign="Right">
|
||||
<ItemStyle HorizontalAlign="Right" Width="100px" />
|
||||
</asp:BoundField>--%>
|
||||
<asp:TemplateField HeaderText="Pagado">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLPagado" Text='<%# CDbl(Eval("Pagado").ToString).ToString("N2") %>' Target="_blank" runat="server" />
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Right" Width="120px" />
|
||||
</asp:TemplateField>
|
||||
<%--<asp:BoundField DataField="Pagado" HeaderText="Pagado" DataFormatString="{0:N2}" ItemStyle-Width="70px" ItemStyle-HorizontalAlign="Right">
|
||||
<ItemStyle HorizontalAlign="Right" Width="100px" />
|
||||
</asp:BoundField>--%>
|
||||
<asp:TemplateField HeaderText="Por Pagar">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="lblXPagar" runat="server" Text='<%# (CDbl(Eval("Ejercido").ToString) - CDbl(Eval("Pagado").ToString)).ToString("N2")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Right" Width="120px" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="lblScroll" runat="server" Text=""></asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Right" Width="10px" />
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
<HeaderStyle CssClass="Titulos"></HeaderStyle>
|
||||
<AlternatingRowStyle CssClass="TextoAlterno"></AlternatingRowStyle>
|
||||
<RowStyle CssClass="Texto"></RowStyle>
|
||||
</asp:GridView>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<%--<table runat="server" id="Tbl" style="display: none;">
|
||||
<tr>
|
||||
<td>
|
||||
<asp:UpdatePanel runat="server">
|
||||
<ContentTemplate>
|
||||
<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" GridLines="None">
|
||||
<Columns>
|
||||
<asp:BoundField HeaderText="Clasificación Funcional" DataField="ClasificacionFuncional" DataFormatString="{0}" ItemStyle-Width="400px" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField HeaderText="Clave" DataField="ClaveClasificacionFuncional" DataFormatString="{0}" ItemStyle-Width="100px" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField HeaderText="Estatus" DataField="Estatus" ItemStyle-Width="100px" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField HeaderText="Fecha" DataField="FechaIng" DataFormatString="{0}" ItemStyle-Width="120px" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField HeaderText="Usuario" DataField="Usuario" ItemStyle-Width="100px" ItemStyle-HorizontalAlign="Left" />
|
||||
</Columns>
|
||||
<HeaderStyle CssClass="Titulos" />
|
||||
<RowStyle CssClass="Texto" />
|
||||
<AlternatingRowStyle CssClass="TextoAlterno" />
|
||||
</asp:GridView>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</td>
|
||||
</tr>
|
||||
</table>--%>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
||||
<%--<script type="text/javascript">
|
||||
function pageLoad() {
|
||||
$(document).ready(function () {
|
||||
gridviewScroll();
|
||||
});
|
||||
|
||||
function gridviewScroll() {
|
||||
var Tam = TamañoVentana();
|
||||
var Alto = Tam.height - 245;
|
||||
|
||||
$('#<%=Gv.ClientID%>').gridviewScroll({
|
||||
width: 1736,//995,
|
||||
height: Alto,
|
||||
freezesize: 12,
|
||||
headerrowcount: 1
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
</script>--%>
|
||||
</asp:Content>
|
||||
273
AC/RepPresupuestoEgresos.aspx.vb
Normal file
273
AC/RepPresupuestoEgresos.aspx.vb
Normal file
@@ -0,0 +1,273 @@
|
||||
Option Explicit On
|
||||
Option Strict On
|
||||
|
||||
Imports Extensiones
|
||||
Imports System.Data
|
||||
Imports Microsoft.Reporting.WebForms
|
||||
|
||||
Partial Class AC_RepPresupuestoEgresos
|
||||
Inherits ClsPaginas
|
||||
|
||||
#Region " PROPIEDADES "
|
||||
Private Property DtPresupuestoEgresos As DataTable
|
||||
Get
|
||||
Return CType(ViewState("DtPresupuestoEgresos"), DataTable)
|
||||
End Get
|
||||
Set(value As DataTable)
|
||||
ViewState("DtPresupuestoEgresos") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property EjercicioAC As Integer
|
||||
Get
|
||||
Return ViewState("EjercicioAC").ToString.ToEntero
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
ViewState("EjercicioAC") = value
|
||||
End Set
|
||||
End Property
|
||||
#End Region
|
||||
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||
If Not Page.IsPostBack Then
|
||||
txtFechaF.Text = Now.ToShortDateString
|
||||
CargaCombos()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
|
||||
#Region " VALORES INICIALES "
|
||||
Private Sub CargaCombos()
|
||||
Dim ClsConta As New ClsContPAQi(UsuarioActual.Empresa)
|
||||
If ClsConta.GetEjercicios() Then
|
||||
DdlEjercicio.DataSource = ClsConta.DtResultados
|
||||
Else
|
||||
DdlEjercicio.DataSource = Nothing
|
||||
End If
|
||||
ClsConta.Dispose()
|
||||
DdlEjercicio.DataBind()
|
||||
|
||||
DdlEjercicio.SelectedValueExist(UsuarioActual.Empresa.EjercicioActual.ToString)
|
||||
|
||||
DdlCapituloClasificaciones.DataSource = GlobalDTACClasificadorObjetoGasto(UsuarioActual.CveEmpresa).FiltraParametros("NivelClasificacion = 1", "Codigo")
|
||||
DdlCapituloClasificaciones.DataBind()
|
||||
|
||||
DdlClasificaciones.DataSource = GlobalDTACClasificadorObjetoGasto(UsuarioActual.CveEmpresa).FiltraParametros("NivelClasificacion = 4", "Codigo")
|
||||
DdlClasificaciones.DataBind()
|
||||
|
||||
DdlFuenteFinanciamiento.DataSource = GlobalDTAC_FuentesFinanciamiento.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
|
||||
DdlFuenteFinanciamiento.DataBind()
|
||||
|
||||
DdlProgramaOperativo.DataSource = GlobalDTAC_ProgramaOperativo(UsuarioActual.CveEmpresa).FiltraParametros(String.Format("Ejercicio = {0}", DdlEjercicio.SelectedValue))
|
||||
DdlProgramaOperativo.DataBind()
|
||||
|
||||
DdlUnidadAdministrativa.DataSource = GlobalDTAC_UnidadesAdministrativas(UsuarioActual.CveEmpresa)
|
||||
DdlUnidadAdministrativa.DataBind()
|
||||
|
||||
DdlTipoGasto.DataSource = GlobalDTAC_TipoGasto '.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
|
||||
DdlTipoGasto.DataBind()
|
||||
|
||||
DdlEjercicio_SelectedIndexChanged(DdlEjercicio, EventArgs.Empty)
|
||||
End Sub
|
||||
Protected Sub DdlEjercicio_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||
DdlProgramaOperativo.Items.Clear()
|
||||
|
||||
DdlProgramaOperativo.DataSource = GlobalDTAC_ProgramaOperativo(UsuarioActual.CveEmpresa).FiltraParametros(String.Format("Ejercicio = {0}", DdlEjercicio.SelectedValue))
|
||||
DdlProgramaOperativo.DataBind()
|
||||
|
||||
DdlProgramaOperativo.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
|
||||
LimitaFechaCorte()
|
||||
|
||||
UPFiltros.Update()
|
||||
End Sub
|
||||
Private Sub LimitaFechaCorte()
|
||||
If DdlEjercicio.SelectedValue.ToEntero = Year(Now) Then
|
||||
Calendario2.EndDate = Now
|
||||
RVFechaFinal.MaximumValue = Now.ToShortDateString
|
||||
txtFechaF.Text = Now.ToShortDateString
|
||||
Else
|
||||
Calendario2.EndDate = String.Format("31/12/{0}", DdlEjercicio.SelectedValue.ToEntero).ToDate
|
||||
RVFechaFinal.MaximumValue = String.Format("31/12/{0}", DdlEjercicio.SelectedValue.ToEntero)
|
||||
txtFechaF.Text = String.Format("31/12/{0}", DdlEjercicio.SelectedValue.ToEntero)
|
||||
End If
|
||||
End Sub
|
||||
Protected Sub DdlCapituloClasificaciones_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||
DdlClasificaciones.Items.Clear()
|
||||
|
||||
If DdlCapituloClasificaciones.SelectedValue.ToEntero > 1 Then
|
||||
DdlClasificaciones.DataSource = GlobalDTACClasificadorObjetoGasto(UsuarioActual.CveEmpresa).FiltraParametros(String.Format("NivelClasificacion = 4 AND CodigoClasificacion LIKE '{0}%'", DdlCapituloClasificaciones.SelectedItem.Text.Substring(0, 1)), "Codigo")
|
||||
Else
|
||||
DdlClasificaciones.DataSource = GlobalDTACClasificadorObjetoGasto(UsuarioActual.CveEmpresa).FiltraParametros("NivelClasificacion = 4", "Codigo")
|
||||
End If
|
||||
|
||||
DdlClasificaciones.Items.Insert(0, New ListItem("Todas", "-1"))
|
||||
DdlClasificaciones.DataBind()
|
||||
UPFiltros.Update()
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
|
||||
#Region " CARGA DATOS "
|
||||
Protected Sub consultar_Click(sender As Object, e As EventArgs)
|
||||
CargaDatos()
|
||||
End Sub
|
||||
Private Sub CargaDatos()
|
||||
Dim objAC As New ClsContPAQi(UsuarioActual.Empresa)
|
||||
Dim FechaF As Date = txtFechaF.Text.ToDate
|
||||
Dim Capitulo As String = If(DdlCapituloClasificaciones.SelectedValue.ToEntero = -1, "-1", GlobalDTACClasificadorObjetoGasto.FiltraParametros(String.Format("CveClasificacion = {0}", DdlCapituloClasificaciones.SelectedValue.ToEntero)).Rows(0)("Codigo").ToString.Substring(0, 1))
|
||||
|
||||
If objAC.GetRepPresupuestosEgresosSaldos(DdlEjercicio.SelectedValue.ToEntero, FechaF, Capitulo, DdlClasificaciones.SelectedValue.ToEntero, DdlFuenteFinanciamiento.SelectedValue.ToEntero, DdlProgramaOperativo.SelectedValue.ToEntero, DdlUnidadAdministrativa.SelectedValue.ToEntero, DdlTipoGasto.SelectedValue.ToEntero, DdlOrden.SelectedValue.ToEntero) Then
|
||||
DtPresupuestoEgresos = objAC.DtResultados
|
||||
|
||||
If Not (DdlOrden.SelectedValue.ToEntero = 1 OrElse DdlOrden.SelectedValue.ToEntero = 6 OrElse DdlOrden.SelectedValue.ToEntero = 8) Then
|
||||
DtPresupuestoEgresos.Rows.RemoveAt(0)
|
||||
DtPresupuestoEgresos.Rows.RemoveAt(0)
|
||||
DtPresupuestoEgresos.Rows.RemoveAt(0)
|
||||
End If
|
||||
|
||||
Gv.DataSource = DtPresupuestoEgresos
|
||||
Else
|
||||
Gv.DataSource = Nothing
|
||||
DtPresupuestoEgresos = Nothing
|
||||
End If
|
||||
|
||||
objAC.Dispose()
|
||||
|
||||
'Carga Grid
|
||||
Gv.DataBind()
|
||||
UPPDatos.Update()
|
||||
End Sub
|
||||
|
||||
Private Sub CargaDatosANT()
|
||||
Dim AC As New ClsContPAQi(UsuarioActual.Empresa)
|
||||
Dim Ejercicio As Integer = DdlEjercicio.SelectedValue.ToEntero
|
||||
UPPDatos.Update()
|
||||
Gv.DataBind()
|
||||
|
||||
If AC.RepPresupuestoEgresosGet(Ejercicio) Then
|
||||
Gv.DataSource = AC.DtResultados
|
||||
Gv.DataBind()
|
||||
End If
|
||||
|
||||
AC.Dispose()
|
||||
End Sub
|
||||
|
||||
Protected Sub Gv_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles Gv.RowDataBound
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
|
||||
If e.Row.DBCampo("CodigoClasificacion") = "8" Then
|
||||
'CLASIFICACION FUNCIONAL
|
||||
Select Case e.Row.DBCampo("Nivel")
|
||||
Case "5" : e.Row.Font.Bold = True
|
||||
|
||||
End Select
|
||||
Else
|
||||
If e.Row.DBCampo("Nivel") = "5" Then
|
||||
e.Row.CssClass = "Totales"
|
||||
ElseIf e.Row.DBCampo("Nivel") = "4" Then
|
||||
e.Row.FCLiteral("LtlGrupo").Text = e.Row.DBCampo("Clasificacion1")
|
||||
e.Row.CssClass = "SubTotales2"
|
||||
ElseIf e.Row.DBCampo("Nivel") = "3" Then
|
||||
e.Row.FCLiteral("LtlGrupo").Text = e.Row.DBCampo("Clasificacion2")
|
||||
e.Row.CssClass = "SubTotales3"
|
||||
ElseIf e.Row.DBCampo("Nivel") = "2" Then
|
||||
e.Row.FCLiteral("LtlGrupo").Text = e.Row.DBCampo("Clasificacion3")
|
||||
e.Row.Font.Bold = True
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
If e.Row.DBCampo("Comprometido").ToDecimal > e.Row.DBCampo("Vigente").ToDecimal Then e.Row.FCHyperLink("HLComprometido").ForeColor = Drawing.Color.Red
|
||||
If e.Row.DBCampo("Devengado").ToDecimal > e.Row.DBCampo("Comprometido").ToDecimal Then e.Row.FCHyperLink("HLDevengado").ForeColor = Drawing.Color.Red
|
||||
If e.Row.DBCampo("Ejercido").ToDecimal > e.Row.DBCampo("Devengado").ToDecimal Then e.Row.FCHyperLink("HLEjercido").ForeColor = Drawing.Color.Red
|
||||
If e.Row.DBCampo("Pagado").ToDecimal > e.Row.DBCampo("Ejercido").ToDecimal Then e.Row.FCHyperLink("HLPagado").ForeColor = Drawing.Color.Red
|
||||
|
||||
e.Row.FCHyperLink("HLComprometido").NavigateUrl = String.Format("/AC/RepPresupuestoEgresosDetalle.aspx?MM=1&PO={0}&FF={1}&TG={2}&UA={3}&C={4}&COG={5}&FeI={6}&FeF={7}&Ej={8}", e.Row.DBCampo("CveProgramaOperativo").ToEntero, e.Row.DBCampo("CveFuenteFinanciamiento").ToEntero, e.Row.DBCampo("CveTipoGasto").ToEntero, e.Row.DBCampo("CveUnidadAdministrativa").ToEntero, e.Row.DBCampo("CveClasificacion").ToEntero, e.Row.DBCampo("CodigoOG").ToEntero, String.Format("01/01/{0}", DdlEjercicio.SelectedItem.Text), If(txtFechaF.Text <> "", txtFechaF.Text, Date.Now.ToString("dd/MM/yyyy")), DdlEjercicio.SelectedValue)
|
||||
e.Row.FCHyperLink("HLComprometido").CssClass = "Texto"
|
||||
e.Row.FCHyperLink("HLDevengado").NavigateUrl = String.Format("/AC/RepPresupuestoEgresosDetalle.aspx?MM=2&PO={0}&FF={1}&TG={2}&UA={3}&C={4}&COG={5}&FeI={6}&FeF={7}&Ej={8}", e.Row.DBCampo("CveProgramaOperativo").ToEntero, e.Row.DBCampo("CveFuenteFinanciamiento").ToEntero, e.Row.DBCampo("CveTipoGasto").ToEntero, e.Row.DBCampo("CveUnidadAdministrativa").ToEntero, e.Row.DBCampo("CveClasificacion").ToEntero, e.Row.DBCampo("CodigoOG").ToEntero, String.Format("01/01/{0}", DdlEjercicio.SelectedItem.Text), If(txtFechaF.Text <> "", txtFechaF.Text, Date.Now.ToString("dd/MM/yyyy")), DdlEjercicio.SelectedValue)
|
||||
e.Row.FCHyperLink("HLDevengado").CssClass = "Texto"
|
||||
e.Row.FCHyperLink("HLEjercido").NavigateUrl = String.Format("/AC/RepPresupuestoEgresosDetalle.aspx?MM=3&PO={0}&FF={1}&TG={2}&UA={3}&C={4}&COG={5}&FeI={6}&FeF={7}&Ej={8}", e.Row.DBCampo("CveProgramaOperativo").ToEntero, e.Row.DBCampo("CveFuenteFinanciamiento").ToEntero, e.Row.DBCampo("CveTipoGasto").ToEntero, e.Row.DBCampo("CveUnidadAdministrativa").ToEntero, e.Row.DBCampo("CveClasificacion").ToEntero, e.Row.DBCampo("CodigoOG").ToEntero, String.Format("01/01/{0}", DdlEjercicio.SelectedItem.Text), If(txtFechaF.Text <> "", txtFechaF.Text, Date.Now.ToString("dd/MM/yyyy")), DdlEjercicio.SelectedValue)
|
||||
e.Row.FCHyperLink("HLEjercido").CssClass = "Texto"
|
||||
e.Row.FCHyperLink("HLPagado").NavigateUrl = String.Format("/AC/RepPresupuestoEgresosDetalle.aspx?MM=4&PO={0}&FF={1}&TG={2}&UA={3}&C={4}&COG={5}&FeI={6}&FeF={7}&Ej={8}", e.Row.DBCampo("CveProgramaOperativo").ToEntero, e.Row.DBCampo("CveFuenteFinanciamiento").ToEntero, e.Row.DBCampo("CveTipoGasto").ToEntero, e.Row.DBCampo("CveUnidadAdministrativa").ToEntero, e.Row.DBCampo("CveClasificacion").ToEntero, e.Row.DBCampo("CodigoOG").ToEntero, String.Format("01/01/{0}", DdlEjercicio.SelectedItem.Text), If(txtFechaF.Text <> "", txtFechaF.Text, Date.Now.ToString("dd/MM/yyyy")), DdlEjercicio.SelectedValue)
|
||||
e.Row.FCHyperLink("HLPagado").CssClass = "Texto"
|
||||
'End If
|
||||
'End If
|
||||
|
||||
End If
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
|
||||
|
||||
|
||||
#Region " EXPORTAR - PDF - EXCEL "
|
||||
Protected Sub ImgExcel_Click(sender As Object, e As EventArgs)
|
||||
'Tbl.ExportToExcel("Estado del Ejercicio del Presupuesto de Egresos ")
|
||||
ImprimiReporte("Excel")
|
||||
End Sub
|
||||
|
||||
Protected Sub BtnImprimir_Click(sender As Object, e As EventArgs)
|
||||
'Tbl.ExportToPDF("Estado del Ejercicio del Presupuesto de Egresos ")
|
||||
ImprimiReporte()
|
||||
End Sub
|
||||
'No quitar porque no funciona el exporta PDF
|
||||
Public Overrides Sub VerifyRenderingInServerForm(control As Control)
|
||||
' Verifies that the control is rendered
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
#Region "I M P R I M I R "
|
||||
Protected Sub ImprimiReporte(Optional Formato As String = "PDF")
|
||||
|
||||
Dim params As New List(Of ReportParameter)
|
||||
params.Add(New ReportParameter("pEmp", UsuarioActual.Empresa.Empresa))
|
||||
params.Add(New ReportParameter("pImg", New Uri(Server.MapPath(String.Format("~/Empresas/{0}/Logo.png", UsuarioActual.CveEmpresa))).AbsoluteUri))
|
||||
params.Add(New ReportParameter("pEjercicio", DdlEjercicio.SelectedValue.ToString))
|
||||
params.Add(New ReportParameter("pFechaCorte", txtFechaF.Text))
|
||||
|
||||
ImprimirPDF("AC/Reportes/RepPresupuestoEgresos.rdlc", DtPresupuestoEgresos, params, "ReportePresupuestoEgresos", Formato)
|
||||
|
||||
'Dim rds As New ReportDataSource
|
||||
'rds.Name = "DataSet1"
|
||||
'rds.Value = DtPresupuestoEgresos
|
||||
|
||||
'MasterReporteador.LocalReport.DataSources.Clear()
|
||||
'MasterReporteador.LocalReport.DataSources.Add(rds)
|
||||
'MasterReporteador.LocalReport.ReportPath = "AC/Reportes/RepPresupuestoEgresos.rdlc"
|
||||
|
||||
'MasterReporteador.ProcessingMode = ProcessingMode.Local
|
||||
'MasterReporteador.LocalReport.EnableExternalImages = True
|
||||
'Dim params As New List(Of ReportParameter)
|
||||
|
||||
'params.Add(New ReportParameter("pEmp", UsuarioActual.Empresa.Empresa))
|
||||
'params.Add(New ReportParameter("pImg", New Uri(Server.MapPath(String.Format("~/Empresas/{0}/Logo.png", UsuarioActual.CveEmpresa))).AbsoluteUri))
|
||||
|
||||
'MasterReporteador.LocalReport.SetParameters(params)
|
||||
|
||||
'MasterReporteador.LocalReport.Refresh()
|
||||
|
||||
'Dim warnings As Warning() = Nothing
|
||||
'Dim streamids As String() = Nothing
|
||||
'Dim mimeType As String = Nothing
|
||||
'Dim encoding As String = Nothing
|
||||
'Dim extension As String = Nothing
|
||||
'Dim fileName As String = "ReportePresupuestoEgresos"
|
||||
'Dim bytes As Byte()
|
||||
'Try
|
||||
' bytes = MasterReporteador.LocalReport.Render("PDF", Nothing, mimeType, encoding, extension, streamids, warnings)
|
||||
|
||||
' Response.Buffer = True
|
||||
' Response.Clear()
|
||||
' Response.ContentType = mimeType
|
||||
' Response.AddHeader("content-disposition", String.Format("attachment; filename={0}.{1}", fileName, extension))
|
||||
' Response.BinaryWrite(bytes) ' create the file
|
||||
' Response.Flush() ' send it to the client to download
|
||||
' Response.End()
|
||||
'Catch ex As Exception
|
||||
|
||||
'End Try
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
End Class
|
||||
42
AC/RepPresupuestoEgresosDetalle.aspx
Normal file
42
AC/RepPresupuestoEgresosDetalle.aspx
Normal file
@@ -0,0 +1,42 @@
|
||||
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RepPresupuestoEgresosDetalle.aspx.vb" Inherits="AC_RepPresupuestoEgresosDetalle" %>
|
||||
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="H" runat="Server">
|
||||
<li>
|
||||
<asp:LinkButton ID="HplDownPDF" runat="server" Visible="true"> <i class="fa fa-ad-pdf"></i> Imprimir PDF</asp:LinkButton>
|
||||
</li>
|
||||
<li>
|
||||
<asp:LinkButton ID="LbExcel" runat="server" Visible="true"> <i class="fa fa-ad-excel"></i> Imprimir EXCEL</asp:LinkButton>
|
||||
</li>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="CP" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="CSS" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="HB" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="E" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="JS" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="C" runat="Server">
|
||||
|
||||
|
||||
<asp:UpdatePanel ID="UpDatos" UpdateMode="Conditional" runat="server">
|
||||
<ContentTemplate>
|
||||
<asp:GridView CssClass="table table-hover table-advance Widthall" ID="GvDatos" runat="server" GridLines="None" EmptyDataText="No se encontrarios movimientos." OnRowDataBound="GvDatos_RowDataBound" AutoGenerateColumns="False" DataKeyNames="" ShowHeaderWhenEmpty="true">
|
||||
<Columns>
|
||||
<asp:BoundField HeaderText="Fecha" DataField="Fecha" DataFormatString="{0:d}" ItemStyle-Width="60px" ItemStyle-HorizontalAlign="Center" />
|
||||
<asp:BoundField HeaderText="Tipo" DataField="TipoPoliza" DataFormatString="{0}" ItemStyle-Width="60px" ItemStyle-HorizontalAlign="Center" />
|
||||
|
||||
<asp:HyperLinkField HeaderText="Folio" ItemStyle-Width="60px" ItemStyle-HorizontalAlign="Center" DataNavigateUrlFields="IdPoliza" DataTextField="Folio" DataNavigateUrlFormatString="/Contabilidad/RegPoliza.aspx?IdPoliza={0}" ControlStyle-CssClass="Texto" />
|
||||
|
||||
<asp:BoundField HeaderText="Concepto" DataField="Concepto" DataFormatString="{0}" ItemStyle-Width="500px" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField HeaderText="Referencia " DataField="Referencia" DataFormatString="{0}" ItemStyle-Width="150px" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField HeaderText="Importe " DataField="Importe" DataFormatString="{0:N2}" ItemStyle-Width="100px" ItemStyle-HorizontalAlign="Right" />
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
|
||||
</asp:Content>
|
||||
125
AC/RepPresupuestoEgresosDetalle.aspx.vb
Normal file
125
AC/RepPresupuestoEgresosDetalle.aspx.vb
Normal file
@@ -0,0 +1,125 @@
|
||||
Option Explicit On
|
||||
Option Strict On
|
||||
|
||||
Imports System.Data
|
||||
Imports Extensiones
|
||||
Imports Microsoft.Reporting.WebForms
|
||||
Partial Class AC_RepPresupuestoEgresosDetalle
|
||||
Inherits ClsPaginas
|
||||
|
||||
|
||||
#Region "PROPIEDADES"
|
||||
Private Property DtDatos As DataTable
|
||||
Get
|
||||
DtDatos = DirectCast(ViewState("DtDatos"), DataTable)
|
||||
End Get
|
||||
|
||||
Set(ByVal value As DataTable)
|
||||
ViewState("DtDatos") = value
|
||||
End Set
|
||||
End Property
|
||||
#End Region
|
||||
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||
If Not Page.IsPostBack Then
|
||||
Dim ErrorParametros = True
|
||||
Dim MomentoContable = -1, ProgramaOperativo = -1, FuenteFinanciamiento = -1, TipoGasto = -1, UnidadAdministrativa = -1, Clasificacion = -1, CodigoOG = "-1"
|
||||
Dim FI, FF As Date
|
||||
|
||||
If Request("MM") IsNot Nothing AndAlso IsNumeric(Request("MM")) Then
|
||||
If Request("PO") IsNot Nothing AndAlso IsNumeric(Request("PO")) Then
|
||||
If Request("FF") IsNot Nothing AndAlso IsNumeric(Request("FF")) Then
|
||||
If Request("TG") IsNot Nothing AndAlso IsNumeric(Request("TG")) Then
|
||||
If Request("UA") IsNot Nothing AndAlso IsNumeric(Request("UA")) Then
|
||||
If Request("C") IsNot Nothing AndAlso IsNumeric(Request("C")) Then
|
||||
If Request("COG") IsNot Nothing AndAlso IsNumeric(Request("COG")) Then
|
||||
If Request("FeF") IsNot Nothing AndAlso Request("FeF").ToString.Length = 10 AndAlso Request("FeF").ToDate > "01/01/1000".ToDate Then
|
||||
If Request("FeI") IsNot Nothing AndAlso Request("FeI").ToString.Length = 10 AndAlso Request("FeI").ToDate > "01/01/1000".ToDate Then
|
||||
|
||||
MomentoContable = Request("MM").ToEntero
|
||||
ProgramaOperativo = Request("PO").ToEntero
|
||||
FuenteFinanciamiento = Request("FF").ToEntero
|
||||
TipoGasto = Request("TG").ToEntero
|
||||
UnidadAdministrativa = Request("UA").ToEntero
|
||||
Clasificacion = Request("C").ToEntero
|
||||
CodigoOG = Request("COG").ToString
|
||||
|
||||
FI = Request("FeI").ToDate
|
||||
FF = Request("FeF").ToDate
|
||||
|
||||
ErrorParametros = False
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
If Not ErrorParametros Then
|
||||
CargaDatos(MomentoContable, ProgramaOperativo, FuenteFinanciamiento, TipoGasto, UnidadAdministrativa, Clasificacion, CodigoOG, FI, FF)
|
||||
End If
|
||||
|
||||
End If
|
||||
End Sub
|
||||
Private Sub CargaDatos(MomentoContable As Integer, ProgramaOperativo As Integer, FuenteFinanciamiento As Integer, TipoGasto As Integer, UnidadAdministrativa As Integer, Clasificacion As Integer, CodigoOG As String, FI As Date, FF As Date)
|
||||
If UsuarioActual.Empresa.UsaAC Then
|
||||
Dim ObjConta As New ClsContPAQi(UsuarioActual.Empresa)
|
||||
If ObjConta.GetRepPresupuestosEgresosSaldosDetalle(MomentoContable, ProgramaOperativo, FuenteFinanciamiento, TipoGasto, UnidadAdministrativa, Clasificacion, CodigoOG, FI, FF) Then
|
||||
DtDatos = ObjConta.DtResultados
|
||||
Else
|
||||
DtDatos = Nothing
|
||||
Alert("Ocurrio un error al cargar los datos del Anexo del Catálogo", TipoMensaje.MsgError)
|
||||
End If
|
||||
ObjConta.Dispose()
|
||||
|
||||
Else
|
||||
'Dim ObjConta As New ClsContabilidad
|
||||
'If ObjConta.GetRepPresupuestosEgresosSaldosDetalle(MomentoContable, ProgramaOperativo, FuenteFinanciamiento, TipoGasto, UnidadAdministrativa, Clasificacion, CodigoOG, FI, FF, UsuarioActual.CveEmpresa) Then
|
||||
' DtDatos = ObjConta.DtResultados
|
||||
'Else
|
||||
' DtDatos = Nothing
|
||||
' Alert("Ocurrio un error al cargar los datos del Anexo del Catálogo", TipoMensaje.MsgError)
|
||||
'End If
|
||||
'ObjConta.Dispose()
|
||||
End If
|
||||
|
||||
If DtDatos.Rows.Count > 0 Then
|
||||
CargaGrid()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub CargaGrid()
|
||||
GvDatos.DataSource = DtDatos
|
||||
GvDatos.DataBind()
|
||||
UpDatos.Update()
|
||||
End Sub
|
||||
Protected Sub GvDatos_RowDataBound(sender As Object, e As GridViewRowEventArgs)
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
|
||||
If e.Row.DBCampo("Referencia") = "Total:" Then
|
||||
e.Row.Font.Bold = True
|
||||
End If
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Public Sub Imprimir(Formato As String)
|
||||
Dim params As New List(Of ReportParameter)
|
||||
params.Add(New ReportParameter("Empresa", UsuarioActual.Empresa.Empresa))
|
||||
params.Add(New ReportParameter("Img", New Uri(Server.MapPath(String.Format("~/Empresas/{0}/Logo.png", UsuarioActual.CveEmpresa))).AbsoluteUri))
|
||||
params.Add(New ReportParameter("Fecha", Now.ToString("dd/MM/yyyy")))
|
||||
ImprimirPDF(UsuarioActual.Empresa.Ruta & "Formatos/RepPresupuestosEgresos.rdlc", DtDatos, params, $"Rep.PresupuestosEgresos - {Now.ToShortDateString}", Formato:=Formato)
|
||||
End Sub
|
||||
|
||||
Private Sub HplDownPDF_Click(sender As Object, e As EventArgs) Handles HplDownPDF.Click
|
||||
Imprimir("PDF")
|
||||
End Sub
|
||||
|
||||
Private Sub LbExcel_Click(sender As Object, e As EventArgs) Handles LbExcel.Click
|
||||
Imprimir("EXCEL")
|
||||
End Sub
|
||||
End Class
|
||||
191
AC/RepPresupuestoEgresosMensual.aspx
Normal file
191
AC/RepPresupuestoEgresosMensual.aspx
Normal file
@@ -0,0 +1,191 @@
|
||||
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RepPresupuestoEgresosMensual.aspx.vb" Inherits="AC_RepPresupuestoEgresosMensual" %>
|
||||
|
||||
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="HB" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="E" runat="Server">
|
||||
Estado del Ejercicio del Presupuesto de Egresos - Mensual
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
<asp:ImageButton ID="ImgExcel" runat="server" ImageUrl="/Imagenes/IconoExcel.gif" Width="17px" Height="17px" />
|
||||
<asp:ImageButton ID="BtnImprimir" OnClick="BtnImprimir_Click" runat="server" alt="Imprimir" src="/Imagenes/btnImprimir.gif" Style="cursor: pointer; height: 20px" />
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
|
||||
|
||||
|
||||
<asp:UpdatePanel ID="UPFiltros" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
|
||||
<div class="portlet solid grey-cascade portlet-filter">
|
||||
<div class="portlet-title portlet-filterT portletfiltrostitlee">
|
||||
<div class="tools">
|
||||
<%--<asp:Button ID="BtnConsultar" runat="server" Text="Consultar" class="btn btn-primary" />--%>
|
||||
<asp:Button ID="consultar" runat="server" Text="Consultar" class="btn btn-primary" OnClick="consultar_Click" />
|
||||
<a href="javascript;" class="expand" data-original-title="" title=""></a>
|
||||
<a onclick="document.getElementById('C_BtnConsultar').click();" class="reload"></a>
|
||||
</div>
|
||||
<div class="titlefiltros caption">
|
||||
<div class="row">
|
||||
<div class="titlefiltros caption" style="width: 100%">
|
||||
<label class="col-md-1 text-size-12" style="width: 150px; padding-right: 0px">
|
||||
Cap. Objeto del Gasto:
|
||||
</label>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="DdlCapituloClasificaciones" runat="server" AppendDataBoundItems="true" DataTextField="CodigoClasificacion" DataValueField="CveClasificacion" OnSelectedIndexChanged="DdlCapituloClasificaciones_SelectedIndexChanged" AutoPostBack="true" CssClass="form-control input-sm">
|
||||
<asp:ListItem Selected="True" Text="Todas" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
<label class="col-md-1 text-size-12" style="width: 135px; padding-right: 0px">
|
||||
Programa Operativo:
|
||||
</label>
|
||||
<div class="col-md-2 text-size-12">
|
||||
<asp:DropDownList ID="DdlProgramaOperativo" CssClass="form-control input-sm" runat="server" AppendDataBoundItems="true" DataTextField="ProgramaOperativo" DataValueField="CveProgramaOperativo" >
|
||||
<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
<label class="col-md-1 text-size-12" style="padding-right: 0px;">
|
||||
Ejercicio:
|
||||
</label>
|
||||
<div class="col-md-1">
|
||||
<asp:DropDownList ID="DdlEjercicio" CssClass="form-control input-sm" runat="server" DataTextField="Ejercicio" DataValueField="Ejercicio" >
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body magindate" style="display:none;">
|
||||
<div class="row">
|
||||
<label class="col-md-1 text-size-12 truncate" style="width:150px; padding-right:0px">
|
||||
Objeto del Gasto:
|
||||
</label>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="DdlClasificaciones" runat="server" AppendDataBoundItems="true" DataTextField="CodigoClasificacion" DataValueField="CveClasificacion" CssClass="form-control input-sm select2me">
|
||||
<asp:ListItem Selected="True" Text="Todas" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
<label class="col-md-1 text-size-12 truncate" style="width:130px; padding-right:0px;">
|
||||
Momento Contable:
|
||||
</label>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="DdlTipoCuenta" runat="server" CssClass="form-control input-sm">
|
||||
<%--<asp:ListItem Selected="True" Text="Aprobado" Value="APROV"></asp:ListItem>--%>
|
||||
<asp:ListItem Text="Modificado" Value="MODIF"></asp:ListItem>
|
||||
<asp:ListItem Text="Comprometido" Value="COMP"></asp:ListItem>
|
||||
<asp:ListItem Text="Devengado" Value="DEV"></asp:ListItem>
|
||||
<asp:ListItem Text="Ejercido" Value="EJER"></asp:ListItem>
|
||||
<asp:ListItem Text="Pagado" Value="PAG"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
<label class="col-md-1 text-size-12 truncate" style="width:160px;">
|
||||
Unidad Administrativa:
|
||||
</label>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="DdlUnidadAdministrativa" runat="server" AppendDataBoundItems="true" DataTextField="UnidadAdministrativa" DataValueField="CveUnidadAdministrativa" CssClass="form-control input-sm">
|
||||
<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<%-- <td>
|
||||
<asp:DropDownList ID="DropDownList2" runat="server" Visible="false" Width="150px">
|
||||
<asp:ListItem Text="Presupuesto" Value="1"></asp:ListItem>
|
||||
<asp:ListItem Text="AnteProyecto" Value="2"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</td>--%>
|
||||
<label class="col-md-1 text-size-12 truncate" style="width:150px; padding-right:0px;">
|
||||
Fuente de Financiamiento:
|
||||
</label>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="DdlFuenteFinanciamiento" runat="server" AppendDataBoundItems="true" DataTextField="FuenteFinanciamiento" DataValueField="CveFuenteFinanciamiento" CssClass="form-control input-sm">
|
||||
<asp:ListItem Selected="True" Text="Todas" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
<div class="col-md-1" style="width:130px;"></div>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="DdlOrden" runat="server" CssClass="form-control input-sm">
|
||||
<asp:ListItem Selected="True" Text="Objeto del Gasto" Value="1"></asp:ListItem>
|
||||
<asp:ListItem Text="Objeto del Gasto - Proyecto / Proceso" Value="6"></asp:ListItem>
|
||||
<asp:ListItem Text="Fuente de Financiamiento" Value="2"></asp:ListItem>
|
||||
<asp:ListItem Text="Proyecto / Proceso" Value="3"></asp:ListItem>
|
||||
<asp:ListItem Text="Unidad Administrativa" Value="4"></asp:ListItem>
|
||||
<asp:ListItem Text="Proyecto / Proceso - F. Financiamiento" Value="5"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
<br />
|
||||
|
||||
<asp:UpdatePanel ID="UPPDatos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:GridView ID="Gv" runat="server" AutoGenerateColumns="false" EmptyDataText="No se encontraron Registros de Presupuesto de Egresos del Ejercicio" CssClass="table table-striped table-advance table-hover" Style="text-align: center;" GridLines="None">
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderText="Cuenta">
|
||||
<HeaderTemplate>
|
||||
Grupo
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlGrupo" runat="server" Text='<%# Eval("GPO").ToString%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="320px" HorizontalAlign="Left" />
|
||||
</asp:TemplateField>
|
||||
<%--<asp:BoundField DataField="Vigente" HeaderText="Vigente" DataFormatString="{0:N2}" ItemStyle-Width="70px" ItemStyle-HorizontalAlign="Right" />--%>
|
||||
<asp:BoundField DataField="Ene" HeaderText="Ene" DataFormatString="{0:N2}" ItemStyle-Width="100px" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField DataField="Feb" HeaderText="Feb" DataFormatString="{0:N2}" ItemStyle-Width="100px" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField DataField="Mar" HeaderText="Mar" DataFormatString="{0:N2}" ItemStyle-Width="100px" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField DataField="Abr" HeaderText="Abr" DataFormatString="{0:N2}" ItemStyle-Width="100px" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField DataField="May" HeaderText="May" DataFormatString="{0:N2}" ItemStyle-Width="100px" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField DataField="Jun" HeaderText="Jun" DataFormatString="{0:N2}" ItemStyle-Width="100px" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField DataField="Jul" HeaderText="Jul" DataFormatString="{0:N2}" ItemStyle-Width="100px" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField DataField="Ago" HeaderText="Ago" DataFormatString="{0:N2}" ItemStyle-Width="100px" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField DataField="Sep" HeaderText="Sep" DataFormatString="{0:N2}" ItemStyle-Width="100px" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField DataField="Oct" HeaderText="Oct" DataFormatString="{0:N2}" ItemStyle-Width="100px" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField DataField="Nov" HeaderText="Nov" DataFormatString="{0:N2}" ItemStyle-Width="100px" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField DataField="Dic" HeaderText="Dic" DataFormatString="{0:N2}" ItemStyle-Width="100px" ItemStyle-HorizontalAlign="Right" />
|
||||
|
||||
<asp:BoundField DataField="TotalAcumulado" HeaderText="Total" DataFormatString="{0:N2}" ItemStyle-Width="100px" ItemStyle-HorizontalAlign="Right" />
|
||||
<%-- <asp:TemplateField HeaderText="Diferencia">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="lblDiferencia" runat="server" Text='<%# (CDbl(Eval("Vigente").ToString) - CDbl(Eval("Total").ToString)).ToString("N2")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Right" Width="70px" BackColor="LightGray" CssClass="BorderR" />
|
||||
</asp:TemplateField>--%>
|
||||
</Columns>
|
||||
<HeaderStyle CssClass="Titulos"></HeaderStyle>
|
||||
<AlternatingRowStyle CssClass="TextoAlterno"></AlternatingRowStyle>
|
||||
<RowStyle CssClass="Texto"></RowStyle>
|
||||
</asp:GridView>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
||||
|
||||
<script type="text/javascript">
|
||||
function pageLoad() {
|
||||
$(document).ready(function () {
|
||||
gridviewScroll();
|
||||
});
|
||||
|
||||
function gridviewScroll() {
|
||||
var Tam = TamañoVentana();
|
||||
var Alto = Tam.height - 245;
|
||||
|
||||
$('#<%=Gv.ClientID%>').gridviewScroll({
|
||||
width: 995,
|
||||
height: Alto,
|
||||
freezesize: 1,
|
||||
headerrowcount: 2
|
||||
});
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
</asp:Content>
|
||||
177
AC/RepPresupuestoEgresosMensual.aspx.vb
Normal file
177
AC/RepPresupuestoEgresosMensual.aspx.vb
Normal file
@@ -0,0 +1,177 @@
|
||||
Imports Extensiones
|
||||
Imports System.Data
|
||||
Imports Microsoft.Reporting.WebForms
|
||||
|
||||
Partial Class AC_RepPresupuestoEgresosMensual
|
||||
Inherits ClsPaginas
|
||||
|
||||
Private Property DtPresupuestoEgresos As DataTable
|
||||
Get
|
||||
Return CType(ViewState("DtPresupuestoEgresos"), DataTable)
|
||||
End Get
|
||||
Set(value As DataTable)
|
||||
ViewState("DtPresupuestoEgresos") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||
If Not Page.IsPostBack Then
|
||||
CargaEjercicios()
|
||||
CargaCombos()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub CargaEjercicios()
|
||||
Dim ClsConta As New ClsContPAQi(UsuarioActual.Empresa)
|
||||
If ClsConta.GetEjercicios() Then
|
||||
DdlEjercicio.DataSource = ClsConta.DtResultados
|
||||
Else
|
||||
DdlEjercicio.DataSource = Nothing
|
||||
End If
|
||||
ClsConta.Dispose()
|
||||
DdlEjercicio.DataBind()
|
||||
|
||||
DdlEjercicio.SelectedValueExist(UsuarioActual.Empresa.EjercicioActual.ToString)
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub CargaCombos()
|
||||
DdlCapituloClasificaciones.DataSource = GlobalDTACClasificadorObjetoGasto(UsuarioActual.CveEmpresa).FiltraParametros("NivelClasificacion = 1", "Codigo")
|
||||
DdlCapituloClasificaciones.DataBind()
|
||||
|
||||
DdlClasificaciones.DataSource = GlobalDTACClasificadorObjetoGasto(UsuarioActual.CveEmpresa).FiltraParametros("NivelClasificacion = 4", "Clasificacion")
|
||||
DdlClasificaciones.DataBind()
|
||||
|
||||
DdlFuenteFinanciamiento.DataSource = GlobalDTAC_FuentesFinanciamiento.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
|
||||
DdlFuenteFinanciamiento.DataBind()
|
||||
|
||||
DdlProgramaOperativo.DataSource = GlobalDTAC_ProgramaOperativo(UsuarioActual.CveEmpresa)
|
||||
DdlProgramaOperativo.DataBind()
|
||||
|
||||
DdlUnidadAdministrativa.DataSource = GlobalDTAC_UnidadesAdministrativas(UsuarioActual.CveEmpresa)
|
||||
DdlUnidadAdministrativa.DataBind()
|
||||
End Sub
|
||||
Protected Sub DdlCapituloClasificaciones_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||
DdlClasificaciones.Items.Clear()
|
||||
|
||||
If DdlCapituloClasificaciones.SelectedValue.ToEntero > 1 Then
|
||||
DdlClasificaciones.DataSource = GlobalDTACClasificadorObjetoGasto(UsuarioActual.CveEmpresa).FiltraParametros(String.Format("NivelClasificacion = 4 AND CodigoClasificacion LIKE '{0}%'", DdlCapituloClasificaciones.SelectedItem.Text.Substring(0, 1)), "Codigo")
|
||||
Else
|
||||
DdlClasificaciones.DataSource = GlobalDTACClasificadorObjetoGasto(UsuarioActual.CveEmpresa).FiltraParametros("NivelClasificacion = 4", "Codigo")
|
||||
End If
|
||||
|
||||
DdlClasificaciones.Items.Insert(0, New ListItem("Todas", "-1"))
|
||||
DdlClasificaciones.DataBind()
|
||||
UPFiltros.Update()
|
||||
End Sub
|
||||
|
||||
|
||||
Private Sub CargaDatos()
|
||||
Dim objAC As New ClsContPAQi(UsuarioActual.Empresa)
|
||||
Dim Capitulo As String = If(DdlCapituloClasificaciones.SelectedValue.ToEntero = -1, "-1", GlobalDTACClasificadorObjetoGasto.FiltraParametros(String.Format("CveClasificacion = {0}", DdlCapituloClasificaciones.SelectedValue.ToEntero)).Rows(0)("Codigo").ToString.Substring(0, 1))
|
||||
UPPDatos.Update()
|
||||
Gv.DataBind()
|
||||
|
||||
If objAC.GetRepPresupuestosEgresosSaldosMensual(DdlTipoCuenta.SelectedValue.ToString, DdlEjercicio.SelectedValue.ToEntero, Capitulo, DdlClasificaciones.SelectedValue.ToEntero, DdlFuenteFinanciamiento.SelectedValue.ToEntero, DdlProgramaOperativo.SelectedValue.ToEntero, DdlUnidadAdministrativa.SelectedValue.ToEntero, DdlOrden.SelectedValue.ToEntero) Then
|
||||
DtPresupuestoEgresos = objAC.DtResultados
|
||||
|
||||
If Not (DdlOrden.SelectedValue.ToEntero = 1 Or DdlOrden.SelectedValue.ToEntero = 6) Then
|
||||
DtPresupuestoEgresos.Rows.RemoveAt(0)
|
||||
DtPresupuestoEgresos.Rows.RemoveAt(0)
|
||||
DtPresupuestoEgresos.Rows.RemoveAt(0)
|
||||
End If
|
||||
|
||||
Gv.DataSource = DtPresupuestoEgresos
|
||||
Else
|
||||
Gv.DataSource = Nothing
|
||||
DtPresupuestoEgresos = Nothing
|
||||
End If
|
||||
|
||||
objAC.Dispose()
|
||||
|
||||
'Carga Grid
|
||||
Gv.DataBind()
|
||||
UPPDatos.Update()
|
||||
End Sub
|
||||
|
||||
Private Sub CargaDatosANT()
|
||||
Dim AC As New ClsContPAQi(UsuarioActual.Empresa)
|
||||
Dim Ejercicio As Integer = DdlEjercicio.SelectedValue.ToEntero
|
||||
UPPDatos.Update()
|
||||
Gv.DataBind()
|
||||
|
||||
If AC.RepPresupuestoEgresosGet(Ejercicio) Then
|
||||
Gv.DataSource = AC.DtResultados
|
||||
Gv.DataBind()
|
||||
End If
|
||||
|
||||
AC.Dispose()
|
||||
End Sub
|
||||
|
||||
Protected Sub Gv_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles Gv.RowDataBound
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
|
||||
'If DdlOrden.SelectedValue.ToEntero = 1 Then
|
||||
' If (IsDBNull(e.Row.DBCampo("Codigo1")) OrElse e.Row.DBCampo("Codigo1").Trim = "") Then
|
||||
' e.Row.CssClass = "Totales"
|
||||
' ElseIf (IsDBNull(e.Row.DBCampo("Codigo2")) OrElse e.Row.DBCampo("Codigo2").Trim = "") Then
|
||||
' e.Row.FCLiteral("LtlGrupo").Text = String.Format("{0} - {1}", e.Row.DBCampo("Codigo1"), e.Row.DBCampo("Clasificacion1"))
|
||||
' e.Row.CssClass = "SubTotales2"
|
||||
' ElseIf (IsDBNull(e.Row.DBCampo("Codigo3")) OrElse e.Row.DBCampo("Codigo3").Trim = "") Then
|
||||
' e.Row.FCLiteral("LtlGrupo").Text = String.Format("{0} - {1}", e.Row.DBCampo("Codigo2"), e.Row.DBCampo("Clasificacion2"))
|
||||
' e.Row.CssClass = "SubTotales3"
|
||||
' ElseIf (IsDBNull(e.Row.DBCampo("CodigoClasificacion")) OrElse e.Row.DBCampo("CodigoClasificacion").Trim = "") Then
|
||||
' e.Row.FCLiteral("LtlGrupo").Text = String.Format("{0} - {1}", e.Row.DBCampo("Codigo3"), e.Row.DBCampo("Clasificacion3"))
|
||||
' e.Row.Font.Bold = True
|
||||
' End If
|
||||
'Else
|
||||
' If e.Row.DBCampo("Gpo") = "Total" Then
|
||||
' e.Row.CssClass = "Totales"
|
||||
' e.Row.Visible = If(e.Row.RowIndex = 0, True, False)
|
||||
' End If
|
||||
'End If
|
||||
|
||||
|
||||
|
||||
If e.Row.DBCampo("Nivel") = "5" Then
|
||||
e.Row.CssClass = "Totales"
|
||||
ElseIf e.Row.DBCampo("Nivel") = "4" Then
|
||||
e.Row.FCLiteral("LtlGrupo").Text = e.Row.DBCampo("Clasificacion1")
|
||||
e.Row.CssClass = "SubTotales2"
|
||||
ElseIf e.Row.DBCampo("Nivel") = "3" Then
|
||||
e.Row.FCLiteral("LtlGrupo").Text = e.Row.DBCampo("Clasificacion2")
|
||||
e.Row.CssClass = "SubTotales3"
|
||||
ElseIf e.Row.DBCampo("Nivel") = "2" Then
|
||||
e.Row.FCLiteral("LtlGrupo").Text = e.Row.DBCampo("Clasificacion3")
|
||||
e.Row.Font.Bold = True
|
||||
End If
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Protected Sub consultar_Click(sender As Object, e As EventArgs)
|
||||
CargaDatos()
|
||||
End Sub
|
||||
|
||||
#Region "I M P R I M I R "
|
||||
|
||||
Protected Sub BtnImprimir_Click(sender As Object, e As EventArgs)
|
||||
ImprimirReporte()
|
||||
End Sub
|
||||
|
||||
Protected Sub ImgExcel_Click(sender As Object, e As EventArgs) Handles ImgExcel.Click
|
||||
ImprimirReporte("Excel")
|
||||
End Sub
|
||||
|
||||
Private Sub ImprimirReporte(Optional Formato As String = "PDF")
|
||||
Dim params As New List(Of ReportParameter)
|
||||
params.Add(New ReportParameter("pEmp", UsuarioActual.Empresa.Empresa))
|
||||
params.Add(New ReportParameter("pImg", New Uri(Server.MapPath(String.Format("~/Empresas/{0}/Logo.png", UsuarioActual.CveEmpresa))).AbsoluteUri))
|
||||
params.Add(New ReportParameter("pEjercicio", DdlEjercicio.SelectedValue.ToString))
|
||||
params.Add(New ReportParameter("pMomentoContable", DdlTipoCuenta.SelectedItem.ToString))
|
||||
ImprimirPDF("AC/Reportes/RepPresupuestoEgresosMensual.rdlc", DtPresupuestoEgresos, params, "RepPresupuestoEgresosMensual", Formato)
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
End Class
|
||||
128
AC/RepPresupuestoIngresos.aspx
Normal file
128
AC/RepPresupuestoIngresos.aspx
Normal file
@@ -0,0 +1,128 @@
|
||||
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RepPresupuestoIngresos.aspx.vb" Inherits="AC_RepPresupuestoIngresos" %>
|
||||
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="HB" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="E" runat="Server">
|
||||
Presupuesto de Ingresos del Ejercicio
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
|
||||
<li>
|
||||
<asp:LinkButton ID="ImgExcel" OnClick="ImgExcel_Click" runat="server"><i class="fa fa-ad-excel"></i> Exporta Excel</asp:LinkButton>
|
||||
</li>
|
||||
<li>
|
||||
<asp:LinkButton ID="BtnImprimir" OnClick="BtnImprimir_Click" runat="server"><i class="fa fa-print"></i> Imprimir</asp:LinkButton>
|
||||
</li>
|
||||
|
||||
<%--<asp:ImageButton ID="ImgExcel" OnClick="ImgExcel_Click" runat="server" ImageUrl="/Imagenes/IconoExcel.gif" Width="17px" Height="17px" />
|
||||
<asp:ImageButton ID="BtnImprimir" OnClick="BtnImprimir_Click" runat="server" alt="Imprimir" src="/Imagenes/btnImprimir.gif" Style="cursor: pointer; height: 20px" />--%>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
|
||||
|
||||
<asp:UpdatePanel ID="UPFiltros" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="portlet solid grey-cascade portlet-filter">
|
||||
<div class="portlet-title portlet-filterT smalltitle">
|
||||
<div class="tools">
|
||||
<asp:Button ID="consultar" runat="server" Text="Consultar" ValidationGroup="Validar" CssClass="btn btn-default" OnClick="consultar_Click" />
|
||||
<a href="javascript:;" class="expand"></a>
|
||||
</div>
|
||||
<div class="titlefiltros caption ">
|
||||
<div class="row">
|
||||
<label class="col-md-1 truncate">Tipo de proyecto:</label>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="DdlProyecto" runat="server" Width="130px" CssClass="form-control input-sm select2me">
|
||||
<asp:ListItem Text="Presupuesto" Value="1"></asp:ListItem>
|
||||
<asp:ListItem Text="AnteProyecto" Value="2"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
<label class="col-md-1 truncate">Ejercicio:</label>
|
||||
<div class="col-md-1">
|
||||
<asp:DropDownList ID="DdlEjercicio" runat="server" DataTextField="Ejercicio" DataValueField="Ejercicio" CssClass="form-control input-sm select2me">
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
<label class="col-md-1 truncate">Fecha Corte:</label>
|
||||
<div class="col-md-1" style="width: 130px">
|
||||
<div class="input-group input-sm input-small date date-picker" data-date-format="dd/mm/yyyy" style="width: 90px !important; padding: 0px;">
|
||||
<asp:TextBox ID="txtFechaF" runat="server" CssClass="form-control" Width="99%" CausesValidation="true" MaxLength="10"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="imgCalendarioF" class="btn default " Text="<i class='fa fa-calendar'></i>" 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="Calendario2" TargetControlID="txtFechaF" PopupButtonID="imgCalendarioF" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
<asp:RequiredFieldValidator ID="rfvFechaF" runat="server" ControlToValidate="txtFechaF" Display="None" ErrorMessage="El campo <b>''Fecha Final''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="Valida"></asp:RequiredFieldValidator>
|
||||
<asp:CompareValidator ID="cvFechaF" runat="server" ControlToValidate="txtFechaF" Display="None" ErrorMessage="El campo <b>''Fecha Final''</b> no tienes el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="Valida"></asp:CompareValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="vcoRfvFF" runat="server" HighlightCssClass="vco" TargetControlID="rfvFechaF" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
<ajax:ValidatorCalloutExtender ID="vcoCvFF" runat="server" HighlightCssClass="vco" TargetControlID="cvFechaF" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<label class="col-md-1 truncate">Agrupador:</label>
|
||||
<div class="col-md-1">
|
||||
<asp:DropDownList ID="DdlAgrupador" runat="server" Width="150px" CssClass="form-control input-sm select2me">
|
||||
<asp:ListItem Text="Rubro Ingresos" Value="1"></asp:ListItem>
|
||||
<asp:ListItem Text="Fuente Financiamiento" Value="2"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
|
||||
|
||||
<table runat="server" id="Tbl" class="Widthall">
|
||||
<tr>
|
||||
<td>
|
||||
<asp:UpdatePanel ID="UPPDatos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<br />
|
||||
<asp:GridView ID="Gv" runat="server" AutoGenerateColumns="False" EmptyDataText="No se encontraron Registros de Presupuesto de Egresos del Ejercicio" CssClass="table table-striped table-hover Widthall" Style="margin-top: -10px; text-align: center;" GridLines="None">
|
||||
<Columns>
|
||||
<asp:BoundField DataField="Agrupador" HeaderText="Cuenta" ItemStyle-Width="300px" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:TemplateField HeaderText="Estimado">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtEstimado" runat="server" Text='<%# CDbl(Eval("Estimado").ToString).ToString("N2") %>' visible="false"></asp:Literal>
|
||||
<asp:HyperLink ID="HLEstimado" Text='<%# CDbl(Eval("Estimado").ToString).ToString("N2") %>' Target="_blank" runat="server"/>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Modificado">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtModificado" runat="server" Text='<%# CDbl(Eval("Modificado").ToString).ToString("N2") %>' visible="false"></asp:Literal>
|
||||
<asp:HyperLink ID="HLModificado" Text='<%# CDbl(Eval("Modificado").ToString).ToString("N2") %>' Target="_blank" runat="server" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Devengado">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtDevengado" runat="server" Text='<%# CDbl(Eval("Devengado").ToString).ToString("N2") %>' visible="false"></asp:Literal>
|
||||
<asp:HyperLink ID="HLDevengado" Text='<%# CDbl(Eval("Devengado").ToString).ToString("N2") %>' Target="_blank" runat="server" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Recaudado">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtRecaudado" runat="server" Text='<%# CDbl(Eval("Recaudado").ToString).ToString("N2") %>' visible="false"></asp:Literal>
|
||||
<asp:HyperLink ID="HLRecaudado" Text='<%# CDbl(Eval("Recaudado").ToString).ToString("N2") %>' Target="_blank" runat="server" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField DataField="PorDevengar" HeaderText="X Dev" DataFormatString="{0:N2}" ItemStyle-Width="90px" ItemStyle-BackColor="LightGray" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField DataField="PorRecaudar" HeaderText="X Rec" DataFormatString="{0:N2}" ItemStyle-Width="90px" ItemStyle-BackColor="LightGray" ItemStyle-HorizontalAlign="Right" />
|
||||
</Columns>
|
||||
<HeaderStyle CssClass="Titulos"></HeaderStyle>
|
||||
<AlternatingRowStyle CssClass="TextoAlterno"></AlternatingRowStyle>
|
||||
<RowStyle CssClass="Texto"></RowStyle>
|
||||
</asp:GridView>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
||||
</asp:Content>
|
||||
190
AC/RepPresupuestoIngresos.aspx.vb
Normal file
190
AC/RepPresupuestoIngresos.aspx.vb
Normal file
@@ -0,0 +1,190 @@
|
||||
Imports Extensiones
|
||||
Imports Microsoft.Reporting.WebForms
|
||||
Imports System.Data
|
||||
|
||||
Partial Class AC_RepPresupuestoIngresos
|
||||
Inherits ClsPaginas
|
||||
|
||||
#Region "PROPIEDADES"
|
||||
Private Property DtIngresos As DataTable
|
||||
Get
|
||||
Return CType(ViewState("DtIngresos"), DataTable)
|
||||
End Get
|
||||
Set(value As DataTable)
|
||||
ViewState("DtIngresos") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private Property FechaCorte As Date
|
||||
Get
|
||||
Return ViewState("FechaCorte").ToString.ToDate
|
||||
End Get
|
||||
Set(value As Date)
|
||||
ViewState("FechaCorte") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
|
||||
#End Region
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||
If Not Page.IsPostBack Then
|
||||
If UsuarioActual.Empresa.UsaAC Then
|
||||
Dim ClsConta As New ClsContPAQi(UsuarioActual.Empresa)
|
||||
If ClsConta.GetEjercicios() Then
|
||||
DdlEjercicio.DataSource = ClsConta.DtResultados
|
||||
Else
|
||||
DdlEjercicio.DataSource = Nothing
|
||||
End If
|
||||
ClsConta.Dispose()
|
||||
Else
|
||||
Dim ClsConta As New ClsContabilidad
|
||||
If ClsConta.GetEjercicios(UsuarioActual.CveEmpresa) Then
|
||||
DdlEjercicio.DataSource = ClsConta.DtResultados
|
||||
Else
|
||||
DdlEjercicio.DataSource = Nothing
|
||||
End If
|
||||
ClsConta.Dispose()
|
||||
End If
|
||||
DdlEjercicio.DataBind()
|
||||
DdlEjercicio.SelectedValue = UsuarioActual.Empresa.EjercicioActual.ToString
|
||||
txtFechaF.Text = Now.ToShortDateString
|
||||
CargaDatos()
|
||||
End If
|
||||
End Sub
|
||||
Protected Sub consultar_Click(sender As Object, e As EventArgs)
|
||||
CargaDatos()
|
||||
End Sub
|
||||
Private Sub CargaDatos()
|
||||
If UsuarioActual.Empresa.UsaAC Then
|
||||
Dim ObjAC As New ClsContPAQi(UsuarioActual.Empresa)
|
||||
Dim Ejercicio As Integer = DdlEjercicio.SelectedValue.ToEntero
|
||||
UPPDatos.Update()
|
||||
|
||||
FechaCorte = txtFechaF.Text.ToDate
|
||||
|
||||
If ObjAC.GetPresupuestoIngresosRep(Ejercicio, FechaCorte, DdlAgrupador.SelectedValue.ToEntero) Then
|
||||
DtIngresos = ObjAC.DtResultados
|
||||
Else
|
||||
DtIngresos = Nothing
|
||||
Alert("Ocurrió un error al cargar los datos del reporte.", TipoMensaje.MsgError)
|
||||
End If
|
||||
|
||||
ObjAC.Dispose()
|
||||
Else
|
||||
Dim ObjAC As New ClsContabilidad
|
||||
Dim Ejercicio As Integer = DdlEjercicio.SelectedValue.ToEntero
|
||||
UPPDatos.Update()
|
||||
|
||||
FechaCorte = txtFechaF.Text.ToDate
|
||||
|
||||
If ObjAC.GetPresupuestoIngresosRep(Ejercicio, FechaCorte, DdlAgrupador.SelectedValue.ToEntero, UsuarioActual.CveEmpresa) Then
|
||||
DtIngresos = ObjAC.DtResultados
|
||||
Else
|
||||
DtIngresos = Nothing
|
||||
Alert("Ocurrió un error al cargar los datos del reporte.", TipoMensaje.MsgError)
|
||||
End If
|
||||
|
||||
ObjAC.Dispose()
|
||||
|
||||
End If
|
||||
|
||||
Gv.DataSource = DtIngresos
|
||||
Gv.DataBind()
|
||||
UPPDatos.Update()
|
||||
End Sub
|
||||
|
||||
Protected Sub Gv_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles Gv.RowDataBound
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
If e.Row.DBCampo("Agrupador") = "" Then
|
||||
e.Row.CssClass = "SubTotales"
|
||||
End If
|
||||
|
||||
If e.Row.RowIndex = 0 Then
|
||||
e.Row.FCLiteral("LtEstimado").Visible = True
|
||||
e.Row.FCLiteral("LtModificado").Visible = True
|
||||
e.Row.FCLiteral("LtDevengado").Visible = True
|
||||
e.Row.FCLiteral("LtRecaudado").Visible = True
|
||||
|
||||
e.Row.FCHyperLink("HLEstimado").Visible = False
|
||||
e.Row.FCHyperLink("HLModificado").Visible = False
|
||||
e.Row.FCHyperLink("HLDevengado").Visible = False
|
||||
e.Row.FCHyperLink("HLRecaudado").Visible = False
|
||||
|
||||
'e.Row.FCHyperLink("HLEstimado").Visible = False
|
||||
'e.Row.FCHyperLink("HLModificado").Visible = False
|
||||
'e.Row.FCHyperLink("HLDevengado").Visible = False
|
||||
'e.Row.FCHyperLink("HLRecaudado").Visible = False
|
||||
Else
|
||||
|
||||
e.Row.FCHyperLink("HLEstimado").NavigateUrl = String.Format("/AC/RepPresupuestoIngresosDetalle.aspx?MM=1&FR={0}&RI={1}&FeI={2}&FeF={3}&Ej={4}", e.Row.DBCampo("CveFuenteRecaudacion").ToEntero, e.Row.DBCampo("CveRubroIngreso").ToEntero, String.Format("01/01/{0}", DdlEjercicio.SelectedItem.Text), If(txtFechaF.Text <> "", txtFechaF.Text, Date.Now.ToString("dd/MM/yyyy")), DdlEjercicio.SelectedValue)
|
||||
e.Row.FCHyperLink("HLEstimado").CssClass = "Texto"
|
||||
e.Row.FCHyperLink("HLModificado").NavigateUrl = String.Format("/AC/RepPresupuestoIngresosDetalle.aspx?MM=2&FR={0}&RI={1}&FeI={2}&FeF={3}&Ej={4}", e.Row.DBCampo("CveFuenteRecaudacion").ToEntero, e.Row.DBCampo("CveRubroIngreso").ToEntero, String.Format("01/01/{0}", DdlEjercicio.SelectedItem.Text), If(txtFechaF.Text <> "", txtFechaF.Text, Date.Now.ToString("dd/MM/yyyy")), DdlEjercicio.SelectedValue)
|
||||
e.Row.FCHyperLink("HLModificado").CssClass = "Texto"
|
||||
e.Row.FCHyperLink("HLDevengado").NavigateUrl = String.Format("/AC/RepPresupuestoIngresosDetalle.aspx?MM=3&FR={0}&RI={1}&FeI={2}&FeF={3}&Ej={4}", e.Row.DBCampo("CveFuenteRecaudacion").ToEntero, e.Row.DBCampo("CveRubroIngreso").ToEntero, String.Format("01/01/{0}", DdlEjercicio.SelectedItem.Text), If(txtFechaF.Text <> "", txtFechaF.Text, Date.Now.ToString("dd/MM/yyyy")), DdlEjercicio.SelectedValue)
|
||||
e.Row.FCHyperLink("HLDevengado").CssClass = "Texto"
|
||||
e.Row.FCHyperLink("HLRecaudado").NavigateUrl = String.Format("/AC/RepPresupuestoIngresosDetalle.aspx?MM=4&FR={0}&RI={1}&FeI={2}&FeF={3}&Ej={4}", e.Row.DBCampo("CveFuenteRecaudacion").ToEntero, e.Row.DBCampo("CveRubroIngreso").ToEntero, String.Format("01/01/{0}", DdlEjercicio.SelectedItem.Text), If(txtFechaF.Text <> "", txtFechaF.Text, Date.Now.ToString("dd/MM/yyyy")), DdlEjercicio.SelectedValue)
|
||||
e.Row.FCHyperLink("HLRecaudado").CssClass = "Texto"
|
||||
|
||||
|
||||
'e.Row.FCHyperLink("HLEstimado").NavigateUrl = String.Format("/AC/RepPresupuestoIngresosDetalle.aspx?MM=1&FR={0}&RI={1}&FeI={2}&FeF={3}&Ej={4}", e.Row.DBCampo("CveFuenteRecaudacion").ToEntero, e.Row.DBCampo("CveRubroIngreso").ToEntero, String.Format("01/01/{0}", DdlEjercicio.SelectedItem.Text), If(txtFechaF.Text <> "", txtFechaF.Text, Date.Now.ToString("dd/MM/yyyy")), DdlEjercicio.SelectedValue)
|
||||
'e.Row.FCHyperLink("HLEstimado").CssClass = "Texto"
|
||||
'e.Row.FCHyperLink("HLModificado").NavigateUrl = String.Format("/AC/RepPresupuestoIngresosDetalle.aspx?MM=2&FR={0}&RI={1}&FeI={2}&FeF={3}&Ej={4}", e.Row.DBCampo("CveFuenteRecaudacion").ToEntero, e.Row.DBCampo("CveRubroIngreso").ToEntero, String.Format("01/01/{0}", DdlEjercicio.SelectedItem.Text), If(txtFechaF.Text <> "", txtFechaF.Text, Date.Now.ToString("dd/MM/yyyy")), DdlEjercicio.SelectedValue)
|
||||
'e.Row.FCHyperLink("HLModificado").CssClass = "Texto"
|
||||
'e.Row.FCHyperLink("HLDevengado").NavigateUrl = String.Format("/AC/RepPresupuestoIngresosDetalle.aspx?MM=3&FR={0}&RI={1}&FeI={2}&FeF={3}&Ej={4}", e.Row.DBCampo("CveFuenteRecaudacion").ToEntero, e.Row.DBCampo("CveRubroIngreso").ToEntero, String.Format("01/01/{0}", DdlEjercicio.SelectedItem.Text), If(txtFechaF.Text <> "", txtFechaF.Text, Date.Now.ToString("dd/MM/yyyy")), DdlEjercicio.SelectedValue)
|
||||
'e.Row.FCHyperLink("HLDevengado").CssClass = "Texto"
|
||||
'e.Row.FCHyperLink("HLRecaudado").NavigateUrl = String.Format("/AC/RepPresupuestoIngresosDetalle.aspx?MM=4&FR={0}&RI={1}&FeI={2}&FeF={3}&Ej={4}", e.Row.DBCampo("CveFuenteRecaudacion").ToEntero, e.Row.DBCampo("CveRubroIngreso").ToEntero, String.Format("01/01/{0}", DdlEjercicio.SelectedItem.Text), If(txtFechaF.Text <> "", txtFechaF.Text, Date.Now.ToString("dd/MM/yyyy")), DdlEjercicio.SelectedValue)
|
||||
'e.Row.FCHyperLink("HLRecaudado").CssClass = "Texto"
|
||||
End If
|
||||
|
||||
|
||||
e.Row.Cells(1).HorizontalAlign = HorizontalAlign.Right
|
||||
e.Row.Cells(2).HorizontalAlign = HorizontalAlign.Right
|
||||
e.Row.Cells(3).HorizontalAlign = HorizontalAlign.Right
|
||||
e.Row.Cells(4).HorizontalAlign = HorizontalAlign.Right
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
|
||||
#Region "I M P R I M I R "
|
||||
Protected Sub ImprimirReporte(Optional Formato As String = "PDF")
|
||||
|
||||
Dim params As New List(Of ReportParameter)
|
||||
params.Add(New ReportParameter("pEmp", UsuarioActual.Empresa.Empresa))
|
||||
params.Add(New ReportParameter("pFechaCorte", FechaCorte.ToShortDateString))
|
||||
params.Add(New ReportParameter("pImg", New Uri(Server.MapPath(String.Format("~/Empresas/{0}/Logo.png", UsuarioActual.CveEmpresa))).AbsoluteUri))
|
||||
params.Add(New ReportParameter("pEjercicio", DdlEjercicio.SelectedValue.ToString))
|
||||
|
||||
ImprimirPDF("AC/Reportes/RepPresupuestoIngresos.rdlc", DtIngresos, params, "ReportePresupuestoIngresos", Formato)
|
||||
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
#Region " EXPORTAR - PDF - EXCEL "
|
||||
Protected Sub ImgExcel_Click(sender As Object, e As EventArgs)
|
||||
'Tbl.ExportToExcel("Estado del Ejercicio del Presupuesto de Egresos ")
|
||||
ImprimirReporte("Excel")
|
||||
End Sub
|
||||
|
||||
Protected Sub BtnImprimir_Click(sender As Object, e As EventArgs)
|
||||
'Tbl.ExportToPDF("Estado del Ejercicio del Presupuesto de Egresos ")
|
||||
ImprimirReporte()
|
||||
End Sub
|
||||
'No quitar porque no funciona el exporta PDF
|
||||
Public Overrides Sub VerifyRenderingInServerForm(control As Control)
|
||||
' Verifies that the control is rendered
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
|
||||
Protected Sub BtnConsultar_Click(sender As Object, e As EventArgs)
|
||||
|
||||
End Sub
|
||||
End Class
|
||||
43
AC/RepPresupuestoIngresosDetalle.aspx
Normal file
43
AC/RepPresupuestoIngresosDetalle.aspx
Normal file
@@ -0,0 +1,43 @@
|
||||
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RepPresupuestoIngresosDetalle.aspx.vb" Inherits="AC_RepPresupuestoIngresosDetalle" %>
|
||||
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="E" runat="Server">
|
||||
Presupuesto de Ingresos del Ejercicio
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="HB" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
|
||||
|
||||
<asp:UpdatePanel ID="UpDatos" UpdateMode="Conditional" runat="server">
|
||||
<ContentTemplate>
|
||||
<div class="row col-md-12" align="right">
|
||||
<input type="text" id="TxtBusqueda" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvDatos.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
|
||||
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvDatos.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
||||
</div>
|
||||
<div class="row col-md-12">
|
||||
<asp:GridView CssClass="table table-hover table-advance Widthall ScrollAD" ID="GvDatos" runat="server" GridLines="None" EmptyDataText="No se encontrarios movimientos." OnRowDataBound="GvDatos_RowDataBound" AutoGenerateColumns="False" DataKeyNames="" ShowHeaderWhenEmpty="true">
|
||||
<Columns>
|
||||
<asp:BoundField HeaderText="Fecha" DataField="Fecha" DataFormatString="{0:d}" ItemStyle-Width="60px" ItemStyle-HorizontalAlign="Center" />
|
||||
<asp:BoundField HeaderText="Tipo" DataField="TipoPoliza" DataFormatString="{0}" ItemStyle-Width="60px" ItemStyle-HorizontalAlign="Center" />
|
||||
|
||||
<asp:HyperLinkField HeaderText="Folio" ItemStyle-Width="60px" ItemStyle-HorizontalAlign="Center" Target="_blank" DataNavigateUrlFields="IdPoliza" DataTextField="Folio" DataNavigateUrlFormatString="/Contabilidad/RegPoliza.aspx?IdPoliza={0}" ControlStyle-CssClass="Texto" />
|
||||
|
||||
<asp:BoundField HeaderText="Concepto" DataField="Concepto" DataFormatString="{0}" ItemStyle-Width="500px" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField HeaderText="Referencia " DataField="Referencia" DataFormatString="{0}" ItemStyle-Width="150px" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField HeaderText="Importe " DataField="Importe" DataFormatString="{0:N2}" ItemStyle-Width="100px" ItemStyle-HorizontalAlign="Right" />
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</div>
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
||||
</asp:Content>
|
||||
|
||||
88
AC/RepPresupuestoIngresosDetalle.aspx.vb
Normal file
88
AC/RepPresupuestoIngresosDetalle.aspx.vb
Normal file
@@ -0,0 +1,88 @@
|
||||
Option Explicit On
|
||||
Option Strict On
|
||||
|
||||
Imports System.Data
|
||||
Imports Extensiones
|
||||
Imports Microsoft.Reporting.WebForms
|
||||
Partial Class AC_RepPresupuestoIngresosDetalle
|
||||
Inherits ClsPaginas
|
||||
|
||||
Private Property DtDatos As DataTable
|
||||
Get
|
||||
DtDatos = DirectCast(ViewState("DtDatos"), DataTable)
|
||||
End Get
|
||||
|
||||
Set(ByVal value As DataTable)
|
||||
ViewState("DtDatos") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||
If Not Page.IsPostBack Then
|
||||
Dim ErrorParametros = True
|
||||
Dim MomentoContable = -1
|
||||
Dim FuenteRecaudacion = -1, RubroIngreso = -1
|
||||
Dim FI, FF As Date
|
||||
|
||||
If Request("MM") IsNot Nothing AndAlso IsNumeric(Request("MM")) Then
|
||||
If Request("FR") IsNot Nothing AndAlso Request("FR").ToString.Length > 0 Then
|
||||
If Request("RI") IsNot Nothing AndAlso Request("RI").ToString.Length > 0 Then
|
||||
|
||||
If Request("FeF") IsNot Nothing AndAlso Request("FeF").ToString.Length = 10 AndAlso Request("FeF").ToDate > "01/01/1000".ToDate Then
|
||||
If Request("FeI") IsNot Nothing AndAlso Request("FeI").ToString.Length = 10 AndAlso Request("FeI").ToDate > "01/01/1000".ToDate Then
|
||||
|
||||
MomentoContable = Request("MM").ToEntero
|
||||
FuenteRecaudacion = Request("FR").ToEntero
|
||||
RubroIngreso = Request("RI").ToEntero
|
||||
|
||||
|
||||
FI = Request("FeI").ToDate
|
||||
FF = Request("FeF").ToDate
|
||||
|
||||
ErrorParametros = False
|
||||
End If
|
||||
End If
|
||||
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
If Not ErrorParametros Then
|
||||
CargaDatos(MomentoContable, FuenteRecaudacion, RubroIngreso, FI, FF)
|
||||
End If
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub CargaDatos(MomentoContable As Integer, FuenteRecaudacion As Integer, RubroIngreso As Integer, FI As Date, FF As Date)
|
||||
Dim ObjConta As New ClsContPAQi(UsuarioActual.Empresa)
|
||||
If ObjConta.GetRepPresupuestosIngresosSaldosDetalle(MomentoContable, FuenteRecaudacion, RubroIngreso, FI, FF) Then
|
||||
DtDatos = ObjConta.DtResultados
|
||||
Else
|
||||
DtDatos = Nothing
|
||||
Alert("Ocurrio un error al cargar los datos del Anexo del Catálogo", TipoMensaje.MsgError)
|
||||
End If
|
||||
ObjConta.Dispose()
|
||||
|
||||
If DtDatos.Rows.Count > 0 Then
|
||||
CargaGrid()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub CargaGrid()
|
||||
GvDatos.DataSource = DtDatos ' DtDatos
|
||||
GvDatos.DataBind()
|
||||
UpDatos.Update()
|
||||
End Sub
|
||||
|
||||
Protected Sub GvDatos_RowDataBound(sender As Object, e As GridViewRowEventArgs)
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
|
||||
If e.Row.DBCampo("Referencia") = "Total:" Then
|
||||
e.Row.Font.Bold = True
|
||||
End If
|
||||
|
||||
End If
|
||||
End Sub
|
||||
End Class
|
||||
|
||||
294
AC/RepPresupuestoIngresosMensual.aspx
Normal file
294
AC/RepPresupuestoIngresosMensual.aspx
Normal file
@@ -0,0 +1,294 @@
|
||||
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RepPresupuestoIngresosMensual.aspx.vb" Inherits="AC_RepIngresosMensuales" %>
|
||||
|
||||
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="HB" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="E" runat="Server">
|
||||
Reporte de Ingresos Mensuales
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
|
||||
<li>
|
||||
<asp:LinkButton ID="ImgExcel" runat="server"><i class="fa fa-ad-excel"></i> Exporta Excel</asp:LinkButton>
|
||||
</li>
|
||||
<li>
|
||||
<asp:LinkButton ID="BtnImprimir" OnClick="BtnImprimir_Click" runat="server"><i class="fa fa-print"></i> Imprimir</asp:LinkButton>
|
||||
</li>
|
||||
|
||||
<%--<img src="/Imagenes/separador02.gif" alt="" />
|
||||
<asp:ImageButton ID="ImgExcel" runat="server" ImageUrl="/Imagenes/IconoExcel.gif" Width="20px" Height="20px" />
|
||||
<img src="/Imagenes/separador02.gif" alt="" />
|
||||
<asp:ImageButton ID="BtnImprimir" OnClick="BtnImprimir_Click" runat="server" alt="Imprimir" src="/Imagenes/btnImprimir.gif" Style="cursor: pointer; height: 20px" /> --%>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
|
||||
|
||||
<asp:UpdatePanel runat="server" ID="UpFiltros" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="portlet solid grey-cascade portlet-filter">
|
||||
<div class="portlet-title portlet-filterT smalltitle">
|
||||
<div class="tools">
|
||||
<asp:Button ID="BtnConsultar" runat="server" Text="Consultar" class="btn btn-default" OnClick="BtnConsultar_Click" />
|
||||
<a href="javascript:;" class="expand"></a>
|
||||
</div>
|
||||
<div class="titlefiltros caption ">
|
||||
<div class="row">
|
||||
<label class="col-md-2 truncate">Fuente Recaudación:</label>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="DdlFuenteRecaudacion" CssClass="form-control input-sm" AppendDataBoundItems="true" DataTextField="FuenteRecaudacion" DataValueField="CveFuenteRecaudacion" runat="server">
|
||||
<asp:ListItem Selected="True" Text="Todas" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
<label class="col-md-1 truncate">Rubro Ingreso:</label>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="DdlRubroIngreso" AppendDataBoundItems="true" CssClass="form-control input-sm" DataTextField="RubroIngreso" DataValueField="CveRubroIngreso" runat="server">
|
||||
<asp:ListItem Selected="True" Text="Todas" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
<label class="col-md-1 truncate">Agrupador:</label>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="DdlAgrupador" runat="server" CssClass="form-control input-sm">
|
||||
<asp:ListItem Text="Fuente Recaudacion" Value="1"></asp:ListItem>
|
||||
<asp:ListItem Text="Rubro Ingreso" Value="2"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body" style="display: none;">
|
||||
<div class="row">
|
||||
<label class="col-md-2 truncate">Momento Contable:</label>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="DdlMomentoContable" runat="server" CssClass="form-control input-sm">
|
||||
<asp:ListItem Text="Modificado" Value="2"></asp:ListItem>
|
||||
<asp:ListItem Text="Devengado" Value="3"></asp:ListItem>
|
||||
<asp:ListItem Text="Recaudado" Value="4"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
<label class="col-md-1 truncate">Ejercicio:</label>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="DdlEjercicio" runat="server" CssClass="form-control input-sm">
|
||||
<asp:ListItem Text="2014" Value="2014"></asp:ListItem>
|
||||
<asp:ListItem Text="2015" Value="2015"></asp:ListItem>
|
||||
<asp:ListItem Text="2016" Value="2016"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
<br />
|
||||
<br />
|
||||
|
||||
|
||||
<asp:UpdatePanel runat="server" ID="UpIngresos" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:GridView OnRowDataBound="GvIngresos_RowDataBound" ID="GvIngresos" runat="server" AutoGenerateColumns="False" EmptyDataText="No se encontraron presupuesto de Ingresos" ToolTip="Listado de Presupuetos de Ingresos" ShowHeaderWhenEmpty="true" CssClass="table table-striped table-advance table-hover" Style="text-align: center;" GridLines="None">
|
||||
<Columns>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>
|
||||
GPO
|
||||
<%--<asp:LinkButton ID="LbFuenteRecaudacion" runat="server" CausesValidation="False" Text="Fuente de Recaudacion" CommandArgument="FuenteRecaudacion" OnClick="LbOrden_Click"></asp:LinkButton> <asp:ImageButton ID="ImgFuenteRecaudacion" runat="server" CommandArgument="FuenteRecaudacion;0" OnClick="LbOrden_Click" CausesValidation="false" ImageUrl="/Imagenes/FlechasAbajo.gif" />--%>
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LabelFuenteRecaudacion" runat="server" Text='<%# Eval("GPO")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="250" HorizontalAlign="Left" />
|
||||
</asp:TemplateField>
|
||||
|
||||
|
||||
<asp:BoundField DataField="Enero" HeaderText="Ene" DataFormatString="{0:N2}" ItemStyle-Width="100px" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField DataField="Febrero" HeaderText="Feb" DataFormatString="{0:N2}" ItemStyle-Width="100px" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField DataField="Marzo" HeaderText="Mar" DataFormatString="{0:N2}" ItemStyle-Width="100px" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField DataField="Abril" HeaderText="Abr" DataFormatString="{0:N2}" ItemStyle-Width="100px" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField DataField="Mayo" HeaderText="May" DataFormatString="{0:N2}" ItemStyle-Width="100px" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField DataField="Junio" HeaderText="Jun" DataFormatString="{0:N2}" ItemStyle-Width="100px" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField DataField="Julio" HeaderText="Jul" DataFormatString="{0:N2}" ItemStyle-Width="100px" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField DataField="Agosto" HeaderText="Ago" DataFormatString="{0:N2}" ItemStyle-Width="100px" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField DataField="Septiembre" HeaderText="Sep" DataFormatString="{0:N2}" ItemStyle-Width="100px" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField DataField="Octubre" HeaderText="Oct" DataFormatString="{0:N2}" ItemStyle-Width="100px" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField DataField="Noviembre" HeaderText="Nov" DataFormatString="{0:N2}" ItemStyle-Width="100px" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField DataField="Diciembre" HeaderText="Dic" DataFormatString="{0:N2}" ItemStyle-Width="100px" ItemStyle-HorizontalAlign="Right" />
|
||||
|
||||
<asp:BoundField DataField="TotalAcumulado" HeaderText="Total" DataFormatString="{0:N2}" ItemStyle-Width="100px" ItemStyle-HorizontalAlign="Right" />
|
||||
|
||||
|
||||
<%--<asp:TemplateField>
|
||||
<HeaderTemplate>
|
||||
<asp:LinkButton ID="LbInicial" runat="server" CausesValidation="False" Text="Inicial" CommandArgument="Inicial" OnClick="LbOrden_Click"></asp:LinkButton> <asp:ImageButton ID="ImgInicial" runat="server" CommandArgument="Inicial;0" OnClick="LbOrden_Click" CausesValidation="false" ImageUrl="/Imagenes/FlechasAbajo.gif" />
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LabelInicial" runat="server" Text='<%# Eval("Inicial", "{0:N2}")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="100" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>--%>
|
||||
<%--<asp:TemplateField>
|
||||
<HeaderTemplate>
|
||||
<asp:LinkButton ID="LbEnero" runat="server" CausesValidation="False" Text="Ene" CommandArgument="Enero;0" OnClick="LbOrden_Click"></asp:LinkButton> <asp:ImageButton ID="ImgEnero" runat="server" CommandArgument="Enero" OnClick="LbOrden_Click" CausesValidation="false" ImageUrl="/Imagenes/FlechasAbajo.gif" />
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LabelEnero" runat="server" Text='<%# Eval("Enero", "{0:N2}")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="100" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>
|
||||
<asp:LinkButton ID="LbFebrero" runat="server" CausesValidation="False" Text="Feb" CommandArgument="Febrero;0" OnClick="LbOrden_Click"></asp:LinkButton> <asp:ImageButton ID="ImgFebrero" runat="server" CommandArgument="Febrero" OnClick="LbOrden_Click" CausesValidation="false" ImageUrl="/Imagenes/FlechasAbajo.gif" />
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LabelFebrero" runat="server" Text='<%# Eval("Febrero", "{0:N2}")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="100" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>
|
||||
<asp:LinkButton ID="LbMarzo" runat="server" CausesValidation="False" Text="Mar" CommandArgument="Marzo;0" OnClick="LbOrden_Click"></asp:LinkButton> <asp:ImageButton ID="ImgMarzo" runat="server" CommandArgument="Marzo" OnClick="LbOrden_Click" CausesValidation="false" ImageUrl="/Imagenes/FlechasAbajo.gif" />
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LabelMarzo" runat="server" Text='<%# Eval("Marzo", "{0:N2}")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="100" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>
|
||||
<asp:LinkButton ID="LbAbril" runat="server" CausesValidation="False" Text="Abr" CommandArgument="Abril;0" OnClick="LbOrden_Click"></asp:LinkButton> <asp:ImageButton ID="ImgAbril" runat="server" CommandArgument="Abril" OnClick="LbOrden_Click" CausesValidation="false" ImageUrl="/Imagenes/FlechasAbajo.gif" />
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LabelAbril" runat="server" Text='<%# Eval("Abril", "{0:N2}")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="100" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>
|
||||
<asp:LinkButton ID="LbMayo" runat="server" CausesValidation="False" Text="May" CommandArgument="Mayo;0" OnClick="LbOrden_Click"></asp:LinkButton> <asp:ImageButton ID="ImgMayo" runat="server" CommandArgument="Mayo" OnClick="LbOrden_Click" CausesValidation="false" ImageUrl="/Imagenes/FlechasAbajo.gif" />
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LabelMayo" runat="server" Text='<%# Eval("Mayo", "{0:N2}")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="100" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>
|
||||
<asp:LinkButton ID="LbJunio" runat="server" CausesValidation="False" Text="Jun" CommandArgument="Junio;0" OnClick="LbOrden_Click"></asp:LinkButton> <asp:ImageButton ID="ImgJunio" runat="server" CommandArgument="Junio" OnClick="LbOrden_Click" CausesValidation="false" ImageUrl="/Imagenes/FlechasAbajo.gif" />
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LabelJunio" runat="server" Text='<%# Eval("Junio", "{0:N2}")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="100" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>
|
||||
<asp:LinkButton ID="LbJulio" runat="server" CausesValidation="False" Text="Jul" CommandArgument="Julio;0" OnClick="LbOrden_Click"></asp:LinkButton> <asp:ImageButton ID="ImgJulio" runat="server" CommandArgument="Julio" OnClick="LbOrden_Click" CausesValidation="false" ImageUrl="/Imagenes/FlechasAbajo.gif" />
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LabelJulio" runat="server" Text='<%# Eval("Julio", "{0:N2}")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="100" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>
|
||||
<asp:LinkButton ID="LbAgosto" runat="server" CausesValidation="False" Text="Sep" CommandArgument="Agosto;0" OnClick="LbOrden_Click"></asp:LinkButton> <asp:ImageButton ID="ImgAgosto" runat="server" CommandArgument="Agosto" OnClick="LbOrden_Click" CausesValidation="false" ImageUrl="/Imagenes/FlechasAbajo.gif" />
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LabelAgosto" runat="server" Text='<%# Eval("Agosto", "{0:N2}")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="100" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>
|
||||
<asp:LinkButton ID="LbSeptiembre" runat="server" CausesValidation="False" Text="Sep" CommandArgument="Septiembre;0" OnClick="LbOrden_Click"></asp:LinkButton> <asp:ImageButton ID="ImgSeptiembre" runat="server" CommandArgument="Septiembre" OnClick="LbOrden_Click" CausesValidation="false" ImageUrl="/Imagenes/FlechasAbajo.gif" />
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LabelSeptiembre" runat="server" Text='<%# Eval("Septiembre", "{0:N2}")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="100" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>
|
||||
<asp:LinkButton ID="LbOctubre" runat="server" CausesValidation="False" Text="Oct" CommandArgument="Octubre;0" OnClick="LbOrden_Click"></asp:LinkButton> <asp:ImageButton ID="ImgOctubre" runat="server" CommandArgument="Octubre" OnClick="LbOrden_Click" CausesValidation="false" ImageUrl="/Imagenes/FlechasAbajo.gif" />
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LabelOctubre" runat="server" Text='<%# Eval("Octubre", "{0:N2}")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="100" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>
|
||||
<asp:LinkButton ID="LbNoviembre" runat="server" CausesValidation="False" Text="Nov" CommandArgument="Noviembre;0" OnClick="LbOrden_Click"></asp:LinkButton> <asp:ImageButton ID="ImgNoviembre" runat="server" CommandArgument="Noviembre" OnClick="LbOrden_Click" CausesValidation="false" ImageUrl="/Imagenes/FlechasAbajo.gif" />
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LabelNoviembre" runat="server" Text='<%# Eval("Noviembre", "{0:N2}")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="100" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>
|
||||
<asp:LinkButton ID="LbDiciembre" runat="server" CausesValidation="False" Text="Dic" CommandArgument="Diciembre;0" OnClick="LbOrden_Click"></asp:LinkButton> <asp:ImageButton ID="ImgDiciembre" runat="server" CommandArgument="Diciembre" OnClick="LbOrden_Click" CausesValidation="false" ImageUrl="/Imagenes/FlechasAbajo.gif" />
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LabelDiciembre" runat="server" Text='<%# Eval("Diciembre", "{0:N2}")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="100" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>
|
||||
<asp:LinkButton ID="LbTotalAcumulado" runat="server" CausesValidation="False" Text="Total" CommandArgument="TotalAcumulado;0" OnClick="LbOrden_Click"></asp:LinkButton> <asp:ImageButton ID="ImgTotalAcumulado" runat="server" CommandArgument="TotalAcumulado" OnClick="LbOrden_Click" CausesValidation="false" ImageUrl="/Imagenes/FlechasAbajo.gif" />
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LabelTotalAcumulado" runat="server" Text='<%# Eval("TotalAcumulado", "{0:N2}")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="100" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>--%>
|
||||
<%--<asp:TemplateField>
|
||||
<HeaderTemplate>
|
||||
<asp:LinkButton ID="LbSaldo" runat="server" CausesValidation="False" Text="Saldo" CommandArgument="Saldo" OnClick="LbOrden_Click"></asp:LinkButton> <asp:ImageButton ID="ImgSaldo" runat="server" CommandArgument="Saldo;0" OnClick="LbOrden_Click" CausesValidation="false" ImageUrl="/Imagenes/FlechasAbajo.gif" />
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LabelSaldo" runat="server" Text='<%# Eval("Saldo", "{0:N2}")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="100" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>--%>
|
||||
<%-- <asp:TemplateField>
|
||||
<HeaderTemplate>
|
||||
<asp:LinkButton ID="LbDiferencia" runat="server" CausesValidation="False" Text="Diferencia" CommandArgument="Diferencia;0" OnClick="LbOrden_Click"></asp:LinkButton> <asp:ImageButton ID="ImgDiferencia" runat="server" CommandArgument="Diferencia" OnClick="LbOrden_Click" CausesValidation="false" ImageUrl="/Imagenes/FlechasAbajo.gif" />
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LabelDiferencia" runat="server" Text='<%# Eval("Diferencia", "{0:N2}")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="50" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>--%>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
||||
|
||||
<script type="text/javascript">
|
||||
function pageLoad() {
|
||||
$(document).ready(function () {
|
||||
gridviewScroll();
|
||||
});
|
||||
|
||||
function gridviewScroll() {
|
||||
var Tam = TamañoVentana();
|
||||
var Alto = Tam.height - 245;
|
||||
|
||||
$('#<%=GvIngresos.ClientID%>').gridviewScroll({
|
||||
width: 995,
|
||||
height: Alto,
|
||||
freezesize: 1,
|
||||
headerrowcount: 1
|
||||
});
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
</asp:Content>
|
||||
141
AC/RepPresupuestoIngresosMensual.aspx.vb
Normal file
141
AC/RepPresupuestoIngresosMensual.aspx.vb
Normal file
@@ -0,0 +1,141 @@
|
||||
Imports System.Data
|
||||
Imports Extensiones
|
||||
Imports Microsoft.Reporting.WebForms
|
||||
|
||||
Partial Class AC_RepIngresosMensuales
|
||||
Inherits ClsPaginas
|
||||
|
||||
|
||||
#Region "PROPIEDADES"
|
||||
Private Property DtIngresos As DataTable
|
||||
Get
|
||||
Return CType(ViewState("DtIngresos"), DataTable)
|
||||
End Get
|
||||
Set(value As DataTable)
|
||||
ViewState("DtIngresos") = value
|
||||
End Set
|
||||
End Property
|
||||
#End Region
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||
If Not Page.IsPostBack Then
|
||||
DdlEjercicio.SelectedValue = UsuarioActual.Empresa.EjercicioActual.ToString
|
||||
CargaCombos()
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub CargaCombos()
|
||||
DdlFuenteRecaudacion.DataSource = GlobalDTAC_FuentesRecaudacion(UsuarioActual.CveEmpresa)
|
||||
DdlFuenteRecaudacion.Items.Insert(0, New ListItem("Todas", "-1"))
|
||||
DdlFuenteRecaudacion.DataBind()
|
||||
|
||||
DdlRubroIngreso.DataSource = GlobalDTAC_RubrosIngreso()
|
||||
DdlRubroIngreso.Items.Insert(0, New ListItem("Todas", "-1"))
|
||||
DdlRubroIngreso.DataBind()
|
||||
|
||||
UpFiltros.Update()
|
||||
End Sub
|
||||
|
||||
Private Sub CargaDatos()
|
||||
Dim ObjAC As New ClsContPAQi(UsuarioActual.Empresa)
|
||||
|
||||
If ObjAC.GetPresupuestoIngresosMensualesRep(DdlEjercicio.SelectedValue.ToEntero, DdlMomentoContable.SelectedValue.ToEntero, DdlFuenteRecaudacion.SelectedValue.ToEntero, DdlRubroIngreso.SelectedValue.ToEntero, DdlAgrupador.SelectedValue.ToEntero) Then
|
||||
DtIngresos = ObjAC.DtResultados
|
||||
Else
|
||||
DtIngresos = Nothing
|
||||
Alert("Ocurrio un error al cargar los datos del reporte.", TipoMensaje.MsgError)
|
||||
End If
|
||||
|
||||
ObjAC.Dispose()
|
||||
|
||||
'If DdlAgrupador.SelectedValue = "1" Then
|
||||
' DtIngresos = DtIngresos.FiltraParametros("Nivel IN (1,2)")
|
||||
'ElseIf DdlAgrupador.SelectedValue = "2" Then
|
||||
' DtIngresos = DtIngresos.FiltraParametros("Nivel IN (1,3)")
|
||||
'End If
|
||||
|
||||
DtIngresos = DtIngresos.FiltraParametros("Nivel IN (1,2,3,4)")
|
||||
|
||||
GvIngresos.DataSource = DtIngresos
|
||||
GvIngresos.DataBind()
|
||||
UpIngresos.Update()
|
||||
End Sub
|
||||
|
||||
Protected Sub BtnConsultar_Click(sender As Object, e As EventArgs)
|
||||
CargaDatos()
|
||||
End Sub
|
||||
|
||||
#Region "O R D E N A M I E N T O"
|
||||
|
||||
Protected Sub LbOrden_Click(ByVal sender As Object, ByVal e As EventArgs)
|
||||
Dim Orden As String = ""
|
||||
Dim Campo As String = ""
|
||||
Dim Literal As Literal = Nothing
|
||||
Const OrdenInicial As String = ""
|
||||
Dim Arg(2) As String
|
||||
|
||||
Arg = CType(sender, LinkButton).CommandArgument().ToString.Split(";"c)
|
||||
Campo = Arg(0)
|
||||
Literal = CType(CType(sender, LinkButton).NamingContainer.FindControl("Img" & Campo.Replace(",", "_")), Literal)
|
||||
|
||||
If ViewState(String.Format("O{0}", Campo)) IsNot Nothing AndAlso ViewState(String.Format("O{0}", Campo)).ToString = String.Format("{0} DESC", Campo) Then
|
||||
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>")
|
||||
End If
|
||||
Orden = OrdenInicial & ViewState(String.Format("O{0}", Campo)).ToString
|
||||
ViewState("Orden") = Orden
|
||||
CargaGrid(Orden)
|
||||
End Sub
|
||||
Protected Sub CargaGrid(Orden As String)
|
||||
Dim DV As DataView = Nothing
|
||||
DV = New DataView(DtIngresos, "", Orden, DataViewRowState.CurrentRows)
|
||||
If Orden <> String.Empty Then
|
||||
GvIngresos.DataSource = DV.ToTable()
|
||||
GvIngresos.DataBind()
|
||||
Else
|
||||
GvIngresos.DataSource = DtIngresos
|
||||
End If
|
||||
DV.Dispose()
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
Protected Sub GvIngresos_RowDataBound(sender As Object, e As GridViewRowEventArgs)
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
If e.Row.DBCampo("Nivel") = "1" Then
|
||||
e.Row.FCLabel("LabelFuenteRecaudacion").Text = "Total"
|
||||
e.Row.CssClass = "Totales"
|
||||
'ElseIf e.Row.DBCampo("Nivel") = "2" Then
|
||||
' e.Row.FCLabel("LabelFuenteRecaudacion").Text = e.Row.DBCampo("FuenteRecaudacion")
|
||||
' e.Row.CssClass = "SubTotales"
|
||||
' 'ElseIf e.Row.DBCampo("Nivel") = "1" Then
|
||||
' ' e.Row.CssClass = "SubTotales"
|
||||
'ElseIf e.Row.DBCampo("Nivel") = "4" Then
|
||||
' e.Row.FCLabel("LabelFuenteRecaudacion").Text = e.Row.DBCampo("FuenteRecaudacion")
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
#Region "I M P R I M I R "
|
||||
|
||||
Protected Sub BtnImprimir_Click(sender As Object, e As EventArgs)
|
||||
ImprimirReporte()
|
||||
End Sub
|
||||
|
||||
Protected Sub ImgExcel_Click(sender As Object, e As EventArgs) Handles ImgExcel.Click
|
||||
ImprimirReporte("Excel")
|
||||
End Sub
|
||||
|
||||
Private Sub ImprimirReporte(Optional Formato As String = "PDF")
|
||||
Dim params As New List(Of ReportParameter)
|
||||
params.Add(New ReportParameter("pEmp", UsuarioActual.Empresa.Empresa))
|
||||
params.Add(New ReportParameter("pImg", New Uri(Server.MapPath(String.Format("~/Empresas/{0}/Logo.png", UsuarioActual.CveEmpresa))).AbsoluteUri))
|
||||
params.Add(New ReportParameter("pEjercicio", DdlEjercicio.SelectedValue))
|
||||
params.Add(New ReportParameter("pMomentoContable", DdlMomentoContable.SelectedItem.ToString))
|
||||
ImprimirPDF("AC/Reportes/RepPresupuestoIngresosMensual.rdlc", DtIngresos, params, "ReportePresupuestoIngresosMensual", Formato)
|
||||
End Sub
|
||||
#End Region
|
||||
End Class
|
||||
89
AC/RepProgramaOperativo.aspx
Normal file
89
AC/RepProgramaOperativo.aspx
Normal file
@@ -0,0 +1,89 @@
|
||||
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RepProgramaOperativo.aspx.vb" Inherits="AC_RepProgramaOperativo" %>
|
||||
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="HB" runat="Server">
|
||||
|
||||
<li>
|
||||
<asp:HyperLink ID="HplAgregar" runat="server" NavigateUrl="/AC/ProgramaOperativo.aspx"><i class="fa fa-plus-circle"></i> Agregar</asp:HyperLink>
|
||||
</li>
|
||||
<li>
|
||||
<asp:LinkButton ID="LBPdf" OnClick="LBPdf_Click" runat="server"><i class="fa fa-ad-pdf"></i> Exporta PDF</asp:LinkButton>
|
||||
</li>
|
||||
<li>
|
||||
<asp:LinkButton ID="LBExcel" OnClick="LBExcel_Click" runat="server"><i class="fa fa-ad-excel"></i> Exporta Excel</asp:LinkButton>
|
||||
</li>
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="E" runat="Server">
|
||||
Reporte de Programas Operativos Anuales (POA)
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
|
||||
|
||||
<asp:UpdatePanel ID="UPFiltros" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="portlet solid grey-cascade portlet-filter">
|
||||
<div class="portlet-title portlet-filterT smalltitle">
|
||||
<div class="tools">
|
||||
<asp:Button ID="consultar" runat="server" Text="Consultar" OnClick="consultar_Click" CssClass="btn btn-Default" />
|
||||
</div>
|
||||
<div class="titlefiltros caption ">
|
||||
<div class="row">
|
||||
<label class="col-md-1" style="width: 130px;">Tipo de proyecto:</label>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="DdlProyecto" runat="server" Class="table-group-action-input form-control input-inline input-small input-sm" Style="width: 150px !important;">
|
||||
<asp:ListItem Text="Presupuesto" Value="1"></asp:ListItem>
|
||||
<asp:ListItem Text="AnteProyecto" Value="0"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
<label class="col-md-1">Ejercicio:</label>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="DdlEjercicio" runat="server" Width="100%" DataTextField="Ejercicio" DataValueField="Ejercicio"></asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
<asp:UpdatePanel ID="UPPDatos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:GridView ID="GVD" runat="server" AutoGenerateColumns="False" EmptyDataText="No se encontraron Registros de Programa Operativo" CssClass="table table-striped table-advance table-hover Widthall" Style="min-width: 995px; text-align: center;" GridLines="None">
|
||||
<Columns>
|
||||
<asp:HyperLinkField HeaderText="Clave" DataTextField="Clave" DataNavigateUrlFields="CveProgramaOperativo,EsProyecto,Bloqueado" DataNavigateUrlFormatString="/AC/ProgramaOperativo.aspx?CveProgramaOperativo={0}&EsProyecto={1},&Bloqueado={2}" ControlStyle-CssClass="Texto" />
|
||||
<asp:HyperLinkField HeaderText="Programa Operativo Anual (POA)" DataTextField="ProgramaOperativo" DataNavigateUrlFields="CveProgramaOperativo,EsProyecto,Bloqueado" DataNavigateUrlFormatString="/AC/ProgramaOperativo.aspx?CveProgramaOperativo={0}&EsProyecto={1},&Bloqueado={2}" ControlStyle-CssClass="Texto" ItemStyle-HorizontalAlign="left" />
|
||||
<asp:HyperLinkField HeaderText="Clasificacion Funcional" DataTextField="CodClasificacionFuncional" DataNavigateUrlFields="CveProgramaOperativo,EsProyecto,Bloqueado" DataNavigateUrlFormatString="/AC/ProgramaOperativo.aspx?CveProgramaOperativo={0}&EsProyecto={1},&Bloqueado={2}" ControlStyle-CssClass="Texto" ItemStyle-Width="150px" ItemStyle-HorizontalAlign="left" />
|
||||
<asp:HyperLinkField HeaderText="Clasificación Administrativa" DataTextField="CodClasificacionAdministrativa" DataNavigateUrlFields="CveProgramaOperativo,EsProyecto,Bloqueado" DataNavigateUrlFormatString="/AC/ProgramaOperativo.aspx?CveProgramaOperativo={0}&EsProyecto={1},&Bloqueado={2}" ControlStyle-CssClass="Texto" ItemStyle-Width="150px" ItemStyle-HorizontalAlign="left" />
|
||||
<asp:HyperLinkField HeaderText="Programa CONAC" DataTextField="ProgramaCONAC" DataNavigateUrlFields="CveProgramaOperativo,EsProyecto,Bloqueado" DataNavigateUrlFormatString="/AC/ProgramaOperativo.aspx?CveProgramaOperativo={0}&EsProyecto={1},&Bloqueado={2}" ControlStyle-CssClass="Texto" ItemStyle-HorizontalAlign="left" />
|
||||
<asp:HyperLinkField HeaderText="Clasificación Geográfica" DataTextField="ClasificacionGeografica" DataNavigateUrlFields="CveProgramaOperativo,EsProyecto,Bloqueado" DataNavigateUrlFormatString="/AC/ProgramaOperativo.aspx?CveProgramaOperativo={0}&EsProyecto={1},&Bloqueado={2}" ControlStyle-CssClass="Texto" ItemStyle-HorizontalAlign="left" />
|
||||
<asp:HyperLinkField HeaderText="U.M." DataTextField="UnidadMedida" DataNavigateUrlFields="CveProgramaOperativo,EsProyecto,Bloqueado" DataNavigateUrlFormatString="/AC/ProgramaOperativo.aspx?CveProgramaOperativo={0}&EsProyecto={1},&Bloqueado={2}" ControlStyle-CssClass="Texto" ItemStyle-Width="90px" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:HyperLinkField HeaderText="Total" DataTextField="Total" DataTextFormatString="{0:N2}" DataNavigateUrlFields="CveProgramaOperativo,EsProyecto,Bloqueado" DataNavigateUrlFormatString="/AC/ProgramaOperativo.aspx?CveProgramaOperativo={0}&EsProyecto={1},&Bloqueado={2}" ControlStyle-CssClass="Texto" ItemStyle-Width="90px" ItemStyle-HorizontalAlign="Right" />
|
||||
</Columns>
|
||||
<HeaderStyle CssClass="TitulosChico"></HeaderStyle>
|
||||
</asp:GridView>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
<br />
|
||||
|
||||
<asp:UpdatePanel runat="server">
|
||||
<ContentTemplate>
|
||||
<table width="100%">
|
||||
<tr>
|
||||
<td align="right">
|
||||
<asp:Button ID="BtnProyecto" Visible="false" runat="server" Text="Aprobar Programa" class="btn green" />
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
<br />
|
||||
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
||||
</asp:Content>
|
||||
187
AC/RepProgramaOperativo.aspx.vb
Normal file
187
AC/RepProgramaOperativo.aspx.vb
Normal file
@@ -0,0 +1,187 @@
|
||||
Imports Extensiones
|
||||
Imports Microsoft.Reporting.WebForms
|
||||
Imports System.Data
|
||||
|
||||
Partial Class AC_RepProgramaOperativo
|
||||
Inherits ClsPaginas
|
||||
|
||||
|
||||
#Region "PROPIEDADES"
|
||||
|
||||
Private Property DtProgramaOperativo As DataTable
|
||||
Get
|
||||
Return CType(ViewState("DtProgramaOperativo"), DataTable)
|
||||
End Get
|
||||
Set(value As DataTable)
|
||||
ViewState("DtProgramaOperativo") = value
|
||||
End Set
|
||||
End Property
|
||||
#End Region
|
||||
|
||||
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||
If Not Page.IsPostBack Then
|
||||
SetValues()
|
||||
CargaDatos()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
|
||||
#Region " VALORES INICIALES "
|
||||
Private Sub SetValues()
|
||||
CargaEjercicios()
|
||||
End Sub
|
||||
Private Sub CargaEjercicios()
|
||||
Dim ClsConta As New ClsContPAQi(UsuarioActual.Empresa)
|
||||
If ClsConta.GetEjercicios() Then
|
||||
DdlEjercicio.DataSource = ClsConta.DtResultados
|
||||
Else
|
||||
DdlEjercicio.DataSource = Nothing
|
||||
End If
|
||||
ClsConta.Dispose()
|
||||
DdlEjercicio.DataBind()
|
||||
|
||||
DdlEjercicio.SelectedValueExist(UsuarioActual.Empresa.EjercicioActual.ToString)
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
|
||||
Protected Sub CargaDatos()
|
||||
Dim objAC As New ClsAC
|
||||
Dim Ejercicio As Integer = DdlEjercicio.SelectedValue.ToString.ToEntero
|
||||
Dim EsProyecto As Boolean = CBool(DdlProyecto.SelectedValue.ToString)
|
||||
|
||||
BtnProyecto.Visible = False
|
||||
|
||||
If objAC.GetProgramasOperativos(-1, UsuarioActual.CveEmpresa, EsProyecto, Ejercicio) Then
|
||||
GVD.DataSource = objAC.DtResultados
|
||||
GlobalDTAC_ProgramaOperativo(-1) = objAC.DtResultados
|
||||
DtProgramaOperativo = objAC.DtResultados
|
||||
|
||||
'debe de haber datos para habilitar los botones
|
||||
If DtProgramaOperativo.Rows.Count > 0 Then
|
||||
If EsProyecto Then
|
||||
If DtProgramaOperativo.Rows(0)("Bloqueado").ToString = "0" Then
|
||||
BtnProyecto.Visible = True
|
||||
End If
|
||||
Else
|
||||
'si es anteproyecto
|
||||
If DtProgramaOperativo.Rows(0)("Bloqueado").ToString = "0" Then
|
||||
BtnProyecto.Visible = True
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
UPPDatos.Update()
|
||||
|
||||
objAC.Dispose()
|
||||
GVD.DataBind()
|
||||
End Sub
|
||||
|
||||
|
||||
Protected Sub consultar_Click(sender As Object, e As EventArgs)
|
||||
CargaDatos()
|
||||
End Sub
|
||||
|
||||
Protected Sub GVD_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GVD.RowDataBound
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
'Formato a columnas
|
||||
'e.Row.Cells(5).HorizontalAlign = HorizontalAlign.Center
|
||||
'e.Row.Cells(6).HorizontalAlign = HorizontalAlign.Center
|
||||
|
||||
'Se generan las ligas
|
||||
'e.Row.FCLiteral("LtlClave").Text = "<a class=""Texto"" href=""/AC/ProgramaOperativo.aspx?CveProgramaOperativo=" & e.Row.DBCampo("CveProgramaOperativo") & """>" & e.Row.FCLiteral("LtlClave").Text & "</a>"
|
||||
'e.Row.FCLiteral("LtlProgramaOperativo").Text = "<a class=""Texto"" href=""/AC/ProgramaOperativo.aspx?CveProgramaOperativo=" & e.Row.DBCampo("CveProgramaOperativo") & """>" & e.Row.FCLiteral("LtlProgramaOperativo").Text & "</a>"
|
||||
'e.Row.FCLiteral("LtlClasificacionFuncional").Text = "<a class=""Texto"" href=""/AC/ProgramaOperativo.aspx?CveProgramaOperativo=" & e.Row.DBCampo("CveProgramaOperativo") & """>" & e.Row.FCLiteral("LtlClasificacionFuncional").Text & "</a>"
|
||||
'e.Row.FCLiteral("LtlClasificacionAdministrativa").Text = "<a class=""Texto"" href=""/AC/ProgramaOperativo.aspx?CveProgramaOperativo=" & e.Row.DBCampo("CveProgramaOperativo") & """>" & e.Row.FCLiteral("LtlClasificacionAdministrativa").Text & "</a>"
|
||||
'e.Row.FCLiteral("LtlProgramaCONAC").Text = "<a class=""Texto"" href=""/AC/ProgramaOperativo.aspx?CveProgramaOperativo=" & e.Row.DBCampo("CveProgramaOperativo") & """>" & e.Row.FCLiteral("LtlProgramaCONAC").Text & "</a>"
|
||||
'e.Row.FCLiteral("LtlClasificacionGeografica").Text = "<a class=""Texto"" href=""/AC/ProgramaOperativo.aspx?CveProgramaOperativo=" & e.Row.DBCampo("CveProgramaOperativo") & """>" & e.Row.FCLiteral("LtlClasificacionGeografica").Text & "</a>"
|
||||
'e.Row.FCLiteral("LtlUM").Text = "<a class=""Texto"" href=""/AC/ProgramaOperativo.aspx?CveProgramaOperativo=" & e.Row.DBCampo("CveProgramaOperativo") & """>" & e.Row.FCLiteral("LtlUM").Text & "</a>"
|
||||
'e.Row.FCLiteral("LtlTotal").Text = "<a class=""Texto"" href=""/AC/ProgramaOperativo.aspx?CveProgramaOperativo=" & e.Row.DBCampo("CveProgramaOperativo") & """>" & e.Row.FCLiteral("LtlTotal").Text.FormatoNumero & "</a>"
|
||||
End If
|
||||
End Sub
|
||||
|
||||
|
||||
Protected Sub BtnProyecto_Click(sender As Object, e As EventArgs) Handles BtnProyecto.Click
|
||||
Dim objAC As New ClsAC()
|
||||
objAC.IniciaTransacSQL()
|
||||
|
||||
'Dim Total As Double = txtTotal.Text.Replace(",", "").Trim.ToDouble
|
||||
'Dim Enero As Double = txtEnero.Text.Replace(",", "").Trim.ToDouble
|
||||
'Dim Febrero As Double = txtFebrero.Text.Replace(",", "").Trim.ToDouble
|
||||
'Dim Marzo As Double = txtMarzo.Text.Replace(",", "").Trim.ToDouble
|
||||
'Dim Abril As Double = txtAbril.Text.Replace(",", "").Trim.ToDouble
|
||||
'Dim Mayo As Double = txtMayo.Text.Replace(",", "").Trim.ToDouble
|
||||
'Dim Junio As Double = txtJunio.Text.Replace(",", "").Trim.ToDouble
|
||||
'Dim Julio As Double = txtJulio.Text.Replace(",", "").Trim.ToDouble
|
||||
'Dim Agosto As Double = txtAgosto.Text.Replace(",", "").Trim.ToDouble
|
||||
'Dim Septiembre As Double = txtSeptiembre.Text.Replace(",", "").Trim.ToDouble
|
||||
'Dim Octubre As Double = txtOctubre.Text.Replace(",", "").Trim.ToDouble
|
||||
'Dim Noviembre As Double = txtNoviembre.Text.Replace(",", "").Trim.ToDouble
|
||||
'Dim Diciembre As Double = txtDiciembre.Text.Replace(",", "").Trim.ToDouble
|
||||
|
||||
Dim ErrorAC = False
|
||||
For Each dr As DataRow In DtProgramaOperativo.Rows
|
||||
If Not objAC.BloquearProgramaOperativo(dr("CveProgramaOperativo").ToString.ToEntero) Then
|
||||
ErrorAC = True
|
||||
End If
|
||||
Next
|
||||
|
||||
If Not ErrorAC Then
|
||||
objAC.Commit()
|
||||
Alert("Los Programas Operativos se autorizaron correctamente", TipoMensaje.MsgInformacion)
|
||||
Else
|
||||
Alert("Ocurrió un error al bloquear los Programas Operativos ", TipoMensaje.MsgInformacion)
|
||||
End If
|
||||
|
||||
|
||||
'If CveProgramaOperativo > 0 AndAlso Then
|
||||
' If objAC.ProyectoProgramaOperativo(txtClave.Text, txtProgramaOperativo.Text, CboClasificacionFuncional.SelectedValue.ToEntero, CboClasificacionAdministrativa.SelectedValue.ToEntero, CboProgramaCONAC.SelectedValue.ToEntero, CboClasificacionGeografica.SelectedValue.ToEntero,
|
||||
' txtProblematica.Text, txtCausa.Text, txtEfecto.Text, CboMeta.SelectedValue.ToEntero, CboUM.SelectedValue.ToEntero, Total,
|
||||
' Enero, Febrero, Marzo, Abril, Mayo, Junio, Julio, Agosto, Septiembre, Octubre, Noviembre, Diciembre, DdlEjercicio.SelectedValue.ToEntero, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveProgramaOperativo) Then
|
||||
' Alert("El Programa Operativo se ACTUALIZO Correctamente como PROYECTO", TipoMensaje.MsgInformacion, "document.location.href=""/AC/RepProgramaOperativo.aspx""")
|
||||
' GlobalDTAC_ProgramaOperativo(-1) = objAC.DtResultados
|
||||
' End If
|
||||
'Else
|
||||
' Alert("ERROR", TipoMensaje.MsgError)
|
||||
'End If
|
||||
|
||||
'If EsProyecto = 1 Then
|
||||
' If objAC.BloquearProgramaOperativo(CveProgramaOperativo) Then
|
||||
' Alert("El Programa Operativo se ACTUALIZO Correctamente como PROYECTO AUTORIZADO", TipoMensaje.MsgInformacion, "document.location.href=""/AC/RepProgramaOperativo.aspx""")
|
||||
' End If
|
||||
'End If
|
||||
|
||||
objAC.Dispose()
|
||||
|
||||
CargaDatos()
|
||||
End Sub
|
||||
|
||||
|
||||
#Region "I M P R I M I R "
|
||||
Protected Sub LBPdf_Click(sender As Object, e As EventArgs)
|
||||
ImprimirReporte()
|
||||
End Sub
|
||||
Protected Sub LBExcel_Click(sender As Object, e As EventArgs)
|
||||
ImprimirReporte("Excel")
|
||||
End Sub
|
||||
Protected Sub ImprimirReporte(Optional Formato As String = "PDF")
|
||||
'nombre del archivo a generar
|
||||
Dim fileName As String = "ReporteProgramaOperativo"
|
||||
'ubicacion del rdlc
|
||||
Dim reportpath As String = "AC/Reportes/RepProgramaOperativo.rdlc"
|
||||
|
||||
'parametros a enviar al reporte
|
||||
Dim params As New List(Of ReportParameter)
|
||||
params.Add(New ReportParameter("pEmp", UsuarioActual.Empresa.Empresa))
|
||||
params.Add(New ReportParameter("pImg", New Uri(Server.MapPath(String.Format("~/Empresas/{0}/Logo.png", UsuarioActual.CveEmpresa))).AbsoluteUri))
|
||||
params.Add(New ReportParameter("pEjercicio", DdlEjercicio.SelectedValue.ToString))
|
||||
ImprimirPDF(reportpath, DtProgramaOperativo, params, fileName, Formato)
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
|
||||
End Class
|
||||
581
AC/RepSituacionFinanciera.aspx
Normal file
581
AC/RepSituacionFinanciera.aspx
Normal file
@@ -0,0 +1,581 @@
|
||||
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RepSituacionFinanciera.aspx.vb" Inherits="AC_SituacionFinanciera" %>
|
||||
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="HB" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="E" runat="Server">
|
||||
<asp:Literal ID="LtTitulo" Text="Estado de Situación Financiera" runat="server" />
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
|
||||
<li>
|
||||
<asp:LinkButton ID="ImgExcel" runat="server"><i class="fa fa-file-excel-o" style="font-weight:bold;"></i> Excel</asp:LinkButton>
|
||||
<%--<asp:ImageButton ID="ImgExcel" runat="server" ImageUrl="/Imagenes/IconoExcel.gif" Width="20px" Height="20px" /> --%>
|
||||
</li>
|
||||
<li>
|
||||
<asp:LinkButton ID="Imprimir" runat="server"><i class="fa fa-file-pdf-o" style="font-weight:bold;"></i> PDF</asp:LinkButton>
|
||||
<%--<asp:ImageButton ID="Imprimir" runat="server" alt="Imprimir" src="/Imagenes/btnImprimir.gif" Style="cursor: pointer; height: 20px" /> --%>
|
||||
</li>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
|
||||
<asp:UpdatePanel runat="server" ID="UpFiltros" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="portlet solid grey-cascade portlet-filter">
|
||||
<div class="portlet-title portlet-filterT smalltitle">
|
||||
<div class="tools">
|
||||
<asp:Button ID="BtnConsultar" CssClass="btn btn-default" Text="Consultar" runat="server" OnClick="BtnConsultar_Click" />
|
||||
</div>
|
||||
<div class="titlefiltros caption ">
|
||||
<div class="row">
|
||||
<label class="col-md-1 truncate" style="width: 90px;">Ejercicio:</label>
|
||||
<div class="col-md-1" style="width: 125px;">
|
||||
<asp:DropDownList ID="DdlEjercicio" runat="server" CssClass="select2me" DataTextField="Ejercicio" DataValueField="Ejercicio" Width="100px">
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
<label class="col-md-1 truncate" style="width: 90px;">Periodo:</label>
|
||||
<div class="col-md-1" style="width: 130px;">
|
||||
<asp:DropDownList ID="DdlPeriodo" runat="server" Width="100px" CssClass="select2me">
|
||||
<asp:ListItem Text="Enero" Value="1"></asp:ListItem>
|
||||
<asp:ListItem Text="Febrero" Value="2"></asp:ListItem>
|
||||
<asp:ListItem Text="Marzo" Value="3"></asp:ListItem>
|
||||
<asp:ListItem Text="Abril" Value="4"></asp:ListItem>
|
||||
<asp:ListItem Text="Mayo" Value="5"></asp:ListItem>
|
||||
<asp:ListItem Text="Junio" Value="6"></asp:ListItem>
|
||||
<asp:ListItem Text="Julio" Value="7"></asp:ListItem>
|
||||
<asp:ListItem Text="Agosto" Value="8"></asp:ListItem>
|
||||
<asp:ListItem Text="Septiembre" Value="9"></asp:ListItem>
|
||||
<asp:ListItem Text="Octubre" Value="10"></asp:ListItem>
|
||||
<asp:ListItem Text="Noviembre" Value="11"></asp:ListItem>
|
||||
<asp:ListItem Text="Diciembre" Value="12"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
<div class="col-md-2" runat="server" id="tdTipoReporte" visible="false">
|
||||
<div class="row">
|
||||
<label class="col-md-3 truncate">Tipo:</label>
|
||||
<div class="col-md-9">
|
||||
<asp:DropDownList ID="DdlTipoReporte" runat="server" Width="130px" CssClass="form-control input-sm">
|
||||
<asp:ListItem Text="Contable" Value="1"></asp:ListItem>
|
||||
<asp:ListItem Text="Contable y Complementario" Value="3"></asp:ListItem>
|
||||
<asp:ListItem Text="Complementario" Value="2"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<label class="col-md-1 truncate">Con Firma:</label>
|
||||
<div class="col-md-1">
|
||||
<asp:CheckBox ID="ChkFirma" CssClass="make-switchsd" data-size="small" runat="server" />
|
||||
</div>
|
||||
<label class="col-md-1 truncate">Nivel 2:</label>
|
||||
<div class="col-md-1">
|
||||
<asp:CheckBox ID="ChkNivel" CssClass="make-switchsd" data-size="small" runat="server" />
|
||||
</div>
|
||||
<label class="col-md-1 truncate">Presupuestal:</label>
|
||||
<div class="col-md-1">
|
||||
<asp:CheckBox ID="ChkPresupuestal" CssClass="make-switchsd" data-size="small" runat="server" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
<br />
|
||||
|
||||
<rvweb:ReportViewer ID="rvReporteador" Visible="false" runat="server" Width="100%" Height="600"></rvweb:ReportViewer>
|
||||
|
||||
|
||||
<asp:UpdatePanel runat="server">
|
||||
<ContentTemplate>
|
||||
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-6">
|
||||
<table style="width: 100%; float: left; margin-right: 20px;">
|
||||
<tr>
|
||||
<td width="100%" padding="0">
|
||||
<center>
|
||||
<h3>ACTIVO</h3>
|
||||
|
||||
<asp:UpdatePanel ID="UpActivo" UpdateMode="Conditional" runat="server">
|
||||
<ContentTemplate>
|
||||
|
||||
<asp:GridView ID="GvActivo" Style="max-width: 550px;" Width="90%" runat="server" AutoGenerateColumns="False" GridLines="None" DataKeyNames="" OnRowDataBound="GvActivo_RowDataBound">
|
||||
<Columns>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LbNombre" runat="server" Text='<%# Eval("Nombre")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="50%" HorizontalAlign="Left" />
|
||||
<HeaderTemplate>
|
||||
<asp:Label ID="LbTitulo" runat="server" Style="padding-left: 20px;" Text="ACTIVO CIRCULANTE"></asp:Label>
|
||||
</HeaderTemplate>
|
||||
<HeaderStyle HorizontalAlign="Left" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLActual" runat="server" Text='<%# Eval("ImporteActual", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
<%--<asp:Label ID="LbActual" runat="server" Text='<%# Eval("ImporteActual", "{0:N2}")%>'></asp:Label>--%>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="25%" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLAnterior" runat="server" Text='<%# Eval("ImporteAnterior", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
<%--<asp:Label ID="LbAnterior" runat="server" Text='<%# Eval("ImporteAnterior", "{0:N2}")%>'></asp:Label>--%>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="25%" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
<%--<HeaderStyle CssClass="TitulosChico"></HeaderStyle>--%>
|
||||
<RowStyle CssClass="Texto" />
|
||||
<%--<AlternatingRowStyle CssClass="TextoAlterno" />--%>
|
||||
</asp:GridView>
|
||||
<br />
|
||||
<br />
|
||||
<asp:GridView ID="GvActivoNoCirculante" Style="max-width: 550px;" Width="90%" runat="server" AutoGenerateColumns="False" GridLines="None" DataKeyNames="" OnRowDataBound="GvActivo_RowDataBound">
|
||||
<Columns>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LbNombre" runat="server" Text='<%# Eval("Nombre")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="50%" HorizontalAlign="Left" />
|
||||
<HeaderTemplate>
|
||||
<asp:Label ID="LbTitulo" runat="server" Style="padding-left: 20px;" Text="ACTIVO NO CIRCULANTE"></asp:Label>
|
||||
</HeaderTemplate>
|
||||
<HeaderStyle HorizontalAlign="Left" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLActual" runat="server" Text='<%# Eval("ImporteActual", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
<%--<asp:Label ID="LbActual" runat="server" Text='<%# Eval("ImporteActual", "{0:N2}")%>'></asp:Label>--%>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="25%" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLAnterior" runat="server" Text='<%# Eval("ImporteAnterior", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
<%--<asp:Label ID="LbAnterior" runat="server" Text='<%# Eval("ImporteAnterior", "{0:N2}")%>'></asp:Label>--%>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="25%" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
<%--<HeaderStyle CssClass="TitulosChico"></HeaderStyle>--%>
|
||||
<RowStyle CssClass="Texto" />
|
||||
<%--<AlternatingRowStyle CssClass="TextoAlterno" />--%>
|
||||
</asp:GridView>
|
||||
<br />
|
||||
<br />
|
||||
<asp:GridView ID="GvActivoDiferido" Style="max-width: 550px;" Width="90%" runat="server" AutoGenerateColumns="False" GridLines="None" DataKeyNames="" OnRowDataBound="GvActivo_RowDataBound">
|
||||
<Columns>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LbNombre" runat="server" Text='<%# Eval("Nombre")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="50%" HorizontalAlign="Left" />
|
||||
<HeaderTemplate>
|
||||
<asp:Label ID="LbTitulo" runat="server" Style="padding-left: 20px;" Text="ACTIVO DIFERIDO"></asp:Label>
|
||||
</HeaderTemplate>
|
||||
<HeaderStyle HorizontalAlign="Left" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLActual" runat="server" Text='<%# Eval("ImporteActual", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
<%--<asp:Label ID="LbActual" runat="server" Text='<%# Eval("ImporteActual", "{0:N2}")%>'></asp:Label>--%>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="25%" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLAnterior" runat="server" Text='<%# Eval("ImporteAnterior", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
<%--<asp:Label ID="LbAnterior" runat="server" Text='<%# Eval("ImporteAnterior", "{0:N2}")%>'></asp:Label>--%>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="25%" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
<%--<HeaderStyle CssClass="TitulosChico"></HeaderStyle>--%>
|
||||
<RowStyle CssClass="Texto" />
|
||||
<%--<AlternatingRowStyle CssClass="TextoAlterno" />--%>
|
||||
</asp:GridView>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
</center>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="col-md-6">
|
||||
<table style="width: 100%; float: left;">
|
||||
<tr>
|
||||
<td width="100%">
|
||||
<center>
|
||||
<h3>PASIVO</h3>
|
||||
<asp:UpdatePanel ID="UpPasivo" UpdateMode="Conditional" runat="server">
|
||||
<ContentTemplate>
|
||||
|
||||
<asp:GridView ID="GvPasivo" Style="max-width: 550px;" Width="90%" runat="server" AutoGenerateColumns="False" GridLines="None" DataKeyNames="" OnRowDataBound="GvPasivo_RowDataBound">
|
||||
<Columns>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LbNombre" runat="server" Text='<%# Eval("Nombre")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="50%" HorizontalAlign="Left" />
|
||||
<HeaderTemplate>
|
||||
<asp:Label ID="LbTitulo" runat="server" Style="padding-left: 20px;" Text="PASIVO CIRCULANTE"></asp:Label>
|
||||
</HeaderTemplate>
|
||||
<HeaderStyle HorizontalAlign="Left" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLActual" runat="server" Text='<%# Eval("ImporteActual", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
<%--<asp:Label ID="LbActual" runat="server" Text='<%# Eval("ImporteActual", "{0:N2}")%>'></asp:Label>--%>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="25%" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLAnterior" runat="server" Text='<%# Eval("ImporteAnterior", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
<%--<asp:Label ID="LbAnterior" runat="server" Text='<%# Eval("ImporteAnterior", "{0:N2}")%>'></asp:Label>--%>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="25%" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
<%--<HeaderStyle CssClass="TitulosChico"></HeaderStyle>--%>
|
||||
<RowStyle CssClass="Texto" />
|
||||
<%--<AlternatingRowStyle CssClass="TextoAlterno" />--%>
|
||||
</asp:GridView>
|
||||
<br />
|
||||
<br />
|
||||
<asp:GridView ID="GvPasivoNoCirculante" Style="max-width: 550px;" Width="90%" runat="server" AutoGenerateColumns="False" GridLines="None" DataKeyNames="" OnRowDataBound="GvPasivo_RowDataBound">
|
||||
<Columns>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LbNombre" runat="server" Text='<%# Eval("Nombre")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="50%" HorizontalAlign="Left" />
|
||||
<HeaderTemplate>
|
||||
<asp:Label ID="LbTitulo" runat="server" Style="padding-left: 20px;" Text="PASIVO NO CIRCULANTE"></asp:Label>
|
||||
</HeaderTemplate>
|
||||
<HeaderStyle HorizontalAlign="Left" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLActual" runat="server" Text='<%# Eval("ImporteActual", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
<%--<asp:Label ID="LbActual" runat="server" Text='<%# Eval("ImporteActual", "{0:N2}")%>'></asp:Label>--%>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="25%" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLAnterior" runat="server" Text='<%# Eval("ImporteAnterior", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
<%--<asp:Label ID="LbAnterior" runat="server" Text='<%# Eval("ImporteAnterior", "{0:N2}")%>'></asp:Label>--%>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="25%" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
<%--<HeaderStyle CssClass="TitulosChico"></HeaderStyle>--%>
|
||||
<RowStyle CssClass="Texto" />
|
||||
<%--<AlternatingRowStyle CssClass="TextoAlterno" />--%>
|
||||
</asp:GridView>
|
||||
<br />
|
||||
<br />
|
||||
<asp:GridView ID="GvPasivoDiferido" Style="max-width: 550px;" Width="90%" runat="server" AutoGenerateColumns="False" GridLines="None" DataKeyNames="" OnRowDataBound="GvPasivo_RowDataBound">
|
||||
<Columns>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LbNombre" runat="server" Text='<%# Eval("Nombre")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="50%" HorizontalAlign="Left" />
|
||||
<HeaderTemplate>
|
||||
<asp:Label ID="LbTitulo" runat="server" Style="padding-left: 20px;" Text="PASIVO DIFERIDO"></asp:Label>
|
||||
</HeaderTemplate>
|
||||
<HeaderStyle HorizontalAlign="Left" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLActual" runat="server" Text='<%# Eval("ImporteActual", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
<%--<asp:Label ID="LbActual" runat="server" Text='<%# Eval("ImporteActual", "{0:N2}")%>'></asp:Label>--%>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="25%" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLAnterior" runat="server" Text='<%# Eval("ImporteAnterior", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
<%--<asp:Label ID="LbAnterior" runat="server" Text='<%# Eval("ImporteAnterior", "{0:N2}")%>'></asp:Label>--%>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="25%" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
<%--<HeaderStyle CssClass="TitulosChico"></HeaderStyle>--%>
|
||||
<RowStyle CssClass="Texto" />
|
||||
<%--<AlternatingRowStyle CssClass="TextoAlterno" />--%>
|
||||
</asp:GridView>
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</center>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<asp:UpdatePanel runat="server">
|
||||
<ContentTemplate>
|
||||
<table style="max-width: 550px; width: 90%;">
|
||||
<tr>
|
||||
<td width="275px" align="center">
|
||||
<h4>Total del Pasivo:</h4>
|
||||
</td>
|
||||
<td width="100px" align="right">
|
||||
<asp:Label Font-Bold="true" runat="server" ID="LbTotalPasivoActual"></asp:Label>
|
||||
</td>
|
||||
<td runat="server" id="TdTotalPasivo" width="100px" align="right">
|
||||
<asp:Label Font-Bold="true" runat="server" ID="LbTotalPasivoAnterior"></asp:Label>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
|
||||
<center>
|
||||
<h3>
|
||||
<asp:Literal Text="HACIENDA PÚBLICA/PATRIMONIO" ID="LtlTituloHacienda" runat="server" />
|
||||
</h3>
|
||||
|
||||
<asp:UpdatePanel ID="UpPatrimonio" UpdateMode="Conditional" runat="server">
|
||||
<ContentTemplate>
|
||||
|
||||
<asp:GridView ID="GvPatrimonio" Style="max-width: 550px;" Width="90%" runat="server" AutoGenerateColumns="False" GridLines="None" DataKeyNames="" OnRowDataBound="GvPatrimonio_RowDataBound">
|
||||
<Columns>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LbNombre" runat="server" Text='<%# Eval("Nombre")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="50%" HorizontalAlign="Left" />
|
||||
<HeaderTemplate>
|
||||
<asp:Label ID="LbTitulo" runat="server" Style="padding-left: 20px;" Text="PATRIMONIO CONTRIBUIDO"></asp:Label>
|
||||
</HeaderTemplate>
|
||||
<HeaderStyle HorizontalAlign="Left" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLActual" runat="server" Text='<%# Eval("ImporteActual", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
<%--<asp:Label ID="LbActual" runat="server" Text='<%# Eval("ImporteActual", "{0:N2}")%>'></asp:Label>--%>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="25%" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLAnterior" runat="server" Text='<%# Eval("ImporteAnterior", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
<%--<asp:Label ID="LbAnterior" runat="server" Text='<%# Eval("ImporteAnterior", "{0:N2}")%>'></asp:Label>--%>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="25%" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
<%--<HeaderStyle CssClass="TitulosChico"></HeaderStyle>--%>
|
||||
<RowStyle CssClass="Texto" />
|
||||
<%--<AlternatingRowStyle CssClass="TextoAlterno" />--%>
|
||||
</asp:GridView>
|
||||
<asp:GridView ID="GvUtilidad" ShowHeader="false" Style="max-width: 550px;" Width="90%" runat="server" AutoGenerateColumns="False" GridLines="None" DataKeyNames="" OnRowDataBound="GvPatrimonio_RowDataBound">
|
||||
<Columns>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LbNombre" runat="server" Text='<%# Eval("Nombre")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="50%" HorizontalAlign="Left" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLActual" runat="server" Text='<%# Eval("ImporteActual", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
<%--<asp:Label ID="LbActual" runat="server" Text='<%# Eval("ImporteActual", "{0:N2}")%>'></asp:Label>--%>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="25%" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLAnterior" runat="server" Text='<%# Eval("ImporteAnterior", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
<%--<asp:Label ID="LbAnterior" runat="server" Text='<%# Eval("ImporteAnterior", "{0:N2}")%>'></asp:Label>--%>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="25%" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
<%--<HeaderStyle CssClass="TitulosChico"></HeaderStyle>--%>
|
||||
<RowStyle CssClass="Texto" />
|
||||
<%--<AlternatingRowStyle CssClass="TextoAlterno" />--%>
|
||||
</asp:GridView>
|
||||
<br />
|
||||
<br />
|
||||
<asp:GridView ID="GvPatrimonioGenerado" Style="max-width: 550px;" Width="90%" runat="server" AutoGenerateColumns="False" GridLines="None" DataKeyNames="" OnRowDataBound="GvPatrimonio_RowDataBound">
|
||||
<Columns>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LbNombre" runat="server" Text='<%# Eval("Nombre")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="50%" HorizontalAlign="Left" />
|
||||
<HeaderTemplate>
|
||||
<asp:Label ID="LbTitulo" runat="server" Style="padding-left: 20px;" Text="PATRIMONIO GENERADO"></asp:Label>
|
||||
</HeaderTemplate>
|
||||
<HeaderStyle HorizontalAlign="Left" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLActual" runat="server" Text='<%# Eval("ImporteActual", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
<%--<asp:Label ID="LbActual" runat="server" Text='<%# Eval("ImporteActual", "{0:N2}")%>'></asp:Label>--%>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="25%" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLAnterior" runat="server" Text='<%# Eval("ImporteAnterior", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
<%--<asp:Label ID="LbAnterior" runat="server" Text='<%# Eval("ImporteAnterior", "{0:N2}")%>'></asp:Label>--%>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="25%" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
<%--<HeaderStyle CssClass="TitulosChico"></HeaderStyle>--%>
|
||||
<RowStyle CssClass="Texto" />
|
||||
<%--<AlternatingRowStyle CssClass="TextoAlterno" />--%>
|
||||
</asp:GridView>
|
||||
<br />
|
||||
<br />
|
||||
<asp:GridView ID="GvPatrimonioActualizacion" Style="max-width: 550px;" Width="90%" runat="server" AutoGenerateColumns="False" GridLines="None" DataKeyNames="" OnRowDataBound="GvPatrimonio_RowDataBound">
|
||||
<Columns>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LbNombre" runat="server" Text='<%# Eval("Nombre")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="50%" HorizontalAlign="Left" />
|
||||
<HeaderTemplate>
|
||||
<asp:Label ID="LbTitulo" runat="server" Style="padding-left: 20px;" Text="EXCESO O INSUFICIENCIA DE ACTUALIZACION"></asp:Label>
|
||||
</HeaderTemplate>
|
||||
<HeaderStyle HorizontalAlign="Left" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLActual" runat="server" Text='<%# Eval("ImporteActual", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
<%--<asp:Label ID="LbActual" runat="server" Text='<%# Eval("ImporteActual", "{0:N2}")%>'></asp:Label>--%>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="100" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLAnterior" runat="server" Text='<%# Eval("ImporteAnterior", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
<%--<asp:Label ID="LbAnterior" runat="server" Text='<%# Eval("ImporteAnterior", "{0:N2}")%>'></asp:Label>--%>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="100" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
<%--<HeaderStyle CssClass="TitulosChico"></HeaderStyle>--%>
|
||||
<RowStyle CssClass="Texto" />
|
||||
<%--<AlternatingRowStyle CssClass="TextoAlterno" />--%>
|
||||
</asp:GridView>
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</center>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<asp:UpdatePanel runat="server">
|
||||
<ContentTemplate>
|
||||
<table style="max-width: 550px; width: 90%;">
|
||||
<tr>
|
||||
<td width="50%" style="text-align: center;">
|
||||
<h4>
|
||||
<asp:Literal ID="LtlTotalHacienda" Text="Total Hacienda Pública/Patrimonio:" runat="server" />
|
||||
</h4>
|
||||
</td>
|
||||
<td width="25%" align="right">
|
||||
<asp:Label Font-Bold="true" runat="server" ID="LbTotalPatrimonioActual"></asp:Label>
|
||||
</td>
|
||||
<td runat="server" id="TdTotalPatrimonio" width="25%" align="right">
|
||||
<asp:Label Font-Bold="true" runat="server" ID="LbTotalPatrimonioAnterior"></asp:Label>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<br />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<asp:UpdatePanel runat="server">
|
||||
<ContentTemplate>
|
||||
<center>
|
||||
<table style="max-width: 550px; width: 90%;">
|
||||
<tr>
|
||||
<td width="50%" style="text-align: center;">
|
||||
<h4>Total del Activo:</h4>
|
||||
</td>
|
||||
<td width="25%" align="right">
|
||||
<asp:Label Font-Bold="true" runat="server" ID="LbTotalActivoActual"></asp:Label>
|
||||
</td>
|
||||
<td runat="server" id="TdTotalActivoAnterior" width="25%" align="right">
|
||||
<asp:Label Font-Bold="true" runat="server" ID="LbTotalActivoAnterior"></asp:Label>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</center>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
|
||||
<div class="col-md-6">
|
||||
<asp:UpdatePanel runat="server">
|
||||
<ContentTemplate>
|
||||
<center>
|
||||
<table style="max-width: 550px; width: 90%;">
|
||||
<tr>
|
||||
<td style="text-align: center; width: 50%;">
|
||||
<h4>
|
||||
<asp:Literal ID="LtlTotalPasivoPatrimonio" Text="Total del Pasivo y Patrimonio:" runat="server" />
|
||||
</h4>
|
||||
</td>
|
||||
<td width="25%" align="right">
|
||||
<asp:Label Font-Bold="true" runat="server" ID="LbTotalPasivoPatrimonioActual"></asp:Label>
|
||||
</td>
|
||||
<td runat="server" id="TdTotalPasivoAnterior" width="25%" align="right">
|
||||
<asp:Label Font-Bold="true" runat="server" ID="LbTotalPasivoPatrimonioAnterior"></asp:Label>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</center>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-12">
|
||||
<asp:Label runat="server" ID="LbDescuadre" ForeColor="Red" Font-Bold="false" Font-Size="Small"></asp:Label>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
||||
</asp:Content>
|
||||
655
AC/RepSituacionFinanciera.aspx.vb
Normal file
655
AC/RepSituacionFinanciera.aspx.vb
Normal file
@@ -0,0 +1,655 @@
|
||||
Option Explicit On
|
||||
Option Strict On
|
||||
|
||||
Imports System.Data
|
||||
Imports Extensiones
|
||||
Imports Microsoft.Reporting.WebForms
|
||||
Partial Class AC_SituacionFinanciera
|
||||
Inherits ClsPaginas
|
||||
|
||||
#Region "PROPIEDADES"
|
||||
Private Property DtDatos As DataTable
|
||||
Get
|
||||
DtDatos = DirectCast(ViewState("DtDatos"), DataTable)
|
||||
End Get
|
||||
|
||||
Set(ByVal value As DataTable)
|
||||
ViewState("DtDatos") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property DtCuentasOrden As DataTable
|
||||
Get
|
||||
DtCuentasOrden = DirectCast(ViewState("DtCuentasOrden"), DataTable)
|
||||
End Get
|
||||
|
||||
Set(ByVal value As DataTable)
|
||||
ViewState("DtCuentasOrden") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property TotalActivoActual As Double
|
||||
Get
|
||||
TotalActivoActual = ViewState("TotalActivoActual").ToString.ToDouble
|
||||
End Get
|
||||
Set(value As Double)
|
||||
ViewState("TotalActivoActual") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property TotalActivoAnterior As Double
|
||||
Get
|
||||
TotalActivoAnterior = ViewState("TotalActivoAnterior").ToString.ToDouble
|
||||
End Get
|
||||
Set(value As Double)
|
||||
ViewState("TotalActivoAnterior") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property TotalPasivoActual As Double
|
||||
Get
|
||||
TotalPasivoActual = ViewState("TotalPasivoActual").ToString.ToDouble
|
||||
End Get
|
||||
Set(value As Double)
|
||||
ViewState("TotalPasivoActual") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property TotalPasivoAnterior As Double
|
||||
Get
|
||||
TotalPasivoAnterior = ViewState("TotalPasivoAnterior").ToString.ToDouble
|
||||
End Get
|
||||
Set(value As Double)
|
||||
ViewState("TotalPasivoAnterior") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property TotalPatrimonioActual As Double
|
||||
Get
|
||||
TotalPatrimonioActual = ViewState("TotalPatrimonioActual").ToString.ToDouble
|
||||
End Get
|
||||
Set(value As Double)
|
||||
ViewState("TotalPatrimonioActual") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property TotalPatrimonioAnterior As Double
|
||||
Get
|
||||
TotalPatrimonioAnterior = ViewState("TotalPatrimonioAnterior").ToString.ToDouble
|
||||
End Get
|
||||
Set(value As Double)
|
||||
ViewState("TotalPatrimonioAnterior") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property TotalPasivoPatrimonioActual As Double
|
||||
Get
|
||||
TotalPasivoPatrimonioActual = ViewState("TotalPasivoPatrimonioActual").ToString.ToDouble
|
||||
End Get
|
||||
Set(value As Double)
|
||||
ViewState("TotalPasivoPatrimonioActual") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property TotalPasivoPatrimonioAnterior As Double
|
||||
Get
|
||||
TotalPasivoPatrimonioAnterior = ViewState("TotalPasivoPatrimonioAnterior").ToString.ToDouble
|
||||
End Get
|
||||
Set(value As Double)
|
||||
ViewState("TotalPasivoPatrimonioAnterior") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property FechaInicioActual As Date
|
||||
Get
|
||||
FechaInicioActual = ViewState("FechaInicioActual").ToString.ToDate
|
||||
End Get
|
||||
Set(value As Date)
|
||||
ViewState("FechaInicioActual") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property FechaFinActual As Date
|
||||
Get
|
||||
FechaFinActual = ViewState("FechaFinActual").ToString.ToDate
|
||||
End Get
|
||||
Set(value As Date)
|
||||
ViewState("FechaFinActual") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property FechaInicioAnterior As Date
|
||||
Get
|
||||
FechaInicioAnterior = ViewState("FechaInicioAnterior").ToString.ToDate
|
||||
End Get
|
||||
Set(value As Date)
|
||||
ViewState("FechaInicioAnterior") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property FechaFinAnterior As Date
|
||||
Get
|
||||
FechaFinAnterior = ViewState("FechaFinAnterior").ToString.ToDate
|
||||
End Get
|
||||
Set(value As Date)
|
||||
ViewState("FechaFinAnterior") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property TipoReporte As Integer
|
||||
Get
|
||||
TipoReporte = ViewState("TipoReporte").ToString.ToEntero
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
ViewState("TipoReporte") = value
|
||||
End Set
|
||||
End Property
|
||||
#End Region
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||
If Not Page.IsPostBack Then
|
||||
|
||||
If UsuarioActual.Empresa.UsaAC Then
|
||||
TipoReporte = -1
|
||||
Else
|
||||
TipoReporte = 1
|
||||
tdTipoReporte.Visible = True
|
||||
LtTitulo.Text = "Balance General"
|
||||
End If
|
||||
|
||||
|
||||
TotalActivoActual = 0
|
||||
TotalActivoAnterior = 0
|
||||
TotalPasivoActual = 0
|
||||
TotalPasivoAnterior = 0
|
||||
TotalPatrimonioActual = 0
|
||||
TotalPatrimonioAnterior = 0
|
||||
TotalPasivoPatrimonioActual = 0
|
||||
TotalPasivoPatrimonioAnterior = 0
|
||||
|
||||
'TxtFechaInicio.Text = DateSerial(Year(Date.Now), 1, 1).ToShortDateString
|
||||
'TxtFechaFin.Text = Date.Now.ToShortDateString
|
||||
|
||||
CargaEjercicios()
|
||||
|
||||
CargaDatos()
|
||||
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub CargaEjercicios()
|
||||
Dim ClsConta As New ClsContPAQi(UsuarioActual.Empresa)
|
||||
If ClsConta.GetEjercicios() Then
|
||||
DdlEjercicio.DataSource = ClsConta.DtResultados
|
||||
Else
|
||||
DdlEjercicio.DataSource = Nothing
|
||||
End If
|
||||
ClsConta.Dispose()
|
||||
DdlEjercicio.DataBind()
|
||||
|
||||
DdlEjercicio.SelectedValueExist(UsuarioActual.Empresa.EjercicioActual.ToString)
|
||||
DdlPeriodo.SelectedValue = Now.Month.ToString
|
||||
End Sub
|
||||
|
||||
Private Sub CargaDatos()
|
||||
Dim ObjConta As New ClsContPAQi(UsuarioActual.Empresa)
|
||||
|
||||
Dim FechaI = String.Format("01/{0}/{1}", DdlPeriodo.SelectedValue.PadLeft(2, CChar("0")), DdlEjercicio.SelectedValue)
|
||||
Dim FechaF = FechaI.ToDate.LastDayOfMonth.ToShortDateString
|
||||
TipoReporte = If(TipoReporte = -1, -1, DdlTipoReporte.SelectedValue.ToEntero)
|
||||
|
||||
GvActivo.Columns(1).HeaderText = DdlEjercicio.SelectedValue
|
||||
GvActivo.Columns(2).HeaderText = (DdlEjercicio.SelectedValue.ToEntero - 1).ToString
|
||||
|
||||
GvPasivo.Columns(1).HeaderText = DdlEjercicio.SelectedValue
|
||||
GvPasivo.Columns(2).HeaderText = (DdlEjercicio.SelectedValue.ToEntero - 1).ToString
|
||||
|
||||
Dim IdCuentaAhorroDesahorro = 9999
|
||||
|
||||
If UsuarioActual.CveEmpresa = 48 Then
|
||||
IdCuentaAhorroDesahorro = 87
|
||||
End If
|
||||
If UsuarioActual.CveEmpresa = 120 Then
|
||||
IdCuentaAhorroDesahorro = 646
|
||||
End If
|
||||
|
||||
If ObjConta.GetBalanceGeneral("01/01/1000".ToDate, FechaF.ToDate, UsuarioActual.CveEmpresa, TipoReporte, UsuarioActual.Empresa.UsaAC, IdCuentaAhorroDesahorro) Then
|
||||
DtDatos = ObjConta.DtResultados
|
||||
|
||||
CargaGrids()
|
||||
SumaTotales()
|
||||
Else
|
||||
DtDatos = Nothing
|
||||
Alert("Ocurrio un error al cargar los datos del estado de situación financiera", TipoMensaje.MsgError)
|
||||
End If
|
||||
|
||||
ObjConta.Dispose()
|
||||
End Sub
|
||||
Private Sub CargaGrids()
|
||||
|
||||
If Not ChkNivel.Checked Then
|
||||
DtDatos = DtDatos.FiltraParametros("Level < 2")
|
||||
End If
|
||||
Dim CuentaAhorroDesahorro As Integer = 87
|
||||
|
||||
Select Case UsuarioActual.CveEmpresa
|
||||
Case 120
|
||||
CuentaAhorroDesahorro = 646
|
||||
Case Else
|
||||
CuentaAhorroDesahorro = 87
|
||||
End Select
|
||||
|
||||
'Defino Variables para el Orden
|
||||
Dim Orden1, Orden2, Orden3, Orden4, Orden5, Orden6, Orden7 As String
|
||||
If UsuarioActual.CveEmpresa = 48 Then Orden1 = "00011%" Else Orden1 = "011%"
|
||||
If UsuarioActual.CveEmpresa = 48 Then Orden2 = "00012%" Else Orden2 = "012%"
|
||||
If UsuarioActual.CveEmpresa = 48 Then Orden3 = "00021%" Else Orden3 = "021%"
|
||||
If UsuarioActual.CveEmpresa = 48 Then Orden4 = "00022%" Else Orden4 = "022%"
|
||||
If UsuarioActual.CveEmpresa = 48 Then Orden5 = "00031%" Else If UsuarioActual.CveEmpresa = 120 Then Orden5 = "0321%" Else Orden5 = "031%"
|
||||
If UsuarioActual.CveEmpresa = 48 Then Orden6 = "00032%" Else Orden6 = "032%"
|
||||
If UsuarioActual.CveEmpresa = 48 Then Orden7 = "00033%" Else Orden7 = "033%"
|
||||
|
||||
'ACTIVO
|
||||
Dim DtActivoCirculante = DtDatos.FiltraParametros($"Tipo in ('A','B','C') AND Orden LIKE '{Orden1}' ")
|
||||
|
||||
Dim DtActivoNoCirculante As DataTable
|
||||
|
||||
If UsuarioActual.CveEmpresa = 48 Then
|
||||
DtActivoNoCirculante = DtDatos.FiltraParametros($"Tipo in ('A','B','C') AND Orden LIKE '{Orden2}' ")
|
||||
Else
|
||||
DtActivoNoCirculante = DtDatos.FiltraParametros($"Tipo in ('A','B','C') AND Orden LIKE '{Orden2}' ")
|
||||
End If
|
||||
|
||||
Dim Row As DataRow = DtActivoCirculante.NewRow
|
||||
|
||||
If DtActivoCirculante.Rows.Count > 0 Then
|
||||
Row.Item("Nombre") = " TOTAL ACTIVO CIRCULANTE"
|
||||
Row.Item("ImporteActual") = DtActivoCirculante.Rows(0)("ImporteActual").ToString
|
||||
Row.Item("ImporteAnterior") = DtActivoCirculante.Rows(0)("ImporteAnterior").ToString
|
||||
Row.Item("CtaMayor") = -1
|
||||
DtActivoCirculante.Rows.RemoveAt(0)
|
||||
Else
|
||||
Row.Item("Nombre") = " TOTAL ACTIVO CIRCULANTE"
|
||||
Row.Item("ImporteActual") = "0.00"
|
||||
Row.Item("ImporteAnterior") = "0.00"
|
||||
Row.Item("CtaMayor") = -1
|
||||
End If
|
||||
DtActivoCirculante.Rows.Add(Row)
|
||||
|
||||
|
||||
Row = DtActivoNoCirculante.NewRow
|
||||
If DtActivoNoCirculante.Rows.Count > 0 Then
|
||||
Row.Item("Nombre") = " TOTAL ACTIVO NO CIRCULANTE"
|
||||
|
||||
If UsuarioActual.CveEmpresa = 48 Then
|
||||
Row.Item("ImporteActual") = DtActivoNoCirculante.Rows(0)("ImporteActual").ToString
|
||||
Row.Item("ImporteAnterior") = DtActivoNoCirculante.Rows(0)("ImporteAnterior").ToString
|
||||
ElseIf UsuarioActual.CveEmpresa = 120 Then
|
||||
Row.Item("ImporteActual") = DtActivoNoCirculante.SUM("ImporteActual", " Sup ='ACTIVO NO CIRCULANTE' ")
|
||||
Row.Item("ImporteAnterior") = DtActivoNoCirculante.SUM("ImporteAnterior", " Sup ='ACTIVO NO CIRCULANTE' ")
|
||||
Else
|
||||
Row.Item("ImporteActual") = DtActivoNoCirculante.Rows(0)("ImporteActual").ToString
|
||||
Row.Item("ImporteAnterior") = DtActivoNoCirculante.Rows(0)("ImporteAnterior").ToString
|
||||
End If
|
||||
|
||||
|
||||
Row.Item("CtaMayor") = -1
|
||||
DtActivoNoCirculante.Rows.RemoveAt(0)
|
||||
Else
|
||||
Row.Item("Nombre") = " TOTAL ACTIVO NO CIRCULANTE"
|
||||
Row.Item("ImporteActual") = "0.00"
|
||||
Row.Item("ImporteAnterior") = "0.00"
|
||||
Row.Item("CtaMayor") = -1
|
||||
End If
|
||||
DtActivoNoCirculante.Rows.Add(Row)
|
||||
|
||||
GvActivo.DataSource = DtActivoCirculante
|
||||
GvActivo.DataBind()
|
||||
GvActivoNoCirculante.DataSource = DtActivoNoCirculante
|
||||
GvActivoNoCirculante.DataBind()
|
||||
UpActivo.Update()
|
||||
|
||||
|
||||
'PASIVO
|
||||
Dim DtPasivoCirculante = DtDatos.FiltraParametros($"Tipo in ('D') AND Orden LIKE '{Orden3}' ")
|
||||
Dim DtPasivoNoCirculante = DtDatos.FiltraParametros($"Tipo in ('D') AND Orden LIKE '{Orden4}' ")
|
||||
|
||||
Row = DtPasivoCirculante.NewRow
|
||||
If DtPasivoCirculante.Rows.Count > 0 Then
|
||||
Row.Item("Nombre") = " TOTAL PASIVO CIRCULANTE"
|
||||
Row.Item("ImporteActual") = DtPasivoCirculante.Rows(0)("ImporteActual").ToString
|
||||
Row.Item("ImporteAnterior") = DtPasivoCirculante.Rows(0)("ImporteAnterior").ToString
|
||||
Row.Item("CtaMayor") = -1
|
||||
DtPasivoCirculante.Rows.RemoveAt(0)
|
||||
Else
|
||||
Row.Item("Nombre") = " TOTAL PASIVO CIRCULANTE"
|
||||
Row.Item("ImporteActual") = "0.00"
|
||||
Row.Item("ImporteAnterior") = "0.00"
|
||||
Row.Item("CtaMayor") = -1
|
||||
End If
|
||||
DtPasivoCirculante.Rows.Add(Row)
|
||||
|
||||
Row = DtPasivoNoCirculante.NewRow
|
||||
If DtPasivoNoCirculante.Rows.Count > 0 Then
|
||||
Row.Item("Nombre") = " TOTAL PASIVO NO CIRCULANTE"
|
||||
Row.Item("ImporteActual") = DtPasivoNoCirculante.Rows(0)("ImporteActual").ToString
|
||||
Row.Item("ImporteAnterior") = DtPasivoNoCirculante.Rows(0)("ImporteAnterior").ToString
|
||||
Row.Item("CtaMayor") = -1
|
||||
DtPasivoNoCirculante.Rows.RemoveAt(0)
|
||||
Else
|
||||
Row.Item("Nombre") = " TOTAL PASIVO NO CIRCULANTE"
|
||||
Row.Item("ImporteActual") = "0.00"
|
||||
Row.Item("ImporteAnterior") = "0.00"
|
||||
Row.Item("CtaMayor") = -1
|
||||
End If
|
||||
DtPasivoNoCirculante.Rows.Add(Row)
|
||||
|
||||
|
||||
GvPasivo.DataSource = DtPasivoCirculante
|
||||
GvPasivo.DataBind()
|
||||
GvPasivoNoCirculante.DataSource = DtPasivoNoCirculante
|
||||
GvPasivoNoCirculante.DataBind()
|
||||
UpPasivo.Update()
|
||||
|
||||
|
||||
'PATRIMONIO
|
||||
Dim DtPatrimonioContribuido = DtDatos.FiltraParametros($"Tipo in ('F') AND Orden LIKE '{Orden5}' ")
|
||||
Dim DtPatrimonioGenerado = DtDatos.FiltraParametros($"Tipo in ('F') AND Orden LIKE '{Orden6}' ")
|
||||
Dim DtPatrimonioActualizacion = DtDatos.FiltraParametros($"Tipo in ('F') AND Orden LIKE '{Orden7}' ")
|
||||
|
||||
Row = DtPatrimonioContribuido.NewRow
|
||||
If DtPatrimonioContribuido.Rows.Count > 0 Then
|
||||
Row.Item("Nombre") = " TOTAL PATRIMONIO CONTRIBUIDO"
|
||||
Row.Item("ImporteActual") = DtPatrimonioContribuido.Rows(0)("ImporteActual").ToString
|
||||
Row.Item("ImporteAnterior") = DtPatrimonioContribuido.Rows(0)("ImporteAnterior").ToString
|
||||
Row.Item("CtaMayor") = -1
|
||||
DtPatrimonioContribuido.Rows.RemoveAt(0)
|
||||
Else
|
||||
Row.Item("Nombre") = " TOTAL PATRIMONIO CONTRIBUIDO"
|
||||
Row.Item("ImporteActual") = "0.00"
|
||||
Row.Item("ImporteAnterior") = "0.00"
|
||||
Row.Item("CtaMayor") = -1
|
||||
End If
|
||||
DtPatrimonioContribuido.Rows.Add(Row)
|
||||
|
||||
Row = DtPatrimonioGenerado.NewRow
|
||||
If DtPatrimonioGenerado.Rows.Count > 0 Then
|
||||
Row.Item("Nombre") = " TOTAL PATRIMONIO GENERADO"
|
||||
'El id = 87 es el id de la cuenta "RESULTADOS DEL EJERCICIO:(AHORRO/DESAHORRO)"
|
||||
If DtPatrimonioGenerado.FiltraParametros($"Id = {CuentaAhorroDesahorro}").Rows.Count > 0 Then
|
||||
Row.Item("ImporteActual") = (DtPatrimonioGenerado.Rows(0)("ImporteActual").ToString.ToDouble + DtPatrimonioGenerado.FiltroPrimero($"Id = {CuentaAhorroDesahorro}")("ImporteActual").ToString.ToDouble).ToString
|
||||
Row.Item("ImporteAnterior") = (DtPatrimonioGenerado.Rows(0)("ImporteAnterior").ToString.ToDouble + DtPatrimonioGenerado.FiltroPrimero($"Id = {CuentaAhorroDesahorro}")("ImporteAnterior").ToString.ToDouble).ToString
|
||||
Else
|
||||
Row.Item("ImporteActual") = DtPatrimonioGenerado.Rows(0)("ImporteActual").ToString
|
||||
Row.Item("ImporteAnterior") = DtPatrimonioGenerado.Rows(0)("ImporteAnterior").ToString
|
||||
End If
|
||||
Row.Item("CtaMayor") = -1
|
||||
DtPatrimonioGenerado.Rows.RemoveAt(0)
|
||||
Else
|
||||
Row.Item("Nombre") = " TOTAL PATRIMONIO GENERADO"
|
||||
Row.Item("ImporteActual") = "0.00"
|
||||
Row.Item("ImporteAnterior") = "0.00"
|
||||
Row.Item("CtaMayor") = -1
|
||||
End If
|
||||
DtPatrimonioGenerado.Rows.Add(Row)
|
||||
|
||||
Row = DtPatrimonioActualizacion.NewRow
|
||||
If DtPatrimonioActualizacion.Rows.Count > 0 Then
|
||||
Row.Item("Nombre") = " TOTAL EXCESO O INSUFICIENCIA EN LA ACTUALIZACION"
|
||||
Row.Item("ImporteActual") = DtPatrimonioActualizacion.Rows(0)("ImporteActual").ToString
|
||||
Row.Item("ImporteAnterior") = DtPatrimonioActualizacion.Rows(0)("ImporteAnterior").ToString
|
||||
Row.Item("CtaMayor") = -1
|
||||
DtPatrimonioActualizacion.Rows.RemoveAt(0)
|
||||
Else
|
||||
Row.Item("Nombre") = " TOTAL EXCESO O INSUFICIENCIA EN LA ACTUALIZACION"
|
||||
Row.Item("ImporteActual") = "0.00"
|
||||
Row.Item("ImporteAnterior") = "0.00"
|
||||
Row.Item("CtaMayor") = -1
|
||||
End If
|
||||
DtPatrimonioActualizacion.Rows.Add(Row)
|
||||
|
||||
|
||||
GvPatrimonio.DataSource = DtPatrimonioContribuido
|
||||
GvPatrimonio.DataBind()
|
||||
GvPatrimonioGenerado.DataSource = DtPatrimonioGenerado
|
||||
GvPatrimonioGenerado.DataBind()
|
||||
GvPatrimonioActualizacion.DataSource = DtPatrimonioActualizacion
|
||||
GvPatrimonioActualizacion.DataBind()
|
||||
UpPatrimonio.Update()
|
||||
End Sub
|
||||
Private Sub SumaTotales()
|
||||
TotalPasivoPatrimonioActual = TotalPasivoActual + TotalPatrimonioActual
|
||||
TotalPasivoPatrimonioAnterior = TotalPasivoAnterior + TotalPatrimonioAnterior
|
||||
|
||||
'Llena Lb´s Totales
|
||||
LbTotalActivoActual.Text = TotalActivoActual.ToString.FormatoNumero
|
||||
LbTotalActivoAnterior.Text = TotalActivoAnterior.ToString.FormatoNumero
|
||||
|
||||
LbTotalPasivoActual.Text = TotalPasivoActual.ToString.FormatoNumero
|
||||
LbTotalPasivoAnterior.Text = TotalPasivoAnterior.ToString.FormatoNumero
|
||||
|
||||
LbTotalPatrimonioActual.Text = TotalPatrimonioActual.ToString.FormatoNumero
|
||||
LbTotalPatrimonioAnterior.Text = TotalPatrimonioAnterior.ToString.FormatoNumero
|
||||
|
||||
LbTotalPasivoPatrimonioActual.Text = TotalPasivoPatrimonioActual.ToString.FormatoNumero
|
||||
LbTotalPasivoPatrimonioAnterior.Text = TotalPasivoPatrimonioAnterior.ToString.FormatoNumero
|
||||
|
||||
|
||||
Dim Descuadre = False
|
||||
'COLOREA ROJO SI NO CUADRAN TOTALES
|
||||
If TotalActivoActual <> TotalPasivoPatrimonioActual Then
|
||||
LbTotalActivoActual.ForeColor = Drawing.Color.Red
|
||||
LbTotalPasivoPatrimonioActual.ForeColor = Drawing.Color.Red
|
||||
Descuadre = True
|
||||
Else
|
||||
LbTotalActivoActual.ForeColor = Drawing.Color.Black
|
||||
LbTotalPasivoPatrimonioActual.ForeColor = Drawing.Color.Black
|
||||
End If
|
||||
|
||||
If TotalActivoAnterior <> TotalPasivoPatrimonioAnterior Then
|
||||
LbTotalActivoAnterior.ForeColor = Drawing.Color.Red
|
||||
LbTotalPasivoPatrimonioAnterior.ForeColor = Drawing.Color.Red
|
||||
Descuadre = True
|
||||
Else
|
||||
LbTotalActivoAnterior.ForeColor = Drawing.Color.Black
|
||||
LbTotalPasivoPatrimonioAnterior.ForeColor = Drawing.Color.Black
|
||||
End If
|
||||
|
||||
If Descuadre Then
|
||||
LbDescuadre.Text = "Las sumas de los totales están descuadradas."
|
||||
Else
|
||||
LbDescuadre.Text = ""
|
||||
End If
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Sub Imprimir_click(sender As Object, e As EventArgs) Handles Imprimir.Click
|
||||
'Dim ObjConta As New ClsContPAQi(UsuarioActual.Empresa)
|
||||
'Dim FechaI = String.Format("01/{0}/{1}", DdlPeriodo.SelectedValue.PadLeft(2, CChar("0")), DdlEjercicio.SelectedValue)
|
||||
'Dim FechaF = DateAdd(DateInterval.Day, -1, DateAdd(DateInterval.Month, 1, CDate(FechaI))).ToString("dd/MM/yyyy")
|
||||
|
||||
'If ObjConta.GetSituacionFinanciera("01/01/2000".ToDate, FechaF.ToDate, DdlTipoReporte.SelectedValue.ToEntero) Then
|
||||
' DtDatos = ObjConta.DtResultados
|
||||
' 'If ChkFirma.Checked = True Then
|
||||
|
||||
' ' Dim Row As DataRow = DtDatos.NewRow
|
||||
' ' Row.Item("Nombre") = String.Format("C.P. Izelda Angulo Peraza{0} Subdirector de contabilidad", "")
|
||||
' ' Row.Item("Sup") = String.Format("Lic. Juan Fortino Leon Robinson{0} Director General", "")
|
||||
' ' Row.Item("ImporteActual") = "0"
|
||||
' ' Row.Item("ImporteAnterior") = "0"
|
||||
' ' Row.Item("Tipo") = "Firma"
|
||||
' ' DtDatos.Rows.Add(Row)
|
||||
' 'End If
|
||||
'End If
|
||||
'ObjConta.Dispose()
|
||||
|
||||
If Not IsNothing(DtDatos) Then
|
||||
ImprimirReporte()
|
||||
Else
|
||||
Alert("No se econtró información para el reporte.", TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
Protected Sub BtnConsultar_Click(sender As Object, e As EventArgs)
|
||||
TotalActivoActual = 0
|
||||
TotalActivoAnterior = 0
|
||||
TotalPasivoActual = 0
|
||||
TotalPasivoAnterior = 0
|
||||
TotalPatrimonioActual = 0
|
||||
TotalPatrimonioAnterior = 0
|
||||
TotalPasivoPatrimonioActual = 0
|
||||
TotalPasivoPatrimonioAnterior = 0
|
||||
|
||||
CargaDatos()
|
||||
End Sub
|
||||
|
||||
|
||||
#Region "GV´S ROW DATA BOUND"
|
||||
|
||||
Protected Sub GvActivo_RowDataBound(sender As Object, e As GridViewRowEventArgs)
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
If e.Row.DBCampo("CtaMayor").ToString.ToEntero < 0 Then
|
||||
TotalActivoActual += e.Row.DBCampo("ImporteActual").ToString.ToDouble
|
||||
TotalActivoAnterior += e.Row.DBCampo("ImporteAnterior").ToString.ToDouble
|
||||
e.Row.FCLabel("LbNombre").Font.Italic = True
|
||||
e.Row.FCLabel("LbNombre").Font.Bold = True
|
||||
e.Row.Attributes.Add("style", "border-top: thick solid; border-top-width: thin;")
|
||||
Else
|
||||
e.Row.FCHyperLink("HLActual").NavigateUrl = String.Format("/Contabilidad/RepAnexoCatalogo.aspx?ID={0}&FF={1}&TP={2}", e.Row.DBCampo("Id"), e.Row.DBCampo("FechaFActual").ToDate.ToShortDateString, TipoReporte)
|
||||
e.Row.FCHyperLink("HLAnterior").NavigateUrl = String.Format("/Contabilidad/RepAnexoCatalogo.aspx?ID={0}&FF={1}&TP={2}", e.Row.DBCampo("Id"), e.Row.DBCampo("FechaFAnterior").ToDate.ToShortDateString, TipoReporte)
|
||||
End If
|
||||
|
||||
If e.Row.DBCampo("ImporteActual").ToString.ToDouble < 0 Then
|
||||
e.Row.FCHyperLink("HLActual").ForeColor = Drawing.Color.Red
|
||||
End If
|
||||
If e.Row.DBCampo("ImporteAnterior").ToString.ToDouble < 0 Then
|
||||
e.Row.FCHyperLink("HLAnterior").ForeColor = Drawing.Color.Red
|
||||
End If
|
||||
|
||||
If e.Row.DBCampo("Level").ToString = "2" Then
|
||||
e.Row.FCLabel("LbNombre").Text = String.Format(" {0}", e.Row.DBCampo("Nombre").ToString)
|
||||
ElseIf e.Row.DBCampo("Level").ToString = "1" Then
|
||||
e.Row.FCLabel("LbNombre").Font.Bold = True
|
||||
End If
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Protected Sub GvPasivo_RowDataBound(sender As Object, e As GridViewRowEventArgs)
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
|
||||
'Totales
|
||||
If e.Row.DBCampo("CtaMayor").ToString.ToEntero < 0 Then
|
||||
TotalPasivoActual += e.Row.DBCampo("ImporteActual").ToString.ToDouble
|
||||
TotalPasivoAnterior += e.Row.DBCampo("ImporteAnterior").ToString.ToDouble
|
||||
e.Row.FCLabel("LbNombre").Font.Italic = True
|
||||
e.Row.FCLabel("LbNombre").Font.Bold = True
|
||||
e.Row.Attributes.Add("style", "border-top: thick solid; border-top-width: thin;")
|
||||
'Cuentas
|
||||
Else
|
||||
e.Row.FCHyperLink("HLActual").NavigateUrl = String.Format("/Contabilidad/RepAnexoCatalogo.aspx?ID={0}&FF={1}", e.Row.DBCampo("Id"), e.Row.DBCampo("FechaFActual").ToDate.ToShortDateString)
|
||||
e.Row.FCHyperLink("HLAnterior").NavigateUrl = String.Format("/Contabilidad/RepAnexoCatalogo.aspx?ID={0}&FF={1}", e.Row.DBCampo("Id"), e.Row.DBCampo("FechaFAnterior").ToDate.ToShortDateString)
|
||||
End If
|
||||
|
||||
|
||||
'Colorea NEGATIVOS
|
||||
If e.Row.DBCampo("ImporteActual").ToString.ToDouble < 0 Then
|
||||
e.Row.FCHyperLink("HLActual").ForeColor = Drawing.Color.Red
|
||||
End If
|
||||
If e.Row.DBCampo("ImporteAnterior").ToString.ToDouble < 0 Then
|
||||
e.Row.FCHyperLink("HLAnterior").ForeColor = Drawing.Color.Red
|
||||
End If
|
||||
|
||||
If e.Row.DBCampo("Level").ToString = "2" Then
|
||||
e.Row.FCLabel("LbNombre").Text = String.Format(" {0}", e.Row.DBCampo("Nombre").ToString)
|
||||
ElseIf e.Row.DBCampo("Level").ToString = "1" Then
|
||||
e.Row.FCLabel("LbNombre").Font.Bold = True
|
||||
End If
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Protected Sub GvPatrimonio_RowDataBound(sender As Object, e As GridViewRowEventArgs)
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
If e.Row.DBCampo("CtaMayor").ToString.ToEntero < 0 Then
|
||||
TotalPatrimonioActual += e.Row.DBCampo("ImporteActual").ToString.ToDouble
|
||||
TotalPatrimonioAnterior += e.Row.DBCampo("ImporteAnterior").ToString.ToDouble
|
||||
e.Row.FCLabel("LbNombre").Font.Italic = True
|
||||
e.Row.FCLabel("LbNombre").Font.Bold = True
|
||||
e.Row.Attributes.Add("style", "border-top: thick solid; border-top-width: thin;")
|
||||
'e.Row.ControlStyle.BackColor = Drawing.Color.LightGray
|
||||
'e.Row.ControlStyle.ForeColor = Drawing.Color.White
|
||||
'e.Row.ControlStyle.Font.Bold = True
|
||||
Else
|
||||
e.Row.FCHyperLink("HLActual").NavigateUrl = String.Format("/Contabilidad/RepAnexoCatalogo.aspx?ID={0}&FF={1}", e.Row.DBCampo("Id"), e.Row.DBCampo("FechaFActual").ToDate.ToShortDateString)
|
||||
e.Row.FCHyperLink("HLAnterior").NavigateUrl = String.Format("/Contabilidad/RepAnexoCatalogo.aspx?ID={0}&FF={1}", e.Row.DBCampo("Id"), e.Row.DBCampo("FechaFAnterior").ToDate.ToShortDateString)
|
||||
End If
|
||||
|
||||
If e.Row.DBCampo("ImporteActual").ToString.ToDouble < 0 Then
|
||||
e.Row.FCHyperLink("HLActual").ForeColor = Drawing.Color.Red
|
||||
End If
|
||||
If e.Row.DBCampo("ImporteAnterior").ToString.ToDouble < 0 Then
|
||||
e.Row.FCHyperLink("HLAnterior").ForeColor = Drawing.Color.Red
|
||||
End If
|
||||
|
||||
If e.Row.DBCampo("Level").ToString = "2" Then
|
||||
e.Row.FCLabel("LbNombre").Text = String.Format(" {0}", e.Row.DBCampo("Nombre").ToString)
|
||||
ElseIf e.Row.DBCampo("Level").ToString = "1" Then
|
||||
e.Row.FCLabel("LbNombre").Font.Bold = True
|
||||
End If
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
Protected Sub ImgExcel_Click(sender As Object, e As EventArgs) Handles ImgExcel.Click
|
||||
If Not IsNothing(DtDatos) Then
|
||||
ImprimirReporte("Excel")
|
||||
Else
|
||||
Alert("No se econtró información para el reporte.", TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
|
||||
Private Sub ImprimirReporte(Optional Formato As String = "PDF")
|
||||
Dim FechaI = String.Format("01/{0}/{1}", DdlPeriodo.SelectedValue.PadLeft(2, CChar("0")), DdlEjercicio.SelectedValue)
|
||||
Dim FechaF = DateAdd(DateInterval.Day, -1, DateAdd(DateInterval.Month, 1, CDate(FechaI))).ToString("dd/MM/yyyy")
|
||||
'nombre del archivo a generar
|
||||
Dim fileName As String = "EdoSituacionFinanciera"
|
||||
'ubicacion del rdlc
|
||||
Dim reportpath As String = "AC/Reportes/RepSituacionFinanciera.rdlc"
|
||||
|
||||
DtCuentasOrden = New DataTable
|
||||
If Not DtCuentasOrden.Columns.Contains("Concepto") Then DtCuentasOrden.Columns.Add("Concepto", GetType(String))
|
||||
If Not DtCuentasOrden.Columns.Contains("Importe") Then DtCuentasOrden.Columns.Add("Importe", GetType(String))
|
||||
If Not DtCuentasOrden.Columns.Contains("Nivel") Then DtCuentasOrden.Columns.Add("Nivel", GetType(String))
|
||||
|
||||
Dim Dr = DtCuentasOrden.NewRow
|
||||
Dr("Concepto") = "PRUEBA"
|
||||
Dr("Importe") = "15236.85"
|
||||
Dr("Nivel") = "1"
|
||||
DtCuentasOrden.Rows.Add(Dr)
|
||||
|
||||
Dim DDdr = DtCuentasOrden.NewRow
|
||||
DDdr("Concepto") = "PRUEBA 2"
|
||||
DDdr("Importe") = "15236.85"
|
||||
DDdr("Nivel") = "2"
|
||||
DtCuentasOrden.Rows.Add(DDdr)
|
||||
|
||||
'parametros a enviar al reporte
|
||||
Dim lrds As New List(Of ReportDataSource)
|
||||
Dim rds As New ReportDataSource With {.Name = "DataSet1", .Value = If(ChkNivel.Checked, DtDatos, DtDatos.FiltraParametros("Level < 2"))}
|
||||
lrds.Add(rds)
|
||||
|
||||
Dim rds1 As New ReportDataSource With {.Name = "DataSet2", .Value = If(DtCuentasOrden IsNot Nothing, DtCuentasOrden, New DataTable)} ' sino esta creado el objeto, lo creamos, para que no truene el reporte
|
||||
lrds.Add(rds1)
|
||||
|
||||
Dim params As New List(Of ReportParameter)
|
||||
params.Add(New ReportParameter("pEmp", UsuarioActual.Empresa.Empresa))
|
||||
params.Add(New ReportParameter("CveEmpresa", UsuarioActual.CveEmpresa.ToString))
|
||||
params.Add(New ReportParameter("pImg", New Uri(Server.MapPath(String.Format("~/Empresas/{0}/Logo.png", UsuarioActual.CveEmpresa))).AbsoluteUri))
|
||||
If (UsuarioActual.CveEmpresa = 48 And ChkFirma.Checked) Then
|
||||
params.Add(New ReportParameter("pFirma1", String.Format("Lic. Damian A. Benitez Alcantar{0}Director Administrativo", vbCrLf)))
|
||||
params.Add(New ReportParameter("pFirma2", String.Format("Ing. Soraida Mesinas Reyes{0}Director General", vbCrLf)))
|
||||
ElseIf (ChkFirma.Checked) Then
|
||||
params.Add(New ReportParameter("pFirma1", String.Format("C.P. Izelda Angulo Peraza{0} Subdirector de Contabilidad", vbCrLf)))
|
||||
params.Add(New ReportParameter("pFirma2", String.Format("ING. Soraida Mesinas Reyes{0} Director General", vbCrLf)))
|
||||
Else
|
||||
params.Add(New ReportParameter("pFirma1", ""))
|
||||
params.Add(New ReportParameter("pFirma2", ""))
|
||||
End If
|
||||
params.Add(New ReportParameter("pFechaFin", FechaF))
|
||||
ImprimirPDF(reportpath, lrds, params, fileName, Formato)
|
||||
End Sub
|
||||
End Class
|
||||
123
AC/RepVariacionHaciendaPublica.aspx
Normal file
123
AC/RepVariacionHaciendaPublica.aspx
Normal file
@@ -0,0 +1,123 @@
|
||||
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RepVariacionHaciendaPublica.aspx.vb" Inherits="AC_RepVariacionHaciendaPublica" %>
|
||||
|
||||
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="HB" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="E" runat="Server">
|
||||
Estado de Variación de Hacienda Pública
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
<li>
|
||||
<asp:LinkButton ID="ImgExcel" runat="server"><i class="fa fa-ad-excel"></i> Exporta Excel</asp:LinkButton>
|
||||
</li>
|
||||
<li>
|
||||
<asp:LinkButton ID="BtnImprimir" runat="server" ><i class="fa fa-print"></i> Imprimir</asp:LinkButton>
|
||||
</li>
|
||||
<%--<asp:ImageButton ID="ImgExcel" runat="server" ImageUrl="/Imagenes/IconoExcel.gif" Width="20px" Height="20px" />
|
||||
<asp:ImageButton ID="BtnImprimir" runat="server" alt="Imprimir" src="/Imagenes/btnImprimir.gif" Style="cursor: pointer; height: 20px" /> --%>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
|
||||
|
||||
<asp:UpdatePanel ID="UPFiltros" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="portlet solid grey-cascade portlet-filter">
|
||||
<div class="portlet-title portlet-filterT smalltitle">
|
||||
<div class="tools">
|
||||
<asp:Button ID="BtnConsultar" runat="server" Text="Consultar" CssClass="btn btn-default" Enabled="false" />
|
||||
<a href="javascript:;" class="expand"></a>
|
||||
</div>
|
||||
<div class="titlefiltros caption ">
|
||||
<div class="row">
|
||||
<label class="col-md-2 truncate">Fecha Inicio:</label>
|
||||
<div class="col-md-2">
|
||||
<div class="input-group input-sm input-small date date-picker" data-date-format="dd/mm/yyyy" style="width: 140px !important; padding: 0px;">
|
||||
<asp:TextBox ID="TxtFechaDel" runat="server" CssClass="form-control" Width="99%" CausesValidation="true" MaxLength="10"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="ImgCalendarioDel" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
</div>
|
||||
<ajax:MaskedEditExtender ID="MEEFechaDel" runat="server" TargetControlID="TxtFechaDel" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender ID="CalendarioDel" runat="server" TargetControlID="TxtFechaDel" PopupButtonID="ImgCalendarioDel" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
</div>
|
||||
<label class="col-md-1 truncate">Fecha Fin:</label>
|
||||
<div class="col-md-2">
|
||||
<div class="input-group input-sm input-small date date-picker" data-date-format="dd/mm/yyyy" style="width: 140px !important; padding: 0px;">
|
||||
<asp:TextBox ID="TxtFechaAl" runat="server" CssClass="form-control" Width="99%" CausesValidation="true" MaxLength="10"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="ImgCalendarioAl" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
</div>
|
||||
<ajax:MaskedEditExtender ID="MEEFechaAl" runat="server" TargetControlID="TxtFechaAl" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender ID="CalendarioAl" runat="server" TargetControlID="TxtFechaAl" PopupButtonID="ImgCalendarioAl" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
|
||||
<asp:UpdatePanel ID="UpDatos" UpdateMode="Conditional" runat="server">
|
||||
<ContentTemplate>
|
||||
|
||||
<asp:GridView ID="GvDatos" CssClass="table table-striped table-hover Widthall" runat="server" AutoGenerateColumns="False" GridLines="None" DataKeyNames="" OnRowDataBound="GvDatos_RowDataBound" ShowFooter="True">
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderText="Concepto">
|
||||
<ItemTemplate>
|
||||
<div id="Concepto" runat="server">
|
||||
<asp:Literal ID="LtNombre" Text='<%# Eval("Concepto")%>' runat="server" />
|
||||
</div>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="500px" HorizontalAlign="Left" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Hacienda Pública <br/> Patrimonio Contribuido">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="Contribuido" Text='<%# Eval("Contribuido", "{0:N2}")%>' runat="server" />
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="90px" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Hacienda Pública <br/> Patrimonio Generado de Ejercicios Anteriores">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="GeneradoAnteriores" Text='<%# Eval("GeneradoAnteriores", "{0:N2}")%>' runat="server" />
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="90px" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Hacienda Pública <br/> Patrimonio Generado del Ejercicio">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="GeneradoActual" Text='<%# Eval("GeneradoActual", "{0:N2}")%>' runat="server" />
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="90px" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Ajustes por Cambios de Valor">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="Ajustes" Text='<%# Eval("Ajustes", "{0:N2}")%>' runat="server" />
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="90px" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="TOTAL">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="Total" Text='<%# Eval("Total", "{0:N2}")%>' runat="server" />
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="90px" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
|
||||
|
||||
<%-- <asp:BoundField DataField="Nombre" HeaderText="Cuenta" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="300px"/>
|
||||
<asp:BoundField DataField="ImporteActual" DataFormatString="{0:N2}" HeaderText="ImporteActual" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="150px"/>
|
||||
<asp:BoundField DataField="ImporteAnterior" DataFormatString="{0:N2}" HeaderText="ImporteAnterior" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="150px"/>--%>
|
||||
</Columns>
|
||||
<%--<AlternatingRowStyle CssClass="TextoAlterno" />--%>
|
||||
</asp:GridView>
|
||||
<br />
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
||||
</asp:Content>
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user