Advertisement
Guest User

Untitled

a guest
Dec 8th, 2016
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.31 KB | None | 0 0
  1. public class Modelo
  2. {
  3. public DateTime? DataPedido { get; set; }
  4. public string Pao { get; set; }
  5. public string Fermentacao { get; set; }
  6. public int QtdeTotal { get; set; }
  7. public decimal ValorTotal { get; set; }
  8. public IEnumerable<Modelo> Modelos { get; set; }
  9. }
  10.  
  11. public ActionResult Relatorio()
  12. {
  13. IEnumerable<Modelo> pedidos = new List<Modelo>{
  14. new Modelo{DataPedido=Convert.ToDateTime("2016-11-29 12:24:53.707"), Pao="PÃO CONGELADO" , Fermentacao="F" ,QtdeTotal=5 ,ValorTotal=decimal.Parse("105.00")},
  15. new Modelo{DataPedido=Convert.ToDateTime("2016-11-29 12:24:53.707"), Pao="PÃO DE LEITE" , Fermentacao="S/ Fermentação" ,QtdeTotal=2 ,ValorTotal=decimal.Parse("16.20")},
  16. new Modelo{DataPedido=Convert.ToDateTime("2016-11-29 12:24:53.707"), Pao="PÃO CONGELADO" , Fermentacao="F" ,QtdeTotal=15 ,ValorTotal=decimal.Parse("330.00")},
  17. new Modelo{DataPedido=Convert.ToDateTime("2016-11-30 07:30:12.480"), Pao="PÃO COCO FRESCO" , Fermentacao="S/ Fermentação" ,QtdeTotal=1 ,ValorTotal=decimal.Parse("10.50")},
  18. new Modelo{DataPedido=Convert.ToDateTime("2016-11-30 07:30:12.480"), Pao="PÃO CONGELADO" , Fermentacao="C" ,QtdeTotal=8 ,ValorTotal=decimal.Parse("168.00")},
  19. new Modelo{DataPedido=Convert.ToDateTime("2016-11-30 07:30:12.480"), Pao="PÃO CONGELADO" , Fermentacao="L" ,QtdeTotal=2 ,ValorTotal=decimal.Parse("42.00")},
  20. new Modelo{DataPedido=Convert.ToDateTime("2016-12-01 06:39:53.477"), Pao="PÃO ASSADO" , Fermentacao="S/ Fermentação" ,QtdeTotal=175 ,ValorTotal=decimal.Parse("38.50")},
  21. new Modelo{DataPedido=Convert.ToDateTime("2016-12-01 06:39:53.477"), Pao="PÃO DE LEITE" , Fermentacao="S/ Fermentação" ,QtdeTotal=2 ,ValorTotal=decimal.Parse("16.20")},
  22. new Modelo{DataPedido=Convert.ToDateTime("2016-12-01 06:39:53.477"), Pao="PÃO DE ASSADO" , Fermentacao="S/ Fermentação" ,QtdeTotal=35 ,ValorTotal=decimal.Parse("8.75")}
  23. };
  24. var _pedido = pedidos.ToList();
  25. return View(_pedido);
  26. }
  27.  
  28. <table>
  29. <thead>
  30. <tr>
  31. <th class="aling-center">DATA PEDIDO&nbsp;</th>
  32. <th>PAO&nbsp;</th>
  33. <th>FERMENTAÇÃO&nbsp;</th>
  34. <th>QTDE&nbsp;</th>
  35. <th>VALOR&nbsp;</th>
  36. </tr>
  37. </thead>
  38. <tbody class="fonte10">
  39. @{
  40. foreach (var item in Model)
  41. {
  42. <tr>
  43. <td>@item.DataPedido&nbsp;</td>
  44. <td>@item.Pao&nbsp;</td>
  45. <td>@item.Fermentacao&nbsp;</td>
  46. <td>@item.QtdeTotal&nbsp;</td>
  47. <td>@item.ValorTotal&nbsp;</td>
  48. </tr>
  49. }
  50. }
  51.  
  52. </tbody>
  53. <tfoot>
  54. <tr>
  55. <td colspan="10" class="bold"></td>
  56. <td class="aling-right"></td>
  57. </tr>
  58. </tfoot>
  59. </table>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement