You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

53 lines
1.3 KiB

3 years ago
using PetaPoco;
3 years ago
using System.Web.Mvc;
3 years ago
using Pingchuan.BeijingSafeguard.BLL;
using Pingchuan.BeijingSafeguard.Model;
3 years ago
using Pingchuan.BeijingSafeguard.Utility;
3 years ago
3 years ago
namespace Pingchuan.BeijingSafeguard.App.Controllers
{
3 years ago
public class UserManagementController : BaseController
3 years ago
{
// GET: UserManagement
public ActionResult Index()
{
return View();
}
3 years ago
[HttpPost]
public JsonResult Add(User user)
{
int id = UserBLL.Add(user);
return Json(id);
}
[HttpPost]
public JsonResult Update(User user)
{
3 years ago
int count = UserBLL.Update(user);
3 years ago
return Json(count);
}
3 years ago
[HttpPost]
public JsonResult UpdatePassword(int id, string newPassword)
{
int count = UserBLL.UpdatePassword(id, newPassword);
return Json(count);
}
3 years ago
[HttpPost]
public JsonResult Delete(int id)
{
int count = UserBLL.Delete(id);
return Json(count);
}
[HttpPost]
3 years ago
public JsonResult Query(int orgId, int page, int rows)
3 years ago
{
Pagination<UserDTO> users = UserBLL.Query(orgId, page, rows);
3 years ago
return Json(users);
}
3 years ago
}
}