/// <summary>
/// 删除用户组
/// </summary>
/// <param name="Id">用户组Id</param>
/// <returns></returns>
[HttpPost]
[AdminAuthorize]
public JsonResult Delete(int Id)
{
userGroupRsy = new UserGroupRepository();
if (userGroupRsy.Delete(Id)) return Json(true);
else return Json(false);
}
function Delete(id,name) {
if (confirm("你确定要删除【" + name + "】吗?")) {
$.post("@Url.Content("~/UserGroup/Delete")", {Id:id}, function (data) {
if (data) {
alert("删除【" + name + "】成功!");
location.reload();
}
});
}
}
@model IEnumerable<Ninesky.Models.UserGroup>
@{
ViewBag.Title = "用户组列表";
Layout = "~/Views/Layout/_Manage.cshtml";
}
<div class="left">
<div class="top"></div>
左侧列表
</div>
<div class="split"></div>
<div class="workspace">
<div class="inside">
<div class="notebar">
<img alt="" src="~/Skins/Default/Manage/Images/UserGroup.gif" />用户组列表
</div>
<div class="buttonbar">@Html.ActionLink("添加用户组", "Add", "UserGroup") 用户组类型:
@Html.DropDownList("GroupTypeList")
</div>
<table>
<tr>
<th>
@Html.DisplayNameFor(model => model.Name)
</th>
<th>
@Html.DisplayNameFor(model => model.Type)
</th>
<th>
@Html.DisplayNameFor(model => model.Description)
</th>
<th></th>
</tr>
@foreach (var item in Model)
{
<tr>
<td>
@Html.DisplayFor(modelItem => item.Name)
</td>
<td>
@Html.DisplayFor(modelItem => item.Type)
</td>
<td>
@Html.DisplayFor(modelItem => item.Description)
</td>
<td>
@Html.ActionLink("修改", "Edit", new { id = item.UserGroupId }) |
<a href="javascript:void(0)" onclick="Delete(@item.UserGroupId,'@item.Name')" >删除</a>
</td>
</tr>
}
</table>
</div>
</div>
<div class="clear"></div>
<script type="text/javascript">
$("#GroupTypeList").change(function () {
window.location.href = "/UserGroup/List/" + $(this).children("option:selected").val();
})
function Delete(id,name) {
if (confirm("你确定要删除【" + name + "】吗?")) {
$.post("@Url.Content("~/UserGroup/Delete")", {Id:id}, function (data) {
if (data) {
alert("删除【" + name + "】成功!");
location.reload();
}
});
}
}
</script>
机械节能产品生产企业官网模板...
大气智能家居家具装修装饰类企业通用网站模板...
礼品公司网站模板
宽屏简约大气婚纱摄影影楼模板...
蓝白WAP手机综合医院类整站源码(独立后台)...苏ICP备2024110244号-2 苏公网安备32050702011978号 增值电信业务经营许可证编号:苏B2-20251499 | Copyright 2018 - 2025 源码网商城 (www.ymwmall.com) 版权所有