• 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
        }
  • 相关阅读:
    golang基础之第一个go程序
    golang基础之工程结构
    golang基础之初识
    Prometheus神器之监控K8s集群
    Kubernetes使用GlusterFS实现数据持久化
    Go使用Makefile构建
    快排的2种分区图解
    密钥交换之DH算法
    go mod使用
    socket常见选项之SO_REUSEADDR,SO_REUSEPORT
  • 原文地址:https://www.cnblogs.com/914556495wxkj/p/3489965.html
Copyright © 2020-2023  润新知