private void createClass() { if (cbSubject.Text == "" || cbSession.Text == "") { MessageBox.Show("Please fill all the information"); return; } this.Close(); DataManager dataMng = DataManager.GetInstance; dataMng.setClassSessionDate(cbSubject.SelectedItem.ToString(), cbSession.SelectedItem.ToString(), datClassDate.Value.ToString("dd-MM-yyyy", System.Globalization.CultureInfo.InvariantCulture)); Insert_Student_form inStufm = new Insert_Student_form(); inStufm.Show(); }
private void Insert() { if (dataMng.Subject == null || dataMng.Session == null || dataMng.Date == null) { MessageBox.Show("Some information of class is missing. Please fill again the information of class"); dataMng.Subject = Interaction.InputBox("Please fill subject name", "", ""); dataMng.Session = Interaction.InputBox("Please fill session", "", ""); dataMng.Date = Interaction.InputBox("Please fill date with the format dd-mm-yyyy", "", ""); } if (dataMng.Subject == null || dataMng.Session == null || dataMng.Date == null) { MessageBox.Show("Some information of class is still missing. Please try again"); return; } Insert_Student_form inStu = new Insert_Student_form(); inStu.Show(); }