Exemplo n.º 1
0
        public static int Update(this DBModel dbmodel, string tablename, string keyname, OracleTransaction trans = null)
        {
            string sql = Common_DB2.GetUpdateSqlCache(dbmodel, tablename, keyname);

            if (trans != null)
            {
                return(OracleDBPoolHelper.ExecuteNonQuery(trans, System.Data.CommandType.Text, sql, null));
            }

            return(OracleDBPoolHelper.ExecuteNonQuery(System.Data.CommandType.Text, sql, null));
        }
Exemplo n.º 2
0
        public static int Save(this DBModel dbmodel, string tablename, string seq, OracleTransaction trans = null)
        {
            string sql = Common_DB2.GetInertSqlCache(dbmodel, tablename, seq);

            BILBasic.Basing.DbFactory dbFactory = new BILBasic.Basing.DbFactory(BILBasic.Basing.DbFactory.DbFactoryType.SQLSERVER);
            if (trans != null)
            {
                return(dbFactory.ExecuteNonQuery(trans, System.Data.CommandType.Text, sql, null));
                //return OracleDBPoolHelper.ExecuteNonQuery(trans, System.Data.CommandType.Text, sql, null);
            }
            return(dbFactory.ExecuteNonQuery(System.Data.CommandType.Text, sql, null));
            //return OracleDBPoolHelper.ExecuteNonQuery(System.Data.CommandType.Text, sql, null);
        }