示例#1
0
        /// <summary>
        /// The Fetch method will find the record in the database, and return a newly instantiated object containing
        /// the record data. It uses the generic DataSQL Fetch method to dynamically instantiate the object using Reflection,
        /// which will return the instance.
        /// </summary>
        /// <param name="id">The primary key of the object desired to find.</param>
        /// <returns>The instance object.</returns>
        public static CreditCard Fetch(int id)
        {
            Dictionary <string, object> parameters = new Dictionary <string, object>();

            parameters.Add("@CardID", id);
            return(DataSQL <CreditCard> .Fetch(SQL_FETCH, parameters));
        }
示例#2
0
        /// <summary>
        /// The Fetch method will find the record in the database, and return a newly instantiated object containing
        /// the record data. It uses the generic DataSQL Fetch method to dynamically instantiate the object using Reflection,
        /// which will return the instance.
        /// </summary>
        /// <param name="id">The primary key of the object desired to find.</param>
        /// <returns>The instance object.</returns>
        public static DVD Fetch(int id)
        {
            Dictionary <string, object> parameters = new Dictionary <string, object>();

            parameters.Add("@dvdID", id);
            return(DataSQL <DVD> .Fetch(SQL_FETCH, parameters));
        }
示例#3
0
        /// <summary>
        /// The Fetch method will find the record in the database, and return a newly instantiated object containing
        /// the record data. It uses the generic DataSQL Fetch method to dynamically instantiate the object using Reflection,
        /// which will return the instance.
        /// </summary>
        /// <param name="id">The primary key of the object desired to find.</param>
        /// <returns>The instance object.</returns>
        public static Transaction Fetch(int id)
        {
            Dictionary <string, object> parameters = new Dictionary <string, object>();

            parameters.Add("@TransactionID", id);
            return(DataSQL <Transaction> .Fetch(SQL_FETCH, parameters));
        }
示例#4
0
        /// <summary>
        /// The Fetch method will find the record in the database, and return a newly instantiated object containing
        /// the record data. It uses the generic DataSQL Fetch method to dynamically instantiate the object using Reflection,
        /// which will return the instance.
        /// </summary>
        /// <param name="transactionID">The Transaction primary key.</param>
        /// /// <param name="copyID">The DVD Copy primary key.</param>
        /// <returns>The instance object.</returns>
        public static TransactionItem Fetch(int transactionID, int copyID)
        {
            Dictionary <string, object> parameters = new Dictionary <string, object>();

            parameters.Add("@TransactionID", transactionID);
            parameters.Add("@CopyID", copyID);
            return(DataSQL <TransactionItem> .Fetch(SQL_FETCH, parameters));
        }
示例#5
0
        /// <summary>
        /// The Fetch method will find the record in the database, and return a newly instantiated object containing
        /// the record data. It uses the generic DataSQL Fetch method to dynamically instantiate the object using Reflection,
        /// which will return the instance.
        /// </summary>
        /// <param name="id">The primary key of the object desired to find.</param>
        /// <returns>The instance object.</returns>
        public static Customer Fetch(int id)
        {
            // Instantiates a new dictionary to add the parameters.
            Dictionary <string, object> parameters = new Dictionary <string, object>();

            // Adds the primary key as a parameter.
            parameters.Add("@CustomerID", id);
            // Invokes the generic Fetch method passing the sql statement, and the paramaters as arguments.
            // Returns the object instance.
            return(DataSQL <Customer> .Fetch(SQL_FETCH, parameters));
        }