/// <summary> /// Метод для стандартной выплаты /// </summary> public void MethodPaymentsStandart(int Id) { if (Repository.db[Id].GetType() == Type.GetType("Rushtell_Bunk.Clients.Worker")) { DepositChanged?.Invoke(Repository.db[Id], Math.Round(Repository.db[Id].deposit * 1.24 - Repository.db[Id].deposit, 2)); Repository.db[Id].deposit = Repository.db[Id].deposit * 1.24; Repository.db[Id].deposit = Math.Round(Repository.db[Id].deposit, 2); EntityDB.Change(Repository.db[Id]); //BaseSQL.Change(db[Id]); } else if (Repository.db[Id].GetType() == Type.GetType("Rushtell_Bunk.Clients.VIPworker")) { DepositChanged?.Invoke(Repository.db[Id], Math.Round(Repository.db[Id].deposit * 1.36 - Repository.db[Id].deposit, 2)); Repository.db[Id].deposit = Repository.db[Id].deposit * 1.36; Repository.db[Id].deposit = Math.Round(Repository.db[Id].deposit, 2); EntityDB.Change(Repository.db[Id]); //BaseSQL.Change(db[Id]); } else if (Repository.db[Id].GetType() == Type.GetType("Rushtell_Bunk.Clients.Organization")) { DepositChanged?.Invoke(Repository.db[Id], Math.Round(Repository.db[Id].deposit * 1.12 - Repository.db[Id].deposit, 2)); Repository.db[Id].deposit = Repository.db[Id].deposit * 1.12; Repository.db[Id].deposit = Math.Round(Repository.db[Id].deposit, 2); EntityDB.Change(Repository.db[Id]); //BaseSQL.Change(db[Id]); } }
/// <summary> /// Метод для выплаты каждый месяц /// </summary> public void MethodPaymentsCapitalizated(int Id) { if (Repository.db[Id].GetType() == Type.GetType("Rushtell_Bunk.Clients.Worker")) { DepositChanged?.Invoke(Repository.db[Id], Math.Round(Repository.db[Id].deposit * 1.02 - Repository.db[Id].deposit, 2)); Repository.db[Id].deposit = Repository.db[Id].deposit * 1.02; Repository.db[Id].deposit = Math.Round(Repository.db[Id].deposit, 2); EntityDB.Change(Repository.db[Id]); //BaseSQL.Change(db[Id]); } else if (Repository.db[Id].GetType() == Type.GetType("Rushtell_Bunk.Clients.VIPworker")) { DepositChanged?.Invoke(Repository.db[Id], Math.Round(Repository.db[Id].deposit * 1.03 - Repository.db[Id].deposit, 2)); Repository.db[Id].deposit = Repository.db[Id].deposit * 1.03; Repository.db[Id].deposit = Math.Round(Repository.db[Id].deposit, 2); EntityDB.Change(Repository.db[Id]); //BaseSQL.Change(db[Id]); } else if (Repository.db[Id].GetType() == Type.GetType("Rushtell_Bunk.Clients.Organization")) { DepositChanged?.Invoke(Repository.db[Id], Math.Round(Repository.db[Id].deposit * 1.01 - Repository.db[Id].deposit, 2)); Repository.db[Id].deposit = Repository.db[Id].deposit * 1.01; Repository.db[Id].deposit = Math.Round(Repository.db[Id].deposit, 2); EntityDB.Change(Repository.db[Id]); //BaseSQL.Change(db[Id]); } }