class ModificarSerie(wx.Frame): def __init__(self, frame_father, id_serie): super(ModificarSerie, self).__init__() self.xml = xrc.XmlResource('../View/modificar_serie.xml') self.frame = self.xml.LoadFrame(None, 'Frame_Modificar_Serie') self.panel = xrc.XRCCTRL(self.frame, 'ModificarSerie_Panel') self.titulo = xrc.XRCCTRL(self.panel, 'Textctrl_Titulo') self.genero = xrc.XRCCTRL(self.panel, 'Textctrl_Genero') self.autor = xrc.XRCCTRL(self.panel, 'Textctrl_Autor') self.temporadas = xrc.XRCCTRL(self.panel, 'Textctrl_Temporadas') self.imagen = xrc.XRCCTRL(self.panel, 'Filepicker_Imagen') self.id_serie = id_serie self.frame_father = frame_father self.serie_controller = SerieController() self.button_modificar = xrc.XRCCTRL(self.panel, 'wxID_OK') self.button_cancelar = xrc.XRCCTRL(self.panel, 'wxID_CANCEL') self.frame.SetIcon(wx.Icon("../view/System_Images/icon.png")) self.frame.Bind(wx.EVT_BUTTON, self.modificar_serie, self.button_modificar) self.frame.Bind(wx.EVT_BUTTON, self.cancelar, self.button_cancelar) self.cargar_datos_serie() self.frame.Show() def cargar_datos_serie(self): serie = self.serie_controller.get_serie(self.id_serie) self.titulo.SetValue(serie.titulo) self.genero.SetValue(serie.genero) self.autor.SetValue(serie.autor) self.temporadas.SetValue(str(serie.temporadas)) def modificar_serie(self, evt): titulo = self.titulo.GetValue() genero = self.genero.GetValue() autor = self.autor.GetValue() temporadas = self.temporadas.GetValue() imagen = self.imagen.GetPath() if titulo and genero and autor and temporadas: data = { 'titulo': titulo, 'genero': genero, 'autor': autor, 'temporadas': temporadas, "imagen": imagen } if self.serie_controller.edit_serie(self.id_serie, data): wx.MessageBox('La serie se modifico exitosamente', 'Information', wx.OK | wx.ICON_INFORMATION) self.frame_father.load_data_listctrl_serie() self.cargar_datos_serie() else: wx.MessageBox('Todos los campos son obligatorios', 'Error', wx.OK | wx.ICON_ERROR) def cancelar(self, evt): self.frame.Close()
def __init__(self, frame_father): super(AnadirReservaSerie, self).__init__() self.xml = xrc.XmlResource('../View/anadir_reserva_serie.xml') self.frame = self.xml.LoadFrame(None, 'Frame_Anadir_Reserva') self.panel = xrc.XRCCTRL(self.frame, 'AnadirReserva_Panel') self.id_cliente = xrc.XRCCTRL(self.panel, 'Textctrl_ID_Cliente') self.id_serie = xrc.XRCCTRL(self.panel, 'Textctrl_ID_Serie') self.button_anadir = xrc.XRCCTRL(self.panel, 'wxID_OK') self.button_cancelar = xrc.XRCCTRL(self.panel, 'wxID_CANCEL') self.frame.SetIcon(wx.Icon("../view/System_Images/icon.png")) self.frame_father = frame_father self.frame.Bind(wx.EVT_BUTTON, self.anadir_reserva, self.button_anadir) self.frame.Bind(wx.EVT_BUTTON, self.cerrar_frame, self.button_cancelar) self.reserva_serie_controller = ReservaSerieController() self.user_controller = UserController() self.serie_controller = SerieController() self.frame.Show()
def __init__(self, frame_father): super(AnadirSerie, self).__init__() self.xml = xrc.XmlResource('../View/anadir_serie.xml') self.frame = self.xml.LoadFrame(None, 'Frame_Anadir_Serie') self.panel = xrc.XRCCTRL(self.frame, 'AnadirSerie_Panel') self.titulo = xrc.XRCCTRL(self.panel, 'Textctrl_Titulo') self.genero = xrc.XRCCTRL(self.panel, 'Textctrl_Genero') self.autor = xrc.XRCCTRL(self.panel, 'Textctrl_Autor') self.temporadas = xrc.XRCCTRL(self.panel, 'Textctrl_Temporadas') self.imagen = xrc.XRCCTRL(self.panel, 'Filepicker_Imagen') self.button_anadir = xrc.XRCCTRL(self.panel, 'wxID_OK') self.button_cancelar = xrc.XRCCTRL(self.panel, 'wxID_CANCEL') self.frame.SetIcon(wx.Icon("../view/System_Images/icon.png")) self.frame_father = frame_father self.frame.Bind(wx.EVT_BUTTON, self.anadir_serie, self.button_anadir) self.frame.Bind(wx.EVT_BUTTON, self.cerrar_frame, self.button_cancelar) self.serie_controller = SerieController() self.frame.Show()
def __init__(self, frame_father, id_serie): super(EliminarSerie, self).__init__() self.xml = xrc.XmlResource('../View/eliminar_serie.xml') self.frame = self.xml.LoadFrame(None, 'Frame_Eliminar_Serie') self.panel = xrc.XRCCTRL(self.frame, 'EliminarSerie_Panel') self.titulo = xrc.XRCCTRL(self.panel, 'Textctrl_Titulo') self.genero = xrc.XRCCTRL(self.panel, 'Textctrl_Genero') self.autor = xrc.XRCCTRL(self.panel, 'Textctrl_Autor') self.temporadas = xrc.XRCCTRL(self.panel, 'Textctrl_Temporadas') self.id_serie = id_serie self.frame_father = frame_father self.serie_controller = SerieController() self.button_eliminar = xrc.XRCCTRL(self.panel, 'wxID_OK') self.button_cancelar = xrc.XRCCTRL(self.panel, 'wxID_CANCEL') self.frame.SetIcon(wx.Icon("../view/System_Images/icon.png")) self.frame.Bind(wx.EVT_BUTTON, self.eliminar_serie, self.button_eliminar) self.frame.Bind(wx.EVT_BUTTON, self.cancelar, self.button_cancelar) self.cargar_datos_usuario() self.frame.Show()
def __init__(self, *args, **kw): super(ListaSerie, self).__init__(*args, **kw) self.xml = xrc.XmlResource('../View/lista_series.xml') self.frame = self.xml.LoadFrame(None, 'Frame_Series') self.panel = xrc.XRCCTRL(self.frame, 'Panel_Series') self.button_anadir_serie = xrc.XRCCTRL(self.panel, 'Button_Anadir_Serie') self.listctrl_serie = xrc.XRCCTRL(self.panel, 'Listctrl_Series') self.frame.SetIcon(wx.Icon("../view/System_Images/icon.png")) self.list_series = [] self.serie_list = [] self.serie_controller = SerieController() self.load_columns_listctrl_serie() self.load_data_listctrl_serie() self.frame.Bind(wx.EVT_LIST_ITEM_SELECTED, self.list_serie_selected, self.listctrl_serie) self.frame.Bind(wx.EVT_BUTTON, self.anadir_serie, self.button_anadir_serie) self.frame.Show()
class AnadirReservaSerie(wx.Frame): def __init__(self, frame_father): super(AnadirReservaSerie, self).__init__() self.xml = xrc.XmlResource('../View/anadir_reserva_serie.xml') self.frame = self.xml.LoadFrame(None, 'Frame_Anadir_Reserva') self.panel = xrc.XRCCTRL(self.frame, 'AnadirReserva_Panel') self.id_cliente = xrc.XRCCTRL(self.panel, 'Textctrl_ID_Cliente') self.id_serie = xrc.XRCCTRL(self.panel, 'Textctrl_ID_Serie') self.button_anadir = xrc.XRCCTRL(self.panel, 'wxID_OK') self.button_cancelar = xrc.XRCCTRL(self.panel, 'wxID_CANCEL') self.frame.SetIcon(wx.Icon("../view/System_Images/icon.png")) self.frame_father = frame_father self.frame.Bind(wx.EVT_BUTTON, self.anadir_reserva, self.button_anadir) self.frame.Bind(wx.EVT_BUTTON, self.cerrar_frame, self.button_cancelar) self.reserva_serie_controller = ReservaSerieController() self.user_controller = UserController() self.serie_controller = SerieController() self.frame.Show() def anadir_reserva(self, evt): id_cliente = self.id_cliente.GetValue() id_serie = self.id_serie.GetValue() if id_cliente and id_serie: if self.user_controller.get_user(id_cliente) != None and self.serie_controller.get_serie(id_serie) != None: if self.reserva_serie_controller.search_booking(id_cliente, id_serie) == False: if self.reserva_serie_controller.create_booking(id_cliente,id_serie): wx.MessageBox('La reserva se creo con exito', 'Information', wx.OK | wx.ICON_INFORMATION) self.frame_father.load_data_listctrl_serie() self.frame.Close() else: wx.MessageBox('Ya existe una reserva con los mismos datos ', 'Error', wx.OK | wx.ICON_ERROR) self.limpiar_campos() else: wx.MessageBox('El usuario o la serie no existe en el sistema intente nuevamente', 'Error', wx.OK | wx.ICON_ERROR) else: wx.MessageBox('Todos los campos son obligatorios', 'Error', wx.OK | wx.ICON_ERROR) def limpiar_campos(self): self.id_cliente.Clear() self.id_serie.Clear() def cerrar_frame(self, evt): self.frame.Close()
class EliminarSerie(wx.Frame): def __init__(self, frame_father, id_serie): super(EliminarSerie, self).__init__() self.xml = xrc.XmlResource('../View/eliminar_serie.xml') self.frame = self.xml.LoadFrame(None, 'Frame_Eliminar_Serie') self.panel = xrc.XRCCTRL(self.frame, 'EliminarSerie_Panel') self.titulo = xrc.XRCCTRL(self.panel, 'Textctrl_Titulo') self.genero = xrc.XRCCTRL(self.panel, 'Textctrl_Genero') self.autor = xrc.XRCCTRL(self.panel, 'Textctrl_Autor') self.temporadas = xrc.XRCCTRL(self.panel, 'Textctrl_Temporadas') self.id_serie = id_serie self.frame_father = frame_father self.serie_controller = SerieController() self.button_eliminar = xrc.XRCCTRL(self.panel, 'wxID_OK') self.button_cancelar = xrc.XRCCTRL(self.panel, 'wxID_CANCEL') self.frame.SetIcon(wx.Icon("../view/System_Images/icon.png")) self.frame.Bind(wx.EVT_BUTTON, self.eliminar_serie, self.button_eliminar) self.frame.Bind(wx.EVT_BUTTON, self.cancelar, self.button_cancelar) self.cargar_datos_usuario() self.frame.Show() def cargar_datos_usuario(self): serie = self.serie_controller.get_serie(self.id_serie) self.titulo.SetValue(serie.titulo) self.genero.SetValue(serie.genero) self.autor.SetValue(serie.autor) self.temporadas.SetValue(str(serie.temporadas)) def eliminar_serie(self, evt): if self.serie_controller.delete_serie(self.id_serie): wx.MessageBox('La serie se elimino exitosamente', 'Information', wx.OK | wx.ICON_INFORMATION) self.frame_father.load_data_listctrl_serie() self.frame.Close() def cancelar(self, evt): self.frame.Close()
def __init__(self, frame_father, id_reserva): super(EliminarReservaSerie, self).__init__() self.xml = xrc.XmlResource('../View/eliminar_reserva_serie.xml') self.frame = self.xml.LoadFrame(None, 'Frame_Eliminar_Reserva') self.panel = xrc.XRCCTRL(self.frame, 'EliminarReserva_Panel') self.id_reserva = xrc.XRCCTRL(self.panel, 'Textctrl_ID_Reserva') self.id_cliente = xrc.XRCCTRL(self.panel, 'Textctrl_ID_Cliente') self.username = xrc.XRCCTRL(self.panel, 'Textctrl_Username') self.id_serie = xrc.XRCCTRL(self.panel, 'Textctrl_ID_Serie') self.titulo = xrc.XRCCTRL(self.panel, 'Textctrl_titulo_serie') self.id_booking = id_reserva self.frame_father = frame_father self.reserva_serie_controller = ReservaSerieController() self.user_controller = UserController() self.serie_controller = SerieController() self.button_eliminar = xrc.XRCCTRL(self.panel, 'wxID_OK') self.button_cancelar = xrc.XRCCTRL(self.panel, 'wxID_CANCEL') self.frame.SetIcon(wx.Icon("../view/System_Images/icon.png")) self.frame.Bind(wx.EVT_BUTTON, self.eliminar_reserva, self.button_eliminar) self.frame.Bind(wx.EVT_BUTTON, self.cancelar, self.button_cancelar) self.cargar_datos_reserva() self.frame.Show()
class EliminarReservaSerie(wx.Frame): def __init__(self, frame_father, id_reserva): super(EliminarReservaSerie, self).__init__() self.xml = xrc.XmlResource('../View/eliminar_reserva_serie.xml') self.frame = self.xml.LoadFrame(None, 'Frame_Eliminar_Reserva') self.panel = xrc.XRCCTRL(self.frame, 'EliminarReserva_Panel') self.id_reserva = xrc.XRCCTRL(self.panel, 'Textctrl_ID_Reserva') self.id_cliente = xrc.XRCCTRL(self.panel, 'Textctrl_ID_Cliente') self.username = xrc.XRCCTRL(self.panel, 'Textctrl_Username') self.id_serie = xrc.XRCCTRL(self.panel, 'Textctrl_ID_Serie') self.titulo = xrc.XRCCTRL(self.panel, 'Textctrl_titulo_serie') self.id_booking = id_reserva self.frame_father = frame_father self.reserva_serie_controller = ReservaSerieController() self.user_controller = UserController() self.serie_controller = SerieController() self.button_eliminar = xrc.XRCCTRL(self.panel, 'wxID_OK') self.button_cancelar = xrc.XRCCTRL(self.panel, 'wxID_CANCEL') self.frame.SetIcon(wx.Icon("../view/System_Images/icon.png")) self.frame.Bind(wx.EVT_BUTTON, self.eliminar_reserva, self.button_eliminar) self.frame.Bind(wx.EVT_BUTTON, self.cancelar, self.button_cancelar) self.cargar_datos_reserva() self.frame.Show() def cargar_datos_reserva(self): reserva = self.reserva_serie_controller.get_booking(self.id_booking) serie = self.serie_controller.get_serie(reserva.serie_id) user = self.user_controller.get_user(reserva.usuario_id) self.id_reserva.SetValue(str(reserva.id)) self.id_cliente.SetValue(str(user.id)) self.username.SetValue(user.nombre_usuario) self.id_serie.SetValue(str(serie.id)) self.titulo.SetValue(serie.titulo) def eliminar_reserva(self, evt): if self.reserva_serie_controller.delete_booking(self.id_booking): wx.MessageBox('La reserva se eliminó correctamente', 'Information', wx.OK | wx.ICON_INFORMATION) self.frame_father.load_data_listctrl_juego() self.frame.Close() def cancelar(self, evt): self.frame.Close()
def __init__(self, *args, **kw): super(ListaReserva, self).__init__(*args, **kw) self.xml = xrc.XmlResource('../View/lista_reservas.xml') self.frame = self.xml.LoadFrame(None, 'Frame_Reservas') self.panel = xrc.XRCCTRL(self.frame, 'Panel_Reservas') self.button_anadir_reserva = xrc.XRCCTRL(self.panel, 'Button_Anadir_Reservas') self.combox = xrc.XRCCTRL(self.panel, 'Combox') self.button_filtrar = xrc.XRCCTRL(self.panel, 'Button_Filtrar') self.listctrl_reservas = xrc.XRCCTRL(self.panel, 'Listctrl_Reservas') self.frame.SetIcon(wx.Icon("../view/System_Images/icon.png")) self.list_reservas = [] self.reservas_list = [] self.reserva_serie_controller = ReservaSerieController() self.serie_controller = SerieController() self.reserva_juego_controller = ReservaJuegoController() self.frame.Bind(wx.EVT_LIST_ITEM_SELECTED, self.list_reserva_selected, self.listctrl_reservas) self.frame.Bind(wx.EVT_BUTTON, self.cargar_datos, self.button_filtrar) self.frame.Bind(wx.EVT_BUTTON, self.cargar_eventos, self.button_anadir_reserva) self.cargar_datos_inicial() self.frame.Show()
class AnadirSerie(wx.Frame): def __init__(self, frame_father): super(AnadirSerie, self).__init__() self.xml = xrc.XmlResource('../View/anadir_serie.xml') self.frame = self.xml.LoadFrame(None, 'Frame_Anadir_Serie') self.panel = xrc.XRCCTRL(self.frame, 'AnadirSerie_Panel') self.titulo = xrc.XRCCTRL(self.panel, 'Textctrl_Titulo') self.genero = xrc.XRCCTRL(self.panel, 'Textctrl_Genero') self.autor = xrc.XRCCTRL(self.panel, 'Textctrl_Autor') self.temporadas = xrc.XRCCTRL(self.panel, 'Textctrl_Temporadas') self.imagen = xrc.XRCCTRL(self.panel, 'Filepicker_Imagen') self.button_anadir = xrc.XRCCTRL(self.panel, 'wxID_OK') self.button_cancelar = xrc.XRCCTRL(self.panel, 'wxID_CANCEL') self.frame.SetIcon(wx.Icon("../view/System_Images/icon.png")) self.frame_father = frame_father self.frame.Bind(wx.EVT_BUTTON, self.anadir_serie, self.button_anadir) self.frame.Bind(wx.EVT_BUTTON, self.cerrar_frame, self.button_cancelar) self.serie_controller = SerieController() self.frame.Show() def anadir_serie(self, evt): titulo = self.titulo.GetValue() genero = self.genero.GetValue() autor = self.autor.GetValue() temporadas = self.temporadas.GetValue() imagen = self.imagen.GetPath() if imagen == "": imagen = None if titulo and genero and autor and temporadas: if self.serie_controller.buscar_serie(titulo) == False: if self.serie_controller.create_serie(titulo, temporadas, genero, autor, imagen): wx.MessageBox('La serie se añadio con exito', 'Information', wx.OK | wx.ICON_INFORMATION) self.limpiar_campos() self.frame_father.load_data_listctrl_serie() else: msg = "La serie %s" % titulo + " ya existe ingrese otro diferente o valla a la opción modificar" wx.MessageBox(msg, 'Error', wx.OK | wx.ICON_ERROR) self.limpiar_usuario() else: wx.MessageBox( 'Todos los campos excepto la imagen deben ser completados', 'Error', wx.OK | wx.ICON_ERROR) def limpiar_usuario(self): self.titulo.Clear() def limpiar_campos(self): self.titulo.Clear() self.genero.Clear() self.autor.Clear() self.temporadas.Clear() def cerrar_frame(self, evt): self.frame.Close()
class ModificarReservaSerie(wx.Frame): def __init__(self, frame_father, id_reserva): super(ModificarReservaSerie, self).__init__() self.xml = xrc.XmlResource('../View/modificar_reserva_serie.xml') self.frame = self.xml.LoadFrame(None, 'Frame_Modificar_Reserva') self.panel = xrc.XRCCTRL(self.frame, 'ModificarReserva_Panel') self.id_reserva = xrc.XRCCTRL(self.panel, 'Textctrl_ID_Reserva') self.id_cliente = xrc.XRCCTRL(self.panel, 'Textctrl_ID_Cliente') self.username = xrc.XRCCTRL(self.panel, 'Textctrl_Username') self.id_serie = xrc.XRCCTRL(self.panel, 'Textctrl_ID_Serie') self.titulo = xrc.XRCCTRL(self.panel, 'Textctrl_titulo_serie') self.id_booking = id_reserva self.frame_father = frame_father self.reserva_serie_controller = ReservaSerieController() self.serie_controller = SerieController() self.user_controller = UserController() self.button_modificar = xrc.XRCCTRL(self.panel, 'wxID_OK') self.button_cancelar = xrc.XRCCTRL(self.panel, 'wxID_CANCEL') self.frame.SetIcon(wx.Icon("../view/System_Images/icon.png")) self.frame.Bind(wx.EVT_BUTTON, self.modificar_serie, self.button_modificar) self.frame.Bind(wx.EVT_BUTTON, self.cancelar, self.button_cancelar) self.cargar_datos_reserva() self.frame.Show() def cargar_datos_reserva(self): reserva = self.reserva_serie_controller.get_booking(self.id_booking) serie = self.serie_controller.get_serie(reserva.serie_id) user = self.user_controller.get_user(reserva.usuario_id) self.id_reserva.SetValue(str(reserva.id)) self.id_cliente.SetValue(str(user.id)) self.username.SetValue(user.nombre_usuario) self.id_serie.SetValue(str(serie.id)) self.titulo.SetValue(serie.titulo) def modificar_serie(self, evt): id_cliente = self.id_cliente.GetValue() id_serie = self.id_serie.GetValue() if id_cliente and id_serie: if self.user_controller.get_user( id_cliente) != None and self.serie_controller.get_serie( id_serie) != None: data = {"usuario_id": id_cliente, "serie_id": id_serie} if self.reserva_serie_controller.edit_booking( self.id_booking, data): wx.MessageBox('La reserva se modificó con exito', 'Information', wx.OK | wx.ICON_INFORMATION) self.frame_father.load_data_listctrl_serie() self.frame.Close() else: wx.MessageBox( 'El usuario o la serie no existe en el sistema intente nuevamente', 'Error', wx.OK | wx.ICON_ERROR) else: wx.MessageBox('Todos los campos son obligatorios', 'Error', wx.OK | wx.ICON_ERROR) def cancelar(self, evt): self.frame.Close()
class ListaSerie(wx.Frame): def __init__(self, *args, **kw): super(ListaSerie, self).__init__(*args, **kw) self.xml = xrc.XmlResource('../View/lista_series.xml') self.frame = self.xml.LoadFrame(None, 'Frame_Series') self.panel = xrc.XRCCTRL(self.frame, 'Panel_Series') self.button_anadir_serie = xrc.XRCCTRL(self.panel, 'Button_Anadir_Serie') self.listctrl_serie = xrc.XRCCTRL(self.panel, 'Listctrl_Series') self.frame.SetIcon(wx.Icon("../view/System_Images/icon.png")) self.list_series = [] self.serie_list = [] self.serie_controller = SerieController() self.load_columns_listctrl_serie() self.load_data_listctrl_serie() self.frame.Bind(wx.EVT_LIST_ITEM_SELECTED, self.list_serie_selected, self.listctrl_serie) self.frame.Bind(wx.EVT_BUTTON, self.anadir_serie, self.button_anadir_serie) self.frame.Show() def load_columns_listctrl_serie(self): self.listctrl_serie.InsertColumn(0, "ID", format=wx.LIST_FORMAT_CENTER, width=wx.LIST_AUTOSIZE) self.listctrl_serie.InsertColumn(1, "Titulo", format=wx.LIST_FORMAT_CENTER, width=wx.LIST_AUTOSIZE) self.listctrl_serie.InsertColumn(2, "Temporadas", format=wx.LIST_FORMAT_CENTER, width=wx.LIST_AUTOSIZE) self.listctrl_serie.InsertColumn(3, "Genero", format=wx.LIST_FORMAT_CENTER, width=wx.LIST_AUTOSIZE) self.listctrl_serie.InsertColumn(4, "Autor", format=wx.LIST_FORMAT_CENTER, width=wx.LIST_AUTOSIZE) self.listctrl_serie.InsertColumn(5, "Url_Imagen", format=wx.LIST_FORMAT_CENTER, width=wx.LIST_AUTOSIZE) def load_data_listctrl_serie(self): self.serie_list = self.serie_controller.get_all_series() self.listctrl_serie.DeleteAllItems() for serie in self.serie_list: self.listctrl_serie.Append([ serie.id, serie.titulo, serie.temporadas, serie.genero, serie.autor, serie.imagen ]) def list_serie_selected(self, evt): current_item = evt.GetIndex() self.list_series = self.serie_controller.get_all_series() self.serie_selected = self.list_series[current_item] menu = wx.Menu() id_item_menu_update = wx.NewId() id_item_menu_delete = wx.NewId() menu.Append(id_item_menu_update, ACTUALIZAR_SERIE) menu.Append(id_item_menu_delete, ELIMINAR_SERIE) self.frame.Bind(wx.EVT_MENU, self.popup_item_selected_serie, id=id_item_menu_update) self.frame.Bind(wx.EVT_MENU, self.popup_item_selected_serie, id=id_item_menu_delete) self.frame.PopupMenu(menu) menu.Destroy() def popup_item_selected_serie(self, evt): id_item = evt.GetId() menu = evt.GetEventObject() menu_item = menu.FindItemById(id_item) if menu_item.GetLabel() == ACTUALIZAR_SERIE: self.modificar_serie = ModificarSerie(self, self.serie_selected.id) elif menu_item.GetLabel() == ELIMINAR_SERIE: self.eliminar_serie = EliminarSerie(self, self.serie_selected.id) def anadir_serie(self, evt): self.anadir_serie = AnadirSerie(self)