// Employees - Link selected employee to editEmployee
        private async void dataGridViewEmployees_SelectionChanged(object sender, EventArgs e)
        {
            if ((dataGridViewEmployees.SelectedRows.Count <= 0))
            {
                return;
            }

            editEmployee = (Employee)dataGridViewEmployees.SelectedRows[0].DataBoundItem;

            await _repo.GetEmployeeTypesByIdAsync(editEmployee);

            ClearEmployeeTextBoxes();
        }
        private async void LoginBtn_Click(object sender, EventArgs e)
        {
            try
            {
                // Gets user if matching username and password exists
                user = await _repo.GetEmployeeLoginAsync(tbUsername.Text, tbPassword.Text);
            }
            catch (System.Data.SqlClient.SqlException)
            {
                MessageBox.Show("Couldn't establish connection");
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }

            if (user is null)
            {
                ShowErrorMessage("Fel login");
                return;
            }

            await _repo.GetEmployeeTypesByIdAsync(user);

            // Block access if user has wrong type for selected form
            if (!user.HasAccess(cbConnectTo.SelectedIndex))
            {
                ShowErrorMessage("Access Denied");
                return;
            }

            //MessageBox.Show($"Logged in as:\n{user.Username} ID: {user.EmployeeID}\n");
            SwitchForm(cbConnectTo.SelectedIndex);
            user.LoggedIn = true;

            await _repo.UpdateEmployeeStatusAsync(user);
        }