Ejemplo n.º 1
0
        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();
        }
Ejemplo n.º 2
0
        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();
        }
Ejemplo n.º 3
0
        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);
        }