protected void btnSubmit_Click(object sender, EventArgs e) { if (Page.IsValid) { // Create a new object from ClassStudent Class ClassStudent objClassStudent = new ClassStudent(); objClassStudent.classStudentID = Convert.ToInt32(txtStudentID.Text); objClassStudent.tuitionClassID = Convert.ToInt32(txtTClassID.Text); objClassStudent.feedback = txtFeedback.Text; int errorcode = objClassStudent.createFeedback(); if (errorcode == 0) { lblMessage.Text = "Feedback must be entered before submission."; } else lblMessage.Text = "Your feedback has been successfully submitted."; } }
protected void btnSubmit_Click(object sender, EventArgs e) { if (Page.IsValid) { ClassStudent objClassStudent = new ClassStudent(); objClassStudent.classStudentID = Convert.ToInt32(txtStudentID.Text); objClassStudent.tuitionClassID = Convert.ToInt32(ddlTClass.SelectedValue); DiscussionTopic objDiscussionTopic = new DiscussionTopic(); DataSet ds = new DataSet(); int errorcode2 = objDiscussionTopic.createDiscussion(ref ds); if (errorcode2 == 0) { lblMessage.Text = "Discussion Topic has been successfully submitted."; } else lblMessage.Text = "All entries and selections must be entered before submission."; } }