public bool Login(LoginModel loginInfo) { if(string.IsNullOrEmpty(loginInfo.Username) || string.IsNullOrEmpty(loginInfo.Password)) return false; string username = loginInfo.Username.ToLower(); string password = loginInfo.Password.ToLower(); if (username.Equals("admin") && password.Equals("admin")) return true; else return false; }
public bool Login(LoginModel loginInfo) { string username = loginInfo.Username.ToLower(); string password = loginInfo.Password.ToLower(); if(username.Equals("admin") && password.Equals("admin")) { return true; } else { return false; } }
public IPosActionResult Execute(LoginModel model) { LoginActionResult result = new LoginActionResult(); string username = model.Username.ToLower(); string password = model.Password.ToLower(); if (username.Equals("admin") && password.Equals("admin")) { result.IsValidated = true; } else { result.IsValidated = false; } return result; }
public void LoginAction() { LoginModel model = new LoginModel(); model.Username = Username; model.Password = Password; LoginLogic loginLogic = new LoginLogic(); bool result = loginLogic.Login(model); if(result) { GlobalSession.Instance.Put(CommonConstants.IS_LOGGED,true); Flow.Session.Put(CommonConstants.LOGGED_USER, model); //_startViewModel.Open<IMainView>(); GoToNextNode(); } else { MessageBox.Show("Login failed babe !"); } }