Advertisement
Guest User

Untitled

a guest
May 26th, 2017
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 22.68 KB | None | 0 0
  1. @using ProyectoLaimi.Models
  2.  
  3. @model ProyectoLaimi.Models.PendienteInfo
  4.  
  5. <head>
  6. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  7. <title></title>
  8. <meta charset="utf-8" />
  9. <link type="text/css" rel="stylesheet" href="@Url.Content("~/Content/bootstrap.css")">
  10. <link type="text/css" rel="stylesheet" href="@Url.Content("~/Content/PendientesStyle.css")">
  11. <script src="~/Scripts/jquery-1.10.2.min.js"></script>
  12. <script src="~/Scripts/jquery.unobtrusive-ajax.min.js"></script>
  13. </head>
  14. <body>
  15. <img id="logoTEC" src="@Url.Content("~/Content/img/logo-tec.png")" alt="TEC">
  16. <div id="wrapper">
  17. <nav class="navbar navbar-inverse" style="position:absolute; width:76%; height:7%; top:14%; left:12%; background-color:#F8F8F8;">
  18. <div class="container-fluid">
  19. <div class="navbar-header">
  20. <a class="navbar-brand" href="#" onMouseOver="this.style.color='#1F2F5F'" onMouseOut="this.style.color='#777777'">Laimi</a>
  21. </div>
  22. <ul class="nav navbar-nav">
  23. <li><a href="@Url.Action("MostrarAsistentes", "Asistentes")" onMouseOver="this.style.color = '#1F2F5F'" onMouseOut="this.style.color = '#777777'">Asistentes</a></li>
  24. <li class="dropdown">
  25. <a class="dropdown-toggle" data-toggle="dropdown" href="#" style="width:105px; background:#F8F8F8; background-color:#1F2F5F; color:#FFFFFF" onMouseOver="this.style.color='#FFFFFF'" onMouseOut="this.style.color='#FFFFFF'">
  26. Solicitudes<span class="caret" style="left:85%;top:45%;border-top-color:#FFFFFF" onMouseOver="this.style.borderTopColor='#FFFFFF'" onMouseOut="this.style.borderTopColor='#FFFFFF'"></span>
  27. </a>
  28. <ul class="dropdown-menu" style="background:#F8F8F8">
  29. <li style="width:115px; display:inline-block"><a href="@Url.Action("MostrarPrioridades", "Prioridades")" style="color:#777777;background-color:#F8F8F8" onMouseOver="this.style.color='#1F2F5F'" onMouseOut="this.style.color='#777777'">Prioridades</a></li>
  30. <li style="width:115px; display:inline-block"><a href="@Url.Action("MostrarPendientes", "Pendientes")" style="color:#777777;background-color:#F8F8F8" onMouseOver="this.style.color='#1F2F5F'" onMouseOut="this.style.color='#777777'">Pendientes</a></li>
  31. <li style="width:115px; display:inline-block"><a href="#" style="color:#777777;background-color:#F8F8F8" onMouseOver="this.style.color='#1F2F5F'" onMouseOut="this.style.color='#777777'">Modificables</a></li>
  32. </ul>
  33. </li>
  34. <li><a href="#" onMouseOver="this.style.color='#1F2F5F'" onMouseOut="this.style.color='#777777'">Laboratorios</a></li>
  35. </ul>
  36. <ul class="nav navbar-nav navbar-right">
  37. <li><a href="#" style="position:absolute;right:1px" onMouseOver="this.style.color='#1F2F5F'" onMouseOut="this.style.color='#777777'">Salir</a></li>
  38. </ul>
  39. </div>
  40. </nav>
  41. <div id="searchDiv">
  42. <div id="titleHeader">
  43. Solicitudes Aceptadas
  44. </div>
  45. <div id="filterDiv">
  46. @using (Ajax.BeginForm("ActualizarPendientesFirst", "Pendientes", new AjaxOptions { UpdateTargetId = "replaceFirstBody" }))
  47. {
  48. <div class="input-group add-on" style="position:absolute; top:42%; left:260%">
  49. <input class="form-control" type="text" placeholder="Buscar" name="searchingFirst" id="searchingFirst" style="color:black; width:160px">
  50. <div class="input-group-btn">
  51. <button class="btn btn-default" type="submit" style="height:34px"><i class="glyphicon glyphicon-search"></i></button>
  52. </div>
  53. </div>
  54. }
  55. </div>
  56. </div>
  57.  
  58. <div id="tableContainer">
  59. <div class="table-frame">
  60. <table class="tftable" border="1" id="mainTable">
  61. <tr>
  62. <th width="5%"></th>
  63. <th width="14%">
  64. Carné
  65. <div style="display:inline-block; position:relative">
  66. @Ajax.HtmlActionLink("<img style ='position: absolute; top: -13px; cursor: pointer' src='/Content/img/up-arrow.png' height='11' width='11'>", "ActualizarPendientesFirst", "Pendientes", new { sortBy = "carne asc", searching = Request.QueryString["searchingFirst"] }, new AjaxOptions() { HttpMethod = "GET", UpdateTargetId = "replaceFirstBody", InsertionMode = InsertionMode.Replace })
  67. @Ajax.HtmlActionLink("<img style='position: absolute; top: -5px; cursor: pointer' src='/Content/img/down-arrow.png' height='11' width='11'>", "ActualizarPendientesFirst", "Pendientes", new { sortBy = "carne desc", searching = Request.QueryString["searchingFirst"] }, new AjaxOptions() { HttpMethod = "GET", UpdateTargetId = "replaceFirstBody", InsertionMode = InsertionMode.Replace })
  68. </div>
  69. </th>
  70. <th width="26%">
  71. Estudiante
  72. <div style="display:inline-block;position:relative">
  73. @Ajax.HtmlActionLink("<img style='position: absolute; top: -13px; cursor: pointer' src='/Content/img/up-arrow.png' height='11' width='11'>", "ActualizarPendientesFirst", "Pendientes", new { sortBy = "nombreCompleto asc", searching = Request.QueryString["searchingFirst"] }, new AjaxOptions() { HttpMethod = "GET", UpdateTargetId = "replaceFirstBody", InsertionMode = InsertionMode.Replace })
  74. @Ajax.HtmlActionLink("<img style='position: absolute; top: -5px; cursor: pointer' src='/Content/img/down-arrow.png' height='11' width='11'>", "ActualizarPendientesFirst", "Pendientes", new { sortBy = "nombreCompleto desc", searching = Request.QueryString["searchingFirst"] }, new AjaxOptions() { HttpMethod = "GET", UpdateTargetId = "replaceFirstBody", InsertionMode = InsertionMode.Replace })
  75. </div>
  76. </th>
  77. <th width="17%">
  78. Teléfono
  79. <div style="display:inline-block;position:relative">
  80. @Ajax.HtmlActionLink("<img style='position: absolute; top: -13px; cursor: pointer' src='/Content/img/up-arrow.png' height='11' width='11'>", "ActualizarPendientesFirst", "Pendientes", new { sortBy = "telefono asc", searching = Request.QueryString["searchingFirst"] }, new AjaxOptions() { HttpMethod = "GET", UpdateTargetId = "replaceFirstBody", InsertionMode = InsertionMode.Replace })
  81. @Ajax.HtmlActionLink("<img style='position: absolute; top: -5px; cursor: pointer' src='/Content/img/down-arrow.png' height='11' width='11'>", "ActualizarPendientesFirst", "Pendientes", new { sortBy = "telefono desc", searching = Request.QueryString["searchingFirst"] }, new AjaxOptions() { HttpMethod = "GET", UpdateTargetId = "replaceFirstBody", InsertionMode = InsertionMode.Replace })
  82. </div>
  83. </th>
  84. <th width="14%">
  85. Ponderado
  86. <div style="display:inline-block;position:relative">
  87. @Ajax.HtmlActionLink("<img style='position: absolute; top: -13px; cursor: pointer' src='/Content/img/up-arrow.png' height='11' width='11'>", "ActualizarPendientesFirst", "Pendientes", new { sortBy = "ponderado asc", searching = Request.QueryString["searchingFirst"] }, new AjaxOptions() { HttpMethod = "GET", UpdateTargetId = "replaceFirstBody", InsertionMode = InsertionMode.Replace })
  88. @Ajax.HtmlActionLink("<img style='position: absolute; top: -5px; cursor: pointer' src='/Content/img/down-arrow.png' height='11' width='11'>", "ActualizarPendientesFirst", "Pendientes", new { sortBy = "ponderado desc", searching = Request.QueryString["searchingFirst"] }, new AjaxOptions() { HttpMethod = "GET", UpdateTargetId = "replaceFirstBody", InsertionMode = InsertionMode.Replace })
  89. </div>
  90. </th>
  91. <th width="24%">
  92. Horas por semana
  93. <div style="display:inline-block;position:relative">
  94. @Ajax.HtmlActionLink("<img style='position: absolute; top: -13px; cursor: pointer' src='/Content/img/up-arrow.png' height='11' width='11'>", "ActualizarPendientesFirst", "Pendientes", new { sortBy = "horasXSemana asc", searching = Request.QueryString["searchingFirst"] }, new AjaxOptions() { HttpMethod = "GET", UpdateTargetId = "replaceFirstBody", InsertionMode = InsertionMode.Replace })
  95. @Ajax.HtmlActionLink("<img style='position: absolute; top: -5px; cursor: pointer' src='/Content/img/down-arrow.png' height='11' width='11'>", "ActualizarPendientesFirst", "Pendientes", new { sortBy = "horasXSemana desc", searching = Request.QueryString["searchingFirst"] }, new AjaxOptions() { HttpMethod = "GET", UpdateTargetId = "replaceFirstBody", InsertionMode = InsertionMode.Replace })
  96. </div>
  97. </th>
  98. </tr>
  99. <tbody id="replaceFirstBody">
  100. @foreach (AsistenteInfo asistenteInfo in @Model.Aceptadas)
  101. {
  102. <tr>
  103. <td style="font-size:0px"><img class="extraInformation" data-toggle="modal" data-target="#extraInfo" src="@Url.Content("~/Content/img/info.png")" height="45" width="45" style="cursor:pointer;" />@asistenteInfo.cedula;@asistenteInfo.carrera;@asistenteInfo.correoElectronico;@asistenteInfo.cuentaBancaria</td>
  104. <td>@asistenteInfo.carnet</td>
  105. <td>@asistenteInfo.nombreCompleto</td>
  106. <td>@asistenteInfo.telefono</td>
  107. <td>@asistenteInfo.ponderado</td>
  108. <td>@asistenteInfo.horasXSemana</td>
  109. </tr>
  110. }
  111. </tbody>
  112. </table>
  113. </div>
  114. </div>
  115. <div id="bottomDiv"></div>
  116. <div id="secondSearchDiv">
  117. <div id="titleHeader">
  118. Solicitudes Pendientes
  119. </div>
  120. <div id="filterDiv">
  121. @using (Ajax.BeginForm("ActualizarPendientesSecond", "Pendientes", new AjaxOptions { UpdateTargetId = "replaceSecondBody" }))
  122. {
  123. <div class="input-group add-on" style="position:absolute; top:42%; left:260%">
  124. <input class="form-control" type="text" placeholder="Buscar" name="searchingSecond" id="searchingSecond" style="color:black; width:160px">
  125. <div class="input-group-btn">
  126. <button class="btn btn-default" type="submit" style="height:34px"><i class="glyphicon glyphicon-search"></i></button>
  127. </div>
  128. </div>
  129. }
  130. </div>
  131. </div>
  132. <div id="secondTableContainer">
  133. <div class="table-frame">
  134. <table class="tftable" border="1">
  135. <tr>
  136. <th width="5%"></th>
  137. <th width="14%">
  138. Carné
  139. <div style="display:inline-block; position:relative">
  140. @Ajax.HtmlActionLink("<img style='position: absolute; top: -13px; cursor: pointer' src='/Content/img/up-arrow.png' height='11' width='11'>", "ActualizarPendientesSecond", "Pendientes", new { sortBy = "carne asc", searching = Request.QueryString["searchingSecond"] }, new AjaxOptions() { HttpMethod = "GET", UpdateTargetId = "replaceSecondBody", InsertionMode = InsertionMode.Replace })
  141. @Ajax.HtmlActionLink("<img style='position: absolute; top: -5px; cursor: pointer' src='/Content/img/down-arrow.png' height='11' width='11'>", "ActualizarPendientesSecond", "Pendientes", new { sortBy = "carne desc", searching = Request.QueryString["searchingSecond"] }, new AjaxOptions() { HttpMethod = "GET", UpdateTargetId = "replaceSecondBody", InsertionMode = InsertionMode.Replace })
  142. </div>
  143. </th>
  144. <th width="26%">
  145. Estudiante
  146. <div style="display:inline-block;position:relative">
  147. @Ajax.HtmlActionLink("<img style='position: absolute; top: -13px; cursor: pointer' src='/Content/img/up-arrow.png' height='11' width='11'>", "ActualizarPendientesSecond", "Pendientes", new { sortBy = "nombreCompleto asc", searching = Request.QueryString["searchingSecond"] }, new AjaxOptions() { HttpMethod = "GET", UpdateTargetId = "replaceSecondBody", InsertionMode = InsertionMode.Replace })
  148. @Ajax.HtmlActionLink("<img style='position: absolute; top: -5px; cursor: pointer' src='/Content/img/down-arrow.png' height='11' width='11'>", "ActualizarPendientesSecond", "Pendientes", new { sortBy = "nombreCompleto desc", searching = Request.QueryString["searchingSecond"] }, new AjaxOptions() { HttpMethod = "GET", UpdateTargetId = "replaceSecondBody", InsertionMode = InsertionMode.Replace })
  149. </div>
  150. </th>
  151. <th width="17%">
  152. Teléfono
  153. <div style="display:inline-block;position:relative">
  154. @Ajax.HtmlActionLink("<img style='position: absolute; top: -13px; cursor: pointer' src='/Content/img/up-arrow.png' height='11' width='11'>", "ActualizarPendientesSecond", "Pendientes", new { sortBy = "telefono asc", searching = Request.QueryString["searchingSecond"] }, new AjaxOptions() { HttpMethod = "GET", UpdateTargetId = "replaceSecondBody", InsertionMode = InsertionMode.Replace })
  155. @Ajax.HtmlActionLink("<img style='position: absolute; top: -5px; cursor: pointer' src='/Content/img/down-arrow.png' height='11' width='11'>", "ActualizarPendientesSecond", "Pendientes", new { sortBy = "telefono desc", searching = Request.QueryString["searchingSecond"] }, new AjaxOptions() { HttpMethod = "GET", UpdateTargetId = "replaceSecondBody", InsertionMode = InsertionMode.Replace })
  156. </div>
  157. </th>
  158. <th width="14%">
  159. Ponderado
  160. <div style="display:inline-block;position:relative">
  161. @Ajax.HtmlActionLink("<img style='position: absolute; top: -13px; cursor: pointer' src='/Content/img/up-arrow.png' height='11' width='11'>", "ActualizarPendientesSecond", "Pendientes", new { sortBy = "ponderado asc", searching = Request.QueryString["searchingSecond"] }, new AjaxOptions() { HttpMethod = "GET", UpdateTargetId = "replaceSecondBody", InsertionMode = InsertionMode.Replace })
  162. @Ajax.HtmlActionLink("<img style='position: absolute; top: -5px; cursor: pointer' src='/Content/img/down-arrow.png' height='11' width='11'>", "ActualizarPendientesSecond", "Pendientes", new { sortBy = "ponderado desc", searching = Request.QueryString["searchingSecond"] }, new AjaxOptions() { HttpMethod = "GET", UpdateTargetId = "replaceSecondBody", InsertionMode = InsertionMode.Replace })
  163. </div>
  164. </th>
  165. <th width="24%">
  166. Horas por semana
  167. <div style="display:inline-block;position:relative">
  168. @Ajax.HtmlActionLink("<img style='position: absolute; top: -13px; cursor: pointer' src='/Content/img/up-arrow.png' height='11' width='11'>", "ActualizarPendientesSecond", "Pendientes", new { sortBy = "horasXSemana asc", searching = Request.QueryString["searchingSecond"] }, new AjaxOptions() { HttpMethod = "GET", UpdateTargetId = "replaceSecondBody", InsertionMode = InsertionMode.Replace })
  169. @Ajax.HtmlActionLink("<img style='position: absolute; top: -5px; cursor: pointer' src='/Content/img/down-arrow.png' height='11' width='11'>", "ActualizarPendientesSecond", "Pendientes", new { sortBy = "horasXSemana desc", searching = Request.QueryString["searchingSecond"] }, new AjaxOptions() { HttpMethod = "GET", UpdateTargetId = "replaceSecondBody", InsertionMode = InsertionMode.Replace })
  170. </div>
  171. </th>
  172. <th width="10%">
  173. <img src="@Url.Content("~/Content/img/selection.png")" height="16" width="16" style="cursor:pointer;" />
  174. </th>
  175. </tr>
  176. <tbody id="replaceSecondBody">
  177. @foreach (AsistenteInfo asistenteInfo in @Model.Pendientes)
  178. {
  179. <tr>
  180. <td style="font-size:0px"><img class="extraInformation" data-toggle="modal" data-target="#extraInfo" src="@Url.Content("~/Content/img/info.png")" height="45" width="45" style="cursor:pointer;" />@asistenteInfo.cedula;@asistenteInfo.carrera;@asistenteInfo.correoElectronico;@asistenteInfo.cuentaBancaria</td>
  181. <td>@asistenteInfo.carnet</td>
  182. <td>@asistenteInfo.nombreCompleto</td>
  183. <td>@asistenteInfo.telefono</td>
  184. <td>@asistenteInfo.ponderado</td>
  185. <td>@asistenteInfo.horasXSemana</td>
  186. <td><input id="@(asistenteInfo.idSolicitud)" type="checkbox" /></td>
  187. </tr>
  188. }
  189. </tbody>
  190. </table>
  191. </div>
  192. </div>
  193. <div id="secondBottomDiv">
  194. <button id="aceptarBtn" style="position:absolute; font-weight:bold; left:6%; top:22%; border-radius: 15px; height: 30px; width: 100px;">Aceptar</button>
  195. <button id="eliminarBtn" style="position:absolute; font-weight:bold; left:16%; top:22%; border-radius: 15px; height: 30px; width: 100px;">Eliminar</button>
  196. </div>
  197. </div>
  198. <div class="modal" data-keyboard="false" style="overflow-y:hidden;overflow-x:hidden;top:210px;" id="extraInfo">
  199. <div class="modal-dialog" style="width:1000px;">
  200. <div class="modal-content" style="width:1000px;">
  201. <div class="modal-header">
  202. <button class="close" data-dismiss="modal">&times;</button>
  203. <div class="modal-title" style="font-family:Arial; font-size:18px; font-weight:bold">Información</div>
  204. </div>
  205. <div class="modal-body" style="height:150px">
  206. <div id="infoSearchDiv"></div>
  207. <table class="tftable" border="1" style="position:relative;top:10%;">
  208. <tr>
  209. <th width="14%">Cédula</th>
  210. <th width="26%">Carrera</th>
  211. <th width="17%">Correo electrónico</th>
  212. <th width="14%">Cuenta bancaria</th>
  213. </tr>
  214. <tr>
  215. <td id="cedula"></td>
  216. <td id="carrera"></td>
  217. <td id="correo"></td>
  218. <td id="cuenta"></td>
  219. </tr>
  220. </table>
  221. <div id="infoBottomDiv"></div>
  222. </div>
  223. </div>
  224. </div>
  225. </div>
  226. <script>
  227. $('#titleHeader').click(function () {
  228. });
  229.  
  230. $('#eliminarBtn').click(function () {
  231. var ids = [];
  232. $("#replaceSecondBody").find("tr").find("td").find("input").each(function(){ ids.push(this.id); });
  233.  
  234. var states = new Array(ids.length);
  235.  
  236. for(var i = 0; i < states.length; i++){
  237. if(document.getElementById(ids[i]).checked == true){
  238. states[i] = 1;
  239. } else {
  240. states[i] = 0;
  241. }
  242. }
  243.  
  244. $.ajax({
  245. url:'/Pendientes/EliminarPendientes',
  246. data: { 'Ids': ids , 'States' : states },
  247. type: "POST",
  248. cache: false,
  249. success: function(result){
  250. $('#replaceFirstBody').load('/Pendientes/ActualizarAceptadas');
  251. $('#replaceSecondBody').load('/Pendientes/ActualizarPendientes');
  252. },
  253. error: function () {
  254. alert("no");
  255. }
  256. });
  257. });
  258.  
  259. $('#aceptarBtn').click(function () {
  260. var ids = [];
  261. $("#replaceSecondBody").find("tr").find("td").find("input").each(function(){ ids.push(this.id); });
  262.  
  263. var states = new Array(ids.length);
  264.  
  265. for(var i = 0; i < states.length; i++){
  266. if(document.getElementById(ids[i]).checked == true){
  267. states[i] = 1;
  268. } else {
  269. states[i] = 0;
  270. }
  271. }
  272.  
  273. $.ajax({
  274. url:'/Pendientes/AceptarPendientes',
  275. data: { 'Ids': ids , 'States' : states },
  276. type: "POST",
  277. cache: false,
  278. success: function (result) {
  279. $('#replaceFirstBody').load('/Pendientes/ActualizarAceptadas');
  280. $('#replaceSecondBody').load('/Pendientes/ActualizarPendientes');
  281. },
  282. error: function () {
  283. alert("no");
  284. }
  285. });
  286. });
  287. </script>
  288.  
  289. <script>
  290. $(document).ready(function () {
  291. $(".extraInformation").click(function (event) {
  292. var extraInfo = $(this).closest('tr').find('td:nth-child(1)').text();
  293. extraInfo = extraInfo.split(";");
  294. $('#cedula').html(extraInfo[0]);
  295. $('#carrera').html(extraInfo[1]);
  296. $('#correo').html(extraInfo[2]);
  297. $('#cuenta').html(extraInfo[3]);
  298. });
  299. });
  300. </script>
  301. </body>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement