Esempio n. 1
0
 private void button1_Click(object sender, EventArgs e)
 {
     StudentMethods.AddStudent(textBox1.Text, textBox2.Text, Phone);
     textBox1.Text  = "";
     textBox2.Text  = "";
     textBox3.Text  = "";
     comboBox1.Text = "";
     MessageBox.Show("Student Added!");
 }
Esempio n. 2
0
        public Form2()
        {
            InitializeComponent();
            this.monthCalendar1.MinDate = monthCalendar1.TodayDate;
            foreach (DataRow dr in TeacherMethods.GetAllTeachers().Rows)
            {
                twoitem ti = new twoitem((dr["TeacherName"].ToString()), int.Parse(dr["TeacherId"].ToString()));
                comboBox1.Items.Add(ti);
            }


            foreach (DataRow dr in StudentMethods.GetAllStudents().Rows)
            {
                twoitem ti = new twoitem((dr["StudentName"].ToString()), int.Parse(dr["StudentId"].ToString()));
                comboBox2.Items.Add(ti);
            }
        }