@using EnVisage.Code.HtmlHelpers @model EnVisage.Models.PeopleResourceModel @{ ViewBag.Title = Model.Id != Guid.Empty ? "Edit People Resource" : "Add New People Resource"; } @{ var projects = EnVisage.Code.Utils.GetResourceProjects(Model.Id, User.Identity.Name); } @section Scripts { }
@using (Html.BeginForm("Edit", "PeopleResource", FormMethod.Post, new { @class = "panel form-horizontal", id = "frmEdit" })) { @Html.AntiForgeryToken() @Html.HiddenFor(model => model.Id)
@Html.LabelFor(model => model.FirstName, new { @class = "col-sm-3 control-label" })
@Html.TextBoxFor(model => model.FirstName, new { @class = "form-control" }) @Html.ValidationMessageFor(model => model.FirstName)
@Html.LabelFor(model => model.LastName, new { @class = "col-sm-3 control-label" })
@Html.TextBoxFor(model => model.LastName, new { @class = "form-control" }) @Html.ValidationMessageFor(model => model.LastName)
@Html.DropDownListFor(model => model.ExpenditureCategoryId, (IEnumerable)ViewBag.ExpendituresList, new { @class = "form-control" }) @Html.ValidationMessageFor(model => model.ExpenditureCategoryId)
@Html.DropDownListFor(model => model.TeamId, (IEnumerable)ViewBag.TeamsList, new { @class = "form-control" })
@Html.LabelFor(model => model.IsActiveEmployee, new { @class = "col-sm-3 control-label" })
@Html.CheckBoxFor(model => model.IsActiveEmployee, new { @class = "switcher" }) @Html.ValidationMessageFor(model => model.IsActiveEmployee)
@Html.CheckBoxFor(model => model.ChangeCapacity) (when category changed, changes planned capacity for both categories; when state changed, allows to maintain planned capacity) @*@if (Model.Id == Guid.Empty) { (will increase planned capacity by expenditure category's UoM value) } else { (when category changed, changes planned capacity for both categories) }*@
@Html.CheckBoxFor(model => model.FullTimeResource)
@Html.LabelFor(model => model.StartDate, new { @class = "col-sm-3 control-label" })
@Html.EditorFor(model => model.StartDate, new { @class = "form-control" }) @Html.ValidationMessageFor(model => model.StartDate)
@Html.LabelFor(model => model.EndDate, new { @class = "col-sm-3 control-label" })
@Html.EditorFor(model => model.EndDate, new { @class = "form-control" }) @Html.ValidationMessageFor(model => model.EndDate)
@Html.ValidationSummary(false, "The Scenario could not be saved due to the following errors:")
Back to people resources @if (Model.Id != Guid.Empty) { Back to people resource details } @if (Model.Id == Guid.Empty) {
@Html.CheckBoxFor(model => model.AddMore)
}
} @using (Html.BeginForm("Reassign", "PeopleResource", FormMethod.Post, new {id = "frmReassign" })) { }