Beispiel #1
0
        public List <WishList> GetWishReport(GetReportDataParams param, out int totalCount)
        {
            DataSet ds = MSSqlHelper.GetReportData("WishList", param, XMLID.Admin, out totalCount);
            var     dt = ds.Tables[0];

            if (dt == null)
            {
                return(new List <WishList>());
            }

            var article = (from l in dt.AsEnumerable()
                           select new WishList
            {
                ID = l.Field <int>("ID"),
                Count = l.Field <int>("Count"),
                DateStart = l.Field <DateTime?>("DateStart"),
                Name = l.Field <string>("Name"),
                Title = l.Field <string>("Title"),
                Support = l.Field <int>("Support"),
                StatusID = l.Field <int>("Status"),
                UserName = l.Field <string>("AddUser"),
                ApplyUser = l.Field <string>("ApplyUser"),
                UserID = l.Field <int>("UserID"),
                ApplyUserID = l.Field <int>("ApplyUserID"),
                PictureFile = l.Field <string>("PictureFile"),
            }).ToList();

            article.ForEach(m => m.Status = GetStatusName(m.StatusID));

            return(article);
        }
Beispiel #2
0
        public List <ColumnList> GetColumnList(GetReportDataParams param, out int totalCount)
        {
            DataSet ds = MSSqlHelper.GetReportData("ColumnList", param, out totalCount);
            var     dt = ds.Tables[0];

            if (dt == null)
            {
                return(new List <ColumnList>());
            }

            var article = (from l in dt.AsEnumerable()
                           select new ColumnList
            {
                ColumuName = l.Field <string>("ColumnName"),
                ID = l.Field <int>("ID"),
                IsPublic = l.Field <string>("IsPublic"),
                AdminListUrl = l.Field <string>("AdminListUrl"),
                ContentTemplateID = l.Field <int>("ContentTemplateID"),
                ParentID = l.Field <int?>("ParentID"),
                SortOrder = l.Field <int>("SortOrder"),
                UpdateDate = l.Field <DateTime>("UpdateDate"),
                UpdateUser = l.Field <string>("UserName"),
            }).ToList();

            return(article);
        }
Beispiel #3
0
        public List <User> GetUserList(GetReportDataParams param, out int totalCount)
        {
            DataSet ds = MSSqlHelper.GetReportData("UserList", param, XMLID.Admin, out totalCount);
            var     dt = ds.Tables[0];

            if (dt == null)
            {
                return(new List <User>());
            }

            var list = (from l in dt.AsEnumerable()
                        select new User
            {
                ID = l.Field <int>("ID"),
                //Count = l.Field<int>("Count"),
                DateStart = l.Field <DateTime>("DateStart"),
                //DateEnd = l.Field<DateTime?>("DateEnd"),
                Description = l.Field <string>("Description"),
                Support = l.Field <int>("Support"),
                Phone = l.Field <string>("Phone"),
                HeadPicture = l.Field <string>("HeadPicture"),
                UserName = l.Field <string>("UserName"),
                LastLoginDate = l.Field <DateTime>("LastLoginDate"),
                Heart = l.Field <int>("Heart")
            }).ToList();

            return(list);
        }
Beispiel #4
0
        public List <ArticleList> GetArticleList(GetReportDataParams param, out int totalCount)
        {
            DataSet ds = MSSqlHelper.GetReportData("ArticleList", param, out totalCount);
            var     dt = ds.Tables[0];

            if (dt == null)
            {
                return(new List <ArticleList>());
            }

            List <ArticleList> article = (from l in dt.AsEnumerable()
                                          select new ArticleList
            {
                ID = l.Field <int>("ID"),
                ColumnName = l.Field <string>("ColumnName"),
                PageVisits = l.Field <int>("PageVisits"),
                UpdateTime = l.Field <DateTime>("UpdateTime"),
                UpdateUser = l.Field <string>("UpdateUser"),
                ShortTitle = l.Field <string>("ShortTitle"),
                SortOrder = l.Field <int>("SortOrder"),
                Title = l.Field <string>("Title")
            }).ToList();

            return(article.ToList());
        }
