Committing payment file upload capability

This commit is contained in:
Rick Falkvinge
2012-01-08 15:01:59 +00:00
parent c5bcdcd7e5
commit ebfed16393
13 changed files with 413 additions and 19 deletions
+1 -1
View File
@@ -48,7 +48,7 @@ namespace Activizr.Database
DbCommand command =
GetDbCommand("SELECT" + paymentGroupFieldSequence +
"WHERE OrganizationId=" + organizationId.ToString() + " AND Tag='" + tag.Replace("'", "''") + "' AND Open=1",
"WHERE OrganizationId=" + organizationId.ToString() + " AND Tag='" + tag.Replace("'", "''") + "'",
connection);
using (DbDataReader reader = command.ExecuteReader())
+22
View File
@@ -197,6 +197,28 @@ namespace Activizr.Database
}
}
[Obsolete ("This should never be called, ever: it ruins trackability.")]
public void DeletePayment(int paymentId)
{
// This function is necessary since the Swedish bank system only allows for a dupe check AFTER all payments
// have been communicated, so they are created as data is received. If the data was a dupe, it is therefore
// deleted after the dupecheck triggers.
// That code was later re-written to do in-memory dupechecking. This delete function should never be called.
using (DbConnection connection = GetMySqlDbConnection())
{
connection.Open();
DbCommand command = GetDbCommand("DeletePayment", connection);
command.CommandType = CommandType.StoredProcedure;
AddParameterWithName(command, "paymentId", paymentId);
command.ExecuteNonQuery();
}
}
#endregion