Exemplo n.º 1
0
        public static DataTable getLateMovies()
        {
            DataTable table;

            adapter = getNewAdapter();
            table   = adapter.GetLateMovies();
            adapter.Dispose();

            return(table);
        }
Exemplo n.º 2
0
        public static DataTable getNotReturned()
        {
            DataTable table;

            adapter = getNewAdapter();
            table   = adapter.GetCurrentlyRented();
            adapter.Dispose();

            return(table);
        }
Exemplo n.º 3
0
        public static bool customerIsRenting(int customerId)
        {
            bool isRenting;

            adapter = getNewAdapter();
            DataTable table = adapter.GetCurrentByCustomer(customerId);

            adapter.Dispose();

            isRenting = table.Select().Length > 0;

            return(isRenting);
        }
Exemplo n.º 4
0
        public static bool upcIsRenting(string upc)
        {
            bool isRenting;

            adapter = getNewAdapter();
            DataTable table = adapter.GetCurrentByUpc(upc);

            adapter.Dispose();

            isRenting = table.Select().Length > 0;

            return(isRenting);
        }
Exemplo n.º 5
0
 public static void returnMovie(string upc)
 {
     adapter = getNewAdapter();
     adapter.ReturnMovie(upc);
     adapter.Dispose();
 }
Exemplo n.º 6
0
 public static void add(string upc, int customerId, string userName, DateTime dueDate)
 {
     adapter = getNewAdapter();
     adapter.Insert(upc, customerId, userName, dueDate, false);
     adapter.Dispose();
 }