@model CZBK.ItcastOA.Model.RoleInfo
@{
Layout = null;
}
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width" />
<title>添加角色</title>
<script src="~/Scripts/jquery-1.7.1.min.js"></script>
<script src="~/Scripts/jquery.unobtrusive-ajax.min.js"></script>
<script type="text/javascript">
function subForm() {
$("#addRoleForm").submit();
}
function afterAdd(data) {
//子窗体调用父窗体中的方法。
window.parent.afterAdd(data);
}
</script>
</head>
<body>
@using (Ajax.BeginForm("AddRoleInfo", "RoleInfo", new { }, new AjaxOptions() { OnSuccess = "afterAdd" }, new {id="addRoleForm"}))
{
@Html.ValidationSummary(true)
<fieldset>
<legend>RoleInfo</legend>
<div class="editor-label">
@Html.LabelFor(model => model.RoleName)
</div>
<div class="editor-field">
@Html.EditorFor(model => model.RoleName)
@Html.ValidationMessageFor(model => model.RoleName)
</div>
<div class="editor-label">
@Html.LabelFor(model => model.Remark)
</div>
<div class="editor-field">
@Html.EditorFor(model => model.Remark)
@Html.ValidationMessageFor(model => model.Remark)
</div>
<div class="editor-label">
@Html.LabelFor(model => model.Sort)
</div>
<div class="editor-field">
@Html.EditorFor(model => model.Sort)
@Html.ValidationMessageFor(model => model.Sort)
</div>
</fieldset>
}
</body>
</html>