Example #1
0
        /// <summary>
        /// The UpdateCopies method is used to update the status of all the DVDCopies that
        /// were added to a transaction. It uses the generic helper method of the DataSQL class
        /// to execute the query.
        /// </summary>
        /// <param name="transactionID">The transactionID of the.</param>
        /// <returns>A boolean indicating whether the record was updated.</returns>
        public static int UpdateCopies(int transactionID, DVDCopy.Status status)
        {
            Dictionary <string, object> parameters = new Dictionary <string, object>();

            parameters.Add("@Status", (int)status);
            parameters.Add("@TransactionID", transactionID);
            return(DataSQL <DVDCopy> .NonQuery(SQL_UPDATE, parameters));
        }
Example #2
0
 public Boolean AddCopy(string barcode, DVDCopy.Status status)
 {
     return(DataDVDCopy.Add(new DVDCopy(this.dvdID, barcode, status)));
 }
 /// <summary>
 /// The UpdateCopyStatus is a static method, which is used to interact with the data layer. It will
 /// update all the copies relating to a specific transaction to whether they are available or unavailable.
 /// </summary>
 /// <param name="transactionID">The transaction ID</param>
 /// <param name="status">The DVD Copy status.</param>
 public static void UpdateCopyStatus(int transactionID, DVDCopy.Status status)
 {
     DataTransactionItem.UpdateCopies(transactionID, status);
 }