private void AddressesMenuBox_Click(object sender, EventArgs e)//открытие таблицы адресов компании { if (Users.CurrentUser.Status == "admin") { AddressesList addressesList = new AddressesList(); addressesList.Owner = this; addressesList.ShowDialog(); } else { MessageBox.Show("Доступ ограничен вашим статусом"); } }
private void AddressEdit_KeyDown(object sender, KeyEventArgs e) { if (e.KeyCode == Keys.Escape) { this.Close(); try { AddressesList addList = this.Owner as AddressesList; addList.Close(); } catch { } } }
private void AddressEdit_FormClosed(object sender, FormClosedEventArgs e)//внесение изменений в форму родителя { AddressesList addressesList = this.Owner as AddressesList; addressesList.FillGrid(); }