/// <summary> /// Verify username and password /// </summary> /// <param name="userID">User ID</param> /// <param name="password">Password</param> /// <returns>Whether or not password and ID match</returns> public static int VerifyPassword(string userID, string password) { SecurityDO sDO = new SecurityDO(); DataTable dt = sDO.Verify(new object[] { userID, password }); if (dt.Rows.Count == 1) { if (dt.Rows[0][0] != null) { return int.Parse(dt.Rows[0][0].ToString()); } else { return 0; } } else return 0; }
/// <summary> /// Return List of Users from database /// </summary> /// <returns>List of User objects</returns> public static List<AppUser> UserList() { SecurityDO sDO = new SecurityDO(); return BusinessDataBinder.BindData<List<AppUser>>(sDO.GetUser(new object[] { DBNull.Value })); }
/// <summary> /// Get User /// </summary> /// <param name="userID">ID of user</param> /// <returns>User object</returns> public static AppUser GetUser(int userID) { SecurityDO sDO = new SecurityDO(); return BusinessDataBinder.BindData<AppUser>(sDO.GetUser(new object[] { userID })); }