documentacion proveedor para pago electronico General
This commit is contained in:
@@ -7,110 +7,117 @@ Imports Extensiones
|
||||
Partial Class Edoc_CatTipoContrato
|
||||
Inherits ClsPaginas
|
||||
|
||||
Protected Property CveTipoContrato As Integer
|
||||
Get
|
||||
If ViewState("CveTipoContrato") Is Nothing Then
|
||||
Return -1
|
||||
Else
|
||||
Return ViewState("CveTipoContrato").ToString.ToEntero
|
||||
End If
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
ViewState("CveTipoContrato") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||
|
||||
If Not Page.IsPostBack Then
|
||||
CargaDatos()
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
Protected Sub BtnAgregarMotivo_Click(sender As Object, e As EventArgs) Handles BtnAgregarMotivoD.Click
|
||||
Private Sub CargaDatos()
|
||||
|
||||
Dim ObjProv As New ClsCompProveedores
|
||||
|
||||
If ObjProv.GetTiposContratos(-1, UsuarioActual.CveEmpresa, -1) Then
|
||||
GvDatos.DataSource = ObjProv.DtResultados
|
||||
Else
|
||||
GvDatos.DataSource = Nothing
|
||||
End If
|
||||
|
||||
ObjProv.Dispose()
|
||||
|
||||
GvDatos.DataBind()
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
Protected Sub BtnAgregarMotivo_Click(sender As Object, e As EventArgs) Handles BtnAgregarTipoContrato.Click
|
||||
|
||||
CveTipoContrato = -1
|
||||
TxtTipoContrato.Text = ""
|
||||
ChkEstatus.Checked = True
|
||||
|
||||
UpModalTiposContrato.Update()
|
||||
|
||||
RegistraScript(String.Format("$('#{0}').modal();", "DivAgregarTiposContrato"))
|
||||
End Sub
|
||||
|
||||
Protected Sub LnkGvActualizar_Click(sender As Object, e As EventArgs)
|
||||
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
|
||||
|
||||
|
||||
CveTipoContrato = GvRow.DataKey("CveTipoContrato").ToEntero
|
||||
TxtTipoContrato.Text = GvRow.DataKey("TipoContrato")
|
||||
ChkEstatus.Checked = Boolean.Parse(GvRow.DataKey("Estatus").ToString)
|
||||
UpModalTiposContrato.Update()
|
||||
|
||||
RegistraScript(String.Format("$('#{0}').modal();", "DivAgregarTiposContrato"))
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Sub LbAgregar_Click(sender As Object, e As System.EventArgs) Handles BtnAgregarTiposDModal.Click
|
||||
|
||||
Dim ObjProv As New ClsCompProveedores
|
||||
Dim ErrorProceso As Boolean = False
|
||||
|
||||
If CveTipoContrato = -1 Then
|
||||
If Not ObjProv.AddTiposContratos(TxtTipoContrato.Text, ChkEstatus.Checked, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
|
||||
ErrorProceso = True
|
||||
End If
|
||||
Else
|
||||
|
||||
If Not ObjProv.UpdateTiposContratos(CveTipoContrato, TxtTipoContrato.Text, ChkEstatus.Checked, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
|
||||
ErrorProceso = True
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
|
||||
If Not ErrorProceso Then
|
||||
RegistraScript(String.Format("$('#{0}').modal('HIDE');", "DivAgregarTiposContrato"))
|
||||
CargaDatos()
|
||||
|
||||
End If
|
||||
|
||||
|
||||
|
||||
ObjProv.Dispose()
|
||||
End Sub
|
||||
|
||||
#Region "G V D A T O S"
|
||||
Protected Sub LnkGvEliminar_Click(sender As Object, e As EventArgs)
|
||||
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
|
||||
Dim ErrorProceso As Boolean = False
|
||||
Dim CveTipoContratoEliminar As Integer = GvRow.DataKey("CveTipoContrato").ToEntero
|
||||
|
||||
'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(100)
|
||||
' e.Row.Cells(5).Width = Unit.Pixel(61)
|
||||
' End If
|
||||
' e.Row.Cells(0).HorizontalAlign = HorizontalAlign.Left
|
||||
' End If
|
||||
'End Sub
|
||||
Dim ObjProv As New ClsCompProveedores
|
||||
|
||||
'Protected Sub GvDatos_RowDeleting(sender As Object, e As System.Web.UI.WebControls.GridViewDeleteEventArgs) Handles GvDatos.RowDeleting
|
||||
' Dim ObjGenero As New ClsRH
|
||||
' If ObjGenero.RemoveGenero(GvDatos.DataKeys(e.RowIndex).Value.ToString.ToEntero) Then
|
||||
' GvDatos.EditIndex = -1
|
||||
' ViewState("DTGenero") = ObjGenero.DtResultados
|
||||
' GlobalDTGenero = ObjGenero.DtResultados
|
||||
' Alert("El Género se eliminó correctamente.", TipoMensaje.MsgInformacion)
|
||||
' End If
|
||||
If ObjProv.RemoveTiposContratos(CveTipoContratoEliminar, UsuarioActual.CveEmpresa) Then
|
||||
Alert("Tipo Contrato eliminado correctamente")
|
||||
Else
|
||||
ErrorProceso = True
|
||||
End If
|
||||
|
||||
' ObjGenero.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 EventArgs) Handles BtnEditarTiposDModal.Click
|
||||
' Dim ObjGenero As New ClsRH
|
||||
' Dim Genero As String = GeneroTxt.Text.Trim
|
||||
' Dim Estatus As Boolean = ChkEstatus.Checked
|
||||
' Dim CveGenero As Integer = CveGeneroAEditar
|
||||
|
||||
' If ObjGenero.UpdateGenero(Genero, Estatus, CveGenero) Then
|
||||
' GvDatos.EditIndex = -1
|
||||
' ViewState("DTGenero") = ObjGenero.DtResultados
|
||||
' GlobalDTGenero = ObjGenero.DtResultados
|
||||
' Alert("Los cambios se guardaron correctamente.", TipoMensaje.MsgInformacion)
|
||||
' End If
|
||||
|
||||
' ObjGenero.Dispose()
|
||||
|
||||
' If ViewState("Orden").ToString() <> String.Empty Then
|
||||
' CargaGrid(ViewState("Orden").ToString())
|
||||
' Else
|
||||
' CargaGrid("")
|
||||
' End If
|
||||
'End Sub
|
||||
|
||||
'Public Sub GvDatos_RowEditing(sender As Object, e As EventArgs)
|
||||
' BtnAgregarTiposDModal.Visible = False
|
||||
' BtnEditarTiposDModal.Visible = True
|
||||
' CheckActiveSection.Visible = True
|
||||
' saltoDeLinea.Visible = True
|
||||
|
||||
' Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow) 'obtenemos el renglon que acabamos de seleccionar
|
||||
' GeneroTxt.Text = GvRow.DataKey("Genero")
|
||||
' ChkEstatus.Checked = If(GvRow.DataKey("Estatus") = "Activo", True, False)
|
||||
' CveGeneroAEditar = Convert.ToInt32(GvRow.DataKey("CveGenero")) 'Guardamos en una propiedad el id del registro del cual haremos cambios, se guarda y se utiliza en el metodo "GvDatos_RowUpdating"
|
||||
|
||||
' UpDatos.Update()
|
||||
' If ViewState("Orden").ToString() <> String.Empty Then
|
||||
' CargaGrid(ViewState("Orden").ToString())
|
||||
' Else
|
||||
' CargaGrid("")
|
||||
' End If
|
||||
' RegistraScript(String.Format("$('#{0}').modal();", "DivAgregarTiposD"))
|
||||
'End Sub
|
||||
#End Region
|
||||
If Not ErrorProceso Then
|
||||
CargaDatos()
|
||||
End If
|
||||
|
||||
|
||||
ObjProv.Dispose()
|
||||
|
||||
End Sub
|
||||
End Class
|
||||
|
||||
Reference in New Issue
Block a user