Beispiel #1
0
        private void loadUsers()
        {
            bool   setPwDFocus = false;
            string sUser       = "";

            sAdminPwd = "";
            clsUsers  = new Userlist(CCFBGlobal.connectionString);

            clsUsers.openAll();
            cboUsers.Items.Clear();
            tbPassword.Text = "";
            for (int i = 0; i < clsUsers.RowCount; i++)
            {
                sUser = clsUsers.DSet.Tables[0].Rows[i]["UserName"].ToString();
                if (sUser == "Admin")
                {
                    sAdminPwd = clsUsers.DSet.Tables[0].Rows[i]["Password"].ToString();
                }
                cboUsers.Items.Add(sUser);
                if (sUser == UserFromRegistry)
                {
                    cboUsers.SelectedIndex = cboUsers.Items.Count - 1;
                    setPwDFocus            = true;
                }
            }
            SetVisibility(cboUsers.Items.Count > 0);
            if (setPwDFocus == true)
            {
                tbPassword.Focus();
            }
        }
Beispiel #2
0
        private void loadUsers()
        {
            string sUser = "";

            clsUsers = new Userlist(CCFBGlobal.connectionString);

            clsUsers.openAll();
            cboUsers.Items.Clear();
            tbPassword.Text = "";
            for (int i = 0; i < clsUsers.RowCount; i++)
            {
                sUser = clsUsers.DSet.Tables[0].Rows[i]["UserName"].ToString();
                cboUsers.Items.Add(sUser);
                if (sUser == UserFromRegistry)
                {
                    cboUsers.SelectedIndex = cboUsers.Items.Count - 1;
                }
            }
            SetVisibility(cboUsers.Items.Count > 0);
        }