Esempio n. 1
0
 /// <summary>
 /// 读取实例集合
 /// <para>框架</para>
 /// </summary>
 /// <returns></returns>
 protected override bool ReadContentsFrame()
 {
     try
     {
         CtxContents = new Ctx();
         Contents    = CondContents.ToList();
         BuildTreeChildren("1");
         BuildContentsView();
         return(true);
     }
     catch (Exception ex) { return(ReadFailed(ex)); }
 }
Esempio n. 2
0
 /// <summary>
 /// 读取实例集合
 /// <para>框架</para>
 /// </summary>
 /// <param name="query_condition"></param>
 /// <returns></returns>
 protected bool ReadContentsFrame(Func <DbSet <T>, IQueryable <T> > query_condition)
 {
     try
     {
         CtxContents  = new Ctx();
         CondContents = query_condition(CtxContents.Set <T>());
         Contents     = CondContents.ToList();
         BuildContentsView();
         return(true);
     }
     catch (Exception ex) { return(ReadFailed(ex)); }
 }
Esempio n. 3
0
 /// <summary>
 /// 读取实例集合
 /// <para>框架</para>
 /// </summary>
 /// <param name="set_query_condition"></param>
 /// <returns></returns>
 protected bool ReadContentsFrame(Action set_query_condition)
 {
     try
     {
         CtxContents = new Ctx();
         set_query_condition();
         Contents = CondContents.ToList();
         BuildContentsView();
         return(true);
     }
     catch (Exception ex) { return(ReadFailed(ex)); }
 }
Esempio n. 4
0
 /// <summary>
 /// 读取实例集合
 /// <para>框架</para>
 /// </summary>
 /// <returns></returns>
 protected bool ReadContentsFrame()
 {
     if (CondContents == null)
     {
         return(false);
     }
     try
     {
         CtxContents = new Ctx();
         Contents    = CondContents.ToList();
         BuildContentsView();
         return(true);
     }
     catch (Exception ex) { return(ReadFailed(ex)); }
 }