Exemple #1
0
        public override ChildrenListModel <TEntity, TParent> ListModel(ChildrenListGetModel req)
        {
            var m = base.ListModel(req);

            m.Parent = DataContext.Set <TParent>().SingleOrDefault(p => p.ID == req.ParentID);
            return(m);
        }
        EntitiesForSelectionModel ForSelectionModel(ChildrenListGetModel get)
        {
            throw new Lpp.Utilities.CodeToBeUpdatedException();

            //var ee = Entities.All.Where( FilterByParent( get.ParentId ) );
            //if ( !get.SearchTerm.NullOrEmpty() )
            //{
            //    var s = Search( get.SearchTerm );
            //    if ( s != null ) ee = ee.Where( s );
            //}

            //return ee
            //    .ListModel( get, Sort )
            //    .EntitiesForSelection( e => e.Id, e => e.Name, (url,m) => url.Action( (TController c) => c.ForSelectionBody( m ) ) );
        }
Exemple #3
0
 protected override ChildCreateGetModel CreateFromList(ChildrenListGetModel listModel)
 {
     return(new ChildCreateGetModel {
         ParentID = listModel.ParentID
     });
 }
 public ActionResult ForSelectionBody(ChildrenListGetModel get)
 {
     return(View <Views.Crud.ForSelectionList>().WithModel(ForSelectionModel(get)));
 }