Exemple #1
0
        /// <summary>
        /// 投票信息转换为list
        /// </summary>
        /// <param name="list"></param>
        /// <returns></returns>
        public List <list_info> GetFromShopVote(List <wp_shop_vote> list)
        {
            List <list_info> result = new List <list_info>();

            if (list != null && list.Count > 0)
            {
                list.ForEach(s =>
                {
                    list_info model   = new list_info();
                    model.id          = s.Id;
                    model.title       = s.title;
                    model.create_time = DateTimeHelper.GetDateString(BaseClass.ConvertToDateTime((long)s.start_time));
                    model.count       = 0;
                    model.desc        = s.remark;
                    result.Add(model);
                });
            }
            return(result);
        }
Exemple #2
0
        /// <summary>
        /// 问卷信息转换为list
        /// </summary>
        /// <param name="list"></param>
        /// <returns></returns>
        public List <list_info> GetFromSurvey(List <full_wp_survey> list)
        {
            List <list_info> result = new List <list_info>();

            if (list != null && list.Count > 0)
            {
                list.ForEach(s =>
                {
                    list_info model   = new list_info();
                    model.id          = s.wp_survey.Id;
                    model.title       = s.wp_survey.title;
                    model.create_time = DateTimeHelper.GetDateString(BaseClass.ConvertToDateTime((long)s.wp_survey.start_time));
                    model.count       = 0;
                    model.img         = s.wp_survey.Image;
                    model.desc        = s.wp_survey.intro;
                    result.Add(model);
                });
            }
            return(result);
        }
Exemple #3
0
        /// <summary>
        /// 文章信息转换为list
        /// </summary>
        /// <param name="list"></param>
        /// <returns></returns>
        public List <list_info> GetFromArticle(List <wp_article_new> list)
        {
            List <list_info> result = new List <list_info>();

            if (list != null && list.Count > 0)
            {
                list.ForEach(s =>
                {
                    list_info model   = new list_info();
                    model.id          = (uint)s.Id;
                    model.title       = s.title;
                    model.create_time = DateTimeHelper.GetDateString((DateTime)s.cTime);
                    model.count       = 0;
                    model.img         = s.image;
                    model.desc        = s.name;
                    result.Add(model);
                });
            }
            return(result);
        }