예제 #1
0
        private void addRecordButton_Click(object sender, EventArgs e)
        {
            string name    = textNameBox.Text;
            int    groupId = ((Group)comboGroupBox.SelectedItem).Id;

            (int, int)result          = DBStudents.GetInstance().AddNewStudent(name, groupId);
            form.addedLabel.Visible   = true;
            form.idLabel.Visible      = true;
            form.addedInputLabel.Text = result.Item1.ToString();
            form.idInputLabel.Text    = result.Item2.ToString();
            DialogResult = DialogResult.OK;
            Close();
        }
예제 #2
0
 private void countButton_Click(object sender, EventArgs e)
 {
     countInputLabel.Text = DBStudents.GetInstance().GetCount().ToString();
     countLabel.Visible   = true;
 }
예제 #3
0
        private void readButton_Click(object sender, EventArgs e)
        {
            IEnumerable <StudentGroupRecord> records = DBStudents.GetInstance().GetAllStudents();

            FillTable(records);
        }