Exemplo n.º 1
0
        private void btnAdd_Click(object sender, EventArgs e)
        {
            Tafe_DataTier dt           = new Tafe_DataTier();
            int           rowsInserted = dt.insertStudent(txtID.Text, txtName.Text, dtpEnrollment.Value);

            if (rowsInserted > 0)
            {
                MessageBox.Show("New Student Information Saved", "Add Student", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
            else
            {
                MessageBox.Show("New Student Information NOT Saved", "Add Student", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }