Adding new dbcall

This commit is contained in:
Rick Falkvinge
2018-07-12 18:15:51 +02:00
parent 209daaebc2
commit 3732fabf06
4 changed files with 8 additions and 7 deletions
+4 -3
View File
@@ -966,7 +966,7 @@ namespace Swarmops.Database
}
public int CreateFinancialTransactionStub (int organizationId, DateTime dateTime, int financialAccountId,
Int64 amountCents, string comment, string importHash, int personId)
Int64 amountCents, string comment, string importHash, string importSha256, int personId)
{
using (DbConnection connection = GetMySqlDbConnection())
{
@@ -979,8 +979,9 @@ namespace Swarmops.Database
AddParameterWithName (command, "organizationId", organizationId);
AddParameterWithName (command, "financialAccountId", financialAccountId);
AddParameterWithName (command, "comment", comment);
AddParameterWithName (command, "importHash", importHash);
AddParameterWithName (command, "amountCents", amountCents);
AddParameterWithName(command, "importHash", importHash);
AddParameterWithName(command, "importSha256", importSha256);
AddParameterWithName(command, "amountCents", amountCents);
AddParameterWithName (command, "personId", personId);
return Convert.ToInt32 (command.ExecuteScalar());
+2 -2
View File
@@ -51,12 +51,12 @@ namespace Swarmops.Logic.Financial
public static FinancialTransaction ImportWithStub (int organizationId, DateTime dateTime, int financialAccountId,
Int64 amountCents, string description, string importHash, int personId)
Int64 amountCents, string description, string importHash, string importSha256, int personId)
{
int transactionId = SwarmDb.GetDatabaseForWriting()
.CreateFinancialTransactionStub (organizationId, dateTime,
financialAccountId, amountCents,
description, importHash, personId);
description, importHash, importSha256, personId);
if (transactionId <= 0)
{
+1 -1
View File
@@ -182,7 +182,7 @@ namespace Swarmops.Utility.Financial
transaction = FinancialTransaction.ImportWithStub (organization.Identity, row.DateTime,
payPalAccount.Identity, amountCents,
row.Comment, importKey,
row.Comment, importKey, "" /* new SHA256 field */,
importingPerson.Identity);
result.ImportedTransactionCount++;
+1 -1
View File
@@ -197,7 +197,7 @@ namespace Swarmops.Utility.Financial
transaction = FinancialTransaction.ImportWithStub (organization.Identity, row.DateTime,
paysonAccount.Identity, amountCents,
row.Comment, importKey,
row.Comment, importKey, "" /* new SHA256 field */,
importingPerson.Identity);
result.ImportedTransactionCount++;