Beispiel #5
0
        /// <summary>
        /// 课程列表
        /// </summary>
        /// <param name="param"></param>
        /// <param name="totalCount"></param>
        /// <returns></returns>
        public List <CourseEntity> GetCourseReport(GetReportDataParams param, out int totalCount)
        {
            DataSet ds = MSSqlHelper.GetReportData("CourseList", param, out totalCount);
            var     dt = ds.Tables[0];

            if (dt == null)
            {
                return(new List <CourseEntity>());
            }

            var article = (from l in dt.AsEnumerable()
                           select new CourseEntity
            {
                ID = l.Field <int>("ID"),
                AddUserName = l.Field <string>("UserName"),
                Contact = l.Field <string>("Contact"),
                AddDate = l.Field <DateTime>("AddDate"),
                StartDate = l.Field <DateTime?>("StartDate"),
                CourseName = l.Field <string>("CourseName"),
                Industry = l.Field <string>("Industry"),
                CourseType = l.Field <string>("CourseType"),
                ApplyCount = l.Field <int?>("ApplyCount"),
                State = l.Field <int>("State")
            }).ToList();

            return(article);
        }
Beispiel #6
0
        public List <DocumentEntity> GetDocumentList(GetReportDataParams param, out int totalCount)
        {
            DataSet ds = MSSqlHelper.GetReportData("DocumentsList", param, out totalCount);
            var     dt = ds.Tables[0];

            if (dt == null)
            {
                return(new List <DocumentEntity>());
            }

            var article = (from l in dt.AsEnumerable()
                           select new DocumentEntity
            {
                Content = l.Field <string>("Content"),
                ID = l.Field <int>("ID"),
                MetaDescription = l.Field <string>("MetaDescription"),
                MetaKeywords = l.Field <string>("MetaKeywords"),
                Overview = l.Field <string>("Overview"),
                PageTitle = l.Field <string>("PageTitle"),
                PageVisits = l.Field <int?>("PageVisits"),
                Slug = l.Field <string>("Slug"),
                Title = l.Field <string>("Title"),
                UpdateUser = l.Field <int?>("UpdateUser"),
                DateCreated = l.Field <DateTime>("DateCreated"),
                UpdateUserName = l.Field <string>("UpdateUserName")
            }).ToList();

            return(article);
        }
Beispiel #7
0
        public List <UserEntity> GetUserListReport(GetReportDataParams param, out int totalCount)
        {
            DataSet ds = MSSqlHelper.GetReportData("UserList", param, out totalCount);
            var     dt = ds.Tables[0];

            if (dt == null)
            {
                return(new List <UserEntity>());
            }

            var article = (from l in dt.AsEnumerable()
                           select new UserEntity
            {
                ID = l.Field <int>("ID"),
                DateCreated = l.Field <DateTime>("DateCreated"),
                DateLastLogin = l.Field <DateTime>("DateLastLogin"),
                IsActive = l.Field <string>("IsActive"),
                UserName = l.Field <string>("UserName")
            }).ToList();

            return(article);
        }
Beispiel #8
0
        public List <ArticleImageEntity> GetArticleImageList(GetReportDataParams param, out int totalCount)
        {
            DataSet ds = MSSqlHelper.GetReportData("ArticleImageList", param, out totalCount);
            var     dt = ds.Tables[0];

            if (dt == null)
            {
                return(new List <ArticleImageEntity>());
            }

            var article = (from l in dt.AsEnumerable()
                           select new ArticleImageEntity
            {
                Author = l.Field <string>("Author"),
                UpdateUser = l.Field <string>("UserName"),
                Title = l.Field <string>("Title"),
                Source = l.Field <string>("Source"),
                SortOrder = l.Field <int>("SortOrder"),
                Slug = l.Field <string>("Slug"),
                ShortTitle = l.Field <string>("ShortTitle"),
                PageVisits = l.Field <int>("PageVisits"),
                PageTitle = l.Field <string>("PageTitle"),
                MetaKeywords = l.Field <string>("MetaKeywords"),
                MetaDescription = l.Field <string>("MetaDescription"),
                DateCreated = l.Field <DateTime>("DateCreated"),
                //Content = l.Field<string>("Content"),
                //IsDelete = l.IsDelete,
                Overview = l.Field <string>("Overview"),
                Photo = l.Field <string>("Photo"),
                ColumnID = l.Field <int>("ColumnID"),
                ID = l.Field <int>("ID")
            }).ToList();

            //article.ForEach(m => m.Photo =
            //    _db.Pictures.Where(l => l.TargetID == m.ID && l.Type == PictureType.ArticleImage
            //        && l.IsDefault == PublicType.Yes).Select(n => n.PictureUrl).FirstOrDefault());

            return(article.ToList());
        }
