Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // GET: PesquisaProdutoes
- public ActionResult RelatorioPConfirmado()
- {
- var pesquisa = db.PesquisaProdutoes.GroupBy(c => c.CodPro);
- return View(pesquisa.ToList());
- }
- <table class="table table-bordered" id="dataTable" cellspacing="0">
- <thead>
- <tr>
- <th>@Html.DisplayNameFor(model => model.CodPro)</th>
- <th>@Html.DisplayNameFor(model => model.CodBar)</th>
- <th>@Html.DisplayNameFor(model => model.Nome)</th>
- <th>@Html.DisplayNameFor(model => model.Valor)</th>
- <th>@Html.DisplayNameFor(model => model.Qtd)</th>
- <th>@Html.DisplayNameFor(model => model.Total)</th>
- <th>@Html.DisplayNameFor(model => model.Confimado)</th>
- <th>@Html.DisplayNameFor(model => model.DataPesquisa)</th>
- </thead>
- @foreach (var item in Model)
- {
- if (item.Confimado.Equals(true))
- {
- <tr>
- <td>@Html.DisplayFor(modelItem => item.CodPro)</td>
- <td>@Html.DisplayFor(modelItem => item.CodBar)</td>
- <td>@Html.DisplayFor(modelItem => item.Nome)</td>
- <td>@Model.Sum(v => v.Valor)</td>
- <td>@Model.Sum(q => q.Qtd)</td>
- <td>@Model.Sum(t => t.Total)</td>
- <td>@Html.DisplayFor(modelItem => item.Confimado)</td>
- <td>@Html.DisplayFor(modelItem => item.DataPesquisa)</td>
- </tr>
- }
- }
- </table>
Add Comment
Please, Sign In to add comment