<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Admin/AdminMain.Master" Inherits="System.Web.Mvc.ViewPage<MvcEnterprise.Models.DataSet1+AdminRow>" %>

<asp:Content ID="Content0" ContentPlaceHolderID="HeadContent" runat="server">
    <script src="../../Scripts/MicrosoftAjax.js" type="text/javascript"></script>
    <script src="../../Scripts/MicrosoftMvcAjax.js" type="text/javascript"></script>
    <script src="../../Scripts/MicrosoftMvcValidation.js" type="text/javascript"></script>
    <script src="../../Scripts/jquery-1.3.2.min.js" type="text/javascript"></script>
    <script src="../../Scripts/Admin.js" type="text/javascript"></script>
    <script src="<%=Url.Content("~/Content/fckeditor/fckeditor.js")%>" type="text/javascript"></script>
    <%Html.EnableClientValidation(); %>
</asp:Content>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
    编辑内容
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <div>
        <%= Html.ActionLink("返回列表","AdminList") %></div>
    <hr />
    <% using (Html.BeginForm())
       {%>
    <div>
        <%--管理员帐号--%>
        <span class="editor-label"><%= Html.LabelFor(model => model.AdminName) %>：</span>
        <span class="editor-field">
            <% if (!string.IsNullOrEmpty(Model.AdminName))
               { %>
            <%= Html.TextBoxFor(model => model.AdminName, new { @readonly = "readonly" })%>
            <%}
               else
               { 
            %>
            <%= Html.TextBoxFor(model => model.AdminName)%>
            <%
                } %>
            <%= Html.DisplayToolTipFor(model => model.AdminName) %> <%= Html.ValidationMessageFor(model => model.AdminName) %></span>
        <%--是否锁定--%>
        <span><%= Html.LabelFor(model => model.Locked) %>：<%= Html.CheckBoxFor(model => model.Locked) %><%= Html.DisplayToolTipFor(model => model.Locked) %><%= Html.ValidationMessageFor(model => model.Locked) %></span>
    </div>
    <div>
        <%--管理员密码--%>
        <span class="editor-label"><%= Html.LabelFor(model => model.Password) %>：</span>
        <span class="editor-field"><input type="text" name="Password" /> <%= Html.DisplayToolTip("不修改请留空。") %><%=Html.ValidationMessage("Password") %></span>
    </div>
    <div>
        <%--管理员姓名--%>
        <span class="editor-label"><%= Html.LabelFor(model => model.UserName) %>：</span>
        <span class="editor-field"><%= Html.TextBoxFor(model => model.UserName)%> <%= Html.DisplayToolTipFor(model => model.UserName) %>
            <%= Html.ValidationMessageFor(model => model.UserName) %></span>
    </div>
    <div>
        <%--管理员ID--%>
        <%= Html.HiddenFor(model=>model.ID) %>
    </div>
    <div>
        <%--备注信息--%>
        <span class="editor-label"><%= Html.LabelFor(model => model.Explain) %>：</span>
        <span class="editor-field"><%= Html.TextAreaFor(model => model.Explain) %> <%= Html.DisplayToolTipFor(model => model.Explain) %>
            <%= Html.ValidationMessageFor(model => model.Explain) %></span>
    </div>
    <div>
        <%--添加时间--%>
        <span class="editor-label"><%= Html.LabelFor(model => model.AddTime) %>：</span>
        <span class="editor-field"><%= Html.TextBoxFor(model => model.AddTime, new { @readonly = "readonly" })%>
            <%= Html.DisplayToolTipFor(model => model.AddTime) %> <%= Html.ValidationMessageFor(model => model.AddTime) %></span>
    </div>
    <div>
        <%--最后登录时间--%>
        <span class="editor-label"><%= Html.LabelFor(model => model.LastLoginTime) %>：</span>
        <span class="editor-field"><%= Html.TextBoxFor(model => model.LastLoginTime, new { @readonly = "readonly" })%>
            <%= Html.DisplayToolTipFor(model => model.LastLoginTime) %> <%= Html.ValidationMessageFor(model => model.LastLoginTime) %></span>
    </div>
    <div>
        <%--最后登录IP--%>
        <span class="editor-label"><%= Html.LabelFor(model => model.LastLoginIP) %>：</span>
        <span class="editor-field"><%= Html.TextBoxFor(model => model.LastLoginIP, new { @readonly = "readonly" })%>
            <%= Html.DisplayToolTipFor(model => model.LastLoginIP) %> <%= Html.ValidationMessageFor(model => model.LastLoginIP) %></span>
    </div>
    <p><input type="submit" value="保 存" /> </p>
    <% } %>
</asp:Content>

