示例#1
0
        public List <Tab_MHCatalog> GetMHList(int pageIndex, int pageSize, out int totalPage, out int totalRecord)
        {
            PageCriteria page = new PageCriteria();

            page.TableName   = "[Tab_MHCatalog] a JOIN [Tab_GongZhongHao] b ON a.[F_GZHId] = b.[F_Id] JOIN [dbo].[Tab_User] c ON c.F_Id = a.[F_CreateUser]";
            page.Fields      = "a.[F_Id], a.[F_Catalog], a.[F_Logo], a.[F_About], a.[F_GZHId], c.[F_Name] [userName], a.[F_CreateUser], a.[F_CreateDate], b.[F_GZHName] [GZHName]";
            page.Condition   = "1 = 1";
            page.Sort        = "a.[F_Id] DESC";
            page.PageSize    = pageSize;
            page.CurrentPage = pageIndex;

            return(CommonRepository.GetSomeList <Tab_MHCatalog>(page, out totalPage, out totalRecord));
        }
示例#2
0
        public List <Tab_MHSale> GetMHPriceList(int gid, int pageIndex, int pageSize, out int totalPage, out int totalRecord)
        {
            PageCriteria page = new PageCriteria();

            page.TableName = "Tab_MHSale a JOIN Tab_SaleType b ON a.F_SaleType = b.F_Id JOIN Tab_MHCatalog c ON c.F_Id = a.F_Id JOIN Tab_GongZhongHao d ON d.F_Id = c.F_GZHId";
            page.Fields    = "d.F_GZHName GZHName, c.F_Catalog Catalog, a.F_Id, a.F_SaleType, b.F_Type Type, b.F_TypeValue TypeValue, a.F_Price, a.F_CreateDate";
            page.Condition = "1 = 1";
            if (gid > 0)
            {
                page.Condition += " AND d.F_Id = " + gid;
            }
            page.Sort        = "a.F_Id DESC";
            page.PageSize    = pageSize;
            page.CurrentPage = pageIndex;

            return(CommonRepository.GetSomeList <Tab_MHSale>(page, out totalPage, out totalRecord));
        }
示例#3
0
        public List <Tab_User> GetUserList(int pageIndex, int pageSize, out int totalPage, out int totalRecord)
        {
            PageCriteria page = new PageCriteria();

            page.TableName   = @"Tab_User a 
                          JOIN Tab_User_GZH_Relation b ON a.F_Id = b.F_UserId
                          JOIN Tab_GongZhongHao c ON c.F_Id = b.F_GZHId
                          JOIN Tab_User_Role_Relation d ON d.F_UserId = a.F_Id
                          JOIN Tab_Role e ON e.F_Id = d.F_RoleId";
            page.Fields      = "a.F_Id, a.F_Name, a.F_CreateDate, c.F_GZHName GZHName, e.F_Name RoleName";
            page.Condition   = "e.F_Id = 2";
            page.Sort        = "a.F_Id DESC";
            page.PageSize    = pageSize;
            page.CurrentPage = pageIndex;

            return(CommonRepository.GetSomeList <Tab_User>(page, out totalPage, out totalRecord));
        }