Advertisement
Guest User

CombinationViewModel

a guest
Jul 2nd, 2014
203
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.07 KB | None | 0 0
  1. @model FlexSystem.BusinessLogic.ViewModels.CombinationViewModel
  2.  
  3. <div class="row panelRow">
  4.  
  5. <div class="panel panel-default combination">
  6.  
  7. @Html.HiddenFor(m => m.Number, new { @class = "rowNumber" })
  8.  
  9. <div class="panel-heading">
  10. @if (Model.Existing)
  11. {
  12. <strong>@Html.DisplayTextFor(m => m.Number)</strong>
  13. }
  14. else
  15. {
  16. <span class="productNumber">PRODNO</span><text>-</text><strong>@Html.DisplayTextFor(m => m.Number)</strong>
  17. }
  18.  
  19. <button class="btn btn-danger btn-xs pull-right delete" type="button">&times;</button>
  20. </div>
  21.  
  22. <div class="panel-body">
  23.  
  24. <div class="row">
  25.  
  26. <div class="col-md-4">
  27.  
  28. <div class="form-group" id="rowColor">
  29. @Html.LabelFor(m => m.Color)
  30. @Html.TextBoxFor(m => m.Color, new { @class = "form-control" })
  31. </div>
  32.  
  33. </div>
  34. <div class="col-md-4">
  35.  
  36. <div class="form-group" id="rowSize">
  37. @Html.LabelFor(m => m.Size)
  38. @Html.TextBoxFor(m => m.Size, new { @class = "form-control" })
  39. </div>
  40.  
  41. </div>
  42. <div class="col-md-4">
  43.  
  44. <div class="form-group" id="rowBarcode">
  45.  
  46. @Html.LabelFor(m => m.Barcode)
  47. <div class="input-group">
  48. <span class="input-group-validation-default" id="barcode-validation"></span>
  49. @Html.TextBoxFor(m => m.Barcode, new { @class = "form-control", @maxlength = "13" })
  50. <span class="input-group-btn">
  51. <button class="btn btn-default generate" type="button">Generér!</button>
  52. </span>
  53. </div>
  54.  
  55. </div>
  56.  
  57. </div>
  58.  
  59. </div>
  60.  
  61. @if (Model.CombinationInfo1.Active || Model.CombinationInfo2.Active || Model.CombinationInfo3.Active || Model.CombinationInfo4.Active)
  62. {
  63. <div class="row">
  64. @{
  65. int count = 0;
  66. if (Model.CombinationInfo1.Active)
  67. {
  68. count++;
  69. }
  70. if (Model.CombinationInfo2.Active)
  71. {
  72. count++;
  73. }
  74. if (Model.CombinationInfo3.Active)
  75. {
  76. count++;
  77. }
  78. if (Model.CombinationInfo4.Active)
  79. {
  80. count++;
  81. }
  82.  
  83. string test = String.Format("col-md-{0}", 12 / count);
  84. }
  85.  
  86. @if (Model.CombinationInfo1.Active)
  87. {
  88. <div class="@Html.Raw(test)">
  89.  
  90. <div class="form-group" id="rowCombination1">
  91. @Html.Label(Model.CombinationInfo1.Title)
  92. @Html.TextBoxFor(m => m.Combination1, new { @class = "form-control" })
  93. </div>
  94.  
  95. </div>
  96. }
  97.  
  98. @if (Model.CombinationInfo2.Active)
  99. {
  100. <div class="@Html.Raw(test)">
  101.  
  102. <div class="form-group" id="rowCombination2">
  103. @Html.Label(Model.CombinationInfo2.Title)
  104. @Html.TextBoxFor(m => m.Combination2, new { @class = "form-control" })
  105. </div>
  106.  
  107. </div>
  108. }
  109.  
  110. @if (Model.CombinationInfo3.Active)
  111. {
  112. <div class="@Html.Raw(test)">
  113.  
  114. <div class="form-group" id="rowCombination3">
  115. @Html.Label(Model.CombinationInfo3.Title)
  116. @Html.TextBoxFor(m => m.Combination3, new { @class = "form-control" })
  117. </div>
  118.  
  119. </div>
  120. }
  121.  
  122. @if (Model.CombinationInfo4.Active)
  123. {
  124. <div class="@Html.Raw(test)">
  125.  
  126. <div class="form-group" id="rowCombination4">
  127. @Html.Label(Model.CombinationInfo4.Title)
  128. @Html.TextBoxFor(m => m.Combination4, new { @class = "form-control" })
  129. </div>
  130.  
  131. </div>
  132. }
  133.  
  134. </div>
  135. }
  136.  
  137.  
  138. @Html.HiddenFor(m => m.DeleteCombination, new { @class = "mark-for-delete" })
  139.  
  140. </div>
  141. </div>
  142.  
  143. </div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement