Catalogo Clasificaiones Viáticos Comprobaciones
This commit is contained in:
@@ -137,13 +137,14 @@ Public Class ClsClasificaciones
|
|||||||
Return Retorno
|
Return Retorno
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
Public Function GetClasificacionesComprobaciones(CveEmpresa As Integer) As Boolean
|
Public Function GetClasificacionesComprobaciones(CveEmpresa As Integer, Optional Opcion As Integer = 1) As Boolean
|
||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Boolean = False
|
||||||
|
|
||||||
DataAdapter("PA_ClasificacionesComprobacionesGet")
|
DataAdapter("PA_ClasificacionesComprobacionesGet")
|
||||||
|
|
||||||
With SqlAdapter.SelectCommand.Parameters
|
With SqlAdapter.SelectCommand.Parameters
|
||||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||||
|
.Add("@Opcion", SqlDbType.Int).Value = Opcion
|
||||||
End With
|
End With
|
||||||
Try
|
Try
|
||||||
SqlAdapter.Fill(Data)
|
SqlAdapter.Fill(Data)
|
||||||
@@ -152,6 +153,26 @@ Public Class ClsClasificaciones
|
|||||||
OnError("Ocurrió un error al consultar las Clasificaciones de comprobaciones.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
OnError("Ocurrió un error al consultar las Clasificaciones de comprobaciones.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||||
End Try
|
End Try
|
||||||
|
|
||||||
|
Return Retorno
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Public Function AddClasificacionesComprobaciones(CveClasificacion As Integer, CveEmpresa As Integer, TipoComprobacion As Integer) As Boolean
|
||||||
|
Dim Retorno As Boolean = False
|
||||||
|
|
||||||
|
DataAdapter("PA_ClasificacionesComprobacionesAdd")
|
||||||
|
|
||||||
|
With SqlAdapter.SelectCommand.Parameters
|
||||||
|
.Add("@CveClasificacion", SqlDbType.Int).Value = CveClasificacion
|
||||||
|
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||||
|
.Add("@TipoComprobacion", SqlDbType.Int).Value = TipoComprobacion
|
||||||
|
End With
|
||||||
|
Try
|
||||||
|
SqlAdapter.Fill(Data)
|
||||||
|
Retorno = True
|
||||||
|
Catch ex As SqlException
|
||||||
|
OnError("Ocurrió un error al modificar la clasificación.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||||
|
End Try
|
||||||
|
|
||||||
Return Retorno
|
Return Retorno
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
|
|||||||
@@ -4183,6 +4183,7 @@ Public Class ClsPaginas
|
|||||||
'GENERAL
|
'GENERAL
|
||||||
#Region "General"
|
#Region "General"
|
||||||
PaginaDict.Add("/General/CatClasificaciones.aspx".ToUpper(), 425)
|
PaginaDict.Add("/General/CatClasificaciones.aspx".ToUpper(), 425)
|
||||||
|
PaginaDict.Add("/General/CatClasificacionesComprobaciones.aspx".ToUpper(), 1308)
|
||||||
PaginaDict.Add("/General/CatPSCaracteristicas.aspx".ToUpper(), 101)
|
PaginaDict.Add("/General/CatPSCaracteristicas.aspx".ToUpper(), 101)
|
||||||
PaginaDict.Add("/General/CatCategorias.aspx".ToUpper(), 233)
|
PaginaDict.Add("/General/CatCategorias.aspx".ToUpper(), 233)
|
||||||
PaginaDict.Add("/General/SaldosIniciales.aspx".ToUpper(), 526)
|
PaginaDict.Add("/General/SaldosIniciales.aspx".ToUpper(), 526)
|
||||||
|
|||||||
102
General/CatClasificacionesComprobaciones.aspx
Normal file
102
General/CatClasificacionesComprobaciones.aspx
Normal file
@@ -0,0 +1,102 @@
|
|||||||
|
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" ValidateRequest="false" EnableEventValidation="false" CodeFile="CatClasificacionesComprobaciones.aspx.vb" Inherits="Gral_CatClasificacionesComprobaciones" %>
|
||||||
|
|
||||||
|
<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 Viáticos y Comprobaciones
|
||||||
|
</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="UpDatos" UpdateMode="Conditional">
|
||||||
|
<ContentTemplate>
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-6">
|
||||||
|
|
||||||
|
<asp:GridView runat="server" ID="GvClasificaciones" DataKeyNames="CveClasificacion, Clasificacion,TipoComprobacion" GridLines="None" CssClass="table table-striped table-hover Widthall" AutoGenerateColumns="false">
|
||||||
|
<Columns>
|
||||||
|
|
||||||
|
<asp:BoundField DataField="Clasificacion" HeaderText="Clasificación" />
|
||||||
|
|
||||||
|
<asp:BoundField DataField="TipoComprobacionStr" HeaderText="Tipo Comprobacion" />
|
||||||
|
|
||||||
|
<asp:TemplateField ItemStyle-Width="40px" ItemStyle-HorizontalAlign="Right">
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:LinkButton ID="imgE" runat="server" AlternateText="Editar" OnClick="ActualizaModalClasif" CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-pencil'></i>" />
|
||||||
|
</ItemTemplate>
|
||||||
|
</asp:TemplateField>
|
||||||
|
|
||||||
|
<%-- <asp:TemplateField ItemStyle-HorizontalAlign="center">
|
||||||
|
<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="¿Desea Elminar?" data-btn-ok-label="si" />
|
||||||
|
</ItemTemplate>
|
||||||
|
</asp:TemplateField>--%>
|
||||||
|
|
||||||
|
</Columns>
|
||||||
|
</asp:GridView>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</ContentTemplate>
|
||||||
|
</asp:UpdatePanel>
|
||||||
|
|
||||||
|
|
||||||
|
<div id="ModalClasificaciones" class="modal ADS fade" role="dialog">
|
||||||
|
<div class="modal-dialog" style="width: 450px;">
|
||||||
|
<asp:UpdatePanel runat="server" class="modal-content" ID="UpModalClasificaciones" UpdateMode="Conditional">
|
||||||
|
<ContentTemplate>
|
||||||
|
<div class="modal-header ">
|
||||||
|
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||||
|
<h4 class="modal-title">
|
||||||
|
<asp:Literal ID="LtlTituloModal" runat="server">Agregar Clasificaciones</asp:Literal></h4>
|
||||||
|
</div>
|
||||||
|
<div class="modal-body">
|
||||||
|
|
||||||
|
<div class="form-group form-md-line-input input-iconright">
|
||||||
|
<asp:TextBox ID="TxtClasificaciones" CssClass="form-control " runat="server" MaxLength="50" CausesValidation="true" ValidationGroup="Clasif" Enabled="false"></asp:TextBox>
|
||||||
|
<asp:RequiredFieldValidator ID="RFVCampaña" runat="server" ControlToValidate="TxtClasificaciones" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Clasificación''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardarRegistro"></asp:RequiredFieldValidator>
|
||||||
|
<label for="<%= TxtClasificaciones.ClientID.ToString()%>">Clasificación:</label>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group form-md-line-input input-iconright">
|
||||||
|
<label for="<%= DdlTipoComprobacion.ClientID.ToString()%>">Tipo Comprobacion:</label>
|
||||||
|
<br />
|
||||||
|
<asp:DropDownList runat="server" ID="DdlTipoComprobacion" CssClass="select2me">
|
||||||
|
<asp:ListItem Value="-1">Sin Asignar</asp:ListItem>
|
||||||
|
<asp:ListItem Value="1">Biaticos</asp:ListItem>
|
||||||
|
<asp:ListItem Value="2">Comprobacines</asp:ListItem>
|
||||||
|
</asp:DropDownList>
|
||||||
|
<asp:RequiredFieldValidator ID="RFVOrden" runat="server" InitialValue="-1" ControlToValidate="DdlTipoComprobacion" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Tipo Comprobacion''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardarRegistro"></asp:RequiredFieldValidator>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="modal-footer">
|
||||||
|
<asp:Button ID="LbAgregarClasificacion" runat="server" class="btn btn-success" Text="Agregar" ValidationGroup="GrpGuardarRegistro" />
|
||||||
|
<button id="BtnCancelarCampaña" runat="server" type="button" class="btn default" data-dismiss="modal">Cancelar</button>
|
||||||
|
</div>
|
||||||
|
<asp:HiddenField ID="HdnModalidadClasificacion" runat="server" Value="I" ClientIDMode="Static" />
|
||||||
|
<asp:HiddenField ID="HdnIDClasificacion" runat="server" Value="-1" ClientIDMode="Static" />
|
||||||
|
</ContentTemplate>
|
||||||
|
</asp:UpdatePanel>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
</asp:Content>
|
||||||
|
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
||||||
|
</asp:Content>
|
||||||
78
General/CatClasificacionesComprobaciones.aspx.vb
Normal file
78
General/CatClasificacionesComprobaciones.aspx.vb
Normal file
@@ -0,0 +1,78 @@
|
|||||||
|
Option Explicit On
|
||||||
|
Option Strict On
|
||||||
|
|
||||||
|
Imports Extensiones
|
||||||
|
Partial Class Gral_CatClasificacionesComprobaciones
|
||||||
|
Inherits ClsPaginas
|
||||||
|
|
||||||
|
Property CveClasificacion As Integer
|
||||||
|
|
||||||
|
Get
|
||||||
|
|
||||||
|
If ViewState("CveClasificacion") Is Nothing Then
|
||||||
|
Return -1
|
||||||
|
Else
|
||||||
|
Return ViewState("CveClasificacion").ToString.ToEntero
|
||||||
|
End If
|
||||||
|
|
||||||
|
End Get
|
||||||
|
|
||||||
|
Set(value As Integer)
|
||||||
|
ViewState("CveClasificacion") = value
|
||||||
|
End Set
|
||||||
|
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||||
|
If Not Page.IsPostBack Then
|
||||||
|
CargaGridClasificaciones()
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
#Region " C L A S I F I C A C I O N E S"
|
||||||
|
Protected Sub CargaGridClasificaciones()
|
||||||
|
|
||||||
|
Dim ObjClasificaciones As New ClsClasificaciones()
|
||||||
|
If ObjClasificaciones.GetClasificacionesComprobaciones(UsuarioActual.CveEmpresa, 2) Then
|
||||||
|
GvClasificaciones.DataSource = ObjClasificaciones.DtResultados
|
||||||
|
GvClasificaciones.DataBind()
|
||||||
|
End If
|
||||||
|
ObjClasificaciones.Dispose()
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
Private Sub LbAgregarClasificacion_Click(sender As Object, e As EventArgs) Handles LbAgregarClasificacion.Click
|
||||||
|
|
||||||
|
|
||||||
|
Dim ObjClasificaciones As New ClsClasificaciones()
|
||||||
|
|
||||||
|
|
||||||
|
If ObjClasificaciones.AddClasificacionesComprobaciones(CveClasificacion, UsuarioActual.CveEmpresa, DdlTipoComprobacion.SelectedValue.ToEntero) Then
|
||||||
|
Alert("La clasificación se agregó correctamente.")
|
||||||
|
CargaGridClasificaciones()
|
||||||
|
UpDatos.Update()
|
||||||
|
|
||||||
|
RegistraScript(String.Format("$('#{0}').modal('hide');", "ModalClasificaciones"))
|
||||||
|
End If
|
||||||
|
|
||||||
|
ObjClasificaciones.Dispose()
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Public Sub ActualizaModalClasif(sender As Object, e As EventArgs)
|
||||||
|
|
||||||
|
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
|
||||||
|
|
||||||
|
TxtClasificaciones.Text = GvRow.DataKey("Clasificacion")
|
||||||
|
CveClasificacion = GvRow.DataKey("CveClasificacion").ToString.ToEntero
|
||||||
|
RegistraScript(String.Format("$('#{0}').modal();", "ModalClasificaciones"))
|
||||||
|
|
||||||
|
DdlTipoComprobacion.SelectedValueExist(GvRow.DataKey("TipoComprobacion"))
|
||||||
|
|
||||||
|
UpModalClasificaciones.Update()
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
#End Region
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
End Class
|
||||||
Reference in New Issue
Block a user