public BankAccountManager(IBankAccounts bankAccounts, IBankAccountDao bankAccountDao, IWasteBook wasteBook, Guid elseFilialeId) { _bankAccountDao = bankAccountDao; _bankAccounts = bankAccounts; _wasteBookDao = wasteBook; _reckoningElseFilialeid = elseFilialeId == Guid.Empty ? new Guid(ConfigManage.GetConfigValue("RECKONING_ELSE_FILIALEID")) : elseFilialeId; }
public CostReport(Environment.GlobalConfig.DB.FromType fromType) { _costReport = InventoryInstance.GetCostReportDao(fromType); _costReckoningDao = InventoryInstance.GetCostReckoningDao(fromType); _bankAccountsDao = InventoryInstance.GetBankAccountsDao(fromType); _personnelManager = new PersonnelSao(); }
public BankAccountManager(Environment.GlobalConfig.DB.FromType fromType) { _bankAccountDao = InventoryInstance.GetBankAccountDao(fromType); _bankAccounts = InventoryInstance.GetBankAccountsDao(fromType); _wasteBookDao = InventoryInstance.GetWasteBookDao(fromType); _reckoningElseFilialeid = new Guid(ConfigManage.GetConfigValue("RECKONING_ELSE_FILIALEID")); }
// the interface is applied so as to reduce tight coupling between the method and bankAccounts // You can change it if you want, it's quite flexible.... i think. public static Account Login(IBankAccounts bankAccounts, string accountNumber, string password) { var checkExistence = bankAccounts.AccountExists(accountNumber); if (checkExistence) { var checkDetails = bankAccounts.AccountLoginMatch(accountNumber, password); if (checkDetails) { var UserAccount = bankAccounts.returnAccount(accountNumber); return(UserAccount); } } return(null); }
public CostReport(IBankAccounts bankAccounts, IPersonnelSao personnelSao, ICostReckoning costReckoningDao) { _bankAccountsDao = bankAccounts; _personnelManager = personnelSao; _costReckoningDao = costReckoningDao; }