コード例 #1
0
        public string RevokeConsent(int userID, int permissionID)
        {
            Dictionary <string, object> parameterInput = new Dictionary <string, object>();

            parameterInput.Add("UserID", userID);
            parameterInput.Add("PermissionID", permissionID);

            string outputMessage = ConsentDatabaseController.ExecuteNonQuery("RevokeConsent", parameterInput);

            if (outputMessage == "")
            {
                outputMessage = "Consent with permission ID: " + permissionID + ", has been revoked from user nr: " + userID + ".";
            }

            return(outputMessage);
        }
コード例 #2
0
        public string SaveConsent(int userID, int permissionID, DateTime expirationTime)
        {
            Dictionary <string, object> parameterInput = new Dictionary <string, object>();

            parameterInput.Add("UserID", userID);
            parameterInput.Add("PermissionID", permissionID);
            parameterInput.Add("ExpirationTime", expirationTime);

            string errorMessage = ConsentDatabaseController.ExecuteNonQuery("SaveConsent", parameterInput);

            if (errorMessage == "")
            {
                return("Success! Consent was created!");
            }

            return(errorMessage);
        }