public DataRow AuthenticateAccount(string userName, string password) { string encrypPass = new Encryption().Encrypt(FunctionLibrary.KEY_ENSCRYPTION, password); DataTable dtableTemp = new ClientAccountDAL().GetAllRecordCustomer(); foreach (DataRow row in dtableTemp.Rows) { if (row["UseName"].ToString().Equals(userName) && row["Password"].ToString().Equals(encrypPass)) { return(row); } } return(null); }
public DataRow AuthenticateAccount(string userName, string password) { string encrypPass = new Encryption().Encrypt(FunctionLibrary.KEY_ENSCRYPTION, password); DataTable dtableTemp = new ClientAccountDAL().GetAllRecordCustomer(); foreach (DataRow row in dtableTemp.Rows) { if (row["UseName"].ToString().Equals(userName) && row["Password"].ToString().Equals(encrypPass)) { return row; } } return null; }