From feb4ecff7d32984acbb9cb66a6319191ab0a1d26 Mon Sep 17 00:00:00 2001 From: Milad Karbasizadeh Date: Sun, 30 Mar 2014 18:09:15 +0430 Subject: [PATCH] job edit completed --- Sevomin.WebFrontend/Sevomin.WebFrontend.csproj | 1 + .../Views/Shared/JobParameterViewModel.cshtml | 8 ++++---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/Sevomin.WebFrontend/Sevomin.WebFrontend.csproj b/Sevomin.WebFrontend/Sevomin.WebFrontend.csproj index c04667e..d0aafd0 100644 --- a/Sevomin.WebFrontend/Sevomin.WebFrontend.csproj +++ b/Sevomin.WebFrontend/Sevomin.WebFrontend.csproj @@ -244,6 +244,7 @@ + Web.config diff --git a/Sevomin.WebFrontend/Views/Shared/JobParameterViewModel.cshtml b/Sevomin.WebFrontend/Views/Shared/JobParameterViewModel.cshtml index b2d1a91..ea2e950 100644 --- a/Sevomin.WebFrontend/Views/Shared/JobParameterViewModel.cshtml +++ b/Sevomin.WebFrontend/Views/Shared/JobParameterViewModel.cshtml @@ -14,17 +14,17 @@ @switch (Model.DisplayMethod) { case 1: - @Html.TextBox(paramId, string.Empty, new { @class = "form-control" }) + @Html.TextBox(paramId, Model.StringValue, 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" }) + @Html.TextBox(paramId, Model.StringValue, new { @class = "form-control" }) break; case 4: - @Html.DropDownList(paramId, new SelectList(Model.ParameterValues, "item1", "item2"), "انتخاب کنید ...", new { @class = "form-control" }) + @Html.DropDownList(paramId, new SelectList(Model.ParameterValues, "item1", "item2", Model.StringValue), "انتخاب کنید ...", new { @class = "form-control" }) break; default: @MvcHtmlString.Empty @@ -34,7 +34,7 @@
@if (Model.HasMoscow) { - @Html.DropDownList(muscowId, new SelectList(MuSCoWList, "item2", "item1", "2"), new { @class = "form-control" }) + @Html.DropDownList(muscowId, new SelectList(MuSCoWList, "item2", "item1", string.IsNullOrWhiteSpace(Model.StringValue) ? "2" : Model.StringValue), new { @class = "form-control" }) }