Showroom.cshtml 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. 
  2. @{
  3. ViewData["Title"] = "Customer Care";
  4. ViewBag.description = "Visit our showroom for a hands-on experience with Telemor’s latest products and services.";
  5. }
  6. @using WebPortal.Texts;
  7. @using WebService;
  8. @model string[]
  9. @{
  10. //string[] areaShowroom = Context.Session.GetComplexData<string[]>("areaShowroom");
  11. }
  12. <div class="pathway pt-5">
  13. <div class="container">
  14. <ul class="breadcrumb">
  15. <li class="breadcrumb-item"><a href="/Home">@Lang.Home</a></li>
  16. <li class="breadcrumb-item"><a href="/CustomerCare">@Lang.CustomerCare</a> </li>
  17. <li class="breadcrumb-item active">@Lang.FindAStore</li>
  18. </ul>
  19. </div>
  20. </div>
  21. <div class="tele-customer mb-5">
  22. <div class="container aos-init" data-aos="fade-up">
  23. <h3 class="mb-5">
  24. @Lang.TelemorShowrooms
  25. </h3>
  26. <div class="box-customer f-Helvetica">
  27. <div class="form-search d-flex align-items-center mb-4">
  28. <label><b class="f14"> @Lang.SelectArea</b></label>
  29. <select id="inputState" class="form-control">
  30. @if (Model != null)
  31. {
  32. foreach (var name in Model)
  33. {
  34. <option value="@name">@name</option>
  35. }
  36. }
  37. </select>
  38. <button type="button" class=" btn-accept" onclick="loadShowroom();">@Lang.SearchShowroom</button>
  39. </div>
  40. <div id="showrooms">
  41. </div>
  42. </div>
  43. </div>
  44. </div>
  45. @section Scripts{
  46. <script>
  47. function loadShowroom() {
  48. var areaName = $("#inputState").val();
  49. $.ajax({
  50. url: ('/CustomerCare/ShowroomLoad'),
  51. type: "POST",
  52. data: {
  53. __RequestVerificationToken: $('input[name=__RequestVerificationToken]').val(),
  54. areaName: areaName
  55. },
  56. success: function (result) {
  57. $("#showrooms").html(result);
  58. },
  59. error: function (err) {
  60. console.log(err);
  61. }
  62. });
  63. }
  64. $(document).ready(function () {
  65. $("#inputState").val($("#inputState option:first").val());
  66. loadShowroom();
  67. });
  68. </script>
  69. }