Exemplo n.º 1
0
        public int abcProfesores(string pAccion, E_Profesores objE_Profesores)
        {
            int        Resultado = 0;
            SqlCommand cmd       = new SqlCommand("abcProfesores", Conexion);

            cmd.CommandType = CommandType.StoredProcedure;

            cmd.Parameters.AddWithValue("@Accion", pAccion);
            cmd.Parameters.AddWithValue("@IdProfesor", objE_Profesores.IdProfesor);
            cmd.Parameters.AddWithValue("@NombreProfesor", objE_Profesores.NombreProfesor);
            cmd.Parameters.AddWithValue("@ApellidoProfesor", objE_Profesores.ApellidoProfesor);
            cmd.Parameters.AddWithValue("@EspecialidadProfesor", objE_Profesores.EspecialidadProfesor);
            cmd.Parameters.AddWithValue("@TelefonoProfesor", objE_Profesores.TelefonoProfesor);


            try
            {
                AbrirConexion();
                Resultado = cmd.ExecuteNonQuery();
            }

            catch (Exception e)
            {
                throw new Exception("Error al procesar datos", e);
            }

            finally
            {
                CerrarConexion();
                cmd.Dispose();
            }
            return(Resultado);
        }
Exemplo n.º 2
0
 public int abcProfesor(string pAccion, E_Profesores objE_Profesor)
 {
     return(objNegocioProfesor.abcProfesores(pAccion, objE_Profesor));
 }