Good morning, I present a small concern, recently I am working on a sales module for the company I work for. What I need is to deactivate two controls when identifying what is a cash sale:
Controls:
<input type="button" class="btn btn-primary" id="solici" onclick="parent.location='../Aspx/Visor/ConstruirReporte.aspx?Reporte=FAC2&id=<%=ViewData["id"]%> '" value="Solicitud de crédito">
<input type="button" class="btn btn-success" id="aprobe" onclick="parent.location='../Aspx/Factura/DetalleAprobacion.aspx?id=<%=ViewData["id"]%> '" value="Detalle Aprobacion">
I have tried with the following:
<% var factura = new MvcApp.Models.factura();
var idFactura = Convert.ToDecimal(Request.QueryString["id"]);//recoge el parametro del registro
var numerico = 2;//inicializo la variable en 2, equivale a una venta de contado
if (factura.id_forma_pago == numerico)//valido
{
deshabilitarcontroles();//llamo al metodo
}}
public void deshabilitarcontroles()
{
solici.Visible = false;//indicó funciones
aprobe.Visible = false;
}
%>
My concern is that I do not recognize the id of each control, which instruction I must indicate to meet my objective.
- > Thank you in advance!