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(); }
private void countButton_Click(object sender, EventArgs e) { countInputLabel.Text = DBStudents.GetInstance().GetCount().ToString(); countLabel.Visible = true; }
private void readButton_Click(object sender, EventArgs e) { IEnumerable <StudentGroupRecord> records = DBStudents.GetInstance().GetAllStudents(); FillTable(records); }