todos los catálgoos ahora tienen el diseño con ventana modal
This commit is contained in:
@@ -8,6 +8,14 @@ Imports Microsoft.Reporting.WebForms
|
||||
Partial Class AC_CatFuentesRecaudacion
|
||||
Inherits ClsPaginas
|
||||
|
||||
Private Property CveFuenteRecaudacion() As Integer 'Guardamos el ID de registro para saber cual registro Editar
|
||||
Get
|
||||
Return If(IsNothing(ViewState("CveFuenteRecaudacion")), -1, CInt(ViewState("CveFuenteRecaudacion")))
|
||||
End Get
|
||||
Set
|
||||
ViewState("CveFuenteRecaudacion") = Value
|
||||
End Set
|
||||
End Property
|
||||
Private Property DtFuentesRecaudacion As DataTable
|
||||
Get
|
||||
Return CType(ViewState("DtFuentesRecaudacion"), DataTable)
|
||||
@@ -30,6 +38,15 @@ Partial Class AC_CatFuentesRecaudacion
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Protected Sub BtnMostrarModal_Click(sender As Object, e As EventArgs) Handles BtnMostrarModal.Click
|
||||
TxtFuenteRecaudacion.Text = ""
|
||||
ChkEstatus.Checked = True
|
||||
CheckActiveSection.Visible = False
|
||||
LbAgregar.Text = "Agregar"
|
||||
UpModalTiposD.Update()
|
||||
RegistraScript(String.Format("$('#{0}').modal();", "DivModal"))
|
||||
End Sub
|
||||
|
||||
Public Sub CargaDatos()
|
||||
Dim ObjFuenteRecaudacion As New ClsAC
|
||||
If ObjFuenteRecaudacion.GetFuentesRecaudacion() Then
|
||||
@@ -50,19 +67,29 @@ Partial Class AC_CatFuentesRecaudacion
|
||||
|
||||
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 LbAgregar.Text = "Agregar" Then
|
||||
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
|
||||
Else
|
||||
If ObjFuenteRecaudacion.UpdateFuentesRecaudacion(TxtFuenteRecaudacion.Text, ChkEstatus.Checked, 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
|
||||
End If
|
||||
If ViewState("Orden").ToString() <> String.Empty Then
|
||||
CargaGrid(ViewState("Orden").ToString())
|
||||
Else
|
||||
CargaGrid("")
|
||||
End If
|
||||
RegistraScript(String.Format("$('#{0}').modal('hide');", "DivModal"))
|
||||
ObjFuenteRecaudacion.Dispose()
|
||||
End Sub
|
||||
|
||||
@@ -74,15 +101,15 @@ Partial Class AC_CatFuentesRecaudacion
|
||||
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)
|
||||
'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
|
||||
'e.Row.Cells(4).HorizontalAlign = HorizontalAlign.Center
|
||||
'e.Row.Cells(5).HorizontalAlign = HorizontalAlign.Center
|
||||
End If
|
||||
End Sub
|
||||
|
||||
@@ -147,6 +174,35 @@ Partial Class AC_CatFuentesRecaudacion
|
||||
CargaGrid("")
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Protected Sub LnkEditar_Click(sender As Object, e As EventArgs)
|
||||
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow) 'obtenemos el renglon que acabamos de seleccionar
|
||||
CveFuenteRecaudacion = GvRow.DataKey("CveFuenteRecaudacion").ToEntero
|
||||
TxtFuenteRecaudacion.Text = GvRow.DataKey("FuenteRecaudacion")
|
||||
ChkEstatus.Checked = GvRow.DataKey("Estatus") = "Activo"
|
||||
LbAgregar.Text = "Actualizar"
|
||||
UpModalTiposD.Update()
|
||||
RegistraScript(String.Format("$('#{0}').modal();", "DivModal"))
|
||||
End Sub
|
||||
|
||||
Protected Sub LnkEliminar_Click(sender As Object, e As EventArgs)
|
||||
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow) 'obtenemos el renglon que acabamos de seleccionar
|
||||
Dim ObjFuenteRecaudacion As New ClsAC
|
||||
If ObjFuenteRecaudacion.RemoveFuentesRecaudacion(GvRow.DataKey("CveFuenteRecaudacion").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
|
||||
#End Region
|
||||
|
||||
#Region "O R D E N A M I E N T O"
|
||||
@@ -196,11 +252,11 @@ Partial Class AC_CatFuentesRecaudacion
|
||||
#End Region
|
||||
|
||||
#Region " EXPORTAR - PDF - EXCEL "
|
||||
Protected Sub ImgExcel_Click(sender As Object, e As ImageClickEventArgs)
|
||||
Protected Sub ImgExcel_Click(sender As Object, e As EventArgs)
|
||||
Tbl.ExportToExcel("Catalogo de Fuentes de Recaudacion ")
|
||||
End Sub
|
||||
|
||||
Protected Sub BtnImprimir_Click(sender As Object, e As ImageClickEventArgs)
|
||||
Protected Sub BtnImprimir_Click(sender As Object, e As EventArgs)
|
||||
ImprimiReporte()
|
||||
End Sub
|
||||
'No quitar porque no funciona el exporta PDF
|
||||
|
||||
Reference in New Issue
Block a user