Guest User

Untitled

a guest
Oct 27th, 2016
50
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.90 KB | None | 0 0
  1. [HttpPost]
  2. public ActionResult Consulta(Models.SolicitudesViewModels.Consulta consultar)
  3. {
  4. var token = Session["token"] as string;
  5.  
  6. SRSolicitudes.SolicitudesSoapClient wsSolicitudes = new SRSolicitudes.SolicitudesSoapClient();
  7. SRSolicitudes.ConsultaSolicitudes outConsultaSolicitudes = new SRSolicitudes.ConsultaSolicitudes();
  8. outConsultaSolicitudes = wsSolicitudes.ConsultarSolicitud(token, consultar.Estado, consultar.Cedula, consultar.Nombres, consultar.Apellidos, consultar.Computacion, 1, 50);
  9.  
  10. ViewBag.resultado = outConsultaSolicitudes.Cantidad;
  11. ViewBag.Ocultar = false;
  12. ViewBag.Mostrar = false;
  13.  
  14. return View();
  15. }
  16.  
  17. <section>
  18. <div class="table-responsive">
  19. <h2>Consultar Solicitudes</h2>
  20. @if (ViewBag.Ocultar == false)
  21. {
  22. <h3>Se encontraron @ViewBag.resultado resultados.</h3>
  23. }
  24. <form name="buscando" action="@Url.Action("Consulta", "Solicitudes")" method="POST">
  25. <table class="table table-bordered table-striped">
  26. <tr>
  27. <td colspan="7" class="text-right">
  28. <input class="btn btn-primary" type="submit" value="Buscar" />
  29. <a class="btn btn-danger" href="@Url.Action("Inicio","Home")"><i class="glyphicon glyphicon-remove"></i> Salir</a>
  30. </td>
  31. </tr>
  32.  
  33. <tr>
  34.  
  35. <th>
  36. Cédula<br />
  37. @Html.TextBoxFor(m => m.Cedula, null, new { @class = " form-control" })
  38. </th>
  39. <th>
  40. Apellidos <br />
  41. @Html.TextBoxFor(m => m.Apellidos, null, new { @class = " mayusculas form-control" })
  42. </th>
  43. <th>
  44. Nombres <br />
  45. @Html.TextBoxFor(m => m.Nombres, null, new { @class = " mayusculas form-control" })
  46. </th>
  47. <th>
  48. Nro. de Computación <br />
  49. @Html.TextBoxFor(m => m.Computacion, null, new { @class = "form-control" })
  50. </th>
  51. <th>
  52. Estado <br />
  53. @Html.DropDownListFor(m => m.Estado, new SelectList(new[] { null, "Aprobado", "Rechazado" }), new { @class = "form-control" })
  54. </th>
  55. @if (ViewBag.Mostrar == false)
  56. {
  57. <th>
  58. Categoria
  59. </th>
  60. <th>
  61. Acciones
  62. </th>
  63. }
  64. </tr>
  65. @if (ViewBag.Mostrar == false)
  66. {
  67. <tr>
  68. <td>Cedula</td>
  69. <td>Apellido</td>
  70. <td>Nombres</td>
  71. <td>NroComputacion</td>
  72. <td>Estado</td>
  73. <td>Categoria</td>
  74. <td>
  75. <button class="btn btn-xs btn-primary" role="button"><i class="glyphicon glyphicon-credit-card"></i> <span>Ver</span></button>
  76. </td>
  77. </tr>
  78. }
  79. </table>
  80. </form>
  81. </div>
  82.  
  83. <tr>
  84. <td>Cedula</td>
  85. <td>Apellido</td>
  86. <td>Nombres</td>
  87. <td>NroComputacion</td>
  88. <td>Estado</td>
  89. <td>Categoria</td>
  90. <td>
  91. <button class="btn btn-xs btn-primary" role="button"><i class="glyphicon glyphicon-credit-card"></i> <span>Ver</span></button>
  92. </td>
  93. </tr>
  94.  
  95. <ConsultaSolicitud>
  96. <IdSolicitud>int</IdSolicitud>
  97. <Estado>string</Estado>
  98. <NroComputacion>int</NroComputacion>
  99. <Cedula>string</Cedula>
  100. <Apellidos>string</Apellidos>
  101. <Nombres>string</Nombres>
  102. <Fecha>dateTime</Fecha>
  103. <Categoria>string</Categoria>
  104. </ConsultaSolicitud>
Add Comment
Please, Sign In to add comment