private void buttonUserPW_Click(object sender, EventArgs e) { int nSelected = this.listViewUserList.SelectedItems.Count; if (nSelected > 0) { int nUserRight = this.comboBoxUserRight.SelectedIndex; foreach (ListViewItem item in this.listViewUserList.SelectedItems) { int nID = (int)item.Tag; string user = item.SubItems[1].Text; FormUserPassword userPW = new FormUserPassword(); userPW.SetData(user); DialogResult dlgResult = userPW.ShowDialog(); if (DialogResult.OK == dlgResult) { userMge.SetUserPW(nID, userPW.NewPassword, m_nSession); RefreshUserList(); return; } } } else { MessageBox.Show("Please select a user."); } }
private void buttonUserPW_Click(object sender, EventArgs e) { int nSelected = this.listViewUserList.SelectedItems.Count; if (nSelected > 0) { int nUserRight = this.comboBoxUserRight.SelectedIndex; foreach (ListViewItem item in this.listViewUserList.SelectedItems) { int nID = (int)item.Tag; string user = item.SubItems[1].Text; FormUserPassword userPW = new FormUserPassword(); userPW.SetData(user); DialogResult dlgResult = userPW.ShowDialog(); if (DialogResult.OK == dlgResult) { userMge.SetUserPW(nID, userPW.NewPassword, m_nSession); RefreshUserList(); return; } } } else { MessageBox.Show("Please select a user."); } }