82 lines
2.5 KiB
VB.net
82 lines
2.5 KiB
VB.net
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, DdlEstadosComprobaciones.SelectedValue.ToEntero) Then
|
|
GvClasificaciones.DataSource = ObjClasificaciones.DtResultados
|
|
GvClasificaciones.DataBind()
|
|
End If
|
|
ObjClasificaciones.Dispose()
|
|
UpDatos.Update()
|
|
|
|
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 actualizo 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
|
|
|
|
|
|
|
|
Protected Sub BtnConsultar_Click(sender As Object, e As EventArgs)
|
|
CargaGridClasificaciones()
|
|
End Sub
|
|
End Class |