Está en la página 1de 1

------------------------------------------------------------------------------------

ALTER PROCEDURE Inserta_Matricula


@tip_matr int = 0,
@est_id int,
@grado int,
@nro int,
@fecha date,
@costo decimal(6,2),
@peri int,
@est char(1)
AS
BEGIN
insert into Matricula([Tipo_Matricula_Id],[Estudiante_Id],[Grado_Academico_Id],

[Numero_Vacantes],[Fecha_Matricula],[Costo],[Periodo_Lectivo_Id],[Estado])
values (@tip_matr,@est_id,@grado,@nro,@fecha,@costo,@peri,@est)


UPDATE Grado_Academico SET Grado_Academico.Vacantes = Grado_Academico.vacantes -
1 where Grado_Academico.Grado_Academico_Id = @grado
end

------------------------------------------------------------------------------------

create procedure LISTAR_CURSO_ESTUDIANTE
@id_estud int
as
begin
select C.Nombre from Estudiante E inner join Matricula M
on E.Estudiante_Id = M.Estudiante_Id
inner join Grado_Academico G on G.Grado_Academico_Id = M.Grado_Academico_Id
inner join Curso C on G.Grado_Academico_Id=C.Grado_Academico_Id
where E.Estudiante_Id = @id_estud
end



http://techyosh.blogspot.com/2013/03/creacion-de-conexion-con-sql-server-y.html



http://detrasdelgui.blogspot.com/2013/06/consumir-servicio-web-con-visual-
studio.html

http://detrasdelgui.blogspot.com/2013/06/creando-servicio-web-con-c.html

También podría gustarte