mirror of
https://github.com/islehorse/HISP.git
synced 2025-04-23 21:25:52 +12:00
Add bank interest
This commit is contained in:
parent
c1a0f2e370
commit
8b36407981
4 changed files with 29 additions and 10 deletions
|
@ -2175,13 +2175,14 @@ namespace HISP.Server
|
|||
}
|
||||
}
|
||||
|
||||
public static void DoIntrestPayments()
|
||||
public static void DoIntrestPayments(int intrestRate)
|
||||
{
|
||||
using (MySqlConnection db = new MySqlConnection(ConnectionString))
|
||||
{
|
||||
db.Open();
|
||||
MySqlCommand sqlCommand = db.CreateCommand();
|
||||
sqlCommand.CommandText = "UPDATE UserExt SET BankBalance=BankBalance * (1/@interestRate) AND NOT BankBalance * (1/@interestRate) > 9999999999.9999";
|
||||
sqlCommand.CommandText = "UPDATE UserExt SET BankInterest=BankInterest * (1/@interestRate) AND NOT BankInterest * (1/@interestRate) > 9999999999.9999";
|
||||
sqlCommand.Parameters.AddWithValue("@interest", intrestRate);
|
||||
sqlCommand.Prepare();
|
||||
sqlCommand.ExecuteNonQuery();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue