public bool AdminLoginDisplay() { Console.Clear(); InputForm.LoginInputField(); string adminId = ValidatorHelper.StringValidator(40, 10); string password = ValidatorHelper.StringValidator(40, 12); bool isValid = adminService.AdminLogin(adminId, password); if (isValid == true) { return(true); } else { return(false); } }
public bool EmployeeLoginDisplay() { Console.Clear(); InputForm.LoginInputField(); string employeeId = ValidatorHelper.StringValidator(40, 10); string password = ValidatorHelper.StringValidator(40, 12); bool isValid = employeeService.EmployeeLogIn(employeeId, password); if (isValid == true) { return(true); } else { return(false); } }
public bool AccountLoginDisplay() { Console.Clear(); InputForm.LoginInputField(); /* ValidatorHelper has methods which takes input from user and validate it. * If input matches regex then it returns the input else ask again. * The parameters in those methods tells the x and y coordinate where * cursor will start taking input */ string accountHolderId = ValidatorHelper.StringValidator(40, 10); string password = ValidatorHelper.StringValidator(40, 12); bool isValid = accountService.LogIn(accountHolderId, password); if (isValid == true) { MasterBank.currentAccountHolder = accountHolderId; return(true); } else { Console.WriteLine("WRONG ID PASSWORD"); return(false); } }