// para requerimiento 5 public void insertarHorarioProfesional(VOInsertarHorario voih) { long idHorario = this.obtenerIdHorario(); //String connectionString = ConfigurationManager.ConnectionStrings["ConnectionString"].ToString(); String connectionString = ConfigurationManager.ConnectionStrings["ConnectionString"].ToString(); SqlConnection myConnection = new SqlConnection(connectionString); myConnection.Open(); SqlCommand myCommand = new SqlCommand(consulta.insertarHorario(), myConnection); myCommand.Parameters.AddWithValue("@hora", voih.Hora); myCommand.Parameters.AddWithValue("@dia", voih.Dia); myCommand.Parameters.AddWithValue("@idConsultorio", voih.IdConsultorio); myCommand.Parameters.AddWithValue("@ciProfesional", voih.Profesional); myCommand.ExecuteNonQuery(); myConnection.Close(); }
public void insertarHorario(VOInsertarHorario voih) { daoh.insertarHorarioProfesional(voih); }