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