public void RemoveInterviewer(Interviewer interviewer) { String statement = "DELETE FROM InterviewInterviewers" + "WHERE InterviewerID = " + interviewer.ID + " AND InterviewID = " + ID; SqlConnection connection = new SqlConnection(MySQLUtils.ConnectionString); connection.Open(); SqlCommand command = new SqlCommand(statement, connection); int retValue = command.ExecuteNonQuery(); }
public void AddInterviewer(Interviewer interviewer) { String statement = "INSERT INTO InterviewInterviewers (InterviewID, InterviewerID) " + "VALUES (" + ID + ", " + interviewer.ID + ")"; SqlConnection connection = new SqlConnection(MySQLUtils.ConnectionString); connection.Open(); SqlCommand command = new SqlCommand(statement, connection); int retValue = command.ExecuteNonQuery(); }
public Interviewer GetInterviewer() { String statement = "SELECT * FROM Interviewers WHERE Interviewers.PersonID = " + ID; SqlConnection connection = new SqlConnection(MySQLUtils.ConnectionString); connection.Open(); SqlCommand command = new SqlCommand(statement, connection); SqlDataReader reader = command.ExecuteReader(); reader.Read(); Interviewer returner = new Interviewer().FromDataReader(reader); connection.Close(); return(returner); }