Commit inicial Ventas Productivo
This commit is contained in:
474
OC/RepCotizacionesDetalle.aspx
Normal file
474
OC/RepCotizacionesDetalle.aspx
Normal file
@@ -0,0 +1,474 @@
|
||||
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RepCotizacionesDetalle.aspx.vb" Inherits="PopOCCotizacionesDetalle" %>
|
||||
|
||||
<%--<%@ MasterType VirtualPath="~/Site.master" %>--%>
|
||||
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="HB" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="E" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
|
||||
|
||||
<asp:UpdatePanel runat="server">
|
||||
<ContentTemplate>
|
||||
|
||||
|
||||
<table style="width: 797px!important">
|
||||
<tr>
|
||||
<th class="Titulos" colspan="4">Carga de Cotizaciones</th>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<br />
|
||||
|
||||
<div class="row" style="vertical-align: top">
|
||||
|
||||
<div class="col-sm-6">
|
||||
<div class="row">
|
||||
|
||||
<%--PROVEEDORES--%>
|
||||
<div class="col-sm-12 rowpadding">
|
||||
<div class="portlet light smmallpadding bordered">
|
||||
|
||||
<div class="portlet-title">
|
||||
<div class="caption">
|
||||
<i class="fa fa-truck"></i><span class="caption-subject bold uppercase">Proveedores</span>
|
||||
</div>
|
||||
<div class="tools">
|
||||
<div style="display: inline-block">
|
||||
</div>
|
||||
<a href="javascript:;" class="collapse" data-original-title="" title=""></a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="portlet-body">
|
||||
<table>
|
||||
<tr>
|
||||
<td>
|
||||
<label>Clasificación:</label></td>
|
||||
<td>
|
||||
<div>
|
||||
<asp:DropDownList ID="CboClasificacionProveedor" CssClass="select2me" runat="server" AutoPostBack="true" DataTextField="ProveedorClasificacion" DataValueField="CveProveedorClasificacion"
|
||||
Class="table-group-action-input form-control input-inline input-small input-sm" Style="width: 200px !important;">
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<label>Proveedor:</label>
|
||||
</td>
|
||||
<td>
|
||||
<div>
|
||||
<asp:DropDownList ID="CboProveedores" CssClass="select2me" runat="server" DataTextField="RazonSocial" DataValueField="CveProveedor"
|
||||
Class="table-group-action-input form-control input-inline input-small input-sm" Style="width: 200px !important;">
|
||||
</asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RFVProveedor" runat="server" ControlToValidate="CboProveedores"
|
||||
Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Proveedor''</b> es necesario, por favor ingréselo."
|
||||
ValidationGroup="GrpDetalleGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCEProveedor" runat="server" HighlightCssClass="vco"
|
||||
TargetControlID="RFVProveedor" Width="300px">
|
||||
</ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<%--ARCHIVO--%>
|
||||
<div class="col-sm-12 rowpadding" style="text-align:center;">
|
||||
Archivo:
|
||||
<asp:HyperLink ID="HplArchivo" runat="server" ToolTip="Descargar" Visible="false" Height="20px">[HplArchivo]</asp:HyperLink>
|
||||
|
||||
<div class="btn-file btn green">
|
||||
<i class="fa fa-plus"></i>
|
||||
<span>Seleccionar Archivo</span>
|
||||
<asp:FileUpload ID="FUArchivo" runat="server" onchange="$('#FUTxtt').text(this.value);" />
|
||||
</div>
|
||||
<span id="FUTxtt"></span>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<%--DATOS DE COTIZACION--%>
|
||||
<div class="col-sm-6 rowpadding">
|
||||
|
||||
<div class="portlet light smmallpadding bordered">
|
||||
|
||||
<div class="portlet-title">
|
||||
<div class="caption">
|
||||
<i class="fa fa-money"></i><span class="caption-subject bold uppercase">Datos contización</span>
|
||||
</div>
|
||||
<div class="tools">
|
||||
<div style="display: inline-block">
|
||||
</div>
|
||||
<a href="javascript:;" class="collapse" data-original-title="" title=""></a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="portlet-body">
|
||||
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<td>
|
||||
<label>Folio:</label></td>
|
||||
<td>
|
||||
<div>
|
||||
<asp:TextBox AutoComplete="off" ID="TxtFolio" runat="server" Style="width: 200px !important;"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVFolio" runat="server" ControlToValidate="TxtFolio"
|
||||
Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Folio''</b> es necesario, por favor ingréselo."
|
||||
ValidationGroup="GrpDetalleGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOFolio" runat="server" HighlightCssClass="vco"
|
||||
TargetControlID="RFVFolio" Width="300px">
|
||||
</ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<label>Fecha Cotización:</label></td>
|
||||
<td>
|
||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 120px !important; padding: 0px;">
|
||||
<asp:TextBox AutoComplete="off" ID="TxtFecha" runat="server" CausesValidation="true" MaxLength="10" ValidationGroup="GrpGuardar" Style="width: 183px !important;"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="imgFecha" Style="margin-left: -10px!important" class="btn default" Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
|
||||
|
||||
<ajax:MaskedEditExtender ID="MEEFecha" runat="server" AcceptNegative="Left" CultureAMPMPlaceholder="" CultureCurrencySymbolPlaceholder="" CultureDateFormat="" CultureDatePlaceholder=""
|
||||
CultureDecimalPlaceholder="" CultureThousandsPlaceholder="" CultureTimePlaceholder=""
|
||||
DisplayMoney="Left" Enabled="True" ErrorTooltipEnabled="True" Mask="99/99/9999"
|
||||
MaskType="Date" TargetControlID="TxtFecha" />
|
||||
<ajax:MaskedEditValidator ID="MEVFecha" runat="server" ControlExtender="MEEFecha"
|
||||
ControlToValidate="TxtFecha" Display="None" EmptyValueBlurredText="*" EmptyValueMessage="Fecha de Inicio de pagos Requerida"
|
||||
ErrorMessage="" InvalidValueBlurredMessage="*" InvalidValueMessage="Fecha Inválida"
|
||||
IsValidEmpty="False" TooltipMessage="Ingrese Fecha" ValidationGroup="GrpGuardar" />
|
||||
<ajax:CalendarExtender ID="CEFecha" runat="server" Enabled="True" PopupButtonID="imgFecha" PopupPosition="Left" TargetControlID="TxtFecha"></ajax:CalendarExtender>
|
||||
<ajax:ValidatorCalloutExtender ID="VcoFechaI" runat="server" HighlightCssClass="vco" TargetControlID="MEVFecha" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<label>Moneda:</label></td>
|
||||
<td>
|
||||
<div>
|
||||
<asp:DropDownList ID="ddlMoneda" DataValueField="CveMoneda" DataTextField="Moneda" Class="table-group-action-input form-control input-inline input-small input-sm select2me" Style="width: 200px !important;" runat="server"></asp:DropDownList>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<label>Días de Crédito:</label></td>
|
||||
<td>
|
||||
<div>
|
||||
<asp:TextBox AutoComplete="off" runat="server" ID="TxtDiasCredito" Style="width: 200px !important;"></asp:TextBox>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<hr />
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<asp:GridView ID="GvDC" runat="server" AutoGenerateColumns="False" DataKeyNames="CveOrdenCompra, CvePS, Cantidad, CveUnidadMedida,CveOrdenCompraDetalle"
|
||||
ShowHeader="True" CssClass="table table-striped table-hover Widthall" Style="margin-top: -10px; text-align: center;" GridLines="None">
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderText="Cant.">
|
||||
<ItemTemplate>
|
||||
<asp:TextBox AutoComplete="off" ID="TxtCant" runat="server" Width="35" ReadOnly="True" Style="text-align: right; border: none; background-color: #fff; background: transparent;" Text='<%# Eval("Cantidad", "{0:N2}") %>'></asp:TextBox>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="40" />
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="Unidad">
|
||||
<EditItemTemplate>
|
||||
<asp:DropDownList ID="CboUnidadMedidaEdit" runat="server" DataTextField="Abreviatura"
|
||||
DataValueField="CveUnidadMedida" Class="table-group-action-input form-control input-inline input-small input-sm" Style="width: 70px !important;">
|
||||
</asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RFVUnidadMedida" runat="server" ControlToValidate="CboUnidadMedidaEdit"
|
||||
Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Unidad de Medida''</b> es necesario, por favor ingréselo."
|
||||
ValidationGroup="GrpEditGuardar"></asp:RequiredFieldValidator>
|
||||
</EditItemTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LA" runat="server" Text='<%# Bind("Abreviatura") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="50px" />
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="Descripción">
|
||||
<EditItemTemplate>
|
||||
<asp:TextBox AutoComplete="off" ID="TxtDescripDetalleEdit" runat="server" Text='<%# Bind("Descripcion") %>'
|
||||
Width="345px"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVDescripcion" runat="server" ControlToValidate="TxtDescripDetalleEdit"
|
||||
Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Descripción''</b> es necesario, por favor ingréselo."
|
||||
ValidationGroup="GrpEditGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOEmpresa" runat="server" HighlightCssClass="vco"
|
||||
TargetControlID="RFVDescripcion" Width="300px">
|
||||
</ajax:ValidatorCalloutExtender>
|
||||
</EditItemTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LDescrip" runat="server" Text='<%# Bind("PS") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="250px" HorizontalAlign="Left" />
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:BoundField DataField="Observacion" HeaderText="Observación" />
|
||||
<asp:TemplateField ShowHeader="False" HeaderText="Cantidad Surtir">
|
||||
<EditItemTemplate>
|
||||
</EditItemTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:TextBox AutoComplete="off" ID="TxtCantidadSurtir" runat="server" Width="55px" Style="text-align: right" Text="" CausesValidation="true"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVCantidadSurtir" runat="server" ControlToValidate="TxtCantidadSurtir" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cantidad a Surtir''</b> es necesario, por favor ingréselo." ValidationGroup="GrpEditGuardar" Enabled="false"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCECantidadSurtir" runat="server" HighlightCssClass="vco" TargetControlID="RFVCantidadSurtir" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
<asp:RangeValidator ID="RVCantidad" runat="server" ControlToValidate="TxtCantidadSurtir" Display="None" Type="Double" MinimumValue="0.01" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cantidad Surtir''</b> debe ser mayor a cero y menor que la cantidad solicitada" ValidationGroup="GrpEditGuardar" Enabled="false"></asp:RangeValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCECantidad" runat="server" HighlightCssClass="vco" TargetControlID="RVCantidad" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
<ajax:FilteredTextBoxExtender ID="FilCantidadSurtir" runat="server" TargetControlID="TxtCantidadSurtir" FilterType="Custom, Numbers" ValidChars="." />
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="55px" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField ShowHeader="False" HeaderText="Fecha Entrega">
|
||||
<EditItemTemplate>
|
||||
</EditItemTemplate>
|
||||
<ItemTemplate>
|
||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 120px !important; padding: 0px;">
|
||||
<asp:TextBox ID="txtFechaEntrega" runat="server" CssClass="form-control" CausesValidation="true" Style="width: 87px" MaxLength="10"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="ImgFechaFinContrato" Style="margin-left: -10px!important" class="btn default" Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
<ajax:MaskedEditExtender ID="MEEFechaEntrega" runat="server" TargetControlID="txtFechaEntrega" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender runat="server" ID="CEFechaEntrega" TargetControlID="txtFechaEntrega" PopupButtonID="ImgFechaFinContrato" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
<asp:CompareValidator ID="CVImgFechaEntrega" runat="server" Format="dd/MM/yyyy" ControlToValidate="txtFechaEntrega" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo no tiene el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="GrpEditGuardar" Enabled="false"></asp:CompareValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOImgFechaEntrega" runat="server" HighlightCssClass="vco" TargetControlID="CVImgFechaEntrega" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
|
||||
<asp:RequiredFieldValidator ID="RFVtxtFechaEntrega" runat="server" ControlToValidate="txtFechaEntrega" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha entrega''</b> es necesario, por favor ingréselo." ValidationGroup="GrpEditGuardar" Enabled="false"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCtxtFechaEntrega" runat="server" HighlightCssClass="vco" TargetControlID="RFVtxtFechaEntrega" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="100px" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField ShowHeader="False" HeaderText="Precio Unitario">
|
||||
<EditItemTemplate>
|
||||
</EditItemTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:TextBox AutoComplete="off" ID="TxtPU" runat="server" Width="70px" Style="text-align: right" Text='<%# If(Not EsNuevo, Eval("PU", "{0:###,###,###.##}"), "") %>'></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVTxtPU" runat="server" ControlToValidate="TxtPU" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Precio unitario''</b> es necesario, por favor ingréselo." ValidationGroup="GrpEditGuardar" Enabled="false"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCEPU" runat="server" HighlightCssClass="vco" TargetControlID="RFVTxtPU" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
<ajax:FilteredTextBoxExtender ID="FilTxtPU" runat="server" TargetControlID="TxtPU" FilterType="Custom, Numbers" ValidChars="." />
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="70px" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField ShowHeader="False" HeaderText="Importe">
|
||||
<EditItemTemplate>
|
||||
</EditItemTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:TextBox AutoComplete="off" ID="TxtImporte" runat="server" Width="75px" ReadOnly="True" Style="text-align: right; border: none; background-color: #fff; background: transparent;" Text='<%# If(Not EsNuevo, Eval("Importe", "{0:###,###,###.##}"), "") %>'></asp:TextBox>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="75px" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField ShowHeader="False" HeaderText="Observación">
|
||||
<EditItemTemplate>
|
||||
</EditItemTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:TextBox AutoComplete="off" ID="TxtObservacion" runat="server" Width="75px" Style="text-align: right" Text=""></asp:TextBox>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="100px" />
|
||||
</asp:TemplateField>
|
||||
<%--<asp:BoundField DataField="Happy" HeaderText="Happy" />--%>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<hr />
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12" style="text-align: center">
|
||||
<asp:Button ID="BtnGuardar" runat="server" Text="Guardar" Visible="false" ValidationGroup="GrpEditGuardar" class="btn btn-primary" CausesValidation="true" />
|
||||
<asp:Button ID="BtnEliminar" runat="server" Text="Eliminar" Visible="false" ValidationGroup="GrpEliminar" CssClass="btn btn-danger" data-toggle="confirmation" data-popout="true" data-original-title="Confirmar" data-btn-ok-label="si" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
||||
<script>
|
||||
function Ir() {
|
||||
try {
|
||||
parent.CargaDatosCotizaciones();
|
||||
parent.tb_remove();
|
||||
|
||||
} catch (ex) {
|
||||
console.log(ex.message);
|
||||
}
|
||||
}
|
||||
|
||||
function ClientValidateFechaEntrega(source, arguments) {
|
||||
var txtCantidadSurtir = document.getElementById(source.txtCantidadSurtir);
|
||||
|
||||
if (txtCantidadSurtir.value == 0) {
|
||||
arguments.IsValid = false;
|
||||
} else {
|
||||
if (arguments.Value == "" || arguments.Value == "__/__/____")
|
||||
{ arguments.IsValid = false; }
|
||||
else
|
||||
{ arguments.IsValid = true; }
|
||||
}
|
||||
}
|
||||
|
||||
function ClientValidatePU(source, arguments) {
|
||||
|
||||
arguments.IsValid = true
|
||||
|
||||
}
|
||||
|
||||
function isNumeric(n) {
|
||||
return !isNaN(parseFloat(n)) && isFinite(n);
|
||||
}
|
||||
|
||||
function CalculaImporte(Cant, tPU, Imp) {
|
||||
var Cantidad = ToDouble(Cant.value);
|
||||
var PU = ToDouble(tPU.value);
|
||||
var Importe = Cantidad * PU;
|
||||
|
||||
Imp.value = ToDouble(Importe);
|
||||
}
|
||||
|
||||
|
||||
|
||||
function validacionRow(objControl, tipo) {
|
||||
|
||||
var eRow;
|
||||
|
||||
if (tipo == 1) {
|
||||
eRow = $(objControl).parent().parent();
|
||||
} else if (tipo == 2) {
|
||||
eRow = $(objControl).parent().parent().parent();
|
||||
}
|
||||
|
||||
var arregloControles = $(eRow).attr("data-controles").split(',');
|
||||
var arregloValidadores = $(eRow).attr("data-validadores").split(',');
|
||||
var activarValidadores = false;
|
||||
var ControlConValor = "";
|
||||
|
||||
var controleslen = arregloControles.length;
|
||||
var validadoreslen = arregloValidadores.length;
|
||||
|
||||
for (var i = 0; i < controleslen; i++) {
|
||||
|
||||
var controlName = String.format("{0}{1}", "#", arregloControles[i]);
|
||||
|
||||
controlName = controlName.replace("'", "")
|
||||
|
||||
if ($(controlName).val().length > 0) {
|
||||
|
||||
activarValidadores = true;
|
||||
$(controlName).IsValid = false;
|
||||
console.log('control con valor ' + $(controlName).val() + ' ' + $(controlName).val().length + ' ' + controlName);
|
||||
break;
|
||||
|
||||
} else {
|
||||
$(controlName).IsValid = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (activarValidadores) {
|
||||
|
||||
for (var v = 0; v < validadoreslen; v++) {
|
||||
|
||||
var ValidatorName = arregloValidadores[v];
|
||||
var procesoCorrecto = true;
|
||||
|
||||
ValidatorName = ValidatorName.replace("'", "");
|
||||
|
||||
try {
|
||||
|
||||
document.getElementById(ValidatorName).disabled = false;
|
||||
ValidatorEnable($get(ValidatorName), true);
|
||||
|
||||
} catch (err) {
|
||||
|
||||
console.log(ValidatorName + " - " + err.message);
|
||||
procesoCorrecto = false;
|
||||
|
||||
}
|
||||
|
||||
if (procesoCorrecto) {
|
||||
console.log('validadores activados');
|
||||
} else {
|
||||
console.log('Error al activar validadores');
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
} else {
|
||||
for (var v = 0; v < validadoreslen; v++) {
|
||||
|
||||
var ValidatorName = arregloValidadores[v];
|
||||
var procesoCorrecto = true;
|
||||
|
||||
ValidatorName = ValidatorName.replace("'", "");
|
||||
|
||||
|
||||
try {
|
||||
document.getElementById(ValidatorName).disabled = true;
|
||||
ValidatorEnable($get(ValidatorName), false);
|
||||
} catch (err) {
|
||||
console.log(ValidatorName + " - " + err.message);
|
||||
procesoCorrecto = false;
|
||||
}
|
||||
|
||||
if (procesoCorrecto) {
|
||||
console.log('Validadores desactivados');
|
||||
} else {
|
||||
console.log('Error al desactivar validadores');
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function FechaActualddMMyyy() {
|
||||
var today = new Date();
|
||||
var dd = today.getDate();
|
||||
var mm = today.getMonth() + 1;
|
||||
var yyyy = today.getFullYear();
|
||||
if (dd < 10) {
|
||||
dd = '0' + dd;
|
||||
}
|
||||
if (mm < 10) {
|
||||
mm = '0' + mm;
|
||||
}
|
||||
return today = dd + '/' + mm + '/' + yyyy;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
</asp:Content>
|
||||
Reference in New Issue
Block a user