예제 #1
0
        public static DataTable getAll()
        {
            TechableDS.CopiesDataTable table;

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

            return(table);
        }
예제 #2
0
        public static bool hasAnyCopyByInfo(string upc, int movieId)
        {
            bool hasCopy;

            adapter = getNewAdapter();
            DataTable table = adapter.GetAllByInfo(upc, movieId);

            adapter.Dispose();

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

            return(hasCopy);
        }
예제 #3
0
        public static bool hasCopyById(int movieId)
        {
            bool hasCopy;

            adapter = getNewAdapter();
            DataTable table = adapter.GetCopyById(movieId);

            adapter.Dispose();

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

            return(hasCopy);
        }
예제 #4
0
        public static bool hasAnyCopy(string upc)
        {
            bool hasCopy;

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

            adapter.Dispose();

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

            return(hasCopy);
        }
예제 #5
0
        public static bool isAvailable(string upc)
        {
            bool isAvailable = false;

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

            adapter.Dispose();

            if (table.Select().Length > 0)
            {
                isAvailable = (bool)table.Select()[0].ItemArray[1];
            }

            return(isAvailable);
        }
예제 #6
0
 private static void setDeletedById(bool deleted, int movieId)
 {
     adapter = getNewAdapter();
     adapter.UpdateDeletedById(deleted, movieId);
     adapter.Dispose();
 }
예제 #7
0
 private static void setDeleted(bool deleted, string upc)
 {
     adapter = getNewAdapter();
     adapter.UpdateDeleted(deleted, upc);
     adapter.Dispose();
 }
예제 #8
0
 public static void add(string upc, int movieId)
 {
     adapter = getNewAdapter();
     adapter.Insert(upc, movieId, true, false);
     adapter.Dispose();
 }
예제 #9
0
 public static void setAvailable(bool available, string upc)
 {
     adapter = getNewAdapter();
     adapter.UpdateAvailable(available, upc);
     adapter.Dispose();
 }