Exemple #1
0
        private void Buscar_Click(object sender, EventArgs e)
        {
            if (ActualizarF.existe == 0)
            {
                ActualizarF x = new ActualizarF();
                x.IdFicha = ficha.Text;
                x.MetodoActualizarFicha(x.IdFicha);
                documento.Text   = x.DocumentoInstructor;
                programa.Text    = x.IdPrograma;
                combJornada.Text = x.Jornada;
                combEstado.Text  = x.Estado;

                if (programa.Text.Length > 0)
                {
                    dateTimeInicio.Value = ActualizarF.FechaInicio;
                    dateTimeFin.Value    = ActualizarF.FechaFin;
                }

                if (programa.Text.Length > 0)
                {
                    Buscar.Enabled         = false;
                    ficha.Enabled          = false;
                    documento.Enabled      = true;
                    programa.Enabled       = true;
                    combJornada.Enabled    = true;
                    dateTimeInicio.Enabled = true;
                    dateTimeFin.Enabled    = true;
                    combEstado.Enabled     = true;
                    ACTUALIZAR.Enabled     = true;
                }
            }
        }
Exemple #2
0
        private void ACTUALIZAR_Click(object sender, EventArgs e)
        {
            if (Revisar1() == 0)
            {
                ActualizarF x = new ActualizarF();

                x.Actualizar(ficha.Text, documento.Text, programa.Text, combJornada.Text, dateTimeInicio.Value, dateTimeFin.Value, combEstado.Text);
                Limpiar();
                Buscar.Enabled         = true;
                ficha.Enabled          = true;
                documento.Enabled      = false;
                programa.Enabled       = false;
                combJornada.Enabled    = false;
                dateTimeInicio.Enabled = false;
                dateTimeFin.Enabled    = false;
                combEstado.Enabled     = false;
                ACTUALIZAR.Enabled     = false;
            }
            else
            {
                MessageBox.Show("Ingrese los campos faltantes");
            }
        }