zoukankan      html  css  js  c++  java
  • AdminManager实体层

      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 List<Admin> GetAllAdmin()
            {
                return adminService.GetAllAdmin();
            }
    
            public int UpdateAdmin(Admin admin)
            {
                return adminService.UpdateAdmin(admin);
            }
    
            public List<Admin> GetAdminByNameAndPhone(string name, string phone)
            {
                return adminService.GetAdminByNameAndPhone(name, phone);
            }
    
            public Admin GetAdminById(int id)
            {
                return adminService.GetAdmin(id);
            }
    
            #region 分页查询
            public List<Admin> GetAdminPages(int pageSize,int pageIndex)
            {
                return adminService.GetAdminPages(pageSize, pageIndex);
            }
    
            public int GetAdminPageNum(int pageSize)
            {
                return adminService.GetAdminPageNums(pageSize);
            }
    
            public  List<Admin> GetAdminPagesNew(int pageSize,int pageIndex,string where)
            {
                return adminService.GetAdminPagesNew(pageSize, pageIndex, where);
            }
            #endregion
            #region 管理员登陆
            /// <summary>
            /// 管理员登录
            /// </summary>
            /// <param name="admin">管理员对象</param>
            /// <returns>登录状态</returns>
            public bool Login(ref Admin admin)
            {
                admin = adminService.GetAdminByParas(admin);
                if (admin.Id != 0)
                {
                    return true;
                }
                return false;
            }
            #endregion
        }
  • 相关阅读:
    HTTP请求中的GET-POST方式
    拦截器与过滤器的不同点
    SQL练习题(一)
    Maven聚合工程安装时排除掉不参与本次安装的子工程
    codeforce 796C
    [CF1216E] Numerical Sequence hard version
    【floyd+矩阵乘法】POJ 3613 Cow Relays
    BZOJ 3573米特运输
    Poj 3977 Subset
    【树形dp】Bzoj 1040骑士
  • 原文地址:https://www.cnblogs.com/914556495wxkj/p/3489965.html
Copyright © 2011-2022 走看看