private void btndelete_Click(object sender, EventArgs e) { StudentDBOper sdbo = new StudentDBOper(); string studentid = txtStuid.Text.Trim(); sdbo.deletestudent(studentid); MessageBox.Show("Student Details Deleted Successfully", "Message", MessageBoxButtons.OK, MessageBoxIcon.Information); }
private void btnRegis_Click(object sender, EventArgs e) { string studentid = txtStuid.Text.Trim(); StudentDBOper sdbo = new StudentDBOper(); Student student = sdbo.findstudent(studentid); lblStuName.Text = student.getstudentName(); lblStudeAge.Text = student.getstudentAge().ToString(); lblStuGpa.Text = student.getstudentgpa().ToString(); }
private void btnUpdate_Click(object sender, EventArgs e) { StudentDBOper sdbo = new StudentDBOper(); string studentid = txtStuid.Text.Trim(); string studentname = txtStuname.Text.Trim(); int studentage = int.Parse(txtStuAge.Text.Trim()); float studentgpa = float.Parse(txtStugpa.Text.Trim()); Student student = new Student(studentid, studentname, studentage, studentgpa); sdbo.updatestudent(student); MessageBox.Show("Student Details Updated Successfully", "Message", MessageBoxButtons.OK, MessageBoxIcon.Information); }
private void btnRegis_Click(object sender, EventArgs e) { StudentDBOper sdbo = new StudentDBOper(); string studentid = txtStuid.Text.Trim(); string studentname = txtStuname.Text.Trim(); int studentage = int.Parse(txtStuAge.Text.Trim()); float studentgpa = float.Parse(txtStugpa.Text.Trim()); Student student = new Student(studentid, studentname, studentage, studentgpa); sdbo.registerStudent(student); MessageBox.Show("Student Registration is Successful!!"); }