private void btn_modificar_Click(object sender, EventArgs e) { ControlVistaDocente.opcion = "Modificar"; flowLayoutPanel1.Controls.Remove(agd); flowLayoutPanel1.Visible = true; agd = new agregardocentes(flowLayoutPanel1, -1); agd.labelOpcion.Text = "MODIFICAR DATOS DEL DOCENTE"; ControlVistaDocente.obtenerSeleccion(); ControlVistaDocente.cargarValores(agd); agd.TopLevel = false; agd.Visible = true; flowLayoutPanel1.Width = this.Width; flowLayoutPanel1.Height = this.Height; asignarTamanioVentanaResponsivo(agd); flowLayoutPanel1.Controls.Add(agd); }
private void btn_agregar_Click(object sender, EventArgs e) { ControlVistaDocente.opcion = "Registrar"; flowLayoutPanel1.Controls.Remove(agd); flowLayoutPanel1.Controls.Remove(amd); flowLayoutPanel1.Visible = true; agd = new agregardocentes(flowLayoutPanel1, -1); ControlVistaDocente.cargarValores(agd); agd.labelOpcion.Text = "AGREGAR DOCENTE"; agd.TopLevel = false; agd.Visible = true; flowLayoutPanel1.Width = this.Width; flowLayoutPanel1.Height = this.Height; flowLayoutPanel1.Controls.Add(agd); asignarTamanioVentanaResponsivo(agd); }