private void saveupdates_Click(object sender, EventArgs e) { if (chosen != "None") { bool success = newconnection.update_constraint_teacher(recived.get_id(), new Person(newconnection.get_row_by_username(chosen))); if (success) { MessageBox.Show("completed"); this.Close(); } else { MessageBox.Show("somthing went wrong"); } } else { bool success = newconnection.update_constraint_teacher(recived.get_id()); if (success) { MessageBox.Show("completed"); this.Close(); } else { MessageBox.Show("somthing went wrong"); } } }
public Teacher_movecon_request(object input_constraint) { InitializeComponent(); sending_constraint = input_constraint as constraints; Sender_name_label.Text = "Username: "******"\nID: " + sending_constraint.getlecturerid(); Subject_fixed_text.Text = "ID: " + sending_constraint.get_id() + "\nCourse ID: " + sending_constraint.getcourseid() + "\nCourse Name: " + sending_constraint.getcoursename() + "\nClass: " + sending_constraint.getclassroom(); }
private String make_the_letter() { String Letter = "\tSubject:\n\n" + make_the_subject() + "\n\n\n\tLetter: " + "\n\nSender: " + sending_constraint.getlecturer() + "\nSender`s ID: " + sending_constraint.getlecturerid() + "\nConstrant`s ID: " + sending_constraint.get_id() + "\nCourse`s name: " + sending_constraint.getcoursename() + "\nCourse`s ID: " + sending_constraint.getcourseid() + "\nYear: " + sending_constraint.getyear() + "\nSemester: " + sending_constraint.getsemester() + "\nClassroom: " + sending_constraint.getclassroom(); if (FreeText.Text == String.Empty) { Letter += "\n\n\n\t***No attached message***"; } else { Letter += "\n\n\n\tAttached message: \n\n" + FreeText.Text; } return(Letter); }