|
@ -1,30 +1,41 @@ |
|
|
@model Sevomin.Models.JobParameterViewModel |
|
|
@model Sevomin.Models.JobParameterViewModel |
|
|
@{ string paramId = string.Format("value-{0}", Model.ParameterId.ToString()); |
|
|
@{ string paramId = string.Format("value-{0}", Model.ParameterId.ToString()); |
|
|
string muscowId = string.Format("moscow-{0}", Model.ParameterId.ToString()); |
|
|
string muscowId = string.Format("moscow-{0}", Model.ParameterId.ToString()); |
|
|
var MuSCoWList = new List<Tuple<string, string>>() { new Tuple<string, string>("Must", "4"), new Tuple<string, string>("Should", "3"), new Tuple<string, string>("Could", "2"), new Tuple<string, string>("Won't", "1") }; } |
|
|
|
|
|
@Html.Label(Model.ParameterName) |
|
|
|
|
|
|
|
|
var MuSCoWList = new List<Tuple<string, string>>() { new Tuple<string, string>("الزامی", "4"), new Tuple<string, string>("خیلی مهم", "3"), new Tuple<string, string>("مفید", "2") }; } |
|
|
<div class="form-group"> |
|
|
<div class="form-group"> |
|
|
@switch (Model.DisplayMethod) |
|
|
|
|
|
{ |
|
|
|
|
|
case 1: |
|
|
|
|
|
@Html.TextBox(paramId, string.Empty, new { @class = "form-control" }) |
|
|
|
|
|
break; |
|
|
|
|
|
case 2: |
|
|
|
|
|
@Html.TextArea(paramId) |
|
|
|
|
|
break; |
|
|
|
|
|
case 3: |
|
|
|
|
|
/* validator bezar baraye numeric gereftan */ |
|
|
|
|
|
@Html.TextBox(paramId) |
|
|
|
|
|
break; |
|
|
|
|
|
case 4: |
|
|
|
|
|
@Html.DropDownList(paramId, new SelectList(Model.ParameterValues, "item1", "item2"), new { @class = "form-control" }) |
|
|
|
|
|
break; |
|
|
|
|
|
default: |
|
|
|
|
|
@MvcHtmlString.Empty |
|
|
|
|
|
break; |
|
|
|
|
|
} |
|
|
|
|
|
@if (Model.HasMoscow) |
|
|
|
|
|
{ |
|
|
|
|
|
@Html.DropDownList(muscowId, new SelectList(MuSCoWList, "item2", "item1"), new { @class = "form-control" }) |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
<div class="row"> |
|
|
|
|
|
<div class="col-md-3 pull-right"> |
|
|
|
|
|
@Html.Label(Model.ParameterName) |
|
|
|
|
|
@if (!string.IsNullOrWhiteSpace(Model.CommentAvalin)) { |
|
|
|
|
|
<span class="glyphicon glyphicon-exclamation-sign form-help" data-toggle="tooltip" data-for="@paramId" data-placement="top" title="@Model.CommentAvalin"></span> |
|
|
|
|
|
} |
|
|
|
|
|
</div> |
|
|
|
|
|
<div class="col-md-4 pull-right"> |
|
|
|
|
|
@switch (Model.DisplayMethod) |
|
|
|
|
|
{ |
|
|
|
|
|
case 1: |
|
|
|
|
|
@Html.TextBox(paramId, string.Empty, new { @class = "form-control" }) |
|
|
|
|
|
break; |
|
|
|
|
|
case 2: |
|
|
|
|
|
@Html.TextArea(paramId) |
|
|
|
|
|
break; |
|
|
|
|
|
case 3: |
|
|
|
|
|
/* validator bezar baraye numeric gereftan */ |
|
|
|
|
|
@Html.TextBox(paramId, string.Empty, new { @class = "form-control" }) |
|
|
|
|
|
break; |
|
|
|
|
|
case 4: |
|
|
|
|
|
@Html.DropDownList(paramId, new SelectList(Model.ParameterValues, "item1", "item2"), Model.ParameterName, new { @class = "form-control" }) |
|
|
|
|
|
break; |
|
|
|
|
|
default: |
|
|
|
|
|
@MvcHtmlString.Empty |
|
|
|
|
|
break; |
|
|
|
|
|
} |
|
|
|
|
|
</div> |
|
|
|
|
|
<div class="col-md-3 pull-right"> |
|
|
|
|
|
@if (Model.HasMoscow) |
|
|
|
|
|
{ |
|
|
|
|
|
@Html.DropDownList(muscowId, new SelectList(MuSCoWList, "item2", "item1", "2"), new { @class = "form-control" }) |
|
|
|
|
|
} |
|
|
|
|
|
</div> |
|
|
|
|
|
</div> |
|
|
</div> |
|
|
</div> |