Example #1
0
        public static TG_Address ToEntity(VIEW_TG_Address model)
        {
            TG_Address item = new TG_Address();

            item.Id           = model.Id;
            item.openid       = model.openid;
            item.userid       = model.userid;
            item.Uname        = model.Uname;
            item.UMoblie      = model.UMoblie;
            item.cmbProvince  = model.cmbProvince;
            item.cmbCity      = model.cmbCity;
            item.cmbArea      = model.cmbArea;
            item.AddressInfo  = model.AddressInfo;
            item.isDefaultAds = model.isDefaultAds;
            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);
        }
Example #2
0
        public static IEnumerable <VIEW_TG_Address> ToListViewModel(IEnumerable <TG_Address> list)
        {
            var listModel = new List <VIEW_TG_Address>();

            foreach (TG_Address item in list)
            {
                listModel.Add(VIEW_TG_Address.ToViewModel(item));
            }
            return(listModel);
        }