public static bool hasCopy(string upc) { bool hasCopy; adapter = getNewAdapter(); DataTable table = adapter.GetCopy(upc); adapter.Dispose(); hasCopy = table.Select().Length > 0; return(hasCopy); }
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); }