Advertisement
Guest User

Untitled

a guest
Feb 19th, 2019
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.94 KB | None | 0 0
  1. <tbody>
  2.  
  3. @for (int j = 0; j < avail.Length; j++)
  4. {
  5. <tr>
  6. <th scope="row">@avail[j].RoomType</th>
  7. <td>@avail[j].RoomDescription</td>
  8. <td>@avail[j].RoomCapacity</td>
  9. <td>
  10.  
  11. <select id="@avail[j].RoomType" name="@avail[j].RoomType">
  12. @for (int x = 0; x <= avail[j].Quantities.MinimumQuantity; x++)
  13. {
  14. <option value=@x> @x</option>}
  15.  
  16. </select>
  17.  
  18.  
  19. </td>
  20. <td>
  21. <select id="PACK @avail[j].RoomType" name="PACK @avail[j].RoomType" onChange="changetextbox();">
  22. @for (int x = 0; x < pack[j].Packages.Length; x++)
  23. {
  24. <option value=@x>@pack[j].Packages[x].Package1 - @pack[j].Packages[x].PeriodsPrices[0].Price.DayPrice - @pack[j].Packages[x].PeriodsPrices[0].Price.TotalPrice</option>
  25. }
  26. </select>
  27. </td>
  28. <td>
  29. <input type="number" id="PAX @avail[j].RoomType" name="PAX @avail[j].RoomType" value=0>
  30.  
  31. <script type="text/javascript">
  32.  
  33.  
  34. function changetextbox() {
  35.  
  36.  
  37. if (document.getElementById("@avail[j].RoomType").value == "0") {
  38. document.getElementById("PAX @avail[j].RoomType").disabled = "true";
  39.  
  40. }
  41. else {
  42.  
  43. document.getElementById("PAX @avail[j].RoomType").disabled = "";
  44. }
  45. }
  46. </script>
  47.  
  48. </td>
  49.  
  50. </tr>
  51. }
  52.  
  53.  
  54. </tbody>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement