コード例 #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();
 }