@using EnVisage.Code @using EnVisage.Models @using EnVisage.Code.HtmlHelpers @model EnVisage.Models.ExpenditureCategoryModel @{ ViewBag.Title = Model.Id != Guid.Empty ? "Edit " + Model.Name : "Add New Expenditure Category"; } @section scripts { }
@using (Html.BeginForm()) { @Html.AntiForgeryToken() if (Model.Id != Guid.Empty) { @Html.HiddenFor(t => t.ExpenditureId) @Html.HiddenFor(t => t.UseType) }
@Html.ValidationSummary(true) @Html.HiddenFor(model => model.Id)
@Html.LabelFor(model => model.ExpenditureId, "Expenditure", new { @class = "control-label col-sm-2 disabled" })
@if (Model.Id == Guid.Empty) { @Html.DropDownListFor(model => model.ExpenditureId, Utils.GetExpenditures(), new { @class = "form-control" }) } else { @Html.DropDownListFor(model => model.ExpenditureId, Utils.GetExpenditures(), new { @class = "form-control disabled", @disabled = "disabled" }) } @Html.ValidationMessageFor(model => model.ExpenditureId)
@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.GLId, "GL Account Name", new { @class = "control-label col-sm-2" })
@Html.DropDownListFor(model => model.GLId, Utils.GetGLAccounts(), new { @class = "form-control disabled" }) @Html.ValidationMessageFor(model => model.GLId)
@Html.LabelFor(model => model.UOMId, new { @class = "control-label col-sm-2" })
@Html.DropDownListFor(model => model.UOMId, Utils.GetUnitsOfMeasure(), new { @class = "form-control disabled" }) @Html.ValidationMessageFor(model => model.UOMId)
@Html.LabelFor(model => model.CreditId, new { @class = "control-label col-sm-2" })
@Html.DropDownListFor(model => model.CreditId, Utils.GetCreditDepartments(), new { @class = "form-control disabled" }) @Html.ValidationMessageFor(model => model.CreditId)
@Html.LabelFor(model => model.Type, "Category Type", new { @class = "control-label col-sm-2" })
@if (Model.Id == Guid.Empty) { @Html.DropDownListFor(model => model.Type, Utils.GetCategoryTypes(), new { @class = "form-control disabled", @onchange = "categoryChanged()"}) } else { @Html.DropDownListFor(model => model.Type, Utils.GetCategoryTypes(), new { @class = "form-control disabled", @onchange = "categoryChanged()", @disabled = "disabled"}) } @Html.ValidationMessageFor(model => model.Type)
@Html.LabelFor(model => model.UseType, "Usage", new { @class = "control-label col-sm-2" })
@if (Model.Id == Guid.Empty) { @Html.DropDownListFor(model => model.UseType, Utils.GetUseTypes(), new { @class = "form-control", @onchange = "usageChanged()" }) } else { @Html.DropDownListFor(model => model.UseType, Utils.GetUseTypes(), new { @class = "form-control", @disabled = "disabled" }) } @Html.ValidationMessageFor(model => model.UseType)
@*
@Html.LabelFor(model => model.CGEFX, "CGEFX", new { @class = "control-label col-sm-2" })
@Html.DropDownListFor(model => model.CGEFX, Utils.GetCGEFX(), new { @class = "form-control disabled" }) @Html.ValidationMessageFor(model => model.CGEFX)
*@
@Html.LabelFor(model => model.SystemAttributeOne, "System Attribute One", new { @class = "control-label col-sm-2" })
@Html.DropDownListFor(model => model.SystemAttributeOne, Utils.GetSystemAttributeOne(), new { @class = "form-control disabled" }) @Html.ValidationMessageFor(model => model.SystemAttributeOne)
@Html.LabelFor(model => model.WksSubjectToFee, new { @class = "control-label col-md-2" })
@Html.TextBoxFor(model => model.WksSubjectToFee) @Html.ValidationMessageFor(model => model.WksSubjectToFee)
}
@{ Html.RenderPartial("_calculatesContainer", Model.CalculatesCategories);}
@{ Html.RenderPartial("_feesContainer", Model.Fees);}
@{ Html.RenderPartial("_ratesContainer", Model.Rates);}