public RevistaForm(string id, string editorial, string paginas, string nombre, string apellido, string titulo, string año, string cantidad, string metodo) { myRevista = new Revista(); this.metodo = metodo; this.id = id; InitializeComponent(); if (metodo == "mostrar") { lbNRevista.Text = "DETALLES DE LA REVISTA"; tbEditorial.Text = editorial; tbNo_paginas.Text = paginas; tbNombre_autor.Text = nombre; tbApellido.Text = apellido; tbTitulo.Text = titulo; tbAño.Text = año; tbCantidad.Text = cantidad; tbEditorial.Enabled = false; tbNo_paginas.Enabled = false; tbNombre_autor.Enabled = false; tbApellido.Enabled = false; tbTitulo.Enabled = false; tbAño.Enabled = false; tbCantidad.Enabled = false; BAgregar_Revista.Enabled = false; } if (metodo == "modificar") { lbNRevista.Text = "MODIFICAR REVISTA"; tbEditorial.Text = editorial; tbNo_paginas.Text = paginas; tbNombre_autor.Text = nombre; tbApellido.Text = apellido; tbTitulo.Text = titulo; tbAño.Text = año; tbCantidad.Text = cantidad; BAgregar_Revista.Text = "MODIFICAR"; } }
public RevistaForm() { myRevista = new Revista(); InitializeComponent(); lbNRevista.Text = "NUEVA REVISTA"; }