public static DataTable getAll() { DataTable table; adapter = getNewAdapter(); table = adapter.GetData(); adapter.Dispose(); return(table); }
public static bool validCredentials(string userName, string password) { bool valid; DataTable table; adapter = getNewAdapter(); table = adapter.GetDataBy(userName, password); adapter.Dispose(); valid = (table.Select().Length > 0); return(valid); }
public static bool hasEverHadEmployee(string userName) { bool hasEmployee; DataTable table; adapter = getNewAdapter(); table = adapter.GetAllByUserName(userName); adapter.Dispose(); hasEmployee = (table.Select().Length > 0); return(hasEmployee); }
public static Object[] getEmployee(string userName, string password) { DataTable table; adapter = getNewAdapter(); table = adapter.GetDataBy(userName, password); adapter.Dispose(); if (table.Select().Length > 0) { return(table.Select()[0].ItemArray); } else { return(null); } }
private static void setDeleted(bool deleted, string userName) { adapter = new TechableDSTableAdapters.EmployeesTableAdapter(); adapter.UpdateDeleted(deleted, userName); adapter.Dispose(); }
public static void add(string lName, string fName, bool isAdmin, string userName, string password) { adapter = getNewAdapter(); adapter.Insert(userName, fName, lName, isAdmin, password, false); adapter.Dispose(); }
public static void setPassword(string password, string username) { adapter = getNewAdapter(); adapter.UpdatePassword(password, username); adapter.Dispose(); }