Exemple #1
0
 public object GetScalar(MQLBase mql)
 {
     using (var db = GetDb())
     {
         return(db.GetScalar(mql));
     }
 }
Exemple #2
0
 public MObject GetScalarToMObject(MQLBase mql)
 {
     using (var db = GetDb())
     {
         return(db.GetScalarToMObject(mql));
     }
 }
Exemple #3
0
        /// <summary>
        /// 简单的
        /// </summary>
        /// <param name="mql"></param>
        /// <param name="sumCout"></param>
        /// <param name="pageIndex"></param>
        /// <param name="pageSize"></param>
        /// <param name="oneOrderbyFieldName"></param>
        /// <returns></returns>
        public DataSet GetPagingDataSet(MQLBase mql, int pageIndex, int pageSize, string orderSql)
        {
            int     sumcout  = 0;
            int     pagecout = 0;
            DataSet ds       = GetPagingDataSet(mql, out pagecout, out sumcout, pageIndex, pageSize, orderSql);

            return(ds);
        }
Exemple #4
0
        public List <Dictionary <string, MObject> > GetDictionaryList(MQLBase mql)
        {
            using (var db = GetDb())
            {
                //  db.DebugEnabled = true;

                return(db.GetDictionaryList(mql));
            }
        }
Exemple #5
0
        public T GetEntity(MQLBase mql)
        {
            using (var db = GetDb())
            {
                //  db.DebugEnabled = true;

                return(db.GetEntity <T>(mql));
            }
        }
Exemple #6
0
        public List <T2> GetOwnList <T2>(MQLBase mql) where T2 : new()
        {
            using (var db = GetDb())
            {
                //  db.DebugEnabled = true;

                return(db.GetOwnList <T2>(mql));
            }
        }
Exemple #7
0
        public List <T> GetOwnList(MQLBase mql)
        {
            using (var db = GetDb())
            {
                //  db.DebugEnabled = true;

                return(db.GetOwnList <T>(mql));
            }
        }
Exemple #8
0
        public List <T> GetPagerToOwnList(MQLBase mql, out int sumCout, int pageIndex, int pageSize, string oneOrderbyFieldName)
        {
            int pagecout = 0;

            using (var db = GetDb())
            {
                //  db.DebugEnabled = true;

                List <T> list = db.GetPagerToOwnList <T>(mql, out pagecout, out sumCout, pageIndex, pageSize, oneOrderbyFieldName);
                return(list);
            }
        }
Exemple #9
0
 protected IList <T> TravelEntitiesByWhereCaluse(MQLBase expression)
 {
     using (var db = this.dbFactory.OpenDefalutDataBase())
     {
         IList <T> result = db.GetEntities <T>(expression);
         if (result == null)
         {
             result = new List <T>();
         }
         return(result);
     }
 }
Exemple #10
0
 public IList <T> TravleAllEntities()
 {
     using (var db = this.dbFactory.OpenDefalutDataBase())
     {
         MQLBase   mql    = onCreateMQL_QueryAllEntities();
         IList <T> result = db.GetEntities <T>(mql);
         if (result == null)
         {
             result = new List <T>();
         }
         return(result);
     }
 }
Exemple #11
0
 public DataSet GetPagingDataSet(MQLBase mql, out int pagecout, out int sumCout, int pageIndex, int pageSize, string oneOrderbyFieldName)
 {
     using (var db = GetDb())
     {
         //  db.DebugEnabled = true;
         DataSet ds = db.GetPagerToDataSet(mql, out pagecout, out sumCout, pageIndex, pageSize, oneOrderbyFieldName);
         if (pageIndex > pagecout)
         {
             return(null);
         }
         else
         {
             return(ds);
         }
     }
 }
Exemple #12
0
        public bool Query(IQueryCommand Command = null)
        {
            bool result = false;

            onPrepareQuery();
            using (var db = this.dbFactory.OpenDefalutDataBase())
            {
                MQLBase mql = Command == null?onCreateMQL_QueryAllEntities() : Command.CreateQueryMQL();

                string orderField = Command == null ? null : Command.GetOrderFieldName();
                m_Result = new List <T>(db.GetPagerToOwnList <T>(mql, out m_TotalPage, out m_RecordCount, m_CurrentPage, m_PageSize, orderField));
                result   = m_Result.Count != 0;
                onAfterQuery(result);
            }
            return(result);
        }
Exemple #13
0
 public static new MQLBase Select(params FieldBase[] fields)
 {
     return(MQLBase.Select(DbType.Sqlite, "[TB_BookReadSign]", fields));
 }
Exemple #14
0
 public static MQLBase SelectAllBut(params FieldBase[] fields)
 {
     return(MQLBase.SelectAllBut(typeof(TT_UserSet), DbType.SqlServer, "[TT_User]", fields));
 }
Exemple #15
0
 public static MQLBase SelectAll()
 {
     return(MQLBase.SelectAll(DbType.SqlServer, "[TT_User]"));
 }
Exemple #16
0
 public static MQLBase Select(params FieldBase[] fields)
 {
     return(MQLBase.Select(DbType.SqlServer, "[TT_User]", fields));
 }
Exemple #17
0
 public static new MQLBase SelectAll()
 {
     return(MQLBase.SelectAll(DbType.SqlServer, "[TS_ShopUser]"));
 }
Exemple #18
0
 public static new MQLBase SelectAll()
 {
     return(MQLBase.SelectAll(DbType.SqlServer, "[SysOperateLog]"));
 }
 public static MQLBase SelectAll()
 {
     return(MQLBase.SelectAll(DbType.SqlServer, "[TF_PersonnelFile]"));
 }
 public static new MQLBase SelectAll()
 {
     return(MQLBase.SelectAll(DbType.SqlServer, "[Sys_Dictionary]"));
 }
 public static new MQLBase Select(params FieldBase[] fields)
 {
     return(MQLBase.Select(DbType.SqlServer, "[Sys_Dictionary]", fields));
 }
 public static new MQLBase SelectAll()
 {
     return(MQLBase.SelectAll(DbType.SqlServer, "[RMS_RoleManus]"));
 }
Exemple #23
0
 public static new MQLBase Select(params FieldBase[] fields)
 {
     return(MQLBase.Select(DbType.SqlServer, "[V_MenuButtons]", fields));
 }
Exemple #24
0
 public static new MQLBase Select(params FieldBase[] fields)
 {
     return(MQLBase.Select(DbType.SqlServer, "[TS_Transaction]", fields));
 }
 public static MQLBase SelectAllBut(params FieldBase[] fields)
 {
     return(MQLBase.SelectAllBut(typeof(TF_PersonnelFileSet), DbType.SqlServer, "[TF_PersonnelFile]", fields));
 }
Exemple #26
0
 public static new MQLBase SelectAll()
 {
     return(MQLBase.SelectAll(DbType.Sqlite, "[TB_BookReadSign]"));
 }
Exemple #27
0
 public static new MQLBase SelectAll()
 {
     return(MQLBase.SelectAll(DbType.SqlServer, "[TS_Transaction]"));
 }
Exemple #28
0
 public static new MQLBase Select(params FieldBase[] fields)
 {
     return(MQLBase.Select(DbType.SqlServer, "[SysOperateLog]", fields));
 }
Exemple #29
0
 public static new MQLBase SelectAll()
 {
     return(MQLBase.SelectAll(DbType.SqlServer, "[V_MenuButtons]"));
 }
 public static new MQLBase Select(params FieldBase[] fields)
 {
     return(MQLBase.Select(DbType.SqlServer, "[RMS_RoleManus]", fields));
 }