@using EnVisage.Code @using EnVisage.Code.HtmlHelpers @model EnVisage.Models.ProjectModel @{ ViewBag.Title = Model.Id != Guid.Empty ? "Edit " + Model.Name : "Add New Project"; } @section stylesheets { } @section Scripts { @Scripts.Render("~/bundles/angular-app-modules") }
@using (Html.BeginForm("Edit", "Project", FormMethod.Post, new { @class = "form-horizontal", @id = "frmEditProject" })) {
@Html.AntiForgeryToken() @Html.HiddenFor(model => model.Id) @Html.HiddenFor(model => model.PartForScenarioId) @Html.HiddenFor(model => model.SaveAsCopy) @Html.HiddenFor(model => model.ContinueToScenarios) @Html.HiddenFor(model => model.PartsCount) @Html.HiddenFor(model => model.InitialHasChildrenState)
General Project Information
@Html.LabelFor(model => model.Name, new { @class = "control-label" }) @Html.TextBoxFor(model => model.Name, new { @class = "form-control", @id = "IDDDD" }) @Html.ValidationMessageFor(model => model.Name)
@Html.LabelFor(model => model.Number, new { @class = "control-label" }) @Html.TextBoxFor(model => model.Number, new { @class = "form-control" }) @Html.ValidationMessageFor(model => model.Number)
@Html.LabelFor(model => model.Color, new { @class = "control-label" }) @Html.TextBoxFor(model => model.Color, new { @class = "form-control", @id = "input-color" }) @Html.ValidationMessageFor(model => model.Color)
@Html.LabelFor(model => model.CompanyId, new { @class = "control-label" }) @Html.DropDownListFor(model => model.CompanyId, Utils.GetCompanies(true), new { @class = "form-control forselect2" }) @Html.ValidationMessageFor(model => model.CompanyId)
@Html.LabelFor(model => model.HasChildren, new { @class = "control-label" }) @Html.CheckBoxFor(model => model.HasChildren, new { @class = "switcher form-control" }) @Html.ValidationMessageFor(model => model.HasChildren)
Project Details @Html.EditorFor(t => t.Parts)
@Html.ValidationSummary(false, "The project could not be saved due to the following errors:") @if (Model == null || Model.Id == Guid.Empty) {
Please note! System will automatically give you and all contributors of teams selected the Full Access permissions for this project. Other permissions need to be manually set up through Administration.
}
}
@if (SecurityManager.CheckSecurityObjectPermission(Areas.Scenarios, AccessLevel.Write)) { if (!Model.HasChildren) { Add Scenario

} }
@if (Model.HasChildren) { foreach (EnVisage.Models.ProjectPartModel pm in Model.Parts) { List partScenarios = new List(); if (Model.Scenarios != null) { partScenarios = Model.Scenarios.Where(s => s.Type != ScenarioType.Actuals && s.ProjectId == pm.Id).OrderByDescending(s => s.Status).ThenBy(s => s.Name).ToList(); } if (partScenarios.Count > 0) { foreach (var scenario in partScenarios) { } } } } else if (Model.Scenarios != null) { foreach (var scenario in Model.Scenarios.OrderByDescending(s => s.Status).ThenBy(s => s.Name)) { if (scenario.Type != ScenarioType.Actuals) { } } }
Status Scenario Type Name Projected Revenue Expected Gross Margin Calculated Gross Margin Start Date End Date
@if (SecurityManager.CheckSecurityObjectPermission(Areas.Scenarios, AccessLevel.Write)) { Add Scenario@Html.Raw("  "); } @pm.Name
@scenario.Status @scenario.Type @scenario.Name @(scenario.ProjectedRevenue.HasValue ? scenario.ProjectedRevenue.Value.ToString("#") : string.Empty) @(scenario.ExpectedGrossMargin.HasValue ? scenario.ExpectedGrossMargin.Value.ToString("p") : string.Empty) @(scenario.CalculatedGrossMargin.HasValue ? scenario.CalculatedGrossMargin.Value.ToString("p") : string.Empty) @(scenario.StartDate.HasValue ? scenario.StartDate.Value.ToShortDateString() : string.Empty) @(scenario.EndDate.HasValue ? scenario.EndDate.Value.ToShortDateString() : string.Empty) @if (scenario.Status.HasValue && scenario.Status.Value == ScenarioStatus.Active) { } else if (scenario.Status.HasValue && scenario.Status.Value == ScenarioStatus.Inactive) { } Delete
@scenario.Status @scenario.Type @scenario.Name @(scenario.ProjectedRevenue.HasValue ? scenario.ProjectedRevenue.Value.ToString("#") : string.Empty) @(scenario.ExpectedGrossMargin.HasValue ? scenario.ExpectedGrossMargin.Value.ToString("p") : string.Empty) @(scenario.CalculatedGrossMargin.HasValue ? scenario.CalculatedGrossMargin.Value.ToString("p") : string.Empty) @(scenario.StartDate.HasValue ? scenario.StartDate.Value.ToShortDateString() : string.Empty) @(scenario.EndDate.HasValue ? scenario.EndDate.Value.ToShortDateString() : string.Empty) @if (scenario.Status.HasValue && scenario.Status.Value == ScenarioStatus.Active) { } else if (scenario.Status.HasValue && scenario.Status.Value == ScenarioStatus.Inactive) { } Delete
@if (Model.HasChildren) {
@Html.Partial("../Scenarios/_masterScenarioCalendar", Model.Id) }
Add Note

@if (Model.Notes.Count == 0) { } else { foreach (var note in Model.Notes) { } }
Date Author Title Details
There are no notes for this project
@((note.DateAdded == null) ? "N/A" : note.DateAdded.ToString("d")) @note.Author.UserName @note.Title @(!string.IsNullOrEmpty(note.Details) ? (note.Details.Length < 200 ? note.Details : note.Details.Substring(0, 197) + "...") : "") Edit Delete