示例#1
0
 private void btn_agregar_Click(object sender, EventArgs e)
 {
     ControlVistaMateria.opcion = "Registrar";
     flowLayoutPanel1.Controls.Remove(agm);
     agm = new agregarmaterias(flowLayoutPanel1);
     ControlVistaMateria.cargarValores(agm);
     agm.labelOpcion.Text    = "AGREGAR MATERIA";
     agm.TopLevel            = false;
     agm.Visible             = true;
     flowLayoutPanel1.Width  = this.Width;
     flowLayoutPanel1.Height = this.Height;
     flowLayoutPanel1.Controls.Add(agm);
     flowLayoutPanel1.Visible = true;
     agm.Width  = flowLayoutPanel1.Width - 10;
     agm.Height = flowLayoutPanel1.Height - 10;
 }
示例#2
0
 private void btn_modificar_Click(object sender, EventArgs e)
 {
     ControlVistaMateria.opcion = "Modificar";
     flowLayoutPanel1.Controls.Remove(agm);
     flowLayoutPanel1.Visible = true;
     agm = new agregarmaterias(flowLayoutPanel1);
     agm.labelOpcion.Text = "MODIFICAR DATOS DE LA MATERIA";
     ControlVistaMateria.obtenerSeleccion();
     ControlVistaMateria.cargarValores(agm);
     agm.TopLevel            = false;
     agm.Visible             = true;
     flowLayoutPanel1.Width  = this.Width;
     flowLayoutPanel1.Height = this.Height;
     flowLayoutPanel1.Controls.Add(agm);
     agm.Width  = flowLayoutPanel1.Width - 10;
     agm.Height = flowLayoutPanel1.Height - 10;
 }