コード例 #1
0
        private void btnBack_Click(object sender, EventArgs e)
        {
            frmSearchProfile frm = new frmSearchProfile();

            frm.Show();
            this.Hide();
        }
コード例 #2
0
ファイル: Form3.cs プロジェクト: ayzzanity/schoolmanagement
        private void btnEnroll_Click(object sender, EventArgs e)
        {
            DataSet ds = new DataSet();

            ds       = ct.getCourseByCode(cboCourse.SelectedItem.ToString());
            courseID = Convert.ToInt32(ds.Tables[0].Rows[0].ItemArray[0].ToString());

            ct.enrollStudent(studentID, courseID, dtpEnrolled.Value.ToShortDateString());
            MessageBox.Show("Student Enrolled!");
            frmSearchProfile frm = new frmSearchProfile();

            frm.Show();
            this.Hide();
        }
コード例 #3
0
ファイル: Form1.cs プロジェクト: ayzzanity/schoolmanagement
        private void btnSave_Click(object sender, EventArgs e)
        {
            if (btnSave.Text.Equals("SAVE"))
            {
                st.insertStudent(txtFirstname.Text, txtMiddlename.Text, txtLastname.Text, Convert.ToInt32(txtAge.Text), cboGender.Text);
                MessageBox.Show("New student successfully saved.");
            }
            else
            {
                st.updateStudent(studentID, txtFirstname.Text, txtMiddlename.Text, txtLastname.Text, Convert.ToInt32(txtAge.Text), cboGender.Text);
                MessageBox.Show("Student successfully updated.");
                btnSave.Text = "SAVE";
            }
            this.Hide();
            frmSearchProfile frm = new frmSearchProfile();

            frm.Show();
        }