1
I have a list of records, where I have a Status (STS_BANCO) with values (A of Active and I of Inactive, P awaiting approval, and N analyze, among others ) where in the table I recorded "A,I,N,P", And I also have a table I call List, where I record the flg A and the Active Description and all the other complete Descriptions, but I would like him to show me the Active or Inactive and the others, with the full description on the list. I use the Grid formatting.
Follows code below.
@model IEnumerable<PadraoMVC.Models.BANCO>
@{
ViewBag.Title = "Banco - Listar";
var grid = new WebGrid(source: Model, rowsPerPage: 10, canSort: true, canPage: true);
}
<body>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<br />
<h2>Listagem de Bancos Cadastrados </h2>
<br />
@grid.GetHtml(
tableStyle:"gridtable",
headerStyle: "head",
alternatingRowStyle: "alt",
columns:
grid.Columns(
grid.Column("IDE_BANCO", "ID"),
grid.Column("NUM_BANCO", "Banco"),
grid.Column("DES_BANCO", "Descrição"),
grid.Column("STS_BANCO", "Status"),
//aqui ele mostra A por exemplo, gostaria de Mostrar "Ativo"
grid.Column("DAT_INCLUSAO", "Data Inclusão"),
grid.Column("NOM_LOGIN_INCLUSAO", "Responsável"),
grid.Column("DAT_ALTERACAO", "Data Alteração"),
grid.Column("NOM_LOGIN_ALTERACAO", "Responsável Alteração"),
grid.Column("NUM_IP_INCLUSAO", "IP Inclusão"),
grid.Column(format: @<div>
<a href="EditarBanco/@item.IDE_BANCO">Editar</a><br />
<a href="ExcluirBanco/@item.IDE_BANCO">Excluir</a>
</div>) ),
firstText: "Primeiro",
previousText: "Anterior",
nextText: "Proximo",
lastText: "Ultimo",
mode: WebGridPagerModes.All
)
<br />
@Html.Hidden("dir", grid.SortDirection)
@Html.Hidden("col", grid.SortColumn)
<ul class="optul">
<li class="optli">
@Html.ActionLink("Voltar","Index", "Banco")
</li>
</ul>
<br /><br /><br />
</body>
Not related to the question, but I believe that the tags are not correct
meta
within thebody
. They should be inhead
.– tvdias