Ejemplo n.º 1
0
        public List <T> GetColumnList <T>(string table, string column, string condition, params object[] paramList)
        {
            var sql          = SqlHelper.GenSelectSql(table, column, condition);
            var oracleParams = ParameterHandler.GetConditionParams(condition, paramList);

            return(_dataAccessor.QueryColumnList <T>(sql, oracleParams));
        }
Ejemplo n.º 2
0
        public bool InsertColumnData(string table, Dictionary <string, object> columnDatMap)
        {
            var sql          = SqlHelper.GenInsertSql(table, columnDatMap);
            var oracleParams = ParameterHandler.GetConditionParams(columnDatMap);

            return(_dataAccessor.Update(sql, oracleParams) > 0);
        }
Ejemplo n.º 3
0
        public bool DelData(string table, string condition, params object[] paramList)
        {
            var sql          = SqlHelper.GenDelSql(table, condition);
            var oracleParams = ParameterHandler.GetConditionParams(condition, paramList);

            return(_dataAccessor.Update(sql, oracleParams) > 0);
        }
Ejemplo n.º 4
0
        public long GetCount <T>(string condition, params object[] paramList) where T : class
        {
            var type         = typeof(T);
            var sql          = SqlHelper.GenCountSql(type, condition);
            var oracleParams = ParameterHandler.GetConditionParams(condition, paramList);

            return(_dataAccessor.QueryCount(sql, oracleParams));
        }
Ejemplo n.º 5
0
        public bool Del <T>(string condition, params object[] paramList) where T : class
        {
            var type         = typeof(T);
            var sql          = SqlHelper.GenDelSql(type, condition);
            var oracleParams = ParameterHandler.GetConditionParams(condition, paramList);

            return(_dataAccessor.Update(sql, oracleParams) > 0);
        }
Ejemplo n.º 6
0
        public bool Insert <T>(T t) where T : class
        {
            var type         = typeof(T);
            var sql          = SqlHelper.GenInsertSql(type);
            var oracleParams = ParameterHandler.GetConditionParams(t);

            return(_dataAccessor.Update(sql, oracleParams) > 0);
        }
Ejemplo n.º 7
0
        public bool UpdateColumnData(string table, Dictionary <string, object> columnDatMap, string condition,
                                     params object[] paramList)
        {
            var sql           = SqlHelper.GenUpdateSql(table, columnDatMap, condition);
            var oracleParams1 = ParameterHandler.GetConditionParams(columnDatMap);
            var oracleParams2 = ParameterHandler.GetConditionParams(condition, paramList);
            var oracleParams  =
                oracleParams1.Concat(oracleParams2).ToDictionary(k => k.Key, v => v.Value);

            return(_dataAccessor.Update(sql, oracleParams) > 0);
        }
Ejemplo n.º 8
0
        public bool Update <T>(T t, string condition, params object[] paramList) where T : class
        {
            var type          = typeof(T);
            var sql           = SqlHelper.GenUpdateSql(type, condition);
            var oracleParams1 = ParameterHandler.GetConditionParams(t);
            var oracleParams2 = ParameterHandler.GetConditionParams(condition, paramList);
            var oracleParams  =
                oracleParams1.Concat(oracleParams2).ToDictionary(k => k.Key, v => v.Value);

            return(_dataAccessor.Update(sql, oracleParams) > 0);
        }