Merge branch 'master' of http://192.168.10.111:8383/SIG
This commit is contained in:
@@ -741,9 +741,17 @@ Partial Class AF_AF
|
|||||||
' DdlProyecto.DataSource = GlobalDTProyectos(CveEmpresaActual)
|
' DdlProyecto.DataSource = GlobalDTProyectos(CveEmpresaActual)
|
||||||
' DdlProyecto.DataBind()
|
' DdlProyecto.DataBind()
|
||||||
'End Sub
|
'End Sub
|
||||||
Private Sub CargaEstatusActivoFijo()
|
Private Sub CargaEstatusActivoFijo()
|
||||||
DdlEstadoActivoFijo.DataSource = GlobalDTEstadoActivoFijo
|
|
||||||
|
If UsuarioActual.CveEmpresa = 13 Then
|
||||||
|
DdlEstadoActivoFijo.DataSource = GlobalDTEstadoActivoFijo.FiltraParametros(" CveEstadoActivoFijo <> 3 ")
|
||||||
|
Else
|
||||||
|
DdlEstadoActivoFijo.DataSource = GlobalDTEstadoActivoFijo
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
DdlEstadoActivoFijo.DataBind()
|
DdlEstadoActivoFijo.DataBind()
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
'Private Sub CargaCliente()
|
'Private Sub CargaCliente()
|
||||||
' DdlClientes.DataSource = GlobalDTCliente(UsuarioActual.CveEmpresa)
|
' DdlClientes.DataSource = GlobalDTCliente(UsuarioActual.CveEmpresa)
|
||||||
@@ -1035,7 +1043,16 @@ Partial Class AF_AF
|
|||||||
CargarHistorial()
|
CargarHistorial()
|
||||||
CargaCaracteristicas()
|
CargaCaracteristicas()
|
||||||
|
|
||||||
|
If UsuarioActual.CveEmpresa = 13 AndAlso ObjActivoFijo.DtResultados.Rows(0)("CveEstadoActivoFijo").ToString.ToEntero = 3 Then
|
||||||
|
Dim existeItem As Boolean = DdlEstadoActivoFijo.Items.FindByValue("3") IsNot Nothing
|
||||||
|
If Not existeItem Then
|
||||||
|
Dim nuevoItem As New ListItem("Asignado / En proyecto", "3")
|
||||||
|
DdlEstadoActivoFijo.Items.Add(nuevoItem)
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
DdlEstadoActivoFijo.SelectedValue = ObjActivoFijo.DtResultados.Rows(0)("CveEstadoActivoFijo").ToString
|
DdlEstadoActivoFijo.SelectedValue = ObjActivoFijo.DtResultados.Rows(0)("CveEstadoActivoFijo").ToString
|
||||||
|
|
||||||
DdlResponsable.SelectedValue = ObjActivoFijo.DtResultados.Rows(0)("CvePersonaResponsable").ToString
|
DdlResponsable.SelectedValue = ObjActivoFijo.DtResultados.Rows(0)("CvePersonaResponsable").ToString
|
||||||
DdlProyecto.SelectedValue = ObjActivoFijo.CveProyecto.ToString
|
DdlProyecto.SelectedValue = ObjActivoFijo.CveProyecto.ToString
|
||||||
CargaSubProyecto()
|
CargaSubProyecto()
|
||||||
|
|||||||
@@ -554,6 +554,7 @@ Partial Class Contabilidad_RepBalanceGeneral
|
|||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Protected Sub GvPatrimonio_RowDataBound(sender As Object, e As GridViewRowEventArgs)
|
Protected Sub GvPatrimonio_RowDataBound(sender As Object, e As GridViewRowEventArgs)
|
||||||
|
|
||||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||||
If e.Row.DBCampo("CtaMayor").ToString.ToEntero < 0 Then
|
If e.Row.DBCampo("CtaMayor").ToString.ToEntero < 0 Then
|
||||||
TotalPatrimonioActual += e.Row.DBCampo("ImporteActual").ToString.ToDouble
|
TotalPatrimonioActual += e.Row.DBCampo("ImporteActual").ToString.ToDouble
|
||||||
@@ -585,6 +586,7 @@ Partial Class Contabilidad_RepBalanceGeneral
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
|
|||||||
@@ -165,8 +165,8 @@ Partial Class AC_RepEstadoActividades
|
|||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
Private Sub CargaGrids()
|
Private Sub CargaGrids()
|
||||||
DtIngresos = DtDatos.FiltraParametros("Tipo ='H' ")
|
DtIngresos = DtDatos.FiltraParametros("(Tipo ='H' OR Codigo like '4020%') AND NOT(Codigo like '5030%' OR Codigo like '7020%') ")
|
||||||
DtGastos = DtDatos.FiltraParametros("Tipo ='G' ")
|
DtGastos = DtDatos.FiltraParametros("(Tipo ='G' AND Codigo NOT like '4020%') OR (Codigo like '5030%' OR Codigo like '7020%') ")
|
||||||
Dim Row As DataRow = DtIngresos.NewRow
|
Dim Row As DataRow = DtIngresos.NewRow
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -2,7 +2,6 @@
|
|||||||
Option Strict On
|
Option Strict On
|
||||||
|
|
||||||
Imports System.Data
|
Imports System.Data
|
||||||
Imports Extensiones
|
|
||||||
Imports Microsoft.Reporting.WebForms
|
Imports Microsoft.Reporting.WebForms
|
||||||
Partial Class Contabilidad2_RepEstadoResultados
|
Partial Class Contabilidad2_RepEstadoResultados
|
||||||
Inherits ClsPaginas
|
Inherits ClsPaginas
|
||||||
@@ -192,8 +191,8 @@ Partial Class Contabilidad2_RepEstadoResultados
|
|||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
Private Sub CargaGrids()
|
Private Sub CargaGrids()
|
||||||
DtIngresos = DtDatos.FiltraParametros("Orden Like '0004%' OR Tipo = 'H'")
|
DtIngresos = DtDatos.FiltraParametros("Orden Like '0004%' OR Tipo = 'H' OR Codigo like '4020%' ")
|
||||||
DtGastos = DtDatos.FiltraParametros("Orden Like '0005%' OR Tipo = 'G'")
|
DtGastos = DtDatos.FiltraParametros("Orden Like '0005%' OR Tipo = 'G' OR (Codigo like '5030%' OR Codigo like '7020%') ")
|
||||||
Dim Row As DataRow = DtIngresos.NewRow
|
Dim Row As DataRow = DtIngresos.NewRow
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -390,7 +390,7 @@ public partial class Contabilidad_RepIVA : ClsPaginas
|
|||||||
SbSinTipo.Append("Los siguientes proveedores no tienen especificado el tipo de operación:<br/>");
|
SbSinTipo.Append("Los siguientes proveedores no tienen especificado el tipo de operación:<br/>");
|
||||||
foreach (DataRow row in dtSinTipoOperacion.Rows)
|
foreach (DataRow row in dtSinTipoOperacion.Rows)
|
||||||
{
|
{
|
||||||
SbSinTipo.AppendFormat("{0}-{1} <br/>", row["RFC"], row["RazonSocial"]);
|
SbSinTipo.AppendFormat("{0} - {1} <br/>", row["RFC"], row["RazonSocial"]);
|
||||||
}
|
}
|
||||||
Alert(SbSinTipo.ToString(), TipoMensaje.MsgAdvertencia);
|
Alert(SbSinTipo.ToString(), TipoMensaje.MsgAdvertencia);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -195,7 +195,7 @@
|
|||||||
<label class="col-md-1 truncate">
|
<label class="col-md-1 truncate">
|
||||||
<asp:Label runat="server" ID="LblDestino">Destino:</asp:Label>
|
<asp:Label runat="server" ID="LblDestino">Destino:</asp:Label>
|
||||||
</label>
|
</label>
|
||||||
<div class="col-md-2">
|
<div class="col-md-4">
|
||||||
<asp:Literal ID="LtlAlmacenDestino" runat="server"></asp:Literal>
|
<asp:Literal ID="LtlAlmacenDestino" runat="server"></asp:Literal>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -100,8 +100,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="col-md-1">
|
<div class="col-md-1">
|
||||||
<asp:DropDownList runat="server" ID="DdlOpcion" CssClass="select2me" Width="100px" >
|
<asp:DropDownList runat="server" ID="DdlOpcion" CssClass="select2me" Width="100px" >
|
||||||
<asp:ListItem Value="2" Selected="True">Caducidad</asp:ListItem>
|
<asp:ListItem Value="1" Selected="True">Caducidad</asp:ListItem>
|
||||||
<asp:ListItem Value="1">Elaboración</asp:ListItem>
|
|
||||||
</asp:DropDownList>
|
</asp:DropDownList>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-sm-1" style="text-align:right">
|
<div class="col-sm-1" style="text-align:right">
|
||||||
@@ -184,7 +183,7 @@
|
|||||||
<asp:BoundField HeaderText="Producto" DataField="CodigoPS" />
|
<asp:BoundField HeaderText="Producto" DataField="CodigoPS" />
|
||||||
<asp:BoundField HeaderText="Compuesto" DataField="Compuesto" />
|
<asp:BoundField HeaderText="Compuesto" DataField="Compuesto" />
|
||||||
<asp:BoundField HeaderText="Lote" DataField="Lote" ItemStyle-Width="150px" />
|
<asp:BoundField HeaderText="Lote" DataField="Lote" ItemStyle-Width="150px" />
|
||||||
<asp:BoundField HeaderText="Fecha Caducidad" DataField="FechaCaducidad" DataFormatString = "{0:dd/MM/yyyy}" ItemStyle-Width="90px" />
|
<asp:BoundField HeaderText="F.Caducidad" DataField="FechaCaducidad" DataFormatString = "{0:dd/MM/yyyy}" ItemStyle-Width="90px" />
|
||||||
<asp:TemplateField ItemStyle-Width="90px" ItemStyle-HorizontalAlign="Right" HeaderText="Días de Cad." Visible="false">
|
<asp:TemplateField ItemStyle-Width="90px" ItemStyle-HorizontalAlign="Right" HeaderText="Días de Cad." Visible="false">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:Label ID="LblTiempoCaducidad" runat="server" Text='<%# Eval("TiempoCaducidad","{0:N0}")%>' ></asp:Label>
|
<asp:Label ID="LblTiempoCaducidad" runat="server" Text='<%# Eval("TiempoCaducidad","{0:N0}")%>' ></asp:Label>
|
||||||
|
|||||||
@@ -1,13 +1,11 @@
|
|||||||
using Extensiones;
|
using Extensiones;
|
||||||
using Microsoft.Reporting.WebForms;
|
using Microsoft.Reporting.WebForms;
|
||||||
using System;
|
using System;
|
||||||
using System.Activities.Expressions;
|
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Data;
|
using System.Data;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Web.UI.WebControls;
|
using System.Web.UI.WebControls;
|
||||||
|
|
||||||
|
|
||||||
public partial class Inventarios_RepProductosPorCaducar : ClsPaginas
|
public partial class Inventarios_RepProductosPorCaducar : ClsPaginas
|
||||||
{
|
{
|
||||||
private DataTable DTDatos
|
private DataTable DTDatos
|
||||||
@@ -31,15 +29,11 @@ public partial class Inventarios_RepProductosPorCaducar : ClsPaginas
|
|||||||
CargarDatos();
|
CargarDatos();
|
||||||
CargaAlamacenes();
|
CargaAlamacenes();
|
||||||
CargaCompuestos();
|
CargaCompuestos();
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
private void CargarDatos()
|
private void CargarDatos()
|
||||||
{
|
{
|
||||||
|
|
||||||
string Cves_Alamcenes = ddlAlmacen.GetSelectedValuesM();
|
string Cves_Alamcenes = ddlAlmacen.GetSelectedValuesM();
|
||||||
|
|
||||||
DateTime FI = ModExtensiones.MinFecha;
|
DateTime FI = ModExtensiones.MinFecha;
|
||||||
@@ -60,7 +54,7 @@ public partial class Inventarios_RepProductosPorCaducar : ClsPaginas
|
|||||||
{
|
{
|
||||||
GvDatos.DataSource = ObjInventarios.DtResultados;
|
GvDatos.DataSource = ObjInventarios.DtResultados;
|
||||||
DTDatos = ObjInventarios.DtResultados;
|
DTDatos = ObjInventarios.DtResultados;
|
||||||
if (DdlOpcion.SelectedValue == "1")
|
if (DdlOpcion.SelectedValue == "1" &&UsuarioActual.CveEmpresa == 119 )
|
||||||
{
|
{
|
||||||
GvDatos.Columns[5].HeaderText = "F.Elaboración";
|
GvDatos.Columns[5].HeaderText = "F.Elaboración";
|
||||||
}
|
}
|
||||||
@@ -68,7 +62,6 @@ public partial class Inventarios_RepProductosPorCaducar : ClsPaginas
|
|||||||
{
|
{
|
||||||
GvDatos.Columns[5].HeaderText = "F.Caducidad";
|
GvDatos.Columns[5].HeaderText = "F.Caducidad";
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
ObjInventarios.Dispose();
|
ObjInventarios.Dispose();
|
||||||
GvDatos.DataBind();
|
GvDatos.DataBind();
|
||||||
@@ -81,10 +74,14 @@ public partial class Inventarios_RepProductosPorCaducar : ClsPaginas
|
|||||||
CargarSucursales();
|
CargarSucursales();
|
||||||
CargarClasificaciones();
|
CargarClasificaciones();
|
||||||
|
|
||||||
|
if (UsuarioActual.CveEmpresa == 119)
|
||||||
|
{
|
||||||
|
DdlOpcion.Items.Clear();
|
||||||
|
DdlOpcion.Items.Add(new ListItem("Elaboración", "1"));
|
||||||
|
DdlOpcion.Items.Add(new ListItem("Caducidad", "2"));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private void CargaCompuestos()
|
private void CargaCompuestos()
|
||||||
{
|
{
|
||||||
ClsProductosServicios ObjPS = new ClsProductosServicios();
|
ClsProductosServicios ObjPS = new ClsProductosServicios();
|
||||||
@@ -176,12 +173,8 @@ public partial class Inventarios_RepProductosPorCaducar : ClsPaginas
|
|||||||
@params.Add(new ReportParameter("Filtros", Filtros.ToString()));
|
@params.Add(new ReportParameter("Filtros", Filtros.ToString()));
|
||||||
@params.Add(new ReportParameter("UsuarioImprimio", UsuarioActual.Nombre));
|
@params.Add(new ReportParameter("UsuarioImprimio", UsuarioActual.Nombre));
|
||||||
@params.Add(new ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa));
|
@params.Add(new ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa));
|
||||||
|
|
||||||
@params.Add(new ReportParameter("OcultaCaducidad", ChkTiempoCaducidad.Checked ? "0" : "1"));
|
@params.Add(new ReportParameter("OcultaCaducidad", ChkTiempoCaducidad.Checked ? "0" : "1"));
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
var logouri = string.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa);
|
var logouri = string.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa);
|
||||||
System.IO.FileInfo Imagen = new System.IO.FileInfo($"{UsuarioActual.Empresa.Ruta}/Logo.png");
|
System.IO.FileInfo Imagen = new System.IO.FileInfo($"{UsuarioActual.Empresa.Ruta}/Logo.png");
|
||||||
@params.Add(new ReportParameter("LogoPath", Imagen.Exists ? $"file://{Imagen.FullName}" : "")); @params.Add(new ReportParameter("FechaCaducidadHeader", "Fecha Caducidad")); // (!String.IsNullOrWhiteSpace(UsuarioActual.Empresa.Funcionalidad(147)) ? UsuarioActual.Empresa.Funcionalidad(147) : "Fecha Caducidad")));
|
@params.Add(new ReportParameter("LogoPath", Imagen.Exists ? $"file://{Imagen.FullName}" : "")); @params.Add(new ReportParameter("FechaCaducidadHeader", "Fecha Caducidad")); // (!String.IsNullOrWhiteSpace(UsuarioActual.Empresa.Funcionalidad(147)) ? UsuarioActual.Empresa.Funcionalidad(147) : "Fecha Caducidad")));
|
||||||
@@ -196,8 +189,6 @@ public partial class Inventarios_RepProductosPorCaducar : ClsPaginas
|
|||||||
CargaAlamacenes(DdlSucursal.SelectedValue.ToEntero());
|
CargaAlamacenes(DdlSucursal.SelectedValue.ToEntero());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
protected void BtnPersonalizar_Click(object sender, EventArgs e)
|
protected void BtnPersonalizar_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
Personaliza();
|
Personaliza();
|
||||||
|
|||||||
@@ -10,7 +10,7 @@
|
|||||||
|
|
||||||
.psagregar > div.comboxes {
|
.psagregar > div.comboxes {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
width: 450px;
|
width: 550px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.psagregar > div.codigo input {
|
.psagregar > div.codigo input {
|
||||||
@@ -394,12 +394,11 @@
|
|||||||
Producto
|
Producto
|
||||||
</th>
|
</th>
|
||||||
<th width="100px">Observaciones</th>
|
<th width="100px">Observaciones</th>
|
||||||
<th style="width: 88px" runat="server" id="ThSeccionAlmacen" visible="false">Sección Almacen</th>
|
<th style="width: 88px" runat="server" id="ThSeccionAlmacen" visible="false">Sección Almacen</th>
|
||||||
<th style="width: 88px" runat="server" id="ThSerie" visible="false">Serie</th>
|
<th style="width: 88px" runat="server" id="ThSerie" visible="false">Serie</th>
|
||||||
<th style="width: 88px" runat="server" id="ThLote" visible="false">Lote</th>
|
<th style="width: 88px" runat="server" id="ThLote" visible="false">Lote</th>
|
||||||
<th style="width: 88px" runat="server" id="ThFechaCaducidad" visible="false">Fecha Caducidad</th>
|
<th style="width: 88px" runat="server" id="ThFechaCaducidad" visible="false">Fecha Caducidad</th>
|
||||||
|
<th width="80px">Comandos</th>
|
||||||
<th width="160px">Comandos</th>
|
|
||||||
</tr>
|
</tr>
|
||||||
</thea>
|
</thea>
|
||||||
<tr>
|
<tr>
|
||||||
@@ -421,8 +420,7 @@
|
|||||||
<asp:UpdatePanel runat="server">
|
<asp:UpdatePanel runat="server">
|
||||||
<ContentTemplate>
|
<ContentTemplate>
|
||||||
<div class="psagregar">
|
<div class="psagregar">
|
||||||
<div class="comboxes">
|
<div class="comboxes">
|
||||||
|
|
||||||
<ADS:Dropdownlost runat="server" ID="DdlProducto2" CssStyle="width: 100%;" IncluyeTodos="false" CssClassDdl="select2me" TabIndex="2" DataTextField="PSCodigo" DataValueField="CvePS" />
|
<ADS:Dropdownlost runat="server" ID="DdlProducto2" CssStyle="width: 100%;" IncluyeTodos="false" CssClassDdl="select2me" TabIndex="2" DataTextField="PSCodigo" DataValueField="CvePS" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -440,6 +438,8 @@
|
|||||||
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
||||||
</asp:DropDownList>
|
</asp:DropDownList>
|
||||||
</td>
|
</td>
|
||||||
|
<td runat="server" id="TdLoteCaducidad" visible="false">
|
||||||
|
</td>
|
||||||
<td runat="server" id="TdSerie" visible="false">
|
<td runat="server" id="TdSerie" visible="false">
|
||||||
<asp:Panel runat="server" DefaultButton="BtnSerieAddNew">
|
<asp:Panel runat="server" DefaultButton="BtnSerieAddNew">
|
||||||
<asp:TextBox ID="TxtnSerie" Visible="false" runat="server" Width="80px"></asp:TextBox>
|
<asp:TextBox ID="TxtnSerie" Visible="false" runat="server" Width="80px"></asp:TextBox>
|
||||||
@@ -450,8 +450,7 @@
|
|||||||
<asp:TextBox ID="TxtnLote" CssClass="form-control input-sm" runat="server" Width="80px" Visible="false"></asp:TextBox>
|
<asp:TextBox ID="TxtnLote" CssClass="form-control input-sm" runat="server" Width="80px" Visible="false"></asp:TextBox>
|
||||||
</td>
|
</td>
|
||||||
<td runat="server" id="TdFechaCaducidad" visible="false">
|
<td runat="server" id="TdFechaCaducidad" visible="false">
|
||||||
|
<table id="tbFechaCaducidad" runat="server">
|
||||||
<table>
|
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
<asp:TextBox ID="TxtnFechaCaducidad" CssClass="form-control input-sm" runat="server" Width="80px" Visible="false"></asp:TextBox>
|
<asp:TextBox ID="TxtnFechaCaducidad" CssClass="form-control input-sm" runat="server" Width="80px" Visible="false"></asp:TextBox>
|
||||||
@@ -463,9 +462,9 @@
|
|||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
<asp:DropDownList ID="DdlLoteFechaCaducidad" Visible="false" CssClass="select2me" Width="100%" runat="server" CausesValidation="true" AutoPostBack="true" >
|
||||||
|
<asp:ListItem Selected="True" Text="-" Value="|"></asp:ListItem>
|
||||||
|
</asp:DropDownList>
|
||||||
</td>
|
</td>
|
||||||
<td align="center">
|
<td align="center">
|
||||||
<asp:LinkButton ID="LbAgregar" runat="server" CssClass="Texto" ValidationGroup="GrpAgregar" TabIndex="3" Text="Agregar" />
|
<asp:LinkButton ID="LbAgregar" runat="server" CssClass="Texto" ValidationGroup="GrpAgregar" TabIndex="3" Text="Agregar" />
|
||||||
@@ -500,7 +499,7 @@
|
|||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:LinkButton ID="lnkRemove" runat="server" CssClass="btn btn-circle btn-xs red" Text="<i class='icon-trash'></i>" CommandName="Delete" CommandArgument='<%# Eval("No")%>' data-toggle="confirmation" data-popout="true" data-original-title="¿Seguro que desea eliminar el concepto?" data-btn-ok-label="si"></asp:LinkButton>
|
<asp:LinkButton ID="lnkRemove" runat="server" CssClass="btn btn-circle btn-xs red" Text="<i class='icon-trash'></i>" CommandName="Delete" CommandArgument='<%# Eval("No")%>' data-toggle="confirmation" data-popout="true" data-original-title="¿Seguro que desea eliminar el concepto?" data-btn-ok-label="si"></asp:LinkButton>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
<ItemStyle Width="160px" HorizontalAlign="Center"></ItemStyle>
|
<ItemStyle Width="80px" HorizontalAlign="Center"></ItemStyle>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
</Columns>
|
</Columns>
|
||||||
<RowStyle CssClass="Texto" />
|
<RowStyle CssClass="Texto" />
|
||||||
|
|||||||
@@ -158,7 +158,6 @@ Partial Class Inventarios_TraspasoAlmacen
|
|||||||
ViewState("FolioBusqueda") = value
|
ViewState("FolioBusqueda") = value
|
||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
Private Property ArchivoBitacora As String
|
Private Property ArchivoBitacora As String
|
||||||
Get
|
Get
|
||||||
Return CType(ViewState("ArchivoBitacora"), String)
|
Return CType(ViewState("ArchivoBitacora"), String)
|
||||||
@@ -167,6 +166,17 @@ Partial Class Inventarios_TraspasoAlmacen
|
|||||||
ViewState("ArchivoBitacora") = value
|
ViewState("ArchivoBitacora") = value
|
||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
Private Property SeleccionLoteCaducidadCombo As Boolean
|
||||||
|
Get
|
||||||
|
If ViewState("SeleccionLoteCaducidadCombo") Is Nothing Then
|
||||||
|
ViewState("SeleccionLoteCaducidadCombo") = False
|
||||||
|
End If
|
||||||
|
Return CType(ViewState("SeleccionLoteCaducidadCombo"), Boolean)
|
||||||
|
End Get
|
||||||
|
Set(value As Boolean)
|
||||||
|
ViewState("SeleccionLoteCaducidadCombo") = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
|
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||||
@@ -212,6 +222,8 @@ Partial Class Inventarios_TraspasoAlmacen
|
|||||||
DivTransitorio2.Visible = True
|
DivTransitorio2.Visible = True
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
If UsuarioActual.Empresa.Funcionalidad(578) = "1" Then SeleccionLoteCaducidadCombo = True
|
||||||
|
|
||||||
'If UsuarioActual.CveEmpresa.Contiene(141, 152, 158, 159, 160, 161, 162, 163) Then
|
'If UsuarioActual.CveEmpresa.Contiene(141, 152, 158, 159, 160, 161, 162, 163) Then
|
||||||
' ChkEmitirTimbrado.Visible = False
|
' ChkEmitirTimbrado.Visible = False
|
||||||
' divEmitir.Visible = False
|
' divEmitir.Visible = False
|
||||||
@@ -605,7 +617,7 @@ Partial Class Inventarios_TraspasoAlmacen
|
|||||||
End If
|
End If
|
||||||
Dim DrPS As DataRow = Nothing
|
Dim DrPS As DataRow = Nothing
|
||||||
|
|
||||||
DrPS = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=CveProducto).FiltroPrimero("") ' Estado = -1
|
DrPS = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa, CvePS:=CveProducto).FiltroPrimero("") ' Estado = -1
|
||||||
|
|
||||||
If DrPS IsNot Nothing Then
|
If DrPS IsNot Nothing Then
|
||||||
|
|
||||||
@@ -618,9 +630,16 @@ Partial Class Inventarios_TraspasoAlmacen
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
If DrPS("AplicaCaducidad").ToString = "True" Then
|
If DrPS("AplicaCaducidad").ToString = "True" Then
|
||||||
If Not ChkSugiereFechaCaducidad.Checked AndAlso (TxtnFechaCaducidad.Text = "" OrElse TxtnLote.Text = "") Then
|
If SeleccionLoteCaducidadCombo Then
|
||||||
Alert("Falta Especificar lote/Fecha del producto", TipoMensaje.MsgAdvertencia)
|
If DdlLoteFechaCaducidad.SelectedValue = "|" Then
|
||||||
Exit Sub
|
Alert("Falta Especificar lote/Fecha del producto", TipoMensaje.MsgAdvertencia)
|
||||||
|
Exit Sub
|
||||||
|
End If
|
||||||
|
Else
|
||||||
|
If Not ChkSugiereFechaCaducidad.Checked AndAlso (TxtnFechaCaducidad.Text = "" OrElse TxtnLote.Text = "") Then
|
||||||
|
Alert("Falta Especificar lote/Fecha del producto", TipoMensaje.MsgAdvertencia)
|
||||||
|
Exit Sub
|
||||||
|
End If
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
@@ -647,14 +666,9 @@ Partial Class Inventarios_TraspasoAlmacen
|
|||||||
If CantidadRestante <= 0 Then Exit For
|
If CantidadRestante <= 0 Then Exit For
|
||||||
Next
|
Next
|
||||||
End If
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
ObjInventarios.Dispose()
|
ObjInventarios.Dispose()
|
||||||
|
|
||||||
Else
|
Else
|
||||||
|
|
||||||
'codigo temporal
|
|
||||||
Dim tLote As String
|
Dim tLote As String
|
||||||
Dim tCaducidad As Date
|
Dim tCaducidad As Date
|
||||||
|
|
||||||
@@ -662,17 +676,19 @@ Partial Class Inventarios_TraspasoAlmacen
|
|||||||
tCaducidad = If(TxtnFechaCaducidad.Visible, TxtnFechaCaducidad.Text.ToDate, MinFecha)
|
tCaducidad = If(TxtnFechaCaducidad.Visible, TxtnFechaCaducidad.Text.ToDate, MinFecha)
|
||||||
|
|
||||||
Dim tSerie As String = If(TxtnSerie.Visible, TxtnSerie.Text, "-1").Trim
|
Dim tSerie As String = If(TxtnSerie.Visible, TxtnSerie.Text, "-1").Trim
|
||||||
|
If SeleccionLoteCaducidadCombo Then
|
||||||
|
Dim ArrayCaducidad As String() = DdlLoteFechaCaducidad.SelectedValue.Split("|"c)
|
||||||
|
tLote = ArrayCaducidad(0)
|
||||||
|
tCaducidad = ArrayCaducidad(1).ToDate
|
||||||
|
End If
|
||||||
|
|
||||||
Dim Valido As Boolean = ValidaExistencia(Cantidad, CveProducto, DdlUnidad.SelectedValue.ToEntero, DdlSeccionAlmacen.SelectedValue.ToEntero, tSerie, tLote, tCaducidad)
|
Dim Valido As Boolean = ValidaExistencia(Cantidad, CveProducto, DdlUnidad.SelectedValue.ToEntero, DdlSeccionAlmacen.SelectedValue.ToEntero, tSerie, tLote, tCaducidad)
|
||||||
|
|
||||||
If Valido Then
|
If Valido Then
|
||||||
AgregarPS(Cantidad, CveProducto, DdlUnidad.SelectedValue.ToEntero, TxtnObservaciones.Text, CveSeccionAlmacen:=DdlSeccionAlmacen.SelectedValue.ToEntero, SeccionAlmacen:=DdlSeccionAlmacen.SelectedItem.Text, Serie:=If(TxtnSerie.Visible, TxtnSerie.Text, ""), Lote:=If(tLote = "-1", "", tLote), FechaCaducidad:=tCaducidad, CveSeccionAlmacenDestino:=DdlSeccionAlmacenDestino.SelectedValue.ToEntero, Limpia:=FuncionalidadSinSerie)
|
AgregarPS(Cantidad, CveProducto, DdlUnidad.SelectedValue.ToEntero, TxtnObservaciones.Text, CveSeccionAlmacen:=DdlSeccionAlmacen.SelectedValue.ToEntero, SeccionAlmacen:=DdlSeccionAlmacen.SelectedItem.Text, Serie:=If(TxtnSerie.Visible, TxtnSerie.Text, ""), Lote:=If(tLote = "-1", "", tLote), FechaCaducidad:=tCaducidad, CveSeccionAlmacenDestino:=DdlSeccionAlmacenDestino.SelectedValue.ToEntero, Limpia:=FuncionalidadSinSerie)
|
||||||
End If
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
Private Function ValidaExistencia(Cantidad As Decimal, CvePS As Integer, CveUnidadMedida As Integer, CveSeccionAlmacen As Integer, Serie As String, Lote As String, FechaCaducidad As Date) As Boolean
|
Private Function ValidaExistencia(Cantidad As Decimal, CvePS As Integer, CveUnidadMedida As Integer, CveSeccionAlmacen As Integer, Serie As String, Lote As String, FechaCaducidad As Date) As Boolean
|
||||||
@@ -737,7 +753,6 @@ Partial Class Inventarios_TraspasoAlmacen
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
Dim CveClasificacion As Integer
|
Dim CveClasificacion As Integer
|
||||||
|
|
||||||
Dim DrPS As DataRow = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=CvePS).FiltroPrimero("")
|
Dim DrPS As DataRow = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=CvePS).FiltroPrimero("")
|
||||||
|
|
||||||
If ChkEmitirTimbrado.Checked AndAlso ChkEmitirCartaPorte.Checked Then
|
If ChkEmitirTimbrado.Checked AndAlso ChkEmitirCartaPorte.Checked Then
|
||||||
@@ -1369,36 +1384,46 @@ Partial Class Inventarios_TraspasoAlmacen
|
|||||||
TxtnFechaCaducidad.Visible = False
|
TxtnFechaCaducidad.Visible = False
|
||||||
|
|
||||||
If DdlProducto2.SelectedValue.ToEntero > 0 Then
|
If DdlProducto2.SelectedValue.ToEntero > 0 Then
|
||||||
Dim drP As DataRow = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=DdlProducto2.SelectedValue.ToEntero).FiltroPrimero("", "PS")
|
Dim drP As DataRow = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa, CvePS:=DdlProducto2.SelectedValue.ToEntero).FiltroPrimero("", "PS")
|
||||||
If drP IsNot Nothing Then
|
If drP IsNot Nothing Then
|
||||||
|
|
||||||
ThSeccionAlmacen.Visible = CBool(drP("AplicaSeccion"))
|
ThSeccionAlmacen.Visible = CBool(drP("AplicaSeccion"))
|
||||||
TdSeccionAlmacen.Visible = CBool(drP("AplicaSeccion"))
|
TdSeccionAlmacen.Visible = CBool(drP("AplicaSeccion"))
|
||||||
DdlSeccionAlmacen.Visible = CBool(drP("AplicaSeccion"))
|
DdlSeccionAlmacen.Visible = CBool(drP("AplicaSeccion"))
|
||||||
'GvDatos.Columns(5).Visible = CBool(drP("AplicaSeccion"))
|
|
||||||
|
|
||||||
Dim AplicaSerie As Boolean = CBool(drP("AplicaSerie"))
|
Dim AplicaSerie As Boolean = CBool(drP("AplicaSerie"))
|
||||||
|
|
||||||
ThSerie.Visible = AplicaSerie
|
ThSerie.Visible = AplicaSerie
|
||||||
TdSerie.Visible = AplicaSerie
|
TdSerie.Visible = AplicaSerie
|
||||||
TxtnSerie.Visible = AplicaSerie
|
TxtnSerie.Visible = AplicaSerie
|
||||||
'GvDatos.Columns(6).Visible = CBool(drP("AplicaSerie"))
|
|
||||||
|
|
||||||
TxtnLote.Visible = CBool(drP("AplicaLote"))
|
|
||||||
ThLote.Visible = CBool(drP("AplicaLote"))
|
|
||||||
TdLote.Visible = CBool(drP("AplicaLote"))
|
|
||||||
'GvDatos.Columns(7).Visible = CBool(drP("AplicaLote"))
|
|
||||||
|
|
||||||
|
|
||||||
TxtnFechaCaducidad.Visible = CBool(drP("AplicaCaducidad"))
|
|
||||||
ThFechaCaducidad.Visible = CBool(drP("AplicaCaducidad"))
|
|
||||||
If Not String.IsNullOrWhiteSpace(UsuarioActual.Empresa.Funcionalidad(147)) Then ThFechaCaducidad.InnerText = UsuarioActual.Empresa.Funcionalidad(147)
|
|
||||||
'ThFechaCaducidad.InnerText = If(UsuarioActual.Empresa.Funcionalidad(147) = "Fecha Elaboración", "Fecha Elaboración", "Fecha Caducidad")
|
|
||||||
TdFechaCaducidad.Visible = CBool(drP("AplicaCaducidad"))
|
|
||||||
'GvDatos.Columns(8).Visible = CBool(drP("AplicaCaducidad"))
|
|
||||||
|
|
||||||
|
If SeleccionLoteCaducidadCombo AndAlso (CBool(drP("AplicaLote")) OrElse CBool(drP("AplicaCaducidad"))) Then
|
||||||
|
TxtnLote.Visible = False
|
||||||
|
ThLote.Visible = CBool(drP("AplicaLote"))
|
||||||
|
TdLote.Visible = CBool(drP("AplicaLote"))
|
||||||
|
TxtnFechaCaducidad.Visible = False
|
||||||
|
ThFechaCaducidad.Visible = CBool(drP("AplicaCaducidad"))
|
||||||
|
TdFechaCaducidad.Visible = CBool(drP("AplicaCaducidad"))
|
||||||
|
tbFechaCaducidad.Visible = False
|
||||||
|
DdlLoteFechaCaducidad.Visible = True
|
||||||
|
Dim ObjInventarios As New ClsInventarios
|
||||||
|
If ObjInventarios.GetExistenciasCaducidad(DdlProducto2.SelectedValue.ToEntero, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, DdlAlmacenOrigen.SelectedValue) Then
|
||||||
|
For Each dr As DataRow In ObjInventarios.DtResultados.FiltraParametros("", DistinctColumns:={"Lote", "FechaCaducidad"}).Rows
|
||||||
|
Dim Cad As String = ""
|
||||||
|
If dr("FechaCaducidad").ToString <> "" Then Cad = $"- Cad: {dr("FechaCaducidad").ToString.ToDate.ToString("dd/MM/yyyy")}"
|
||||||
|
DdlLoteFechaCaducidad.Items.Add(New ListItem($"Lote: {dr("Lote").ToString} {Cad}", $"{dr("Lote").ToString}|{dr("FechaCaducidad").ToString.ToDate.ToString("dd/MM/yyyy")}"))
|
||||||
|
Next
|
||||||
|
End If
|
||||||
|
ObjInventarios.Dispose()
|
||||||
|
Else
|
||||||
|
TxtnLote.Visible = CBool(drP("AplicaLote"))
|
||||||
|
ThLote.Visible = CBool(drP("AplicaLote"))
|
||||||
|
TdLote.Visible = CBool(drP("AplicaLote"))
|
||||||
|
TxtnFechaCaducidad.Visible = CBool(drP("AplicaCaducidad"))
|
||||||
|
ThFechaCaducidad.Visible = CBool(drP("AplicaCaducidad"))
|
||||||
|
If Not String.IsNullOrWhiteSpace(UsuarioActual.Empresa.Funcionalidad(147)) Then ThFechaCaducidad.InnerText = UsuarioActual.Empresa.Funcionalidad(147)
|
||||||
|
TdFechaCaducidad.Visible = CBool(drP("AplicaCaducidad"))
|
||||||
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
DdlUnidad.Items.Clear()
|
DdlUnidad.Items.Clear()
|
||||||
|
|||||||
@@ -294,9 +294,15 @@
|
|||||||
<asp:UpdatePanel ID="UpBusqueda" runat="server" UpdateMode="Conditional">
|
<asp:UpdatePanel ID="UpBusqueda" runat="server" UpdateMode="Conditional">
|
||||||
<ContentTemplate>
|
<ContentTemplate>
|
||||||
<div class="row" style="display:flex; justify-content:flex-end; padding-bottom: 12px; padding-right: 15px;">
|
<div class="row" style="display:flex; justify-content:flex-end; padding-bottom: 12px; padding-right: 15px;">
|
||||||
|
<asp:UpdatePanel class="col-md-4" style="max-width: 300px;" ID="UPPIndicadorCompradoRecibido" UpdateMode="Conditional" runat="server">
|
||||||
|
<ContentTemplate>
|
||||||
|
<div id="DivIndicadoresCompradoRecibido" align="Right" runat="server" visible="false" style="max-width:300px!important">
|
||||||
|
</div>
|
||||||
|
</ContentTemplate>
|
||||||
|
</asp:UpdatePanel>
|
||||||
|
|
||||||
<asp:UpdatePanel class="col-md-4" style="min-width: 450px;" ID="UPPIndicador" UpdateMode="Conditional" runat="server">
|
<asp:UpdatePanel class="col-md-4" style="min-width: 450px;" ID="UPPIndicador" UpdateMode="Conditional" runat="server">
|
||||||
<ContentTemplate>
|
<ContentTemplate>
|
||||||
<div id="DivIndicadores" align="Right" runat="server" visible="false">
|
<div id="DivIndicadores" align="Right" runat="server" visible="false">
|
||||||
</div>
|
</div>
|
||||||
</ContentTemplate>
|
</ContentTemplate>
|
||||||
|
|||||||
@@ -398,6 +398,7 @@ Partial Class RepOC
|
|||||||
If UsuarioActual.TienePermisoProceso(227) Then
|
If UsuarioActual.TienePermisoProceso(227) Then
|
||||||
DivIndicadores.Visible = True
|
DivIndicadores.Visible = True
|
||||||
DivIndicadores.InnerHtml = String.Empty
|
DivIndicadores.InnerHtml = String.Empty
|
||||||
|
|
||||||
Dim Cantidad As Integer = DtOC.COUNT("CveOrdenCompra")
|
Dim Cantidad As Integer = DtOC.COUNT("CveOrdenCompra")
|
||||||
Dim TotalPesos As Double = DtOC.SUM("Total", "CveMoneda = 1")
|
Dim TotalPesos As Double = DtOC.SUM("Total", "CveMoneda = 1")
|
||||||
Dim TotalDolares As Double = DtOC.SUM("Total", "CveMoneda = 2")
|
Dim TotalDolares As Double = DtOC.SUM("Total", "CveMoneda = 2")
|
||||||
@@ -405,6 +406,17 @@ Partial Class RepOC
|
|||||||
|
|
||||||
MuestraIndicador(DivIndicadores, "green-haze", "fa fa-money", "Órdenes de Compra", Cantidad.ToString, "Cantidad", "$" + Total.FormatoNumero, "Total", "$" + TotalPesos.FormatoNumero, "Pesos", "$" + TotalDolares.FormatoNumero, "Dólares")
|
MuestraIndicador(DivIndicadores, "green-haze", "fa fa-money", "Órdenes de Compra", Cantidad.ToString, "Cantidad", "$" + Total.FormatoNumero, "Total", "$" + TotalPesos.FormatoNumero, "Pesos", "$" + TotalDolares.FormatoNumero, "Dólares")
|
||||||
UPPIndicador.Update()
|
UPPIndicador.Update()
|
||||||
|
|
||||||
|
|
||||||
|
DivIndicadoresCompradoRecibido.Visible = True
|
||||||
|
DivIndicadoresCompradoRecibido.InnerHtml = String.Empty
|
||||||
|
|
||||||
|
Dim Recibidos As Decimal = DtOC.SUM("Comprado")
|
||||||
|
Dim Comprados As Decimal = DtOC.SUM("Recibido")
|
||||||
|
|
||||||
|
MuestraIndicadorCompradoRecibido(DivIndicadoresCompradoRecibido, "blue", "fa fa-truck", "Almacén", Recibidos.ToString("###,###,###.00"), "Comprados", "", "Recibidos", Comprados.ToString("###,###,###.00"), "")
|
||||||
|
UPPIndicadorCompradoRecibido.Update()
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If DtOC IsNot Nothing AndAlso DtOC.Rows.Count > 0 Then
|
If DtOC IsNot Nothing AndAlso DtOC.Rows.Count > 0 Then
|
||||||
@@ -432,6 +444,9 @@ Partial Class RepOC
|
|||||||
GvConsultar.Columns(15).Visible = False
|
GvConsultar.Columns(15).Visible = False
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
End If
|
End If
|
||||||
OC.Dispose()
|
OC.Dispose()
|
||||||
GvConsultar.DataBind()
|
GvConsultar.DataBind()
|
||||||
@@ -638,6 +653,7 @@ Partial Class RepOC
|
|||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
#Region "Indicadores"
|
#Region "Indicadores"
|
||||||
|
|
||||||
Private Sub MuestraIndicador(DIV As HtmlGenericControl, Color As String, Icono As String, Titulo As String, C1 As String, CT1 As String, C2 As String, CT2 As String, C3 As String, CT3 As String, C4 As String, CT4 As String)
|
Private Sub MuestraIndicador(DIV As HtmlGenericControl, Color As String, Icono As String, Titulo As String, C1 As String, CT1 As String, C2 As String, CT2 As String, C3 As String, CT3 As String, C4 As String, CT4 As String)
|
||||||
Dim htmldiv As New StringBuilder
|
Dim htmldiv As New StringBuilder
|
||||||
htmldiv.AppendFormat("{0}<div class='dashboard-stat {1}'><div class='visual'><i class='{2}' '=''></i></div>", DIV.InnerHtml, Color, Icono)
|
htmldiv.AppendFormat("{0}<div class='dashboard-stat {1}'><div class='visual'><i class='{2}' '=''></i></div>", DIV.InnerHtml, Color, Icono)
|
||||||
@@ -648,6 +664,24 @@ Partial Class RepOC
|
|||||||
htmldiv.AppendFormat("</div></div></div>")
|
htmldiv.AppendFormat("</div></div></div>")
|
||||||
DIV.InnerHtml = htmldiv.ToString
|
DIV.InnerHtml = htmldiv.ToString
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Private Sub MuestraIndicadorCompradoRecibido(DIV As HtmlGenericControl, Color As String, Icono As String, Titulo As String, C1 As String, CT1 As String, C2 As String, CT2 As String, C3 As String, CT3 As String)
|
||||||
|
Dim htmldiv As New StringBuilder
|
||||||
|
htmldiv.AppendFormat("{0}<div class='dashboard-stat {1}'><div class='visual'><i class='{2}' '=''></i></div>", DIV.InnerHtml, Color, Icono)
|
||||||
|
htmldiv.AppendFormat("<div class='details'><div class='number'>{0}</div><div class='desc'>", Titulo)
|
||||||
|
|
||||||
|
htmldiv.AppendFormat("<label class='indicadortipo4 col-md-6 tooltips' data-original-title='{0}'>{1}</label>", "", "")
|
||||||
|
htmldiv.AppendFormat("<label class='indicadortipo4 col-md-6 tooltips' data-original-title='{0}'>{1}</label>", CT1, C1)
|
||||||
|
htmldiv.AppendFormat("<label class='indicadortipo4 col-md-6 tooltips' data-original-title='{0}'>{1}</label>", "", "")
|
||||||
|
htmldiv.AppendFormat("<label class='indicadortipo4 col-md-6 tooltips' data-original-title='{0}'>{1}</label>", CT2, C2)
|
||||||
|
htmldiv.AppendFormat("<label class='indicadortipo4 col-md-6 tooltips' data-original-title='{0}'>{1}</label>", "", "")
|
||||||
|
htmldiv.AppendFormat("<label class='indicadortipo4 col-md-6 tooltips' data-original-title='{0}'>{1}</label>", CT3, C3)
|
||||||
|
'htmldiv.AppendFormat("<label class='indicadortipo4 col-md-6 tooltips' data-original-title='{0}'>{1}</label>", CT4, C4)
|
||||||
|
htmldiv.AppendFormat("</div></div></div>")
|
||||||
|
DIV.InnerHtml = htmldiv.ToString
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
End Class
|
End Class
|
||||||
|
|||||||
107
RH/Personal.aspx
107
RH/Personal.aspx
@@ -537,6 +537,9 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="col-md-4 " style="margin-top: 20px;">
|
||||||
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</ContentTemplate>
|
</ContentTemplate>
|
||||||
@@ -640,8 +643,32 @@
|
|||||||
<asp:Label AssociatedControlID="DdlPuesto" runat="server" Text="Puesto:"></asp:Label>
|
<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>
|
<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>
|
<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>
|
||||||
|
<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" >
|
<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: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>
|
<asp:ListItem Selected="True" Text="Sin asignar Ruta" Value="-1"></asp:ListItem>
|
||||||
@@ -921,6 +948,80 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</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>
|
||||||
|
|
||||||
<div class="col-md-4 ">
|
<div class="col-md-4 ">
|
||||||
@@ -4089,7 +4190,7 @@
|
|||||||
<div class="portlet-title">
|
<div class="portlet-title">
|
||||||
<div class="caption">
|
<div class="caption">
|
||||||
<i class="icon-pin"></i>
|
<i class="icon-pin"></i>
|
||||||
<span class="caption-subject uppercase">Documentos Firma de contratos</span>
|
<span class="caption-subject uppercase">Documentos</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="tools"><a href="javascript;" class="collapse" data-original-title="" title=""></a></div>
|
<div class="tools"><a href="javascript;" class="collapse" data-original-title="" title=""></a></div>
|
||||||
<div class="actions ">
|
<div class="actions ">
|
||||||
@@ -4834,7 +4935,7 @@
|
|||||||
<h4 class="modal-title">
|
<h4 class="modal-title">
|
||||||
<asp:UpdatePanel ID="UpTituloFirma" runat="server" UpdateMode="Conditional">
|
<asp:UpdatePanel ID="UpTituloFirma" runat="server" UpdateMode="Conditional">
|
||||||
<ContentTemplate>
|
<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>
|
</ContentTemplate>
|
||||||
</asp:UpdatePanel>
|
</asp:UpdatePanel>
|
||||||
</h4>
|
</h4>
|
||||||
|
|||||||
@@ -69,6 +69,44 @@ Partial Class RH_Personal
|
|||||||
ViewState("DTCuentasBancos") = value
|
ViewState("DTCuentasBancos") = value
|
||||||
End Set
|
End Set
|
||||||
End Property
|
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
|
Private Property DTLicencias As DataTable
|
||||||
Get
|
Get
|
||||||
Return CType(ViewState("DTLicencias"), DataTable)
|
Return CType(ViewState("DTLicencias"), DataTable)
|
||||||
@@ -972,6 +1010,12 @@ Partial Class RH_Personal
|
|||||||
CargaRegistroPatronal()
|
CargaRegistroPatronal()
|
||||||
CargaOutSourcing()
|
CargaOutSourcing()
|
||||||
CargaDDlPersonalRefsReference()
|
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
|
If Request("CvePersonal") IsNot Nothing AndAlso IsNumeric(Request("CvePersonal")) AndAlso Request("CvePersonal").ToEntero() > 0 Then
|
||||||
ViewState("CvePersonal") = Request("CvePersonal")
|
ViewState("CvePersonal") = Request("CvePersonal")
|
||||||
DdlFormapagovacaciones_SelectedIndexChanged(Nothing, Nothing)
|
DdlFormapagovacaciones_SelectedIndexChanged(Nothing, Nothing)
|
||||||
@@ -1570,23 +1614,20 @@ Partial Class RH_Personal
|
|||||||
|
|
||||||
Private Sub CargaOutSourcing()
|
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
|
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.DataSource = DtModulosEmpresa.FiltraParametros("CveEmpresa in (7,11,12,122,145,113)")
|
||||||
DdlEmpresaAsignada.DataBind()
|
DdlEmpresaAsignada.DataBind()
|
||||||
DvOutsourcing.Visible = True
|
DvOutsourcing.Visible = True
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
DdlEmpresaAsignada.Items.Insert(0, New ListItem("Seleccione uno", "-1"))
|
DdlEmpresaAsignada.Items.Insert(0, New ListItem("Seleccione uno", "-1"))
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
@@ -4198,7 +4239,7 @@ Partial Class RH_Personal
|
|||||||
If CvePersonal > 0 Then
|
If CvePersonal > 0 Then
|
||||||
Dim objRH As New ClsEdocumentacion()
|
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
|
DTDocumentacion = objRH.DtResultados
|
||||||
End If
|
End If
|
||||||
|
|
||||||
@@ -8423,5 +8464,340 @@ Partial Class RH_Personal
|
|||||||
|
|
||||||
'End Sub
|
'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
|
End Class
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user