lemming
10/14/2011 - 12:27 PM

gistfile1.cs

@using Karavay.Logic.ObjectModel
@using Karavay.Procurement.WebFrontEnd.Core
@model IEnumerator<SignedSpec>
@*@while (Model.MoveNext())
{
  <div>@Html.DisplayFor(model => model.Current.Name)</div>
  foreach (var category in Model.Current.Categories)
  {
      <text>@category.Name</text>
  }
}
@{
  Model.Reset();
}*@
This is my supp ID: "@ViewBag.SelectedSuppID"
<table>
  <tr>
    <th>
      @Html.LabelFor(model => model.Current.Name)
    </th>
    <th>
      @Html.LabelFor(model => Model.Current.ID)
    </th>
    <th>
      Файл
    </th>
  </tr>
  @while (Model.MoveNext())
  {
    <tr>
      <td>@Html.DisplayFor(model => model.Current.Name)
      </td>
      <td>@Html.DisplayFor(model => model.Current.ID)
      </td>
      <td style="text-align: center">
        @if (Model.Current.FileID > 0)
        {
          @Html.ActionLink("Загрузить", "ЗагрузитьДоговор", new { supplierId = ViewBag.SelectedSuppID, signSpecId = Model.Current.ID }, new { target = "blank" })
        }
        else
        {
          <text>&ndash;</text>
        }
      </td>
      @*<td>
        @Html.ActionLink(" ", "РедактироватьДоговор", new { contractId = Model.Current.ID }, new { @class = "edit_button", @title = "Изменить параметры этого договора" })
        @Html.ActionLink(" ", "УдалитьДоговор", new { supplierId = ViewBag.SelectedSuppID, contractId = Model.Current.ID }, new { @class = "delete_button", @title = "Удалить этот договор" })
      </td>*@
    </tr>
  }
</table>
<p>
  <button onclick=" window.location.href='@Url.Action("ДобавитьДоговор", new { supplierId = ViewBag.SelectedSuppID })'">
    Прикрепить новый договор</button>
    <text>This is my supp ID: "@ViewBag.SelectedSuppID"</text>
</p>