Exemplo n.º 1
0
        public static IEnumerable <VMOperate> ToListPoCo(IEnumerable <Operate> list)
        {
            var listModel = new List <VMOperate>();

            foreach (Operate item in list)
            {
                listModel.Add(VMOperate.ToPoCo(item));
            }
            return(listModel);
        }
Exemplo n.º 2
0
        public static VMOperate ToPoCo(Operate operate)
        {
            VMOperate model = new VMOperate();

            model.Id        = operate.Id;
            model.MenuId    = operate.MenuId;
            model.Type      = Utils.GetEnumName <OperateTypeEnum>(operate.Type.ToString(), false);
            model.Code      = operate.Code;
            model.Name      = operate.Name;
            model.Icon      = operate.Icon;
            model.Sort      = operate.Sort;
            model.Remark    = operate.Remark;
            model.IsEnable  = operate.IsEnable;
            model.CreatedBy = operate.CreatedBy;
            model.CreatedOn = operate.CreatedOn;
            model.UpdatedBy = operate.UpdatedBy;
            model.UpdatedOn = operate.UpdatedOn;
            return(model);
        }