To make a web proguama in visual basic how can I make a filter of an int type code and only appear clients with the code typed?
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using Nac.Models;
namespace Nac.Controllers
{
public class ClienteController : Controller
{
// GET: Cliente
public ActionResult Principal()
{
return View();
}
public ActionResult Cadastrar()
{
return View();
}
public ActionResult Buscar()
{
return View();
}
[HttpPost]
public ActionResult Cadastrar(Cliente c)
{
if (ModelState.IsValid)
{
Estoque e = Estoque.Instance();
e.incluirCliente(c);
return RedirectToAction("Listar");
}
return View(c);
}
public ActionResult Listar()
{
IEnumerable<Cliente> clientes = Estoque.Instance().listarClientes();
return View(clientes);
}
public ActionResult Excluir(int id)
{
Estoque.Instance().excluirCliente(id);
return RedirectToAction("Listar");
}
public ActionResult Editar(int id)
{
Cliente c = Estoque.Instance().listarCliente(id);
return View("Cadastrar", c);
}
[HttpPost]
public ActionResult Editar(Cliente c)
{
Estoque.Instance().alterarCliente(c);
return RedirectToAction("Listar");
}
}
}