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

            item.Id             = model.Id;
            item.UserId         = model.UserId;
            item.openId         = model.openId;
            item.ThingNum       = model.ThingNum;
            item.transaction_id = model.transaction_id;
            item.orderId        = model.orderId;
            item.orderNum       = model.orderNum;
            item.productId      = model.productId;
            item.productCount   = model.productCount;
            item.productPrice   = model.productPrice;
            item.productMoney   = model.productMoney;
            item.createTim      = model.createTim;
            item.ispay          = model.ispay;
            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_TG_Thing> ToListViewModel(IEnumerable <TG_Thing> list)
        {
            var listModel = new List <VIEW_TG_Thing>();

            foreach (TG_Thing item in list)
            {
                listModel.Add(VIEW_TG_Thing.ToViewModel(item));
            }
            return(listModel);
        }