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.
		
		
		
	
	
		
		
			
	
	
		
			
				
					
						
							|  |  |  | using PetaPoco; | 
					
						
							|  |  |  | using System.Web.Mvc; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | using Pingchuan.BeijingSafeguard.BLL; | 
					
						
							|  |  |  | using Pingchuan.BeijingSafeguard.Model; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | namespace Pingchuan.BeijingSafeguard.App.Controllers | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  |     public class OrgManagementController : BaseController | 
					
						
							|  |  |  |     { | 
					
						
							|  |  |  |         // GET: OrgManagement
 | 
					
						
							|  |  |  |         public ActionResult Index() | 
					
						
							|  |  |  |         { | 
					
						
							|  |  |  |             return View(); | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         [HttpPost] | 
					
						
							|  |  |  |         public JsonResult Add(Org org) | 
					
						
							|  |  |  |         { | 
					
						
							|  |  |  |             int id = OrgBLL.Add(org); | 
					
						
							|  |  |  |             return Json(id); | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         [HttpPost] | 
					
						
							|  |  |  |         public JsonResult Update(Org org) | 
					
						
							|  |  |  |         { | 
					
						
							|  |  |  |             int count = OrgBLL.Update(org); | 
					
						
							|  |  |  |             return Json(count); | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         [HttpPost] | 
					
						
							|  |  |  |         public JsonResult Delete(int id) | 
					
						
							|  |  |  |         { | 
					
						
							|  |  |  |             int count = OrgBLL.Delete(id); | 
					
						
							|  |  |  |             return Json(count); | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         [HttpPost] | 
					
						
							|  |  |  |         public JsonResult Query(int page, int rows) | 
					
						
							|  |  |  |         { | 
					
						
							|  |  |  |             Pagination<Org> orgs = OrgBLL.Query(page, rows); | 
					
						
							|  |  |  |             return Json(orgs); | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  | } |