Пример #1
0
        public static IEnumerable <VIEW_MST_PRD> ToListViewModel(IEnumerable <MST_PRD> list)
        {
            var listModel = new List <VIEW_MST_PRD>();

            foreach (MST_PRD item in list)
            {
                listModel.Add(VIEW_MST_PRD.ToViewModel(item));
            }
            return(listModel);
        }
Пример #2
0
        public static VIEW_MST_PRD ToViewModel(MST_PRD model)
        {
            VIEW_MST_PRD item = new VIEW_MST_PRD();

            item.PRD_CD         = model.PRD_CD;
            item.PRD_NAME       = model.PRD_NAME;
            item.KEYWORD        = model.KEYWORD;
            item.PRD_SHORT_DESC = model.PRD_SHORT_DESC;
            item.PRD_DESC       = model.PRD_DESC;
            item.SEQ_NO         = model.SEQ_NO;
            item.PUBLISH_DT     = model.PUBLISH_DT;
            item.ISPUBLISHED    = model.ISPUBLISHED;
            item.ISHOT          = model.ISHOT;
            item.REASON         = model.REASON;
            item.ISCHECK        = model.ISCHECK;
            item.PRD_URL        = model.PRD_URL;
            item.SUPPLIER_ID    = model.SUPPLIER_ID;
            item.CATE_ID        = model.CATE_ID;
            item.STATUS         = model.STATUS;
            item.VERSION        = model.VERSION;
            item.SYNCOPERATION  = model.SYNCOPERATION;
            item.SYNCVERSION    = model.SYNCVERSION;
            item.SYNCFLAG       = model.SYNCFLAG;
            item.CREATE_DT      = model.CREATE_DT;
            item.CREATE_BY      = model.CREATE_BY;
            item.MODIFY_DT      = model.MODIFY_DT;
            item.MODIFY_BY      = model.MODIFY_BY;
            item.CATE_IDS       = model.CATE_IDS;
            item.PRICE          = model.PRICE;
            item.ARKETPRICE     = model.ARKETPRICE;
            item.FRONTPRICE     = model.FRONTPRICE;
            item.DISCOUNT       = model.DISCOUNT;
            item.SALECOUNT      = model.SALECOUNT;
            item.SJCOUNT        = model.SJCOUNT;
            item.FLAT1          = model.FLAT1;
            item.FLAT2          = model.FLAT2;
            item.REMARK1        = model.REMARK1;
            item.REMARK2        = model.REMARK2;
            item.REMARK3        = model.REMARK3;
            item.REMARK4        = model.REMARK4;
            return(item);
        }