Exemple #1
0
 /// <summary>
 /// The Save method adds the Customer (this) object to the internal data structure.
 /// </summary>
 public void Save()
 {
     if (this.dvdID > 0)
     {
         DataDVD.Update(this);
     }
     else
     {
         this.dvdID = DataDVD.Add(this);
     }
 }
Exemple #2
0
 /// <summary>
 /// The List method recieves the data structure as a List.
 /// </summary>
 /// <returns>A List of the DVD objects</returns>
 public static List <DVD> List()
 {
     return(DataDVD.List());
 }
Exemple #3
0
 /// <summary>
 /// The static Add method receives a DVD object
 /// and adds it to the internal data structure in the DataLayer.
 /// </summary>
 /// <param name="dvd">The DVD that you want added to the data structure</param>
 public static void Add(DVD dvd)
 {
     DataDVD.Add(dvd);
 }
Exemple #4
0
 /// <summary>
 /// The static Remove method interacts with the DataLayer in order to
 /// remove a object corresponding to the received ID key.
 /// </summary>
 /// <param name="id">The ID key corresponding to the object that you want removed</param>
 public static Boolean Remove(int id)
 {
     return(DataDVD.Remove(id));
 }
Exemple #5
0
 /// <summary>
 /// The static Fetch method interacts with the DataLayer to retrieve a object
 /// from the internal data structure based on an ID key.
 /// </summary>
 /// <param name="id">The ID key of the object</param>
 /// <returns>The DVD found</returns>
 public static DVD Fetch(int id)
 {
     return(DataDVD.Fetch(id));
 }