@model EnVisage.Models.CreditDepartmentModel @{ ViewBag.Title = Model != null && Model.Id != Guid.Empty ? "Edit " + Model.Name : "Add New Cost Center"; } @section Scripts { }
@using (Html.BeginForm("Edit", "CreditDepartment", FormMethod.Post, new { @class = "panel form-horizontal" })) { @Html.HiddenFor(model => model.Id) @Html.AntiForgeryToken()
@Html.LabelFor(model => model.Name, new { @class = "col-sm-2 control-label" })
@Html.TextBoxFor(model => model.Name, new { @class = "form-control" }) @Html.ValidationMessageFor(model => model.Name)
@Html.LabelFor(model => model.CreditNumber, new { @class = "col-sm-2 control-label" })
@Html.TextBoxFor(model => model.CreditNumber, new { @class = "form-control" }) @Html.ValidationMessageFor(model => model.CreditNumber)
@Html.ValidationSummary(false, "The cost center could not be saved due to the following errors:")
Back to list @if (Model != null && Model.Id != Guid.Empty) { if (Model.ExpenditureCategoryCount > 0) { Delete } else { Delete } }
}