private void пользователиToolStripMenuItem_Click(object sender, EventArgs e) { if (Users.CurrentUser.Status == "admin") { UsersList usersList = new UsersList(); usersList.Owner = this; usersList.ShowDialog(); } else { MessageBox.Show("Доступ ограничен вашим статусом"); } }
private void UserEdit_KeyDown(object sender, KeyEventArgs e) { if (e.KeyCode == Keys.Escape) { this.Close(); try { UsersList usersList = this.Owner as UsersList; usersList.Close(); } catch { } } }
private void UserEdit_FormClosed(object sender, FormClosedEventArgs e) { UsersList usersList = this.Owner as UsersList; usersList.FillGrid(); }