-- ajustes EMD
This commit is contained in:
107
RH/Personal.aspx
107
RH/Personal.aspx
@@ -537,6 +537,9 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-4 " style="margin-top: 20px;">
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</ContentTemplate>
|
||||
@@ -640,8 +643,32 @@
|
||||
<asp:Label AssociatedControlID="DdlPuesto" runat="server" Text="Puesto:"></asp:Label>
|
||||
<asp:RequiredFieldValidator ID="RFVPuesto" runat="server" ControlToValidate="DdlPuesto" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Puesto''</b> es necesario, por favor seleccione uno." InitialValue="-1" ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<i></i>
|
||||
</div>
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:DropDownList Width="100%" ID="DdlGrupo" runat="server" AppendDataBoundItems="True" DataTextField="Puesto" DataValueField="CvePuesto" CssClass="form-control input-sm select2me" ValidationGroup="GrpGuardar">
|
||||
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
||||
<asp:ListItem Text="Grupo A" Value="1"></asp:ListItem>
|
||||
<asp:ListItem Text="Grupo B" Value="2"></asp:ListItem>
|
||||
<asp:ListItem Text="Grupo C" Value="3"></asp:ListItem>
|
||||
<asp:ListItem Text="Único" Value="4"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
<asp:Label AssociatedControlID="DdlGrupo" runat="server" Text="Grupo:"></asp:Label>
|
||||
<asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" ControlToValidate="DdlPuesto" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Puesto''</b> es necesario, por favor seleccione uno." InitialValue="-1" ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<i></i>
|
||||
</div>
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:DropDownList Width="100%" ID="DdlHorarioRol" runat="server" AppendDataBoundItems="True" DataTextField="Puesto" DataValueField="CvePuesto" CssClass="form-control input-sm select2me" ValidationGroup="GrpGuardar">
|
||||
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
||||
<asp:ListItem Text=" 20 /10" Value="1"></asp:ListItem>
|
||||
<asp:ListItem Text="14 / 7" Value="2"></asp:ListItem>
|
||||
<asp:ListItem Text="6 / 1" Value="3"></asp:ListItem>
|
||||
<asp:ListItem Text="2 / 5" Value="4"></asp:ListItem>
|
||||
<asp:ListItem Text="5 / 2" Value="4"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
<asp:Label AssociatedControlID="DdlHorarioRol" runat="server" Text="Rol:"></asp:Label>
|
||||
<asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server" ControlToValidate="DdlPuesto" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Puesto''</b> es necesario, por favor seleccione uno." InitialValue="-1" ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<i></i>
|
||||
</div>
|
||||
<div class="form-group form-md-line-input input-iconright" runat="server" visible="false" id="DvRuta" >
|
||||
<asp:DropDownList Width="100%" ID="DdlRuta" runat="server" AppendDataBoundItems="True" DataTextField="Ruta" DataValueField="CveRuta" CssClass="form-control input-sm select2me" ValidationGroup="GrpGuardar">
|
||||
<asp:ListItem Selected="True" Text="Sin asignar Ruta" Value="-1"></asp:ListItem>
|
||||
@@ -921,6 +948,80 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="portlet light bordered xspadding">
|
||||
<div class="portlet-title">
|
||||
<div class="caption font-green">
|
||||
<i class="fa fa-phone font-green"></i>
|
||||
<span class="caption-subject bold uppercase">-</span>
|
||||
</div>
|
||||
<div class="actions">
|
||||
<div class="btn-group">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body form">
|
||||
|
||||
<asp:UpdatePanel ID="UPGvCaracteristicas" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:GridView ID="GvCaracteristicas" runat="server" AutoGenerateColumns="False" ShowHeader="false"
|
||||
DataKeyNames="CveCaracteristicaValor,Caracteristica,CveCaracteristica,CaracteristicaValor,CveCaracteristicaTipo,Longitud,Requerido,CveCaracteristicaOpcion"
|
||||
EmptyDataText="No se encontraron registros de familiares" ToolTip="Listado de familiares" CssClass="table table-hover table-advance Widthall" GridLines="None">
|
||||
<Columns>
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Left" HeaderText="Nombre" ItemStyle-Width="150px">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlCaracteristica" runat="server" Text='<%# Eval("Caracteristica") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Left" HeaderText="Valor">
|
||||
<ItemTemplate>
|
||||
|
||||
<asp:TextBox ID="TxtCaracteristicaOpcion" runat="server" CausesValidation="true" MaxLength="200" Visible="false" Width="400px" CssClass="form-control input-sm"></asp:TextBox>
|
||||
<%-- <ajax:MaskedEditExtender ID="MEEFechaF" runat="server" TargetControlID="TxtCaracteristicaOpcion" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>--%>
|
||||
<ajax:CalendarExtender runat="server" ID="CalendarioCaractersiticas" TargetControlID="TxtCaracteristicaOpcion" PopupButtonID="imgCalendarioFc" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
|
||||
<asp:CompareValidator ID="cvFechaF" runat="server" ControlToValidate="TxtCaracteristicaOpcion" Display="Dynamic" ErrorMessage="El campo <b>''Fecha Final''</b> no tienes el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="AddUpdateCaracteristicas"></asp:CompareValidator>
|
||||
<%--<ajax:FilteredTextBoxExtender ID="filTxtCarcateristicaOpcion" Enabled="true" runat="server" TargetControlID="TxtCaracteristicaOpcion" FilterType="Numbers" />--%>
|
||||
|
||||
<asp:RequiredFieldValidator ID="rfvTxtCarcateristicaOpcion" runat="server" ControlToValidate="TxtCaracteristicaOpcion" Display="Dynamic" ErrorMessage="Campo requerido" ValidationGroup="registro"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="rfvcTxtCarcateristicaOpcion" runat="server" HighlightCssClass="vco" TargetControlID="rfvTxtCarcateristicaOpcion" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
<ajax:ValidatorCalloutExtender ID="vcoCvFF" runat="server" HighlightCssClass="vco" TargetControlID="cvFechaF" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
|
||||
|
||||
|
||||
<asp:DropDownList ID="DdlCarcateristicaOpcion" Width="170" runat="server" DataTextField="CaracteristicaOpcion" DataValueField="CveCaracteristicaOpcion" Visible="false" CssClass="select2me "></asp:DropDownList>
|
||||
<asp:RequiredFieldValidator InitialValue="-1" ID="rfvDdlCarcateristicaOpcion" ValidationGroup="registro" runat="server" ControlToValidate="DdlCarcateristicaOpcion" Display="Dynamic" ErrorMessage="Error Seleccione una de las opciones"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="rfvcDdlCarcateristicaOpcion" runat="server" HighlightCssClass="vco" TargetControlID="rfvDdlCarcateristicaOpcion" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
|
||||
|
||||
<asp:RadioButtonList ID="RdlCarcateristicaOpcion" Font-family="sans serif" runat="server" DataTextField="CaracteristicaOpcion" DataValueField="CveCaracteristicaOpcion" RepeatDirection="Horizontal" ValidationGroup="AddUpdateCaracteristicas" Visible="false"></asp:RadioButtonList>
|
||||
<asp:RequiredFieldValidator ID="rfvRdlCarcateristicaOpcion" runat="server" ControlToValidate="RdlCarcateristicaOpcion" Display="Dynamic" ErrorMessage="Seleccione una de las respuestas" ValidationGroup="registro"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="rfvcRdlCarcateristicaOpcion" runat="server" HighlightCssClass="vco" TargetControlID="rfvRdlCarcateristicaOpcion" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
|
||||
<asp:CheckBox ID="chkCaracteristicaValor" runat="server" Visible="false" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Center" ItemStyle-Width="100" HeaderText="Fecha">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlFecha" runat="server" Text='<%# Eval("Fecha", "{0:d}") %>'>></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Left" ItemStyle-Width="250" HeaderText="Usuario">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlUsuario" runat="server" Text='<%# Eval("Usuario") %>'>></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-md-4 ">
|
||||
@@ -4167,7 +4268,7 @@
|
||||
<div class="portlet-title">
|
||||
<div class="caption">
|
||||
<i class="icon-pin"></i>
|
||||
<span class="caption-subject uppercase">Documentos Firma de contratos</span>
|
||||
<span class="caption-subject uppercase">Documentos</span>
|
||||
</div>
|
||||
<div class="tools"><a href="javascript;" class="collapse" data-original-title="" title=""></a></div>
|
||||
<div class="actions ">
|
||||
@@ -4912,7 +5013,7 @@
|
||||
<h4 class="modal-title">
|
||||
<asp:UpdatePanel ID="UpTituloFirma" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:Literal ID="LtlTitulofirmaContrato" runat="server">Documentación Firma de Contrato </asp:Literal>
|
||||
<asp:Literal ID="LtlTitulofirmaContrato" runat="server">Documentación </asp:Literal>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</h4>
|
||||
|
||||
@@ -69,6 +69,44 @@ Partial Class RH_Personal
|
||||
ViewState("DTCuentasBancos") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Property DtCaracteristicas As DataTable
|
||||
Get
|
||||
If ViewState("DtCaracteristicas") Is Nothing Then
|
||||
Return New DataTable
|
||||
Else
|
||||
Return DirectCast(ViewState("DtCaracteristicas"), DataTable)
|
||||
End If
|
||||
End Get
|
||||
Set(value As DataTable)
|
||||
ViewState("DtCaracteristicas") = value
|
||||
End Set
|
||||
End Property
|
||||
Property DtCaracteristicasOpciones As DataTable
|
||||
Get
|
||||
If ViewState("DtCaracteristicasOpciones") Is Nothing Then
|
||||
Return New DataTable
|
||||
Else
|
||||
Return DirectCast(ViewState("DtCaracteristicasOpciones"), DataTable)
|
||||
End If
|
||||
End Get
|
||||
Set(value As DataTable)
|
||||
ViewState("DtCaracteristicasOpciones") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private Property DtCaracteristicasValor As DataTable
|
||||
Get
|
||||
If ViewState("DtCaracteristicasValor") Is Nothing Then
|
||||
Return New DataTable
|
||||
Else
|
||||
Return DirectCast(ViewState("DtCaracteristicasValor"), DataTable)
|
||||
End If
|
||||
End Get
|
||||
Set(value As DataTable)
|
||||
ViewState("DtCaracteristicasValor") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property DTLicencias As DataTable
|
||||
Get
|
||||
Return CType(ViewState("DTLicencias"), DataTable)
|
||||
@@ -972,6 +1010,12 @@ Partial Class RH_Personal
|
||||
CargaRegistroPatronal()
|
||||
CargaOutSourcing()
|
||||
CargaDDlPersonalRefsReference()
|
||||
|
||||
If UsuarioActual.CveEmpresa = 13 AndAlso UsuarioActual.CveRol = 1 Then
|
||||
CargaDTSCaracteristicas()
|
||||
CargaDatosCaracteristicas()
|
||||
End If
|
||||
|
||||
If Request("CvePersonal") IsNot Nothing AndAlso IsNumeric(Request("CvePersonal")) AndAlso Request("CvePersonal").ToEntero() > 0 Then
|
||||
ViewState("CvePersonal") = Request("CvePersonal")
|
||||
DdlFormapagovacaciones_SelectedIndexChanged(Nothing, Nothing)
|
||||
@@ -1571,23 +1615,20 @@ Partial Class RH_Personal
|
||||
|
||||
Private Sub CargaOutSourcing()
|
||||
|
||||
Dim DtModulosEmpresa As New DataTable
|
||||
Dim ObjEmpresas As New ClsSisEmpresas
|
||||
If ObjEmpresas.GetEmpresas(-1, "-1", "-1", "-1", "-1") Then
|
||||
DtModulosEmpresa = ObjEmpresas.DtResultados
|
||||
Else
|
||||
DtModulosEmpresa = Nothing
|
||||
End If
|
||||
ObjEmpresas.Dispose()
|
||||
|
||||
|
||||
If UsuarioActual.CveEmpresa = 7 Then
|
||||
Dim DtModulosEmpresa As New DataTable
|
||||
Dim ObjEmpresas As New ClsSisEmpresas
|
||||
If ObjEmpresas.GetEmpresas(-1, "-1", "-1", "-1", "-1") Then
|
||||
DtModulosEmpresa = ObjEmpresas.DtResultados
|
||||
Else
|
||||
DtModulosEmpresa = Nothing
|
||||
End If
|
||||
ObjEmpresas.Dispose()
|
||||
|
||||
DdlEmpresaAsignada.DataSource = DtModulosEmpresa.FiltraParametros("CveEmpresa in (7,11,12,122,145,113)")
|
||||
DdlEmpresaAsignada.DataBind()
|
||||
DvOutsourcing.Visible = True
|
||||
End If
|
||||
|
||||
|
||||
DdlEmpresaAsignada.Items.Insert(0, New ListItem("Seleccione uno", "-1"))
|
||||
|
||||
End Sub
|
||||
@@ -4199,7 +4240,7 @@ Partial Class RH_Personal
|
||||
If CvePersonal > 0 Then
|
||||
Dim objRH As New ClsEdocumentacion()
|
||||
|
||||
If objRH.DocumentacionElectronicaGet(CvePersonal, -1, -1, UsuarioActual.Empresa.CveEmpresa, -1) Then
|
||||
If objRH.DocumentacionElectronicaGet(CvePersonal, -1, -1, UsuarioActual.Empresa.CveEmpresa, 7) Then
|
||||
DTDocumentacion = objRH.DtResultados
|
||||
End If
|
||||
|
||||
@@ -8398,5 +8439,340 @@ Partial Class RH_Personal
|
||||
|
||||
'End Sub
|
||||
|
||||
#Region " C A R A C T E R I S T I C A S "
|
||||
|
||||
Private Sub CargaDTSCaracteristicas()
|
||||
|
||||
Dim objCaracteristicas As New ClsGenerales
|
||||
If objCaracteristicas.GetCaracteristicasValores(CvePersonal, -1, -1, -1, -1, -1, 2, UsuarioActual.Empresa.CveEmpresa) Then
|
||||
DtCaracteristicas = objCaracteristicas.DtResultados
|
||||
End If
|
||||
|
||||
If objCaracteristicas.GetCaracteriscasOpciones(-1, UsuarioActual.Empresa.CveEmpresa) Then
|
||||
DtCaracteristicasOpciones = objCaracteristicas.DtResultados
|
||||
End If
|
||||
|
||||
objCaracteristicas.Dispose()
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub CargaDatosCaracteristicas()
|
||||
|
||||
Dim objCaracteristicas As New ClsGenerales
|
||||
|
||||
' If CvePersonal <> -1 Then
|
||||
If objCaracteristicas.GetCaracteristicasValores(CvePersonal, -1, -1, -1, -1, -1, 2, UsuarioActual.Empresa.CveEmpresa) Then
|
||||
GvCaracteristicas.DataSource = objCaracteristicas.DtResultados
|
||||
DtCaracteristicasValor = objCaracteristicas.DtResultados
|
||||
Else
|
||||
GvCaracteristicas.DataSource = Nothing
|
||||
End If
|
||||
'End If
|
||||
|
||||
objCaracteristicas.Dispose()
|
||||
GvCaracteristicas.DataBind()
|
||||
UPGvCaracteristicas.Update()
|
||||
|
||||
End Sub
|
||||
|
||||
Public Sub Edit_ClickCaracteristica(sender As Object, e As EventArgs)
|
||||
RegistraScript("$('#divAgregarCaracteristica').modal({ backdrop: 'static', keyboard: false});")
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
Public Sub Remove_ClickCaracteristica(sender As Object, e As EventArgs)
|
||||
|
||||
Dim objRH As New ClsRH
|
||||
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
|
||||
Dim activo As Boolean = False
|
||||
Dim _CvePersonalCaracteristica As Integer = GvRow.DataKey("CvePersonalCaracteristica").ToString.ToEntero
|
||||
|
||||
If objRH.PersonalCaracteristicaRemove(_CvePersonalCaracteristica) Then
|
||||
CargaFamiliares()
|
||||
|
||||
Alert("Caracteristica eliminada correctamente.", TipoMensaje.MsgInformacion)
|
||||
|
||||
End If
|
||||
objRH.Dispose()
|
||||
|
||||
CargaDatosCaracteristicas()
|
||||
End Sub
|
||||
|
||||
Protected Sub GvCaracteristicas_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvCaracteristicas.RowDataBound
|
||||
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
|
||||
|
||||
Dim _CveCaracteristica As Integer = e.Row.DataKey("CveCaracteristica").ToEntero
|
||||
Dim _Caracteristica As String = e.Row.DataKey("Caracteristica")
|
||||
|
||||
Dim _Requerido As Integer
|
||||
If e.Row.DataKey("Requerido").ToString.ToUpper = "TRUE" Then
|
||||
_Requerido = 1
|
||||
Else
|
||||
_Requerido = 0
|
||||
End If
|
||||
|
||||
|
||||
Dim _CaracteristicaValor As String = e.Row.DataKey("CaracteristicaValor")
|
||||
Dim _CveCaracteristicaValor As Integer = e.Row.DataKey("CveCaracteristicaValor").ToEntero
|
||||
Dim _CveCaracteristicaTipo As Integer = e.Row.DataKey("CveCaracteristicaTipo").ToEntero
|
||||
Dim _CveCaracteristicaOpcion As Integer = e.Row.DataKey("CveCaracteristicaOpcion").ToEntero
|
||||
Dim _Logitud As Integer = e.Row.DataKey("Longitud").ToString.ToEntero
|
||||
|
||||
Dim _DdlCarcateristicaOpcion As DropDownList = e.Row.FCDropDownList("DdlCarcateristicaOpcion")
|
||||
Dim _TxtCaracteristicaOpcion As TextBox = e.Row.FCTextBox("TxtCaracteristicaOpcion")
|
||||
Dim _RdlCarcateristicaOpcion As RadioButtonList = e.Row.FCRadioButtonList("RdlCarcateristicaOpcion")
|
||||
Dim _chkCaracteristicaValor As CheckBox = e.Row.FCCheckBox("chkCaracteristicaValor")
|
||||
|
||||
Dim dtTemp As New DataTable
|
||||
Dim objCaracteristicas As New ClsGenerales
|
||||
|
||||
|
||||
If objCaracteristicas.GetCaracteriscasOpciones(-1, UsuarioActual.Empresa.CveEmpresa) Then
|
||||
dtTemp = objCaracteristicas.DtResultados
|
||||
End If
|
||||
objCaracteristicas.Dispose()
|
||||
|
||||
|
||||
If _CaracteristicaValor.Length > 0 Then
|
||||
_TxtCaracteristicaOpcion.Text = _CaracteristicaValor
|
||||
End If
|
||||
|
||||
_TxtCaracteristicaOpcion.Visible = False
|
||||
_TxtCaracteristicaOpcion.Text = _CaracteristicaValor
|
||||
Dim _rfvTxtCarcateristicaOpcion As RequiredFieldValidator = e.Row.FCRequiredFieldValidator("rfvTxtCarcateristicaOpcion")
|
||||
_rfvTxtCarcateristicaOpcion.Enabled = False
|
||||
|
||||
_TxtCaracteristicaOpcion.TextMode = Nothing
|
||||
|
||||
Dim _CalendarioCaractersiticas As AjaxControlToolkit.CalendarExtender = e.Row.FCCalendarExtender("CalendarioCaractersiticas")
|
||||
_CalendarioCaractersiticas.Enabled = False
|
||||
|
||||
_DdlCarcateristicaOpcion.Visible = False
|
||||
Dim _rfvDdlCarcateristicaOpcion As RequiredFieldValidator = e.Row.FCRequiredFieldValidator("rfvDdlCarcateristicaOpcion")
|
||||
_rfvDdlCarcateristicaOpcion.Enabled = False
|
||||
|
||||
_RdlCarcateristicaOpcion.Visible = False
|
||||
Dim _rfvRdlCarcateristicaOpcion = e.Row.FCRequiredFieldValidator("rfvRdlCarcateristicaOpcion")
|
||||
_rfvRdlCarcateristicaOpcion.Enabled = False
|
||||
|
||||
_chkCaracteristicaValor.Visible = False
|
||||
|
||||
Dim _cvFechaF As CompareValidator = e.Row.FCCompareValidator("cvFechaF")
|
||||
_cvFechaF.Enabled = False
|
||||
|
||||
Select Case _CveCaracteristicaTipo
|
||||
Case 0
|
||||
'txt
|
||||
_TxtCaracteristicaOpcion.Visible = True
|
||||
_TxtCaracteristicaOpcion.MaxLength = _Logitud
|
||||
_TxtCaracteristicaOpcion.Width = 120
|
||||
If _Requerido = 1 Then
|
||||
' _rfvTxtCarcateristicaOpcion.Enabled = True
|
||||
End If
|
||||
Exit Select
|
||||
Case 1
|
||||
'drop
|
||||
_DdlCarcateristicaOpcion.Visible = True
|
||||
dtTemp = dtTemp.FiltraParametros(" CveCaracteristica = " & _CveCaracteristica)
|
||||
_DdlCarcateristicaOpcion.DataSource = dtTemp
|
||||
_DdlCarcateristicaOpcion.DataBind()
|
||||
_DdlCarcateristicaOpcion.Items.Insert(0, New ListItem("Seleccione una opción", "-1"))
|
||||
|
||||
If _CveCaracteristicaValor <> -1 Then
|
||||
_DdlCarcateristicaOpcion.SelectedValueExist(_CveCaracteristicaOpcion)
|
||||
End If
|
||||
|
||||
If _Requerido = 1 Then
|
||||
_rfvDdlCarcateristicaOpcion.Enabled = True
|
||||
End If
|
||||
|
||||
Exit Select
|
||||
Case 2
|
||||
'radio
|
||||
_RdlCarcateristicaOpcion.Visible = True
|
||||
dtTemp = dtTemp.FiltraParametros(" CveCaracteristica = " & _CveCaracteristica)
|
||||
_RdlCarcateristicaOpcion.DataSource = dtTemp
|
||||
_RdlCarcateristicaOpcion.DataBind()
|
||||
|
||||
If _CveCaracteristicaValor <> -1 Then
|
||||
_RdlCarcateristicaOpcion.SelectedValuesIfExist(_CveCaracteristicaOpcion.ToString)
|
||||
End If
|
||||
|
||||
If _Requerido = 1 Then
|
||||
' _rfvRdlCarcateristicaOpcion.Enabled = True
|
||||
End If
|
||||
|
||||
Exit Select
|
||||
Case 3
|
||||
'Fecha txt Fecha
|
||||
_TxtCaracteristicaOpcion.Visible = True
|
||||
_TxtCaracteristicaOpcion.Width = 120
|
||||
_cvFechaF.Enabled = True
|
||||
' _CalendarioCaractersiticas.Enabled = True
|
||||
RegistraScript(" $('#" & _TxtCaracteristicaOpcion.ClientID & "').mask('00/00/0000'); ")
|
||||
If _Requerido = 1 Then
|
||||
_rfvTxtCarcateristicaOpcion.Enabled = True
|
||||
End If
|
||||
Exit Select
|
||||
Case 4
|
||||
'Multiline
|
||||
_TxtCaracteristicaOpcion.Visible = True
|
||||
_TxtCaracteristicaOpcion.MaxLength = _Logitud
|
||||
If _Requerido = 1 Then
|
||||
_rfvTxtCarcateristicaOpcion.Enabled = True
|
||||
End If
|
||||
Exit Select
|
||||
Case 5
|
||||
'CheckBox
|
||||
_chkCaracteristicaValor.Visible = True
|
||||
If _CaracteristicaValor = "1" Then
|
||||
_chkCaracteristicaValor.Checked = True
|
||||
Else
|
||||
_chkCaracteristicaValor.Checked = False
|
||||
End If
|
||||
|
||||
Exit Select
|
||||
Case 6
|
||||
|
||||
_TxtCaracteristicaOpcion.Visible = True
|
||||
_TxtCaracteristicaOpcion.TextMode = TextBoxMode.Number
|
||||
|
||||
If _Requerido = 1 Then
|
||||
_rfvTxtCarcateristicaOpcion.Enabled = True
|
||||
End If
|
||||
Exit Select
|
||||
End Select
|
||||
|
||||
End If
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
Private Sub GuardaCaracteristicas()
|
||||
|
||||
Dim objCarac As New ClsGenerales
|
||||
|
||||
For Each dRow As GridViewRow In GvCaracteristicas.Rows
|
||||
Dim _CaracteristicaValor As Integer = dRow.DataKey("CaracteristicaValor").ToEntero
|
||||
|
||||
Dim updateCaracteristica As Boolean = False
|
||||
|
||||
If _CaracteristicaValor = -1 Then
|
||||
updateCaracteristica = False
|
||||
Else
|
||||
updateCaracteristica = True
|
||||
End If
|
||||
|
||||
Dim _CveCaracteristica As Integer = dRow.DataKey("CveCaracteristica").ToEntero
|
||||
Dim _CveCaracteristicaValor As Integer = dRow.DataKey("CveCaracteristicaValor").ToEntero
|
||||
Dim _CveCaracteristicaTipo As Integer = dRow.DataKey("CveCaracteristicaTipo").ToEntero
|
||||
|
||||
Dim _DdlCarcateristicaOpcion As DropDownList = dRow.FCDropDownList("DdlCarcateristicaOpcion")
|
||||
Dim _TxtCaracteristicaOpcion As TextBox = dRow.FCTextBox("TxtCaracteristicaOpcion")
|
||||
Dim _RdlCarcateristicaOpcion As RadioButtonList = dRow.FCRadioButtonList("RdlCarcateristicaOpcion")
|
||||
Dim _chkCaracteristicaValor As CheckBox = dRow.FCCheckBox("chkCaracteristicaValor")
|
||||
|
||||
|
||||
Dim CveCaracteristicaOpcion As Integer = -1
|
||||
Dim CaracteristicaValor As String = ""
|
||||
Dim CaracteristicaValorDate As Date = NowADS()
|
||||
Dim CaracteristicaValorInt As Integer = -1
|
||||
|
||||
|
||||
Select Case _CveCaracteristicaTipo
|
||||
Case 0
|
||||
'txt
|
||||
CaracteristicaValor = _TxtCaracteristicaOpcion.Text
|
||||
|
||||
If CaracteristicaValor.Trim.Length > 0 Then
|
||||
updateCaracteristica = True
|
||||
Else
|
||||
updateCaracteristica = False
|
||||
End If
|
||||
|
||||
Exit Select
|
||||
Case 1
|
||||
'drop
|
||||
|
||||
CveCaracteristicaOpcion = _DdlCarcateristicaOpcion.SelectedValue.ToEntero
|
||||
|
||||
If CveCaracteristicaOpcion > 0 Then
|
||||
updateCaracteristica = True
|
||||
Else
|
||||
updateCaracteristica = False
|
||||
End If
|
||||
Exit Select
|
||||
Case 2
|
||||
'radio
|
||||
CveCaracteristicaOpcion = _RdlCarcateristicaOpcion.SelectedValue.ToEntero
|
||||
If CveCaracteristicaOpcion > 0 Then
|
||||
updateCaracteristica = True
|
||||
Else
|
||||
updateCaracteristica = False
|
||||
End If
|
||||
Exit Select
|
||||
Case 3
|
||||
'Fecha txt Fecha
|
||||
If _TxtCaracteristicaOpcion.Text.Trim.Length > 0 Then
|
||||
CaracteristicaValorDate = _TxtCaracteristicaOpcion.Text.Trim.ToDate
|
||||
CaracteristicaValor = CaracteristicaValorDate.ToString("dd/MM/yyyy")
|
||||
If CaracteristicaValor.Trim.ToDate.ToString("dd/MM/yyyy").ToString.Length > 0 Then
|
||||
updateCaracteristica = True
|
||||
Else
|
||||
updateCaracteristica = False
|
||||
End If
|
||||
|
||||
Exit Select
|
||||
Else
|
||||
updateCaracteristica = False
|
||||
End If
|
||||
|
||||
|
||||
Case 4
|
||||
|
||||
'txt
|
||||
CaracteristicaValor = _TxtCaracteristicaOpcion.Text
|
||||
|
||||
If CaracteristicaValor.Trim.Length > 0 Then
|
||||
updateCaracteristica = True
|
||||
Else
|
||||
updateCaracteristica = False
|
||||
End If
|
||||
Exit Select
|
||||
Case 5
|
||||
'CheckBox
|
||||
If _chkCaracteristicaValor.Checked Then
|
||||
CaracteristicaValor = "1"
|
||||
Else
|
||||
CaracteristicaValor = "0"
|
||||
End If
|
||||
updateCaracteristica = True
|
||||
Exit Select
|
||||
Case 6
|
||||
'txt numerico
|
||||
'txt
|
||||
CaracteristicaValor = _TxtCaracteristicaOpcion.Text.ToEntero.ToString
|
||||
updateCaracteristica = True
|
||||
|
||||
Exit Select
|
||||
End Select
|
||||
|
||||
If updateCaracteristica Then
|
||||
If Not objCarac.AddUpdateCaracteristicasValores(_CveCaracteristica, CveCaracteristicaOpcion, CaracteristicaValor, UsuarioActual.CveUsuario, _CveCaracteristicaValor, CvePersonal) Then
|
||||
Exit For
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
|
||||
CargaDatosCaracteristicas()
|
||||
End Sub
|
||||
|
||||
|
||||
#End Region
|
||||
|
||||
End Class
|
||||
|
||||
|
||||
Reference in New Issue
Block a user