@model EnVisage.Models.WhatIfCalendarModel
@using EnVisage.Code;
@using EnVisage.Code.HtmlHelpers;
@using EnVisage.Models;
@{
ViewBag.Title = "What-If Calendar";
var isUOMHoursChecked = "checked";
if (ViewBag.IsUOMHours != null)
{
isUOMHoursChecked = ViewBag.IsUOMHours ? "checked" : string.Empty;
}
}
@section scripts
{
}
@section pagemenu
{
@using (Html.BeginForm("Index", "WhatIfCalendar", FormMethod.Post, new { @class = "panel form-horizontal", @style = "border:0;", @onsubmit = "saveSelectedScenarios();" }))
{
@Html.AntiForgeryToken()
@Html.ValidationSummary(true)
@Html.HiddenFor(x => x.LaborMaterials);
@Html.HiddenFor(x => x.SeatsCosts);
@Html.HiddenFor(x => x.IncludeActuals);
@Html.HiddenFor(x => x.StartDate);
@Html.HiddenFor(x => x.EndDate);
@Html.HiddenFor(x => x.SelectedScenarios);
@Html.LabelFor(model => model.GroupName, new { @class = "control-label" })
@Html.DropDownListFor(model => model.GroupId, Utils.GetScenarioGroup(), new { @class = "form-control disabled" })
@Html.ValidationMessageFor(model => model.GroupId)
@Html.LabelFor(model => model.SelectedScenarioType, new { @class = "control-label" })
@Html.DropDownListFor(model => model.SelectedScenarioType, EnVisage.Code.Utils.GetScenarioTypesPortfAndSched(), new { @class = "form-control disabled" })
@Html.ValidationMessageFor(model => model.SelectedScenarioType)
}
|
Scnario Name
|
Poject Name
|
Start Date
|
End Date
|
Labor Split
|
Materials
|
@foreach (var item in Model.Scenarios)
{
var isChecked = (Model.SelectedScenarios != null && Model.SelectedScenarios.IndexOf(item.Id.ToString(), System.StringComparison.Ordinal) != -1);
|
@Html.CheckBox("select", isChecked, new { @class = "control-label", @scenario = item.Id})
|
@item.Name
|
@item.ProjectName
|
@(item.StartDate.HasValue ? item.StartDate.Value.ToShortDateString():string.Empty)
|
@(item.EndDate.HasValue ? item.EndDate.Value.ToShortDateString():string.Empty)
|
@string.Format("{0:0.##} %",item.EFXSplit * 100)
|
@string.Format("{0:0.##} %",item.CGSplit * 100)
|
}
@Html.LabelFor(model => model.LaborMaterials, new { @class = "control-label" })
@Html.DropDownListFor(model => model.LaborMaterials, Utils.GetListboxItems(), new { @class = "form-control disabled", @onchange="updateHidden(this.name, $(this).val());" })
@Html.LabelFor(model => model.SeatsCosts, new { @class = "control-label" })
@Html.DropDownListFor(model => model.SeatsCosts, Utils.GetListboxItems(), new { @class = "form-control disabled", @onchange="updateHidden(this.name, $(this).val());" })
@Html.LabelFor(model => model.IncludeActuals, new { @class = "control-label" })
@Html.DropDownListFor(model => model.IncludeActuals, Utils.GetListboxItems(), new { @class = "form-control disabled", @onchange="updateHidden(this.name, $(this).val());" })
@Html.LabelFor(model => model.StartDate, new { @class = "control-label" })
@Html.EditorFor(model => model.StartDate)
@Html.ValidationMessageFor(model => model.StartDate)
@Html.LabelFor(model => model.EndDate, new { @class = "control-label" })
@Html.EditorFor(model => model.EndDate)
@Html.ValidationMessageFor(model => model.EndDate)