private void SaveButton_Click(object sender, EventArgs e) { if (StudentComboBox.Text != "" && BookComboBox.Text != "") { _borrows.ReturnBorrow(_students.ReadStudent(StudentComboBox.Text).StudentId, _books.ReadBook(BookComboBox.Text).BookId, ReturnDatePicker.Value); Close(); } else { MessageBox.Show(@"Inputs are empty!", @"Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } }