Exemplo n.º 1
0
        public ContentResult NotesCount()
        {
            var entity = Lite.Parse <Entity>(Request["key"]);
            int count  = NoteWidgetHelper.CountNotes(entity);

            return(Content(count.ToString()));
        }
Exemplo n.º 2
0
        static IWidget WidgetsHelper_GetWidget(WidgetContext ctx)
        {
            Entity ie = ctx.Entity as Entity;

            if (ie == null || ie.IsNew)
            {
                return(null);
            }

            if (!Types.Contains(ie.GetType()))
            {
                return(null);
            }

            if (!Finder.IsFindable(typeof(NoteEntity)))
            {
                return(null);
            }

            return(NoteWidgetHelper.CreateWidget(ctx));
        }