예제 #1
0
        public static IEnumerable <VIEW_TG_product> ToListViewModel(IEnumerable <TG_product> list)
        {
            var listModel = new List <VIEW_TG_product>();

            foreach (TG_product item in list)
            {
                listModel.Add(VIEW_TG_product.ToViewModel(item));
            }
            return(listModel);
        }
예제 #2
0
        public static VIEW_TG_product ToViewModel(TG_product model)
        {
            VIEW_TG_product item = new VIEW_TG_product();

            item.Id              = model.Id;
            item.cateId          = model.cateId;
            item.childCateId     = model.childCateId;
            item.cateInfo        = model.cateInfo;
            item.brandid         = model.brandid;
            item.childBrandid    = model.childBrandid;
            item.brandInfo       = model.brandInfo;
            item.productName     = model.productName;
            item.proDescrible    = model.proDescrible;
            item.mainPicNum      = model.mainPicNum;
            item.PicNum          = model.PicNum;
            item.DescriblePicNum = model.DescriblePicNum;
            item.shopprice       = model.shopprice;
            item.marketprice     = model.marketprice;
            item.disCount        = model.disCount;
            item.proColor        = model.proColor;
            item.isbest          = model.isbest;
            item.ishot           = model.ishot;
            item.isnew           = model.isnew;
            item.displayorder    = model.displayorder;
            item.proGG           = model.proGG;
            item.sjcount         = model.sjcount;
            item.isSJ            = model.isSJ;
            item.fee             = model.fee;
            item.salecount       = model.salecount;
            item.visitcount      = model.visitcount;
            item.reviewcount     = model.reviewcount;
            item.shareCount      = model.shareCount;
            item.storeCount      = model.storeCount;
            item.AddTime         = model.AddTime;
            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);
        }