Work on Attestation incl. Db0016
This commit is contained in:
@@ -14,7 +14,7 @@ namespace Swarmops.Database
|
||||
/// </summary>
|
||||
public static int DbVersionExpected
|
||||
{
|
||||
get { return 15; }
|
||||
get { return 16; }
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -124,24 +124,41 @@ namespace Swarmops.Database
|
||||
}
|
||||
|
||||
|
||||
public void SetCashAdvanceOpen (int cashAdvanceId, bool open)
|
||||
public void SetCashAdvanceBudget(int cashAdvanceId, int budgetId)
|
||||
{
|
||||
using (DbConnection connection = GetMySqlDbConnection())
|
||||
{
|
||||
connection.Open();
|
||||
|
||||
DbCommand command = GetDbCommand ("SetCashAdvanceOpen", connection);
|
||||
DbCommand command = GetDbCommand("SetCashAdvanceBudget", connection);
|
||||
command.CommandType = CommandType.StoredProcedure;
|
||||
|
||||
AddParameterWithName (command, "cashAdvanceId", cashAdvanceId);
|
||||
AddParameterWithName (command, "open", open);
|
||||
AddParameterWithName(command, "cashAdvanceId", cashAdvanceId);
|
||||
AddParameterWithName(command, "budgetId", budgetId);
|
||||
|
||||
command.ExecuteNonQuery();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public void SetCashAdvanceAttested (int cashAdvanceId, bool attested, int attestedByPersonId)
|
||||
public void SetCashAdvanceOpen(int cashAdvanceId, bool open)
|
||||
{
|
||||
using (DbConnection connection = GetMySqlDbConnection())
|
||||
{
|
||||
connection.Open();
|
||||
|
||||
DbCommand command = GetDbCommand("SetCashAdvanceOpen", connection);
|
||||
command.CommandType = CommandType.StoredProcedure;
|
||||
|
||||
AddParameterWithName(command, "cashAdvanceId", cashAdvanceId);
|
||||
AddParameterWithName(command, "open", open);
|
||||
|
||||
command.ExecuteNonQuery();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public void SetCashAdvanceAttested(int cashAdvanceId, bool attested, int attestedByPersonId)
|
||||
{
|
||||
using (DbConnection connection = GetMySqlDbConnection())
|
||||
{
|
||||
|
||||
@@ -12,4 +12,5 @@
|
||||
0012 - Renamed "Roles" to "Positions" to clarify terminology [RF]
|
||||
0013 - Added PositionTitles for organizational culture flexibility [RF]
|
||||
0014 - Forgot one storedproc in Db0012; renamed CreateAssignedRole [RF]
|
||||
0015 - Merged PositionsStandard and PositionsAdditional into one table [RF]
|
||||
0015 - Merged PositionsStandard and PositionsAdditional into one table [RF]
|
||||
0016 - Added SetCashAdvanceBudget procedure [RF]
|
||||
@@ -0,0 +1,10 @@
|
||||
CREATE PROCEDURE `SetCashAdvanceBudget`(
|
||||
IN cashAdvanceId INTEGER,
|
||||
IN budgetId INTEGER
|
||||
)
|
||||
BEGIN
|
||||
|
||||
UPDATE CashAdvances SET CashAdvances.FinancialAccountId=budgetId
|
||||
WHERE CashAdvances.CashAdvanceId=cashAdvanceId;
|
||||
|
||||
END
|
||||
Reference in New Issue
Block a user