private void comboBox1_SelectedIndexChanged(object sender, EventArgs e) { SpecializationSelect?.Invoke(this, new EntityIdEventArgs(Editor.GetId(comboBox1.SelectedItem.ToString()))); comboBox3.Enabled = true; if (Editor.GetSpecialization(comboBox1.SelectedItem.ToString()) == "Терапевт") { comboBox2.Enabled = true; } else { comboBox2.Text = ""; comboBox2.Enabled = false; } if (comboBox3.Items.Count == 0) { MessageBox.Show("за данной специальностью нет закреплённых кабинетов", "Ошибка", MessageBoxButtons.OK, MessageBoxIcon.Error); RoomsRegister RR = new RoomsRegister(true); RoomsRegisterView = RR; RR.Owner = this; RoomsRegisterOpen?.Invoke(this, EventArgs.Empty); RR.ShowDialog(); } }
private void RoomsRegisterBtn_Click(object sender, EventArgs e) { RoomsRegister RR = new RoomsRegister(); IRoomsRegisterViewRef = RR; RoomsRegister_Click?.Invoke(this, EventArgs.Empty); RR.Show(); }