Пример #1
0
        private void CreateRef_Click(object sender, EventArgs e)
        {
            this.Visible = false;
            CreateReference createReference = new CreateReference(ref conn);

            createReference.ShowDialog();
        }
Пример #2
0
        public CreateReference2(CreateReference createReference, int course)
        {
            InitializeComponent();
            this.createReference = createReference;
            idSpec = Convert.ToInt32(createReference.idSpecText.Items[createReference.idSpecText.SelectedIndex]);
            //заповнення масиву з предметами
            GetStartObj(idSpec, 1, 1, ref liFisrt);
            GetStartObj(idSpec, 1, 2, ref liSecond);
            GetStartObj(idSpec, 2, 3, ref liThree);
            GetStartObj(idSpec, 2, 4, ref liFour);
            GetStartObj(idSpec, 3, 5, ref liFive);
            GetStartObj(idSpec, 3, 6, ref liSix);
            GetStartObj(idSpec, 4, 7, ref liSeven);
            GetStartObj(idSpec, 4, 8, ref liEight);

            //вивід дисциплін для поточного курсу
            //currentCheck = createReference.student.course;
            if (currentCheck == "1")
            {
                radioButton1.Checked = true;
            }
            else if (currentCheck == "2")
            {
                radioButton2.Checked = true;
            }
            else if (currentCheck == "3")
            {
                radioButton3.Checked = true;
            }
            else if (currentCheck == "4")
            {
                rrr.Checked = true;
            }

            numericSemester.Value = numericSemester.Maximum;
            numericSemester.Value = numericSemester.Minimum;

            lblSemester1.Text = "Обрано " + 0 + " з " + liFisrt.Count;
            lblSemester2.Text = "Обрано " + 0 + " з " + liSecond.Count;
            lblSemester3.Text = "Обрано " + 0 + " з " + liThree.Count;
            lblSemester4.Text = "Обрано " + 0 + " з " + liFour.Count;
            lblSemester5.Text = "Обрано " + 0 + " з " + liFive.Count;
            lblSemester6.Text = "Обрано " + 0 + " з " + liSix.Count;
            lblSemester7.Text = "Обрано " + 0 + " з " + liSeven.Count;
            lblSemester8.Text = "Обрано " + 0 + " з " + liEight.Count;

            //вимикання непотрібних перемикачів курсів
            DisabledRadioButton();
            //подія виклику інструкції
            this.HelpButtonClicked += HelpButton_Click;
        }