This commit is contained in:
@@ -10,7 +10,7 @@ Partial Class Nomina_CatPeriodos
|
||||
Inherits ClsPaginas
|
||||
Private Property Comando As String
|
||||
Get
|
||||
Return ViewState("Comando").ToString
|
||||
Return ViewState("Comando").ToString()
|
||||
End Get
|
||||
Set(value As String)
|
||||
ViewState("Comando") = value
|
||||
@@ -37,7 +37,7 @@ Partial Class Nomina_CatPeriodos
|
||||
|
||||
Public Sub CargaDatos()
|
||||
Dim ObjNom_Periodos As New ClsNominas
|
||||
If ObjNom_Periodos.GetPeriodos(DdlTipoPeriodo.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, DdlEjercicio.SelectedValue.ToEntero, -1, -1, DdlEstatus.SelectedValue.ToEntero) Then
|
||||
If ObjNom_Periodos.GetPeriodos(DdlTipoPeriodo.SelectedValue.ToEntero(), UsuarioActual.CveEmpresa, DdlEjercicio.SelectedValue.ToEntero(), -1, -1, DdlEstatus.SelectedValue.ToEntero()) Then
|
||||
ViewState("DTNom_Periodos") = ObjNom_Periodos.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
|
||||
GlobalDTNom_Periodos = ObjNom_Periodos.DtResultados
|
||||
|
||||
@@ -116,17 +116,17 @@ Partial Class Nomina_CatPeriodos
|
||||
e.Row.Cells(13).HorizontalAlign = HorizontalAlign.Center
|
||||
e.Row.Cells(14).HorizontalAlign = HorizontalAlign.Center
|
||||
|
||||
e.Row.FCCheckBox("ChkEsInicioMes").Checked = Convert.ToBoolean(e.Row.DataKey("EsInicioMes").ToString)
|
||||
e.Row.FCCheckBox("ChkEsFinMes").Checked = Convert.ToBoolean(e.Row.DataKey("EsFinMes").ToString)
|
||||
e.Row.FCCheckBox("ChkEsInicioSS").Checked = Convert.ToBoolean(e.Row.DataKey("EsInicioSS").ToString)
|
||||
e.Row.FCCheckBox("ChkEsFinSS").Checked = Convert.ToBoolean(e.Row.DataKey("EsFinSS").ToString)
|
||||
e.Row.FCCheckBox("ChkEsInicioAño").Checked = Convert.ToBoolean(e.Row.DataKey("EsInicioAño").ToString)
|
||||
e.Row.FCCheckBox("ChkEsFinAño").Checked = Convert.ToBoolean(e.Row.DataKey("EsFinAño").ToString)
|
||||
e.Row.FCCheckBox("ChkFueCalculado").Checked = Convert.ToBoolean(e.Row.DataKey("FueCalculado").ToString)
|
||||
e.Row.FCCheckBox("ChkEsInicioMes").Checked = Convert.ToBoolean(e.Row.DataKey("EsInicioMes").ToString())
|
||||
e.Row.FCCheckBox("ChkEsFinMes").Checked = Convert.ToBoolean(e.Row.DataKey("EsFinMes").ToString())
|
||||
e.Row.FCCheckBox("ChkEsInicioSS").Checked = Convert.ToBoolean(e.Row.DataKey("EsInicioSS").ToString())
|
||||
e.Row.FCCheckBox("ChkEsFinSS").Checked = Convert.ToBoolean(e.Row.DataKey("EsFinSS").ToString())
|
||||
e.Row.FCCheckBox("ChkEsInicioAño").Checked = Convert.ToBoolean(e.Row.DataKey("EsInicioAño").ToString())
|
||||
e.Row.FCCheckBox("ChkEsFinAño").Checked = Convert.ToBoolean(e.Row.DataKey("EsFinAño").ToString())
|
||||
e.Row.FCCheckBox("ChkFueCalculado").Checked = Convert.ToBoolean(e.Row.DataKey("FueCalculado").ToString())
|
||||
|
||||
If e.Row.DataKey("Estatus").ToString.ToEntero = 1 Then
|
||||
If e.Row.DataKey("Estatus").ToString().ToEntero() = 1 Then
|
||||
e.Row.FCLiteral("LtlEstatus").Text = "Actual"
|
||||
ElseIf e.Row.DataKey("Estatus").ToString.ToEntero = 2 Or e.Row.DataKey("Estatus").ToString.ToEntero = 3 Then
|
||||
ElseIf e.Row.DataKey("Estatus").ToString().ToEntero() = 2 Or e.Row.DataKey("Estatus").ToString().ToEntero() = 3 Then
|
||||
e.Row.FCLiteral("LtlEstatus").Text = "Cerrado"
|
||||
Else
|
||||
e.Row.FCLiteral("LtlEstatus").Text = ""
|
||||
@@ -137,7 +137,7 @@ Partial Class Nomina_CatPeriodos
|
||||
|
||||
Protected Sub GvDatos_RowDeleting(sender As Object, e As System.Web.UI.WebControls.GridViewDeleteEventArgs) Handles GvDatos.RowDeleting
|
||||
Dim ObjNom_Periodos As New ClsNominas
|
||||
If ObjNom_Periodos.RemovePeriodo(GvDatos.DataKeys(e.RowIndex).Value.ToString.ToEntero) Then
|
||||
If ObjNom_Periodos.RemovePeriodo(GvDatos.DataKeys(e.RowIndex).Value.ToString().ToEntero()) Then
|
||||
GvDatos.EditIndex = -1
|
||||
ViewState("DTNom_Periodos") = ObjNom_Periodos.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
|
||||
GlobalDTNom_Periodos = ObjNom_Periodos.DtResultados
|
||||
@@ -173,18 +173,18 @@ Partial Class Nomina_CatPeriodos
|
||||
Const OrdenInicial As String = ""
|
||||
Dim Arg(2) As String
|
||||
|
||||
Arg = CType(sender, LinkButton).CommandArgument().ToString.Split(";"c)
|
||||
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
|
||||
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
|
||||
Orden = OrdenInicial & ViewState(String.Format("O{0}", Campo)).ToString()
|
||||
ViewState("Orden") = Orden
|
||||
CargaGrid(Orden)
|
||||
End Sub
|
||||
@@ -218,14 +218,14 @@ Partial Class Nomina_CatPeriodos
|
||||
Dim EsInicioAño As Boolean
|
||||
Dim EsFinAño As Boolean
|
||||
Dim FueCalculado As Boolean
|
||||
Dim Numero As Integer = TxtNumeroAdd.Text.Trim.ToEntero
|
||||
Dim Numero As Integer = TxtNumeroAdd.Text.Trim.ToEntero()
|
||||
Dim FechaInicio As Date = TxtFechaInicioAdd.Text.Trim.ToDate
|
||||
Dim FechaFin As Date = TxtFechaFinAdd.Text.Trim.ToDate
|
||||
Dim Mes As Integer = FechaFin.Month
|
||||
Dim Ejercicio As Integer = FechaFin.Year
|
||||
Dim CveTipoPeriodo As Integer = DdlTipoPeriodoAdd.SelectedValue.ToEntero
|
||||
Dim Estatus As Integer = DdlEstatusAdd.SelectedValue.ToEntero
|
||||
Dim CvePeriodo As Integer = hdnCvePerido.Value.ToEntero
|
||||
Dim CveTipoPeriodo As Integer = DdlTipoPeriodoAdd.SelectedValue.ToEntero()
|
||||
Dim Estatus As Integer = DdlEstatusAdd.SelectedValue.ToEntero()
|
||||
Dim CvePeriodo As Integer = hdnCvePerido.Value.ToEntero()
|
||||
|
||||
For Each item As ListItem In CBLchk.Items
|
||||
Select Case item.Value.ToEntero()
|
||||
@@ -247,7 +247,7 @@ Partial Class Nomina_CatPeriodos
|
||||
Next
|
||||
If Comando = "Agregar" Then
|
||||
|
||||
If ObjNom_Periodos.AddPeriodo(CveTipoPeriodo, Ejercicio, Mes, Numero, FechaInicio, FechaFin, EsInicioMes, EsFinMes, EsInicioSS, EsFinSS, EsInicioAño, EsFinAño, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
|
||||
If ObjNom_Periodos.AddPeriodo(CveTipoPeriodo, Ejercicio, Mes, Numero, FechaInicio, FechaFin, EsInicioMes, EsFinMes, EsInicioSS, EsFinSS, EsInicioAño, EsFinAño, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, DdlTurno.SelectedValue.ToEntero()) Then
|
||||
|
||||
Alert("El nuevo Periodo se guardó correctamente.", TipoMensaje.MsgInformacion)
|
||||
UpDatos.Update()
|
||||
@@ -263,7 +263,7 @@ Partial Class Nomina_CatPeriodos
|
||||
End If
|
||||
ElseIf Comando = "Actualizar" Then
|
||||
|
||||
If ObjNom_Periodos.UpdatePeriodo(FechaInicio, FechaFin, EsInicioMes, EsFinMes, EsInicioSS, EsFinSS, EsInicioAño, EsFinAño, FueCalculado, CveTipoPeriodo, Ejercicio, Mes, Numero, Estatus, CvePeriodo, UsuarioActual.CveEmpresa) Then
|
||||
If ObjNom_Periodos.UpdatePeriodo(FechaInicio, FechaFin, EsInicioMes, EsFinMes, EsInicioSS, EsFinSS, EsInicioAño, EsFinAño, FueCalculado, CveTipoPeriodo, Ejercicio, Mes, Numero, Estatus, CvePeriodo, UsuarioActual.CveEmpresa, DdlTurno.SelectedValue.ToEntero()) Then
|
||||
|
||||
Alert("Los cambios se guardaron correctamente.", TipoMensaje.MsgInformacion)
|
||||
UpDatos.Update()
|
||||
@@ -293,28 +293,29 @@ Partial Class Nomina_CatPeriodos
|
||||
Comando = "Actualizar"
|
||||
lblTiulomodal.Text = "Actualizar Periodo"
|
||||
Dim GvRow As GridViewRow = DirectCast((DirectCast(sender, LinkButton)).NamingContainer, GridViewRow)
|
||||
DdlTipoPeriodoAdd.SelectedValueExist(GvRow.DataKey("CveTipoPeriodo").ToString.ToEntero)
|
||||
TxtNumeroAdd.Text = GvRow.DataKey("Numero").ToString
|
||||
TxtFechaInicioAdd.Text = GvRow.DataKey("FechaInicio").ToString
|
||||
TxtFechaFinAdd.Text = GvRow.DataKey("FechaFin").ToString
|
||||
DdlEstatusAdd.SelectedValueExist(GvRow.DataKey("Estatus").ToString.ToEntero)
|
||||
hdnCvePerido.Value = GvRow.DataKey("CvePeriodo").ToString
|
||||
DdlTipoPeriodoAdd.SelectedValueExist(GvRow.DataKey("CveTipoPeriodo").ToString().ToEntero())
|
||||
DdlTurno.SelectedValueExist(GvRow.DataKey("CveTurno").ToString().ToEntero())
|
||||
TxtNumeroAdd.Text = GvRow.DataKey("Numero").ToString()
|
||||
TxtFechaInicioAdd.Text = GvRow.DataKey("FechaInicio").ToString()
|
||||
TxtFechaFinAdd.Text = GvRow.DataKey("FechaFin").ToString()
|
||||
DdlEstatusAdd.SelectedValueExist(GvRow.DataKey("Estatus").ToString().ToEntero())
|
||||
hdnCvePerido.Value = GvRow.DataKey("CvePeriodo").ToString()
|
||||
For Each item As ListItem In CBLchk.Items
|
||||
Select Case item.Value.ToEntero()
|
||||
Case 1
|
||||
item.Selected = Convert.ToBoolean(GvRow.DataKey("EsInicioMes").ToString)
|
||||
item.Selected = Convert.ToBoolean(GvRow.DataKey("EsInicioMes").ToString())
|
||||
Case 2
|
||||
item.Selected = Convert.ToBoolean(GvRow.DataKey("EsFinMes").ToString)
|
||||
item.Selected = Convert.ToBoolean(GvRow.DataKey("EsFinMes").ToString())
|
||||
Case 3
|
||||
item.Selected = Convert.ToBoolean(GvRow.DataKey("EsInicioSS").ToString)
|
||||
item.Selected = Convert.ToBoolean(GvRow.DataKey("EsInicioSS").ToString())
|
||||
Case 4
|
||||
item.Selected = Convert.ToBoolean(GvRow.DataKey("EsFinSS").ToString)
|
||||
item.Selected = Convert.ToBoolean(GvRow.DataKey("EsFinSS").ToString())
|
||||
Case 5
|
||||
item.Selected = Convert.ToBoolean(GvRow.DataKey("EsInicioAño").ToString)
|
||||
item.Selected = Convert.ToBoolean(GvRow.DataKey("EsInicioAño").ToString())
|
||||
Case 6
|
||||
item.Selected = Convert.ToBoolean(GvRow.DataKey("EsFinAño").ToString)
|
||||
item.Selected = Convert.ToBoolean(GvRow.DataKey("EsFinAño").ToString())
|
||||
Case 7
|
||||
item.Selected = Convert.ToBoolean(GvRow.DataKey("FueCalculado").ToString)
|
||||
item.Selected = Convert.ToBoolean(GvRow.DataKey("FueCalculado").ToString())
|
||||
End Select
|
||||
Next
|
||||
UpModalPerido.Update()
|
||||
|
||||
Reference in New Issue
Block a user