Esempio n. 1
0
        public static YX_news ToEntity(VIEW_YX_news model)
        {
            YX_news item = new YX_news();

            item.Id              = model.Id;
            item.EventId         = model.EventId;
            item.newsTitle       = model.newsTitle;
            item.newsDescription = model.newsDescription;
            item.newsPicUrl      = model.newsPicUrl;
            item.newsUrl         = model.newsUrl;
            item.EventCate       = model.EventCate;
            item.remark1         = model.remark1;
            item.remark2         = model.remark2;
            item.remark3         = model.remark3;
            item.flat1           = model.flat1;
            item.flat2           = model.flat2;
            item.remark4         = model.remark4;
            item.remark5         = model.remark5;
            item.remark6         = model.remark6;
            item.flat7           = model.flat7;
            item.flat8           = model.flat8;
            item.RegTim1         = model.RegTim1;
            item.RegTim2         = model.RegTim2;
            return(item);
        }
Esempio n. 2
0
        public static IEnumerable <VIEW_YX_news> ToListViewModel(IEnumerable <YX_news> list)
        {
            var listModel = new List <VIEW_YX_news>();

            foreach (YX_news item in list)
            {
                listModel.Add(VIEW_YX_news.ToViewModel(item));
            }
            return(listModel);
        }
Esempio n. 3
0
        public static VIEW_YX_MenusMsg ToViewModel(VIEW_YX_news model)
        {
            VIEW_YX_MenusMsg item = new VIEW_YX_MenusMsg();

            item.MID             = model.Id;
            item.Event_ID        = model.EventId;
            item.Event_Type      = "2";
            item.EventCate       = model.EventCate;
            item.MsgContent      = model.newsTitle;
            item.NewsTitle       = model.newsTitle;
            item.NewsDescription = model.newsDescription;
            item.NewsPicUrl      = model.newsPicUrl;
            item.NewsUrl         = model.newsUrl;
            return(item);
        }