コード例 #1
0
 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);
 }
コード例 #2
0
 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);
 }
コード例 #3
0
        public docentes()
        {
            InitializeComponent();
            this.lista.DefaultCellStyle.Font = new Font("Microsoft Sans Serif", 12);
            this.lista.DefaultCellStyle.SelectionForeColor = Color.White;
            this.lista.DefaultCellStyle.SelectionBackColor = Color.Orange;

            agd                     = new agregardocentes(flowLayoutPanel1, -1);
            agd.TopLevel            = false;
            agd.Visible             = true;
            flowLayoutPanel1.Width  = this.Width;
            flowLayoutPanel1.Height = this.Height;
            flowLayoutPanel1.Controls.Add(agd);
            flowLayoutPanel1.Visible = false;
            ControlVistaDocente controlVistaDocente = new ControlVistaDocente();

            controlVistaDocente.iniciarDocentes(this);
            asignarTamanioVentanaResponsivo(agd);
        }