Beispiel #9
0
        public List <SidebarEntity> GetSidebarList(GetReportDataParams param, out int totalCount)
        {
            DataSet ds = MSSqlHelper.GetReportData("SidebarList", param, out totalCount);
            var     dt = ds.Tables[0];

            if (dt == null)
            {
                return(new List <SidebarEntity>());
            }

            var article = (from l in dt.AsEnumerable()
                           select new SidebarEntity
            {
                UpdateUser = l.Field <string>("UpdateUser"),
                Title = l.Field <string>("Title"),
                Type = l.Field <string>("Type"),
                UpdateDate = l.Field <DateTime>("UpdateDate"),
                ColumnID = l.Field <int>("ColumnID"),
                ID = l.Field <int>("ID")
            }).ToList();

            return(article.ToList());
        }
Beispiel #10
0
        public List <News> GetNewsList(GetReportDataParams param, out int totalCount)
        {
            DataSet ds = MSSqlHelper.GetReportData("NewsList", param, XMLID.Admin, out totalCount);
            var     dt = ds.Tables[0];

            if (dt == null)
            {
                return(new List <News>());
            }

            var article = (from l in dt.AsEnumerable()
                           select new News
            {
                ID = l.Field <int>("ID"),
                Count = l.Field <int>("Count"),
                Title = l.Field <string>("Title"),
                Content = l.Field <string>("Content"),
                SortOrder = l.Field <int>("SortOrder"),
                DateCreated = l.Field <DateTime>("DateCreated")
            }).ToList();

            return(article);
        }
Beispiel #11
0
        public List <IndustryEntity> GetIndustryListReport(GetReportDataParams param, out int totalCount)
        {
            DataSet ds = MSSqlHelper.GetReportData("IndustryList", param, out totalCount);
            var     dt = ds.Tables[0];

            if (dt == null)
            {
                return(new List <IndustryEntity>());
            }

            var article = (from l in dt.AsEnumerable()
                           select new IndustryEntity
            {
                ID = l.Field <int>("ID"),
                AddDate = l.Field <DateTime>("AddDate"),
                UserID = l.Field <int?>("UserID"),
                UserName = l.Field <string>("UserName"),
                IndustryName = l.Field <string>("IndustryName"),
                Description = l.Field <string>("Description")
            }).ToList();

            return(article.ToList());
        }
Beispiel #12
0
        /// <summary>
        /// 课程类型列表
        /// </summary>
        /// <param name="param"></param>
        /// <param name="totalCount"></param>
        /// <returns></returns>
        public List <CourseTypeEntity> GetCourseTypeReport(GetReportDataParams param, out int totalCount)
        {
            DataSet ds = MSSqlHelper.GetReportData("CourseTypeList", param, out totalCount);
            var     dt = ds.Tables[0];

            if (dt == null)
            {
                return(new List <CourseTypeEntity>());
            }

            var article = (from l in dt.AsEnumerable()
                           select new CourseTypeEntity
            {
                ID = l.Field <int>("ID"),
                ParentID = l.Field <int>("ParentID"),
                AddDate = l.Field <DateTime>("AddDate"),
                UserID = l.Field <int>("UserID"),
                UserName = l.Field <string>("UserName"),
                SortOrder = l.Field <int>("SortOrder"),
                TypeName = l.Field <string>("TypeName")
            }).ToList();

            return(article);
        }