Пример #1
0
        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();
            }
        }
Пример #2
0
        private void comboBox3_SelectedIndexChanged(object sender, EventArgs e)
        {
            SetEnableR3(true);

            comboBox2.Enabled = true;

            if (comboBox4.Items.Count == 0)
            {
                MessageBox.Show("Для этой специальности не указан режим работы", "Внимание", MessageBoxButtons.OK, MessageBoxIcon.Error);
                comboBox2.Enabled = false;
            }

            SpecializationSelect?.Invoke(this, new EntityIdEventArgs(Editor.GetId(comboBox3.SelectedItem.ToString())));

            if (comboBox3.Items.Count == 0)
            {
                MessageBox.Show("Не найдено врачей с данной специальностью", "Ошибка!", MessageBoxButtons.OK, MessageBoxIcon.Error);
                comboBox2.Enabled = false;
            }
            else
            {
                comboBox2.Enabled = true;
            }
        }
Пример #3
0
 public void RefreshRooms()
 {
     SpecializationSelect?.Invoke(this, new EntityIdEventArgs(Editor.GetId(comboBox1.SelectedItem.ToString())));
 }