Exemplo n.º 1
0
 public static ConfigManage GetInstance()
 {
     if (_instance == null)
     {
         _instance = new ConfigManage();
     }
     return(_instance);
 }
Exemplo n.º 2
0
        public PageableData <DBModel> GetPage(string condition, object searchObj, string order, int begin, int end)
        {
            string sql = GetPageSqlFromView("tb_dataconfig", " *", order, condition, begin, end);
            PageableData <DBModel> result = null;

            using (MySqlConnection conn = new MySqlConnection(ConfigManage.GetInstance().GetSysConnStr()))
            {
                var reader = conn.QueryMultiple(sql, searchObj);
                result = new PageableData <DBModel>()
                {
                    total = reader.Read <int>().FirstOrDefault(),
                    rows  = reader.Read <DBModel>()
                };
            }
            return(result);
        }
Exemplo n.º 3
0
 public BaseProvider(string tableName)
 {
     _tableName = tableName;
     _connStr   = ConfigManage.GetInstance().GetSysConnStr();
 }