Advertisement
Guest User

Untitled

a guest
Jun 19th, 2019
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.33 KB | None | 0 0
  1. <a asp-route-id="@item.Id" asp-page="Create" class="btn btn-success btn-sm">Selecionar</a>
  2.  
  3. private readonly ApplicationDbContext _db;
  4.  
  5.  
  6. public CreateModel(ApplicationDbContext db)
  7. {
  8. _db = db;
  9.  
  10. }
  11.  
  12.  
  13. [BindProperty]
  14. public Peticion Peticion { get; set; }
  15.  
  16. [BindProperty]
  17. public Entidades Entidades { get; set; }
  18. [TempData]
  19. public String Mensaje { get; set; }
  20. public async Task OnGet(int Id)
  21. {
  22.  
  23. if (ModelState.IsValid) {
  24. Entidades = await _db.Entidades.FindAsync(Id);
  25.  
  26. var PeticionDesdeDB = await _db.Entidades.FindAsync(Entidades.Id);
  27.  
  28. }
  29.  
  30. }
  31.  
  32. <input type="hidden" asp-for="Entidades.Id" />
  33. <form method="post">
  34. <input type="hidden" asp-for="Entidades.Id" />
  35. <div class="jumbotron text-center p-3 mb-2 shadow mb-5 text-success rounded rounded-pill border">Información del cliente</div>
  36. <!-- <div asp-validation-summary="ModelOnly" class="text-danger"> </div>-->
  37. <div class="container" style="padding:30px;">
  38. <div class="form-group">
  39. <div class="row">
  40.  
  41. <div class="col-sm-2">
  42. <label asp-for="Peticion.NombreEntidad"></label>
  43. </div>
  44.  
  45. <div class="col-4">
  46.  
  47. <input asp-for="Peticion.NombreEntidad" class="form-control" />
  48.  
  49.  
  50. </div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement