private void loginSequence() { timer1.Stop(); if (user != null) { if (loginPane.isLock) { if (user.getUserLevel() == UserLevel.ADMIN) { authorizeLogin(); } else { denyLogin(); } } else { authorizeLogin(); } } else { denyLogin(); } btnLogin.Enabled = true; }
public Employee getEmployeeFromUserId(User user) { string condition = String.Format("user_id = '{0}'", user.UserId); Employee employee = new Employee(getEntityWhere(condition)); employee.Position = user.getUserLevel(); return(employee); }
private void button1_Click(object sender, EventArgs e) { string username = txtUsername.Text; string password = txtPassword.Text; User user = dbController.authenticateUser(username, password); if (user != null && user.getUserLevel() == UserLevel.ADMIN) { selectedResult = DialogResult.OK; } else { selectedResult = DialogResult.Cancel; } Close(); }
public Employee(User user) { User_id = user.UserId; Position = user.getUserLevel(); user.Dispose(); }
public Employee getEmployeeFromUserId(User user){ string condition = String.Format("user_id = '{0}'", user.UserId); Employee employee = new Employee(getEntityWhere(condition)); employee.Position = user.getUserLevel(); return employee; }
public string createUser(User user) { return(insertValues(user.UserId, PasswordHash.PasswordHash.CreateHash(user.Password), user.getUserLevel().ToString(), ACTIVE, "NOW()")); }
public string createUser(User user) { return insertValues(user.UserId, PasswordHash.PasswordHash.CreateHash(user.Password), user.getUserLevel().ToString(), ACTIVE , "NOW()", 0, user.Squery, PasswordHash.PasswordHash.CreateHash(user.FBAnswer)); }