Exemplo n.º 1
0
        /// <exception cref="ConfigurationErrorsException">A configuration file could not be loaded.</exception>
        /// <exception cref="ArgumentNullException"><paramref>
        ///     <name>key</name>
        ///   </paramref>
        ///   is null. </exception>
        /// <exception cref="NotSupportedException">The property is set and the <see cref="T:System.Collections.Hashtable" />
        /// is read-only.-or- The property is set, <paramref>
        ///     <name>key</name>
        ///   </paramref>
        ///   does not exist in the collection, and the
        /// <see cref="T:System.Collections.Hashtable" /> has a fixed size. </exception>
        public static void BulkUpdateTariffNumbers(string[] tariffNumbers, string[] contractNumbers)
        {
            var procName = ConfigUtil.GetStoredProcedureName("TRC_GSD2_BULKUPDATE");

            var oracleParams = new OracleParameter[2];

            oracleParams[0] = new OracleParameter("i_ctr_no", OracleDbType.Varchar2, ParameterDirection.Input)
            {
                Value = contractNumbers
            };

            oracleParams[1] = new OracleParameter("i_tariff_no", OracleDbType.Varchar2, ParameterDirection.Input)
            {
                Value = tariffNumbers
            };

            OracleUtil.ExecuteOracleBatchAction(procName, oracleParams, CommandType.StoredProcedure, tariffNumbers.Length);
        }
Exemplo n.º 2
0
        /// <exception cref="ConfigurationErrorsException">A configuration file could not be loaded.</exception>
        /// <exception cref="ArgumentNullException"><paramref>
        ///     <name>key</name>
        ///   </paramref>
        ///   is null. </exception>
        /// <exception cref="NotSupportedException">The property is set and the <see cref="T:System.Collections.Hashtable" />
        /// is read-only.-or- The property is set, <paramref>
        ///     <name>key</name>
        ///   </paramref>
        ///   does not exist in the collection, and the
        /// <see cref="T:System.Collections.Hashtable" /> has a fixed size. </exception>
        public static void BulkInsertGSD2TariffData(string[] tariffNumbers, string[] contractNumbers, string[] fileNames)
        {
            var procName = ConfigUtil.GetStoredProcedureName("TRC_GSD2_BULKINSERT");

            var oracleParams = new OracleParameter[3];

            oracleParams[0] = new OracleParameter("i_tariff_no", OracleDbType.Varchar2, ParameterDirection.Input)
            {
                Value = tariffNumbers
            };

            oracleParams[1] = new OracleParameter("i_ctr_no", OracleDbType.Varchar2, ParameterDirection.Input)
            {
                Value = contractNumbers
            };

            oracleParams[2] = new OracleParameter("i_file_name", OracleDbType.Varchar2, ParameterDirection.Input)
            {
                Value = fileNames
            };

            OracleUtil.ExecuteOracleBatchAction(procName, oracleParams, CommandType.StoredProcedure, tariffNumbers.Length);
        }