Advertisement
Guest User

develop

a guest
Mar 7th, 2018
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.86 KB | None | 0 0
  1. [DataType(DataType.PhoneNumber)]
  2. public double? Phone { get; set; }
  3.  
  4. [DataType(DataType.Date)]
  5. public DateTime? ScheduleTime { get; set; }
  6.  
  7. [DataType(DataType.Text)]
  8. [DisplayFormat(ApplyFormatInEditMode = true, DataFormatString = "{0:hh:mm tt}")]
  9. public DateTime? ScheduleStart { get; set; }
  10.  
  11. [DataType(DataType.Time)]
  12. public DateTime? ScheduleEnd { get; set; }
  13.  
  14.  
  15.  
  16.  
  17.  
  18. @model WorkMarketScheduleAssignmentInfoViewModel
  19.  
  20. @{
  21. var action = Model.Type == WireBackend.Services.Enums.WorkMarketAssignmentTypeEnum.Install ? "Install" : "Survey";
  22. var actor = Model.Type == WireBackend.Services.Enums.WorkMarketAssignmentTypeEnum.Install ? "Installer" : "Surveyor";
  23. }
  24.  
  25. <div class="row" style="margin-bottom: 20px">
  26. <div class="col-md-offset-2 col-md-10">
  27. <strong>@actor Name</strong>
  28. @if (!string.IsNullOrWhiteSpace(Model.Name))
  29. {
  30. <h4>@Model.Name</h4>
  31. }
  32. else
  33. {
  34. <br />
  35. <span class="text-danger">
  36. Data is not available yet.
  37. <br/>Please wait to see details on your Workmarket job.
  38. </span>
  39. }
  40. </div>
  41. </div>
  42. <div class="row" style="margin-bottom: 20px">
  43. <div class="col-md-offset-2 col-md-10">
  44. <strong>@actor phone</strong>
  45. @if (Model.Phone.HasValue)
  46. {
  47. <h4>@string.Format("{0:(###) ###-####}", Model.Phone.Value)</h4>
  48. }
  49. else
  50. {
  51. <br />
  52. <span class="text-danger">
  53. Data is not available yet.
  54. <br />Please wait to see details on your Workmarket job.
  55. </span>
  56. }
  57. </div>
  58. </div>
  59. <div class="row" style="margin-bottom: 20px">
  60. @if (Model.ScheduleTime.HasValue)
  61. {
  62. <div class="col-md-offset-2 col-md-2">
  63. <strong>@action Date</strong>
  64. <h4>@Model.ScheduleTime.Value.ToShortDateString()</h4>
  65. </div>
  66. <div class="col-md-2">
  67. <strong>Time</strong>
  68. <h4>@Model.ScheduleTime.Value.ToShortTimeString()</h4>
  69. </div>
  70. }
  71. else if (Model.ScheduleStart.HasValue && Model.ScheduleEnd.HasValue)
  72. {
  73. if (Model.ScheduleStart.Value.Date == Model.ScheduleEnd.Value.Date)
  74. {
  75. <div class="col-md-offset-2 col-md-2">
  76. <strong>@action Date</strong>
  77. <h4>@Model.ScheduleStart.Value.ToShortDateString()</h4>
  78. </div>
  79. <div class="col-md-2">
  80. <strong>Time Window</strong>
  81. <h4>@Model.ScheduleStart.Value.ToShortTimeString() - @Model.ScheduleEnd.Value.ToShortTimeString()</h4>
  82. </div>
  83. }
  84. else
  85. {
  86. <div class="col-md-offset-2 col-md-4">
  87. <strong>@action Time Window</strong>
  88. <h4>
  89. @Model.ScheduleStart.Value.ToShortDateString() @Model.ScheduleStart.Value.ToShortTimeString() -
  90. @Model.ScheduleEnd.Value.ToShortDateString() @Model.ScheduleEnd.Value.ToShortTimeString()
  91. </h4>
  92. </div>
  93. }
  94. }
  95. else if (Model.ScheduleStart.HasValue)
  96. {
  97. <div class="col-md-offset-2 col-md-2">
  98. <strong>@action Date</strong>
  99. <h4>@Model.ScheduleStart.Value.ToShortDateString()</h4>
  100. </div>
  101. <div class="col-md-2">
  102. <strong>Time</strong>
  103. <h4>@Model.ScheduleStart.Value.ToShortTimeString()</h4>
  104. </div>
  105. }
  106. else
  107. {
  108. <div class="col-md-offset-2 col-md-10">
  109. <strong>Time Window</strong>
  110. <br />
  111. <span class="text-danger">
  112. Data is not available yet.
  113. <br />Please wait to see details on your Workmarket job.
  114. </span>
  115. </div>
  116. }
  117. </div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement