Error al consultar precios masivamente.
This commit is contained in:
@@ -178,10 +178,10 @@
|
||||
<asp:BoundField DataField="PrecioLista" NullDisplayText="N/A" ItemStyle-Width="10%" HeaderText="Importe" DataFormatString="$ {0:N2}" ItemStyle-HorizontalAlign="right" />
|
||||
<asp:TemplateField HeaderText="">
|
||||
<ItemTemplate>
|
||||
<asp:TextBox ID="TxtPrecio" runat="server" Text='<%# Eval("PrecioLista", "{0:N2}")%>' CssClass="CssCamviaPrecio" MaxLength="39" Width="60px"></asp:TextBox>
|
||||
<ajax:FilteredTextBoxExtender runat="server" TargetControlID="TxtPrecio" FilterType="Numbers,Custom" ValidChars="." />
|
||||
<asp:TextBox ID="TxtPrecio" runat="server" Text='<%# Eval("PrecioLista", "{0:0.######}")%>' CssClass="CssCamviaPrecio" MaxLength="39" Width="60px" onkeypress="return onlyNumberKey(event)"></asp:TextBox>
|
||||
<%--<ajax:FilteredTextBoxExtender runat="server" TargetControlID="TxtPrecio" FilterType="Numbers,Custom" ValidChars="." />
|
||||
<asp:RegularExpressionValidator ID="REVTxtPrecio" runat="server" ControlToValidate="TxtPrecio" Display="None" EnableClientScript="True" ErrorMessage="El campo <b>''PrecioLista''</b> no tiene el formato correcto, por favor corrija e intente de nuevo (Solo formato numérico)." ValidationGroup="GrpGuardar" ValidationExpression="^[0-9]{1,15}(?:\.[0-9]{1,4})?$" />
|
||||
<ajax:ValidatorCalloutExtender ID="VCPrecio" runat="server" HighlightCssClass="vco" TargetControlID="REVTxtPrecio" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
<ajax:ValidatorCalloutExtender ID="VCPrecio" runat="server" HighlightCssClass="vco" TargetControlID="REVTxtPrecio" Width="300px"></ajax:ValidatorCalloutExtender>--%>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Precio Mínimo" ItemStyle-Width="10%" ItemStyle-HorizontalAlign="Right">
|
||||
@@ -191,10 +191,10 @@
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="">
|
||||
<ItemTemplate>
|
||||
<asp:TextBox ID="TxtPrecioMinimo" runat="server" Text='<%# Eval("PrecioMinimo", "{0:N2}")%>' CssClass="CssCamviaPrecio" MaxLength="39" Width="60px"></asp:TextBox>
|
||||
<ajax:FilteredTextBoxExtender runat="server" TargetControlID="TxtPrecioMinimo" FilterType="Numbers,Custom" ValidChars="." />
|
||||
<asp:TextBox ID="TxtPrecioMinimo" runat="server" Text='<%# Eval("PrecioMinimo", "{0:0.######}")%>' CssClass="CssCamviaPrecio" MaxLength="39" Width="60px" onkeypress="return onlyNumberKey(event)"></asp:TextBox>
|
||||
<%-- <ajax:FilteredTextBoxExtender runat="server" TargetControlID="TxtPrecioMinimo" FilterType="Numbers,Custom" ValidChars="." />
|
||||
<asp:RegularExpressionValidator ID="REVTxtPrecioMinimo" runat="server" ControlToValidate="TxtPrecioMinimo" Display="None" EnableClientScript="True" ErrorMessage="El campo <b>''PrecioLista''</b> no tiene el formato correcto, por favor corrija e intente de nuevo (Solo formato numérico)." ValidationGroup="GrpGuardar" ValidationExpression="^[0-9]{1,15}(?:\.[0-9]{1,4})?$" />
|
||||
<ajax:ValidatorCalloutExtender ID="VCTxtPrecioMinimo" runat="server" HighlightCssClass="vco" TargetControlID="REVTxtPrecioMinimo" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
<ajax:ValidatorCalloutExtender ID="VCTxtPrecioMinimo" runat="server" HighlightCssClass="vco" TargetControlID="REVTxtPrecioMinimo" Width="300px"></ajax:ValidatorCalloutExtender>--%>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
@@ -239,7 +239,7 @@
|
||||
<div class="col-md-12">
|
||||
<div class="col-md-3" style="text-align: left">
|
||||
<input id="ChkSeleccionarTodos" type="checkbox" title="Seleccionar Todos" onclick="SeleccionarTodosChkGvSucursa()" />
|
||||
Seleccionar Todos
|
||||
Seleccionar Todos
|
||||
|
||||
</div>
|
||||
<div class="col-md-9" style="text-align: right">
|
||||
@@ -266,7 +266,7 @@
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Precio Mínimo">
|
||||
<ItemTemplate>
|
||||
<asp:TextBox ID="TxtPrecioMinimo" Style="text-align: right" runat="server" CausesValidation="true" MaxLength="39" Text='<%# Eval("PrecioMinimo", "{0:N2}")%>' ValidationGroup="GrpEditGuardarO" Width="90px" CssClass="CssMCamviaPrecio"></asp:TextBox>
|
||||
<asp:TextBox ID="TxtPrecioMinimo" Style="text-align: right" runat="server" CausesValidation="true" MaxLength="39" Text='<%# Eval("PrecioMinimo", "{0:0.######}")%>' ValidationGroup="GrpEditGuardarO" Width="90px" CssClass="CssMCamviaPrecio"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVTxtPrecioMinimo" runat="server" ControlToValidate="TxtPrecioMinimo" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Importe''</b> es necesario, por favor ingréselo." ValidationGroup="GrpEditGuardarS"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOTxtPrecioMinimo" runat="server" HighlightCssClass="vco" TargetControlID="RFVTxtPrecioMinimo" Width="100px"></ajax:ValidatorCalloutExtender>
|
||||
<ajax:FilteredTextBoxExtender ID="FilTxtPrecioMinimo" runat="server" TargetControlID="TxtPrecioMinimo" FilterType="Numbers,Custom" ValidChars="." InvalidChars=",-+" />
|
||||
@@ -364,84 +364,99 @@
|
||||
</div>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
||||
<script>
|
||||
|
||||
<script>
|
||||
|
||||
function onlyNumberKey(evt) {
|
||||
|
||||
// Only ASCII character in that range allowed
|
||||
var ASCIICode = (evt.which) ? evt.which : evt.keyCode
|
||||
if (ASCIICode > 31 && (ASCIICode < 48 || ASCIICode > 57))
|
||||
{
|
||||
if (ASCIICode == 46) {
|
||||
return true
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
function CambiaImporte() {
|
||||
var topLevelElem = document.getElementById("form1");
|
||||
var checks = topLevelElem.getElementsByTagName("input");
|
||||
var idd = '';
|
||||
|
||||
var valor = $('#<%= TxtImporte.ClientID %>').val();
|
||||
|
||||
var topLevelElem = document.getElementById("form1");
|
||||
var checks = topLevelElem.getElementsByTagName("input");
|
||||
var idd = '';
|
||||
|
||||
var valor = $('#<%= TxtImporte.ClientID %>').val();
|
||||
|
||||
for (var i = 0; i < checks.length; i++) {
|
||||
if (checks[i].type == "checkbox") {
|
||||
debugger;
|
||||
|
||||
debugger;
|
||||
|
||||
if (checks[i].checked) {
|
||||
idd = checks[i].id.replace('C_GVPrecios_chkPS_', '')
|
||||
idd = checks[i].id.replace('C_GVPrecios_chkPS_', '')
|
||||
if ($get('C_GVPrecios_TxtPrecio_' + idd) != null) {
|
||||
$get('C_GVPrecios_TxtPrecio_' + idd).value = FormatoNumero(ToDouble(valor), 2);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function CambiaPrecio() {
|
||||
var topLevelElem = document.getElementById("form1");
|
||||
var checks = topLevelElem.getElementsByTagName("input");
|
||||
var idd = '';
|
||||
|
||||
var valor = $('#<%= TxtPrecio.ClientID %>').val();
|
||||
|
||||
//if (!isNaN(valor) && valor.length > 0) {
|
||||
// $('.CssCamviaPrecio').val(valor);
|
||||
//}
|
||||
|
||||
var topLevelElem = document.getElementById("form1");
|
||||
var checks = topLevelElem.getElementsByTagName("input");
|
||||
var idd = '';
|
||||
|
||||
var valor = $('#<%= TxtPrecio.ClientID %>').val();
|
||||
|
||||
//if (!isNaN(valor) && valor.length > 0) {
|
||||
// $('.CssCamviaPrecio').val(valor);
|
||||
//}
|
||||
|
||||
for (var i = 0; i < checks.length; i++) {
|
||||
if (checks[i].type == "checkbox") {
|
||||
debugger;
|
||||
|
||||
debugger;
|
||||
|
||||
if (checks[i].checked) {
|
||||
idd = checks[i].id.replace('C_GVPrecios_chkPS_', '')
|
||||
idd = checks[i].id.replace('C_GVPrecios_chkPS_', '')
|
||||
if ($get('C_GVPrecios_TxtPrecioMinimo_' + idd) != null) {
|
||||
$get('C_GVPrecios_TxtPrecioMinimo_' + idd).value = FormatoNumero(ToDouble(valor), 2);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function CambiaPrecioModal() {
|
||||
|
||||
var ChecksGv = $('.CsMCheckGvSucursal').find('input[type=checkbox]');
|
||||
|
||||
var valor = $('#<%= TxtAplicarPrecio.ClientID %>').val();
|
||||
|
||||
var ChecksGv = $('.CsMCheckGvSucursal').find('input[type=checkbox]');
|
||||
|
||||
var valor = $('#<%= TxtAplicarPrecio.ClientID %>').val();
|
||||
if (!isNaN(valor) && valor.length > 0) {
|
||||
$(".CssMCamviaPrecio").each(function (index) {
|
||||
if ($($(ChecksGv).get(index)).attr('checked')) {
|
||||
|
||||
|
||||
$(this).val(valor);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function SeleccionarTodosChkGvSucursa() {
|
||||
if ($('#ChkSeleccionarTodos').attr('checked')) {
|
||||
$('.CsMCheckGvSucursal').find('input[type=checkbox]').prop('checked', true);
|
||||
} else {
|
||||
$('.CsMCheckGvSucursal').find('input[type=checkbox]').prop('checked', false);
|
||||
}
|
||||
}
|
||||
}
|
||||
function FncSeleccionaChk(chk) {
|
||||
chk.checked = true;
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
</asp:Content>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user