Example #1
0
        public void MetodoActualizarFicha(string IdFicha)
        {
            try
            {
                ConnectionBD  Puente;
                SqlCommand    Comando;
                SqlDataReader Lector;
                Puente  = new ConnectionBD();
                Comando = new SqlCommand("select * from Ficha where IdFicha='" + IdFicha + "'", Puente.RetornarConnexion());
                Lector  = Comando.ExecuteReader();


                while (Lector.Read())
                {
                    DocumentoInstructor = Lector.GetString(1);
                    IdPrograma          = Lector.GetString(2);
                    Jornada             = Lector.GetString(3);
                    FechaInicio         = Lector.GetDateTime(4);
                    FechaFin            = Lector.GetDateTime(5);
                    Estado = Lector.GetString(6);
                }
                a = IdPrograma.ToString();
                if (a == "")
                {
                    existe = 1;
                }
                Lector.Close();
                Comando.Dispose();
                Puente.CerrarConnexion();
            }

            catch (Exception ex)
            {
                MessageBox.Show("la ficha no existe");
            }
        }