Пример #1
0
 public UserServices(UserManager pUserManager)
 {
     _user          = new User();
     _userManager   = pUserManager;
     _tellerManager = new TellerManager("");
     MefContainer.Current.Bind(this);
 }
Пример #2
0
 public UserServices(User pUser, string pTestDb)
 {
     _user          = pUser;
     _userManager   = new UserManager(pTestDb, pUser);
     _tellerManager = new TellerManager(pTestDb);
     MefContainer.Current.Bind(this);
 }
 public ChartOfAccountsServices(string testDB)
 {
     _accountManagement        = new AccountManager(testDB);
     _provisionningRuleManager = new ProvisioningRuleManager(testDB);
     _tellerManager            = new TellerManager(testDB);
     _loanScaleManager         = new LoanScaleManager(testDB);
     _currencyManager          = new CurrencyManager(testDB);
     ConnectionManager.GetInstance(testDB);
 }
 public ChartOfAccountsServices(User pUser)
 {
     _user = pUser;
     _accountManagement        = new AccountManager(pUser);
     _tellerManager            = new TellerManager(pUser);
     _provisionningRuleManager = new ProvisioningRuleManager(pUser);
     _loanScaleManager         = new LoanScaleManager(pUser);
     _currencyManager          = new CurrencyManager(pUser);
 }
Пример #5
0
        public static Teller AccessLevel()
        {
            Console.ForegroundColor = ConsoleColor.White;
            Teller teller = new Teller();
            int    count  = 0;
            string pword  = "";
            string input  = "";


            int username = GetTellerNumber();

            while (count < 4)
            {
                Console.Clear();
                Console.WriteLine("You must enter a valid password to continue.\nWould you like to see your password?\n(Y)es to see password, otherwise hit any key.");
                string showPassword = GetYesorNo();
                Console.WriteLine();
                if (showPassword.Substring(0, 1) == "Y")
                {
                    Console.WriteLine("Please enter your password to continue.");
                    input = Console.ReadLine();
                }
                else
                {
                    input = GetPassword("Please enter your password to continue.");
                }
                TellerManager manager = new TellerManager();

                bool validUsernameAndPassword = manager.GetUserInfo(username, input);

                if (validUsernameAndPassword == false)
                {
                    Console.Clear();
                    Console.WriteLine("Invalid password.");
                    Console.WriteLine("You have {0} attempts left.", 2 - count);
                    if (2 - count == 0)
                    {
                        Console.Clear();
                        Console.WriteLine("Exceeded attempts. Goodbye.");
                        PressKeyforContinue();
                        Environment.Exit(0);
                    }
                    PressKeyforContinue();
                    Console.Clear();
                    count++;
                }
                else if (validUsernameAndPassword)
                {
                    teller = manager.GetTeller(username);
                    break;
                }
            }
            return(teller);
        }
Пример #6
0
        public void Execute()
        {
            Console.ForegroundColor = ConsoleColor.White;

            Console.Clear();

            DisplayHeading();

            Teller newTeller = new Teller();

            newTeller = GenerateNewTeller();

            DisplayNewTellerInformation();

            TellerManager manager = new TellerManager();

            manager.AddNewTeller(newTeller);
        }
Пример #7
0
 public UserServices(UserManager pUserManager)
 {
     _user          = new User();
     _userManager   = pUserManager;
     _tellerManager = new TellerManager("");
 }
Пример #8
0
 public UserServices(User pUser, string pTestDb)
 {
     _user          = pUser;
     _userManager   = new UserManager(pTestDb, pUser);
     _tellerManager = new TellerManager(pTestDb);
 }
 public TellerController()
 {
     mainDb        = new Esoft_WebEntities();
     tellerManager = new TellerManager(new ModelStateWrapper(this.ModelState));
 }
Пример #10
0
 public TellerServices(User user)
 {
     _manager = new TellerManager(user);
 }