<%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage" MasterPageFile="~/Views/Shared/SleisLayout.Master" %>

Add Facility

<% Html.ValidationSummary("Please correct the errors and try again"); %> <% using (Html.BeginForm()) { %> <%:Html.HiddenFor(x => x.Facility.Id)%>

> <%: Html.TextBoxFor(x => x.Facility.Identifier, new { @class = "text-input small-full-input" })%> <%: Html.ValidationMessageFor(x => x.Facility.Identifier)%>

> <%:Html.DropDownList("Facility.Identifiers[0].CountyStateFips", new SelectList(LookupUtility.Get(x=>x.FipsStateCode==ViewData[Constants.AppFipsStateCode]).OrderBy(x=>x.Value), "Code", "CodeDescription"), "", new { @class = "half-input" })%> <%:Html.ValidationMessage("Facility.Identifiers[0].CountyStateFips")%>

> <%: Html.TextBoxFor(x => x.Facility.FacName, new { @class = "text-input small-full-input" })%> <%: Html.ValidationMessageFor(x => x.Facility.FacName)%>

> <%: Html.TextBoxFor(x => x.Facility.Org, new { @class = "text-input small-full-input" })%> <%: Html.ValidationMessageFor(x => x.Facility.Org)%>

> <%: Html.TextBoxFor(x => x.Facility.Description, new { @class = "text-input small-full-input" })%> <%: Html.ValidationMessageFor(x => x.Facility.Description)%>

> <%: Html.DropDownListFor(x => x.Facility.FacilityStatus, new SelectList(LookupUtility.Get(), "Code", "Value", Model.Facility.FacilityStatus), new { @class = "text-input half-input" })%> <%: Html.ValidationMessageFor(x => x.Facility.FacilityStatus)%>

> <%: Html.EditorFor(x=>x.Facility.FacilityStatusAsOfDate,"DateTime") %> <%: Html.ValidationMessageFor(x => x.Facility.FacilityStatusAsOfDate)%>

> <%:Html.DropDownListFor(x => x.Facility.FacilityCategory, LookupUtility.Get().Select(m => new SelectListItem { Selected = m.Code == Model.Facility.FacilityCategory, Value = m.Code, Text = string.Format("{0} - {1}", m.Code, m.Value) }), "", new { @class = "text-input small-full-input" })%> <%: Html.ValidationMessageFor(x => x.Facility.FacilityCategory)%>

> value="<% Html.RenderPartial("LookupItem", LookupUtility.Get(Model.Facility.Naics)); %>" <%} else { %> value="" <% } %> select-only="true" data-autocomplete-target="autocomplete-target-naics" data-autocomplete-type="EpaFacilityNaics" data-autocomplete-type-year="<%= DateTime.Today.Year %>" data-autocomplete-size="<%=Convert.ToInt32(ViewData[Constants.AppAutocompleteResultsSize]) %>" data-autocomplete-min-len="1" /> <%:Html.HiddenFor(x => x.Facility.Naics, new { @class = "autocomplete-target-naics" })%> <%: Html.ValidationMessageFor(x => x.Facility.Naics)%>

> <%:Html.TextAreaFor(x => x.FacilityComments, new { @class = "text-input small-full-input growComments" })%> <%: Html.ValidationMessageFor(x => x.FacilityComments)%>

<%= Html.EditorFor(x => x.Facility.Location, "FacilityLocation", new { Fields = Model.Fields, renderAsAgency = true })%>

<%: Html.ActionLink("Cancel", "Home", "Agency", null, new { @id="cancelButton", @class = "cancelButton" })%>

<%} %>