public virtual ViewConfigurationModel GetBy(ViewConfigurationModelNameCriteria criteria)
        {
            Type entityType = ClientEntities.Find(criteria.EntityType).EntityType;

            var evm = UIModel.Views.Create(entityType, criteria.ViewName);

            var m = new ViewConfigurationModel();

            m.Read(evm);
            (m as IDirtyAware).MarkSaved();

            return(m);
        }
        private EntityList DA_GetByEntity(Type entityType, string viewName)
        {
            var list = this.NewList();

            var evm = UIModel.Views.Create(entityType, viewName);

            var m = new ViewConfigurationModel();
            list.Add(m);
            m.Read(evm);
            m.MarkSaved();

            return list;
        }
        public virtual ViewConfigurationModelList GetByEntity(Type entityType, string viewName)
        {
            var list = this.NewList();

            var evm = UIModel.Views.Create(entityType, viewName);

            var m = new ViewConfigurationModel();

            list.Add(m);
            m.Read(evm);
            (m as IDirtyAware).MarkSaved();

            return(list);
        }
        public override EntityList GetByParentId(object pId, PagingInfo paging = null, EagerLoadOptions eagerLoad = null)
        {
            int parentId = (int)pId;

            var list = new ViewConfigurationCommandList();

            var evm = ViewConfigurationModel.GetEVMByParentId(parentId);

            if (RafyEnvironment.Location.IsWebUI)
            {
                list.Add(parentId, evm.AsWebView().Commands);
            }
            else
            {
                list.Add(parentId, evm.AsWPFView().Commands);
            }

            return(list);
        }
Beispiel #5
0
        public override EntityList GetByParentId(object pId, PagingInfo paging = null, EagerLoadOptions eagerLoad = null)
        {
            int parentId = (int)pId;

            var list = new ViewConfigurationPropertyList();

            var evm = ViewConfigurationModel.GetEVMByParentId(parentId);

            foreach (var p in evm.OrderedEntityProperties())
            {
                var m = new ViewConfigurationProperty();

                m.Id = RafyEnvironment.NewLocalId();
                m.ViewConfigurationModelId = parentId;
                m.Name        = p.Name;
                m.Label       = p.Label ?? p.Name;
                m.ShowInWhere = (PropertyShowInWhere)p.ShowInWhere;
                m.OrderNo     = p.OrderNo;

                list.Add(m);
            }

            return(list);
        }
Beispiel #6
0
 public void Insert(int index, ViewConfigurationModel entity)
 {
     base.Insert(index, entity);
 }
Beispiel #7
0
 public int IndexOf(ViewConfigurationModel entity)
 {
     return(base.IndexOf(entity));
 }
Beispiel #8
0
 public bool Contains(ViewConfigurationModel entity)
 {
     return(base.Contains(entity));
 }
Beispiel #9
0
 public void Add(ViewConfigurationModel entity)
 {
     base.Add(entity);
 }
Beispiel #10
0
 public bool Remove(ViewConfigurationModel entity)
 {
     return(base.Remove(entity));
 }
        private EntityList DA_GetByEntity(Type entityType, string viewName)
        {
            var list = this.NewList();

            var evm = UIModel.Views.Create(entityType, viewName);

            var m = new ViewConfigurationModel();
            list.Add(m);
            m.Read(evm);
            m.MarkSaved();

            return list;
        }
 public int IndexOf(ViewConfigurationModel entity)
 {
     return base.IndexOf(entity);
 }
 public bool Contains(ViewConfigurationModel entity)
 {
     return base.Contains(entity);
 }
 public void Add(ViewConfigurationModel entity)
 {
     base.Add(entity);
 }
 public bool Remove(ViewConfigurationModel entity)
 {
     return base.Remove(entity);
 }
 public void Insert(int index, ViewConfigurationModel entity)
 {
     base.Insert(index, entity);
 }