Guest User

Untitled

a guest
Dec 3rd, 2017
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.92 KB | None | 0 0
  1. // GET: PesquisaProdutoes
  2. public ActionResult RelatorioPConfirmado()
  3. {
  4. var pesquisa = db.PesquisaProdutoes.GroupBy(c => c.CodPro);
  5. return View(pesquisa.ToList());
  6. }
  7.  
  8. <table class="table table-bordered" id="dataTable" cellspacing="0">
  9. <thead>
  10. <tr>
  11. <th>@Html.DisplayNameFor(model => model.CodPro)</th>
  12. <th>@Html.DisplayNameFor(model => model.CodBar)</th>
  13. <th>@Html.DisplayNameFor(model => model.Nome)</th>
  14. <th>@Html.DisplayNameFor(model => model.Valor)</th>
  15. <th>@Html.DisplayNameFor(model => model.Qtd)</th>
  16. <th>@Html.DisplayNameFor(model => model.Total)</th>
  17. <th>@Html.DisplayNameFor(model => model.Confimado)</th>
  18. <th>@Html.DisplayNameFor(model => model.DataPesquisa)</th>
  19. </thead>
  20. @foreach (var item in Model)
  21. {
  22. if (item.Confimado.Equals(true))
  23. {
  24. <tr>
  25. <td>@Html.DisplayFor(modelItem => item.CodPro)</td>
  26. <td>@Html.DisplayFor(modelItem => item.CodBar)</td>
  27. <td>@Html.DisplayFor(modelItem => item.Nome)</td>
  28. <td>@Model.Sum(v => v.Valor)</td>
  29. <td>@Model.Sum(q => q.Qtd)</td>
  30. <td>@Model.Sum(t => t.Total)</td>
  31. <td>@Html.DisplayFor(modelItem => item.Confimado)</td>
  32. <td>@Html.DisplayFor(modelItem => item.DataPesquisa)</td>
  33. </tr>
  34. }
  35. }
  36.  
  37. </table>
Add Comment
Please, Sign In to add comment