Beispiel #1
0
        /// <summary>
        /// Calls stored procedure 'usp_AFGenerateAffiliateCommission'.<br/><br/>
        ///
        /// </summary>
        /// <param name="eventCustomerId">Input parameter of stored procedure</param>
        /// <param name="adapter">The DataAccessAdapter object to use for the call</param>
        /// <returns>Amount of rows affected, if the database / routine doesn't surpress rowcounting.</returns>
        public static int GenerateAffiliateCommission(System.Int64 eventCustomerId, DataAccessAdapter adapter)
        {
            SqlParameter[] parameters = new SqlParameter[1];
            parameters[0] = new SqlParameter("@EventCustomerID", SqlDbType.BigInt, 0, ParameterDirection.Input, true, 19, 0, "", DataRowVersion.Current, eventCustomerId);

            int toReturn = adapter.CallActionStoredProcedure("[Falcon].[dbo].[usp_AFGenerateAffiliateCommission]", parameters);

            return(toReturn);
        }
Beispiel #2
0
        /// <summary>
        /// Calls stored procedure 'usp_AFGenerateAffiliateCommission'.<br/><br/>
        ///
        /// </summary>
        /// <param name="eventCustomerId">Input parameter of stored procedure</param>
        /// <param name="returnValue">Return value of the stored procedure</param>
        /// <param name="adapter">The DataAccessAdapter object to use for the call</param>
        /// <returns>Amount of rows affected, if the database / routine doesn't surpress rowcounting.</returns>
        public static int GenerateAffiliateCommission(System.Int64 eventCustomerId, ref System.Int32 returnValue, DataAccessAdapter adapter)
        {
            // create parameters. Add 1 to make room for the return value parameter.
            SqlParameter[] parameters = new SqlParameter[1 + 1];
            parameters[0] = new SqlParameter("@EventCustomerID", SqlDbType.BigInt, 0, ParameterDirection.Input, true, 19, 0, "", DataRowVersion.Current, eventCustomerId);

            parameters[1] = new SqlParameter("RETURNVALUE", SqlDbType.Int, 0, ParameterDirection.ReturnValue, true, 10, 0, "", DataRowVersion.Current, returnValue);
            int toReturn = adapter.CallActionStoredProcedure("[Falcon].[dbo].[usp_AFGenerateAffiliateCommission]", parameters);


            returnValue = (int)parameters[1].Value;
            return(toReturn);
        }
Beispiel #3
0
        /// <summary>
        /// Calls stored procedure 'usp_AFSaveEventAffiliate'.<br/><br/>
        ///
        /// </summary>
        /// <param name="eventcustomerid">Input parameter of stored procedure</param>
        /// <param name="callid">Input parameter of stored procedure</param>
        /// <param name="returnvalue">InputOutput parameter of stored procedure</param>
        /// <param name="adapter">The DataAccessAdapter object to use for the call</param>
        /// <returns>Amount of rows affected, if the database / routine doesn't surpress rowcounting.</returns>
        public static int SaveEventAffiliate(System.Int64 eventcustomerid, System.Int64 callid, ref System.Int64 returnvalue, DataAccessAdapter adapter)
        {
            SqlParameter[] parameters = new SqlParameter[3];
            parameters[0] = new SqlParameter("@eventcustomerid", SqlDbType.BigInt, 0, ParameterDirection.Input, true, 19, 0, "", DataRowVersion.Current, eventcustomerid);
            parameters[1] = new SqlParameter("@callid", SqlDbType.BigInt, 0, ParameterDirection.Input, true, 19, 0, "", DataRowVersion.Current, callid);
            parameters[2] = new SqlParameter("@returnvalue", SqlDbType.BigInt, 0, ParameterDirection.InputOutput, true, 19, 0, "", DataRowVersion.Current, returnvalue);
            int toReturn = adapter.CallActionStoredProcedure("[Falcon].[dbo].[usp_AFSaveEventAffiliate]", parameters);

            if (parameters[2].Value != System.DBNull.Value)
            {
                returnvalue = (System.Int64)parameters[2].Value;
            }
            return(toReturn);
        }