public class AdminManager { private AdminService adminService = new AdminService(); public int DeleteAdmin(int id) { return adminService.DeleteAdminById(id); } public int DeleteAdmin(Admin admin) { return adminService.DeleteAdminById(admin.Id); } public ListGetAllAdmin() { return adminService.GetAllAdmin(); } public int UpdateAdmin(Admin admin) { return adminService.UpdateAdmin(admin); } public List GetAdminByNameAndPhone(string name, string phone) { return adminService.GetAdminByNameAndPhone(name, phone); } public Admin GetAdminById(int id) { return adminService.GetAdmin(id); } #region 分页查询 public List GetAdminPages(int pageSize,int pageIndex) { return adminService.GetAdminPages(pageSize, pageIndex); } public int GetAdminPageNum(int pageSize) { return adminService.GetAdminPageNums(pageSize); } public List GetAdminPagesNew(int pageSize,int pageIndex,string where) { return adminService.GetAdminPagesNew(pageSize, pageIndex, where); } #endregion #region 管理员登陆 /// /// 管理员登录 /// /// 管理员对象 ///登录状态 public bool Login(ref Admin admin) { admin = adminService.GetAdminByParas(admin); if (admin.Id != 0) { return true; } return false; } #endregion }