1562 lines
78 KiB
Transact-SQL
1562 lines
78 KiB
Transact-SQL
USE [master]
|
||
GO
|
||
/****** Object: Database [ProjetThe] Script Date: 18-01-19 16:46:32 ******/
|
||
CREATE DATABASE [ProjetThe]
|
||
CONTAINMENT = NONE
|
||
ON PRIMARY
|
||
( NAME = N'ProjetThe', FILENAME = N'C:\Users\adrie\ProjetThe.mdf' , SIZE = 8192KB , MAXSIZE = UNLIMITED, FILEGROWTH = 65536KB )
|
||
LOG ON
|
||
( NAME = N'ProjetThe_log', FILENAME = N'C:\Users\adrie\ProjetThe_log.ldf' , SIZE = 8192KB , MAXSIZE = 2048GB , FILEGROWTH = 65536KB )
|
||
GO
|
||
ALTER DATABASE [ProjetThe] SET COMPATIBILITY_LEVEL = 130
|
||
GO
|
||
IF (1 = FULLTEXTSERVICEPROPERTY('IsFullTextInstalled'))
|
||
begin
|
||
EXEC [ProjetThe].[dbo].[sp_fulltext_database] @action = 'enable'
|
||
end
|
||
GO
|
||
ALTER DATABASE [ProjetThe] SET ANSI_NULL_DEFAULT OFF
|
||
GO
|
||
ALTER DATABASE [ProjetThe] SET ANSI_NULLS OFF
|
||
GO
|
||
ALTER DATABASE [ProjetThe] SET ANSI_PADDING OFF
|
||
GO
|
||
ALTER DATABASE [ProjetThe] SET ANSI_WARNINGS OFF
|
||
GO
|
||
ALTER DATABASE [ProjetThe] SET ARITHABORT OFF
|
||
GO
|
||
ALTER DATABASE [ProjetThe] SET AUTO_CLOSE OFF
|
||
GO
|
||
ALTER DATABASE [ProjetThe] SET AUTO_SHRINK OFF
|
||
GO
|
||
ALTER DATABASE [ProjetThe] SET AUTO_UPDATE_STATISTICS ON
|
||
GO
|
||
ALTER DATABASE [ProjetThe] SET CURSOR_CLOSE_ON_COMMIT OFF
|
||
GO
|
||
ALTER DATABASE [ProjetThe] SET CURSOR_DEFAULT GLOBAL
|
||
GO
|
||
ALTER DATABASE [ProjetThe] SET CONCAT_NULL_YIELDS_NULL OFF
|
||
GO
|
||
ALTER DATABASE [ProjetThe] SET NUMERIC_ROUNDABORT OFF
|
||
GO
|
||
ALTER DATABASE [ProjetThe] SET QUOTED_IDENTIFIER OFF
|
||
GO
|
||
ALTER DATABASE [ProjetThe] SET RECURSIVE_TRIGGERS OFF
|
||
GO
|
||
ALTER DATABASE [ProjetThe] SET DISABLE_BROKER
|
||
GO
|
||
ALTER DATABASE [ProjetThe] SET AUTO_UPDATE_STATISTICS_ASYNC OFF
|
||
GO
|
||
ALTER DATABASE [ProjetThe] SET DATE_CORRELATION_OPTIMIZATION OFF
|
||
GO
|
||
ALTER DATABASE [ProjetThe] SET TRUSTWORTHY OFF
|
||
GO
|
||
ALTER DATABASE [ProjetThe] SET ALLOW_SNAPSHOT_ISOLATION OFF
|
||
GO
|
||
ALTER DATABASE [ProjetThe] SET PARAMETERIZATION SIMPLE
|
||
GO
|
||
ALTER DATABASE [ProjetThe] SET READ_COMMITTED_SNAPSHOT OFF
|
||
GO
|
||
ALTER DATABASE [ProjetThe] SET HONOR_BROKER_PRIORITY OFF
|
||
GO
|
||
ALTER DATABASE [ProjetThe] SET RECOVERY SIMPLE
|
||
GO
|
||
ALTER DATABASE [ProjetThe] SET MULTI_USER
|
||
GO
|
||
ALTER DATABASE [ProjetThe] SET PAGE_VERIFY CHECKSUM
|
||
GO
|
||
ALTER DATABASE [ProjetThe] SET DB_CHAINING OFF
|
||
GO
|
||
ALTER DATABASE [ProjetThe] SET FILESTREAM( NON_TRANSACTED_ACCESS = OFF )
|
||
GO
|
||
ALTER DATABASE [ProjetThe] SET TARGET_RECOVERY_TIME = 60 SECONDS
|
||
GO
|
||
ALTER DATABASE [ProjetThe] SET DELAYED_DURABILITY = DISABLED
|
||
GO
|
||
ALTER DATABASE [ProjetThe] SET QUERY_STORE = OFF
|
||
GO
|
||
USE [ProjetThe]
|
||
GO
|
||
ALTER DATABASE SCOPED CONFIGURATION SET LEGACY_CARDINALITY_ESTIMATION = OFF;
|
||
GO
|
||
ALTER DATABASE SCOPED CONFIGURATION SET MAXDOP = 0;
|
||
GO
|
||
ALTER DATABASE SCOPED CONFIGURATION SET PARAMETER_SNIFFING = ON;
|
||
GO
|
||
ALTER DATABASE SCOPED CONFIGURATION SET QUERY_OPTIMIZER_HOTFIXES = OFF;
|
||
GO
|
||
USE [ProjetThe]
|
||
GO
|
||
/****** Object: Table [dbo].[T_lieu] Script Date: 18-01-19 16:46:32 ******/
|
||
SET ANSI_NULLS ON
|
||
GO
|
||
SET QUOTED_IDENTIFIER ON
|
||
GO
|
||
CREATE TABLE [dbo].[T_lieu](
|
||
[ID_lieu] [int] IDENTITY(1,1) NOT NULL,
|
||
[L_nom] [text] NULL
|
||
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
|
||
GO
|
||
/****** Object: Table [dbo].[T_typeEvenement] Script Date: 18-01-19 16:46:32 ******/
|
||
SET ANSI_NULLS ON
|
||
GO
|
||
SET QUOTED_IDENTIFIER ON
|
||
GO
|
||
CREATE TABLE [dbo].[T_typeEvenement](
|
||
[ID_typeEvenement] [int] IDENTITY(1,1) NOT NULL,
|
||
[TE_nom] [text] NULL
|
||
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
|
||
GO
|
||
/****** Object: Table [dbo].[T_equipe] Script Date: 18-01-19 16:46:32 ******/
|
||
SET ANSI_NULLS ON
|
||
GO
|
||
SET QUOTED_IDENTIFIER ON
|
||
GO
|
||
CREATE TABLE [dbo].[T_equipe](
|
||
[ID_equipe] [int] IDENTITY(1,1) NOT NULL,
|
||
[E_nom] [nchar](10) NULL,
|
||
[E_point] [nchar](10) NULL,
|
||
[ID_evenement] [int] NULL
|
||
) ON [PRIMARY]
|
||
GO
|
||
/****** Object: Table [dbo].[T_listParticipant] Script Date: 18-01-19 16:46:32 ******/
|
||
SET ANSI_NULLS ON
|
||
GO
|
||
SET QUOTED_IDENTIFIER ON
|
||
GO
|
||
CREATE TABLE [dbo].[T_listParticipant](
|
||
[ID_LP] [int] IDENTITY(1,1) NOT NULL,
|
||
[ID_equipe] [int] NULL,
|
||
[ID_benificiaire] [int] NULL
|
||
) ON [PRIMARY]
|
||
GO
|
||
/****** Object: Table [dbo].[T_beneficiaire] Script Date: 18-01-19 16:46:32 ******/
|
||
SET ANSI_NULLS ON
|
||
GO
|
||
SET QUOTED_IDENTIFIER ON
|
||
GO
|
||
CREATE TABLE [dbo].[T_beneficiaire](
|
||
[ID_beneficiaire] [int] IDENTITY(1,1) NOT NULL,
|
||
[B_nom] [varchar](50) NULL,
|
||
[B_prenom] [varchar](50) NULL,
|
||
[B_anniversaire] [datetime] NULL,
|
||
[B_img] [nchar](10) NULL
|
||
) ON [PRIMARY]
|
||
GO
|
||
/****** Object: Table [dbo].[T_event] Script Date: 18-01-19 16:46:32 ******/
|
||
SET ANSI_NULLS ON
|
||
GO
|
||
SET QUOTED_IDENTIFIER ON
|
||
GO
|
||
CREATE TABLE [dbo].[T_event](
|
||
[ID_event] [int] IDENTITY(1,1) NOT NULL,
|
||
[E_date] [datetime] NULL,
|
||
[E_duree] [datetime] NULL,
|
||
[ID_typeEvenement] [int] NULL,
|
||
[E_description] [text] NULL,
|
||
[ID_lieu] [int] NULL
|
||
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
|
||
GO
|
||
/****** Object: View [dbo].[event] Script Date: 18-01-19 16:46:32 ******/
|
||
SET ANSI_NULLS ON
|
||
GO
|
||
SET QUOTED_IDENTIFIER ON
|
||
GO
|
||
CREATE VIEW [dbo].[event]
|
||
AS
|
||
SELECT dbo.T_listParticipant.ID_benificiaire, dbo.T_beneficiaire.ID_beneficiaire, dbo.T_listParticipant.ID_equipe AS Expr1, dbo.T_equipe.ID_equipe, dbo.T_event.ID_event, dbo.T_equipe.ID_evenement, dbo.T_lieu.ID_lieu,
|
||
dbo.T_event.ID_lieu AS Expr2, dbo.T_typeEvenement.ID_typeEvenement, dbo.T_event.ID_typeEvenement AS Expr3
|
||
FROM dbo.T_beneficiaire INNER JOIN
|
||
dbo.T_listParticipant ON dbo.T_beneficiaire.B_nom = dbo.T_listParticipant.ID_benificiaire INNER JOIN
|
||
dbo.T_equipe ON dbo.T_listParticipant.ID_equipe = dbo.T_equipe.ID_equipe INNER JOIN
|
||
dbo.T_event ON dbo.T_equipe.ID_evenement = dbo.T_event.ID_event INNER JOIN
|
||
dbo.T_lieu ON dbo.T_event.ID_lieu = dbo.T_lieu.ID_lieu INNER JOIN
|
||
dbo.T_typeEvenement ON dbo.T_event.ID_typeEvenement = dbo.T_typeEvenement.ID_typeEvenement
|
||
GO
|
||
/****** Object: Table [dbo].[T_repa] Script Date: 18-01-19 16:46:32 ******/
|
||
SET ANSI_NULLS ON
|
||
GO
|
||
SET QUOTED_IDENTIFIER ON
|
||
GO
|
||
CREATE TABLE [dbo].[T_repa](
|
||
[ID_repa] [int] IDENTITY(1,1) NOT NULL,
|
||
[ID_listPlat] [int] NULL,
|
||
[ID_typeRepa] [int] NULL
|
||
) ON [PRIMARY]
|
||
GO
|
||
/****** Object: Table [dbo].[T_typeRepa] Script Date: 18-01-19 16:46:32 ******/
|
||
SET ANSI_NULLS ON
|
||
GO
|
||
SET QUOTED_IDENTIFIER ON
|
||
GO
|
||
CREATE TABLE [dbo].[T_typeRepa](
|
||
[ID_typeRepa] [int] IDENTITY(1,1) NOT NULL,
|
||
[TR_nom] [varchar](50) NULL
|
||
) ON [PRIMARY]
|
||
GO
|
||
/****** Object: Table [dbo].[T_listPlat] Script Date: 18-01-19 16:46:32 ******/
|
||
SET ANSI_NULLS ON
|
||
GO
|
||
SET QUOTED_IDENTIFIER ON
|
||
GO
|
||
CREATE TABLE [dbo].[T_listPlat](
|
||
[ID_listPlat] [int] IDENTITY(1,1) NOT NULL,
|
||
[ID_repa] [int] NULL,
|
||
[ID_plat] [int] NULL
|
||
) ON [PRIMARY]
|
||
GO
|
||
/****** Object: Table [dbo].[T_typePlat] Script Date: 18-01-19 16:46:32 ******/
|
||
SET ANSI_NULLS ON
|
||
GO
|
||
SET QUOTED_IDENTIFIER ON
|
||
GO
|
||
CREATE TABLE [dbo].[T_typePlat](
|
||
[ID_typePlat] [int] NULL,
|
||
[TP_nom] [varchar](50) NULL
|
||
) ON [PRIMARY]
|
||
GO
|
||
/****** Object: Table [dbo].[T_plat] Script Date: 18-01-19 16:46:32 ******/
|
||
SET ANSI_NULLS ON
|
||
GO
|
||
SET QUOTED_IDENTIFIER ON
|
||
GO
|
||
CREATE TABLE [dbo].[T_plat](
|
||
[ID_plat] [int] IDENTITY(1,1) NOT NULL,
|
||
[P_nom] [text] NULL,
|
||
[P_img] [image] NULL,
|
||
[ID_typePlat] [int] NULL
|
||
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
|
||
GO
|
||
/****** Object: View [dbo].[repas] Script Date: 18-01-19 16:46:32 ******/
|
||
SET ANSI_NULLS ON
|
||
GO
|
||
SET QUOTED_IDENTIFIER ON
|
||
GO
|
||
CREATE VIEW [dbo].[repas]
|
||
AS
|
||
SELECT dbo.T_repa.ID_typeRepa, dbo.T_listPlat.ID_repa, dbo.T_repa.ID_repa AS Expr1, dbo.T_listPlat.ID_plat, dbo.T_plat.ID_plat AS Expr2, dbo.T_plat.ID_typePlat AS Expr3, dbo.T_typePlat.ID_typePlat,
|
||
dbo.T_typeRepa.ID_typeRepa AS Expr4
|
||
FROM dbo.T_listPlat INNER JOIN
|
||
dbo.T_repa ON dbo.T_listPlat.ID_repa = dbo.T_repa.ID_repa INNER JOIN
|
||
dbo.T_plat ON dbo.T_listPlat.ID_plat = dbo.T_plat.ID_plat INNER JOIN
|
||
dbo.T_typePlat ON dbo.T_plat.ID_typePlat = dbo.T_typePlat.ID_typePlat INNER JOIN
|
||
dbo.T_typeRepa ON dbo.T_repa.ID_typeRepa = dbo.T_typeRepa.ID_typeRepa
|
||
GO
|
||
/****** Object: StoredProcedure [dbo].[beneficiaireDelete] Script Date: 18-01-19 16:46:32 ******/
|
||
SET ANSI_NULLS ON
|
||
GO
|
||
SET QUOTED_IDENTIFIER ON
|
||
GO
|
||
CREATE PROC [dbo].[beneficiaireDelete]
|
||
@ID_beneficiaire int
|
||
AS
|
||
SET NOCOUNT ON
|
||
SET XACT_ABORT ON
|
||
|
||
BEGIN TRAN
|
||
|
||
DELETE
|
||
FROM [dbo].[T_beneficiaire]
|
||
WHERE [ID_beneficiaire] = @ID_beneficiaire
|
||
|
||
COMMIT
|
||
GO
|
||
/****** Object: StoredProcedure [dbo].[beneficiaireInsert] Script Date: 18-01-19 16:46:32 ******/
|
||
SET ANSI_NULLS ON
|
||
GO
|
||
SET QUOTED_IDENTIFIER ON
|
||
GO
|
||
CREATE PROC [dbo].[beneficiaireInsert]
|
||
@B_nom varchar(50) = NULL,
|
||
@B_prenom varchar(50) = NULL,
|
||
@B_anniversaire datetime = NULL,
|
||
@B_img nchar(10) = NULL
|
||
AS
|
||
SET NOCOUNT ON
|
||
SET XACT_ABORT ON
|
||
|
||
BEGIN TRAN
|
||
|
||
INSERT INTO [dbo].[T_beneficiaire] ([B_nom], [B_prenom], [B_anniversaire], [B_img])
|
||
SELECT @B_nom, @B_prenom, @B_anniversaire, @B_img
|
||
|
||
-- Begin Return Select <- do not remove
|
||
SELECT [ID_beneficiaire], [B_nom], [B_prenom], [B_anniversaire], [B_img]
|
||
FROM [dbo].[T_beneficiaire]
|
||
WHERE [ID_beneficiaire] = SCOPE_IDENTITY()
|
||
-- End Return Select <- do not remove
|
||
|
||
COMMIT
|
||
GO
|
||
/****** Object: StoredProcedure [dbo].[beneficiaireSelect] Script Date: 18-01-19 16:46:32 ******/
|
||
SET ANSI_NULLS ON
|
||
GO
|
||
SET QUOTED_IDENTIFIER ON
|
||
GO
|
||
CREATE PROC [dbo].[beneficiaireSelect]
|
||
@ID_beneficiaire int
|
||
AS
|
||
SET NOCOUNT ON
|
||
SET XACT_ABORT ON
|
||
|
||
BEGIN TRAN
|
||
|
||
SELECT [ID_beneficiaire], [B_nom], [B_prenom], [B_anniversaire], [B_img]
|
||
FROM [dbo].[T_beneficiaire]
|
||
WHERE ([ID_beneficiaire] = @ID_beneficiaire OR @ID_beneficiaire IS NULL)
|
||
|
||
COMMIT
|
||
GO
|
||
/****** Object: StoredProcedure [dbo].[beneficiaireUpdate] Script Date: 18-01-19 16:46:32 ******/
|
||
SET ANSI_NULLS ON
|
||
GO
|
||
SET QUOTED_IDENTIFIER ON
|
||
GO
|
||
CREATE PROC [dbo].[beneficiaireUpdate]
|
||
@ID_beneficiaire int,
|
||
@B_nom varchar(50) = NULL,
|
||
@B_prenom varchar(50) = NULL,
|
||
@B_anniversaire datetime = NULL,
|
||
@B_img nchar(10) = NULL
|
||
AS
|
||
SET NOCOUNT ON
|
||
SET XACT_ABORT ON
|
||
|
||
BEGIN TRAN
|
||
|
||
UPDATE [dbo].[T_beneficiaire]
|
||
SET [B_nom] = @B_nom, [B_prenom] = @B_prenom, [B_anniversaire] = @B_anniversaire, [B_img] = @B_img
|
||
WHERE [ID_beneficiaire] = @ID_beneficiaire
|
||
|
||
-- Begin Return Select <- do not remove
|
||
SELECT [ID_beneficiaire], [B_nom], [B_prenom], [B_anniversaire], [B_img]
|
||
FROM [dbo].[T_beneficiaire]
|
||
WHERE [ID_beneficiaire] = @ID_beneficiaire
|
||
-- End Return Select <- do not remove
|
||
|
||
COMMIT
|
||
GO
|
||
/****** Object: StoredProcedure [dbo].[equipeDelete] Script Date: 18-01-19 16:46:32 ******/
|
||
SET ANSI_NULLS ON
|
||
GO
|
||
SET QUOTED_IDENTIFIER ON
|
||
GO
|
||
CREATE PROC [dbo].[equipeDelete]
|
||
@ID_equipe int
|
||
AS
|
||
SET NOCOUNT ON
|
||
SET XACT_ABORT ON
|
||
|
||
BEGIN TRAN
|
||
|
||
DELETE
|
||
FROM [dbo].[T_equipe]
|
||
WHERE [ID_equipe] = @ID_equipe
|
||
|
||
COMMIT
|
||
GO
|
||
/****** Object: StoredProcedure [dbo].[equipeInsert] Script Date: 18-01-19 16:46:32 ******/
|
||
SET ANSI_NULLS ON
|
||
GO
|
||
SET QUOTED_IDENTIFIER ON
|
||
GO
|
||
CREATE PROC [dbo].[equipeInsert]
|
||
@E_nom nchar(10) = NULL,
|
||
@E_point nchar(10) = NULL,
|
||
@ID_evenement int = NULL
|
||
AS
|
||
SET NOCOUNT ON
|
||
SET XACT_ABORT ON
|
||
|
||
BEGIN TRAN
|
||
|
||
INSERT INTO [dbo].[T_equipe] ([E_nom], [E_point], [ID_evenement])
|
||
SELECT @E_nom, @E_point, @ID_evenement
|
||
|
||
-- Begin Return Select <- do not remove
|
||
SELECT [ID_equipe], [E_nom], [E_point], [ID_evenement]
|
||
FROM [dbo].[T_equipe]
|
||
WHERE [ID_equipe] = SCOPE_IDENTITY()
|
||
-- End Return Select <- do not remove
|
||
|
||
COMMIT
|
||
GO
|
||
/****** Object: StoredProcedure [dbo].[equipeSelect] Script Date: 18-01-19 16:46:32 ******/
|
||
SET ANSI_NULLS ON
|
||
GO
|
||
SET QUOTED_IDENTIFIER ON
|
||
GO
|
||
CREATE PROC [dbo].[equipeSelect]
|
||
@ID_equipe int
|
||
AS
|
||
SET NOCOUNT ON
|
||
SET XACT_ABORT ON
|
||
|
||
BEGIN TRAN
|
||
|
||
SELECT [ID_equipe], [E_nom], [E_point], [ID_evenement]
|
||
FROM [dbo].[T_equipe]
|
||
WHERE ([ID_equipe] = @ID_equipe OR @ID_equipe IS NULL)
|
||
|
||
COMMIT
|
||
GO
|
||
/****** Object: StoredProcedure [dbo].[equipeUpdate] Script Date: 18-01-19 16:46:32 ******/
|
||
SET ANSI_NULLS ON
|
||
GO
|
||
SET QUOTED_IDENTIFIER ON
|
||
GO
|
||
CREATE PROC [dbo].[equipeUpdate]
|
||
@ID_equipe int,
|
||
@E_nom nchar(10) = NULL,
|
||
@E_point nchar(10) = NULL,
|
||
@ID_evenement int = NULL
|
||
AS
|
||
SET NOCOUNT ON
|
||
SET XACT_ABORT ON
|
||
|
||
BEGIN TRAN
|
||
|
||
UPDATE [dbo].[T_equipe]
|
||
SET [E_nom] = @E_nom, [E_point] = @E_point, [ID_evenement] = @ID_evenement
|
||
WHERE [ID_equipe] = @ID_equipe
|
||
|
||
-- Begin Return Select <- do not remove
|
||
SELECT [ID_equipe], [E_nom], [E_point], [ID_evenement]
|
||
FROM [dbo].[T_equipe]
|
||
WHERE [ID_equipe] = @ID_equipe
|
||
-- End Return Select <- do not remove
|
||
|
||
COMMIT
|
||
GO
|
||
/****** Object: StoredProcedure [dbo].[eventDelete] Script Date: 18-01-19 16:46:32 ******/
|
||
SET ANSI_NULLS ON
|
||
GO
|
||
SET QUOTED_IDENTIFIER ON
|
||
GO
|
||
CREATE PROC [dbo].[eventDelete]
|
||
@ID_event int
|
||
AS
|
||
SET NOCOUNT ON
|
||
SET XACT_ABORT ON
|
||
|
||
BEGIN TRAN
|
||
|
||
DELETE
|
||
FROM [dbo].[T_event]
|
||
WHERE [ID_event] = @ID_event
|
||
|
||
COMMIT
|
||
GO
|
||
/****** Object: StoredProcedure [dbo].[eventInsert] Script Date: 18-01-19 16:46:32 ******/
|
||
SET ANSI_NULLS ON
|
||
GO
|
||
SET QUOTED_IDENTIFIER ON
|
||
GO
|
||
CREATE PROC [dbo].[eventInsert]
|
||
@E_date datetime = NULL,
|
||
@E_duree datetime = NULL,
|
||
@ID_typeEvenement int = NULL,
|
||
@E_description text = NULL,
|
||
@ID_lieu int = NULL
|
||
AS
|
||
SET NOCOUNT ON
|
||
SET XACT_ABORT ON
|
||
|
||
BEGIN TRAN
|
||
|
||
INSERT INTO [dbo].[T_event] ([E_date], [E_duree], [ID_typeEvenement], [E_description], [ID_lieu])
|
||
SELECT @E_date, @E_duree, @ID_typeEvenement, @E_description, @ID_lieu
|
||
|
||
-- Begin Return Select <- do not remove
|
||
SELECT [ID_event], [E_date], [E_duree], [ID_typeEvenement], [E_description], [ID_lieu]
|
||
FROM [dbo].[T_event]
|
||
WHERE [ID_event] = SCOPE_IDENTITY()
|
||
-- End Return Select <- do not remove
|
||
|
||
COMMIT
|
||
GO
|
||
/****** Object: StoredProcedure [dbo].[eventSelect] Script Date: 18-01-19 16:46:32 ******/
|
||
SET ANSI_NULLS ON
|
||
GO
|
||
SET QUOTED_IDENTIFIER ON
|
||
GO
|
||
CREATE PROC [dbo].[eventSelect]
|
||
@ID_event int
|
||
AS
|
||
SET NOCOUNT ON
|
||
SET XACT_ABORT ON
|
||
|
||
BEGIN TRAN
|
||
|
||
SELECT [ID_event], [E_date], [E_duree], [ID_typeEvenement], [E_description], [ID_lieu]
|
||
FROM [dbo].[T_event]
|
||
WHERE ([ID_event] = @ID_event OR @ID_event IS NULL)
|
||
|
||
COMMIT
|
||
GO
|
||
/****** Object: StoredProcedure [dbo].[eventUpdate] Script Date: 18-01-19 16:46:32 ******/
|
||
SET ANSI_NULLS ON
|
||
GO
|
||
SET QUOTED_IDENTIFIER ON
|
||
GO
|
||
CREATE PROC [dbo].[eventUpdate]
|
||
@ID_event int,
|
||
@E_date datetime = NULL,
|
||
@E_duree datetime = NULL,
|
||
@ID_typeEvenement int = NULL,
|
||
@E_description text = NULL,
|
||
@ID_lieu int = NULL
|
||
AS
|
||
SET NOCOUNT ON
|
||
SET XACT_ABORT ON
|
||
|
||
BEGIN TRAN
|
||
|
||
UPDATE [dbo].[T_event]
|
||
SET [E_date] = @E_date, [E_duree] = @E_duree, [ID_typeEvenement] = @ID_typeEvenement, [E_description] = @E_description, [ID_lieu] = @ID_lieu
|
||
WHERE [ID_event] = @ID_event
|
||
|
||
-- Begin Return Select <- do not remove
|
||
SELECT [ID_event], [E_date], [E_duree], [ID_typeEvenement], [E_description], [ID_lieu]
|
||
FROM [dbo].[T_event]
|
||
WHERE [ID_event] = @ID_event
|
||
-- End Return Select <- do not remove
|
||
|
||
COMMIT
|
||
GO
|
||
/****** Object: StoredProcedure [dbo].[lieuDelete] Script Date: 18-01-19 16:46:32 ******/
|
||
SET ANSI_NULLS ON
|
||
GO
|
||
SET QUOTED_IDENTIFIER ON
|
||
GO
|
||
CREATE PROC [dbo].[lieuDelete]
|
||
@ID_lieu int
|
||
AS
|
||
SET NOCOUNT ON
|
||
SET XACT_ABORT ON
|
||
|
||
BEGIN TRAN
|
||
|
||
DELETE
|
||
FROM [dbo].[T_lieu]
|
||
WHERE [ID_lieu] = @ID_lieu
|
||
|
||
COMMIT
|
||
GO
|
||
/****** Object: StoredProcedure [dbo].[lieuInsert] Script Date: 18-01-19 16:46:32 ******/
|
||
SET ANSI_NULLS ON
|
||
GO
|
||
SET QUOTED_IDENTIFIER ON
|
||
GO
|
||
CREATE PROC [dbo].[lieuInsert]
|
||
@L_nom text = NULL
|
||
AS
|
||
SET NOCOUNT ON
|
||
SET XACT_ABORT ON
|
||
|
||
BEGIN TRAN
|
||
|
||
INSERT INTO [dbo].[T_lieu] ([L_nom])
|
||
SELECT @L_nom
|
||
|
||
-- Begin Return Select <- do not remove
|
||
SELECT [ID_lieu], [L_nom]
|
||
FROM [dbo].[T_lieu]
|
||
WHERE [ID_lieu] = SCOPE_IDENTITY()
|
||
-- End Return Select <- do not remove
|
||
|
||
COMMIT
|
||
GO
|
||
/****** Object: StoredProcedure [dbo].[lieuSelect] Script Date: 18-01-19 16:46:32 ******/
|
||
SET ANSI_NULLS ON
|
||
GO
|
||
SET QUOTED_IDENTIFIER ON
|
||
GO
|
||
CREATE PROC [dbo].[lieuSelect]
|
||
@ID_lieu int
|
||
AS
|
||
SET NOCOUNT ON
|
||
SET XACT_ABORT ON
|
||
|
||
BEGIN TRAN
|
||
|
||
SELECT [ID_lieu], [L_nom]
|
||
FROM [dbo].[T_lieu]
|
||
WHERE ([ID_lieu] = @ID_lieu OR @ID_lieu IS NULL)
|
||
|
||
COMMIT
|
||
GO
|
||
/****** Object: StoredProcedure [dbo].[lieuUpdate] Script Date: 18-01-19 16:46:32 ******/
|
||
SET ANSI_NULLS ON
|
||
GO
|
||
SET QUOTED_IDENTIFIER ON
|
||
GO
|
||
CREATE PROC [dbo].[lieuUpdate]
|
||
@ID_lieu int,
|
||
@L_nom text = NULL
|
||
AS
|
||
SET NOCOUNT ON
|
||
SET XACT_ABORT ON
|
||
|
||
BEGIN TRAN
|
||
|
||
UPDATE [dbo].[T_lieu]
|
||
SET [L_nom] = @L_nom
|
||
WHERE [ID_lieu] = @ID_lieu
|
||
|
||
-- Begin Return Select <- do not remove
|
||
SELECT [ID_lieu], [L_nom]
|
||
FROM [dbo].[T_lieu]
|
||
WHERE [ID_lieu] = @ID_lieu
|
||
-- End Return Select <- do not remove
|
||
|
||
COMMIT
|
||
GO
|
||
/****** Object: StoredProcedure [dbo].[listParticipantDelete] Script Date: 18-01-19 16:46:32 ******/
|
||
SET ANSI_NULLS ON
|
||
GO
|
||
SET QUOTED_IDENTIFIER ON
|
||
GO
|
||
CREATE PROC [dbo].[listParticipantDelete]
|
||
@ID_LP int
|
||
AS
|
||
SET NOCOUNT ON
|
||
SET XACT_ABORT ON
|
||
|
||
BEGIN TRAN
|
||
|
||
DELETE
|
||
FROM [dbo].[T_listParticipant]
|
||
WHERE [ID_LP] = @ID_LP
|
||
|
||
COMMIT
|
||
GO
|
||
/****** Object: StoredProcedure [dbo].[listParticipantInsert] Script Date: 18-01-19 16:46:32 ******/
|
||
SET ANSI_NULLS ON
|
||
GO
|
||
SET QUOTED_IDENTIFIER ON
|
||
GO
|
||
CREATE PROC [dbo].[listParticipantInsert]
|
||
@ID_equipe int = NULL,
|
||
@ID_benificiaire int = NULL
|
||
AS
|
||
SET NOCOUNT ON
|
||
SET XACT_ABORT ON
|
||
|
||
BEGIN TRAN
|
||
|
||
INSERT INTO [dbo].[T_listParticipant] ([ID_equipe], [ID_benificiaire])
|
||
SELECT @ID_equipe, @ID_benificiaire
|
||
|
||
-- Begin Return Select <- do not remove
|
||
SELECT [ID_LP], [ID_equipe], [ID_benificiaire]
|
||
FROM [dbo].[T_listParticipant]
|
||
WHERE [ID_LP] = SCOPE_IDENTITY()
|
||
-- End Return Select <- do not remove
|
||
|
||
COMMIT
|
||
GO
|
||
/****** Object: StoredProcedure [dbo].[listParticipantSelect] Script Date: 18-01-19 16:46:32 ******/
|
||
SET ANSI_NULLS ON
|
||
GO
|
||
SET QUOTED_IDENTIFIER ON
|
||
GO
|
||
CREATE PROC [dbo].[listParticipantSelect]
|
||
@ID_LP int
|
||
AS
|
||
SET NOCOUNT ON
|
||
SET XACT_ABORT ON
|
||
|
||
BEGIN TRAN
|
||
|
||
SELECT [ID_LP], [ID_equipe], [ID_benificiaire]
|
||
FROM [dbo].[T_listParticipant]
|
||
WHERE ([ID_LP] = @ID_LP OR @ID_LP IS NULL)
|
||
|
||
COMMIT
|
||
GO
|
||
/****** Object: StoredProcedure [dbo].[listParticipantUpdate] Script Date: 18-01-19 16:46:32 ******/
|
||
SET ANSI_NULLS ON
|
||
GO
|
||
SET QUOTED_IDENTIFIER ON
|
||
GO
|
||
CREATE PROC [dbo].[listParticipantUpdate]
|
||
@ID_LP int,
|
||
@ID_equipe int = NULL,
|
||
@ID_benificiaire int = NULL
|
||
AS
|
||
SET NOCOUNT ON
|
||
SET XACT_ABORT ON
|
||
|
||
BEGIN TRAN
|
||
|
||
UPDATE [dbo].[T_listParticipant]
|
||
SET [ID_equipe] = @ID_equipe, [ID_benificiaire] = @ID_benificiaire
|
||
WHERE [ID_LP] = @ID_LP
|
||
|
||
-- Begin Return Select <- do not remove
|
||
SELECT [ID_LP], [ID_equipe], [ID_benificiaire]
|
||
FROM [dbo].[T_listParticipant]
|
||
WHERE [ID_LP] = @ID_LP
|
||
-- End Return Select <- do not remove
|
||
|
||
COMMIT
|
||
GO
|
||
/****** Object: StoredProcedure [dbo].[listPlatDelete] Script Date: 18-01-19 16:46:32 ******/
|
||
SET ANSI_NULLS ON
|
||
GO
|
||
SET QUOTED_IDENTIFIER ON
|
||
GO
|
||
CREATE PROC [dbo].[listPlatDelete]
|
||
@ID_listPlat int
|
||
AS
|
||
SET NOCOUNT ON
|
||
SET XACT_ABORT ON
|
||
|
||
BEGIN TRAN
|
||
|
||
DELETE
|
||
FROM [dbo].[T_listPlat]
|
||
WHERE [ID_listPlat] = @ID_listPlat
|
||
|
||
COMMIT
|
||
GO
|
||
/****** Object: StoredProcedure [dbo].[listPlatInsert] Script Date: 18-01-19 16:46:32 ******/
|
||
SET ANSI_NULLS ON
|
||
GO
|
||
SET QUOTED_IDENTIFIER ON
|
||
GO
|
||
CREATE PROC [dbo].[listPlatInsert]
|
||
@ID_repa int,
|
||
@ID_plat int
|
||
AS
|
||
SET NOCOUNT ON
|
||
SET XACT_ABORT ON
|
||
|
||
BEGIN TRAN
|
||
|
||
INSERT INTO [dbo].[T_listPlat] ([ID_repa], [ID_plat])
|
||
SELECT @ID_repa, @ID_plat
|
||
|
||
-- Begin Return Select <- do not remove
|
||
SELECT [ID_listPlat], [ID_repa], [ID_plat]
|
||
FROM [dbo].[T_listPlat]
|
||
WHERE [ID_listPlat] = SCOPE_IDENTITY()
|
||
-- End Return Select <- do not remove
|
||
|
||
COMMIT
|
||
GO
|
||
/****** Object: StoredProcedure [dbo].[listPlatSelect] Script Date: 18-01-19 16:46:32 ******/
|
||
SET ANSI_NULLS ON
|
||
GO
|
||
SET QUOTED_IDENTIFIER ON
|
||
GO
|
||
CREATE PROC [dbo].[listPlatSelect]
|
||
@ID_listPlat int
|
||
AS
|
||
SET NOCOUNT ON
|
||
SET XACT_ABORT ON
|
||
|
||
BEGIN TRAN
|
||
|
||
SELECT [ID_listPlat], [ID_repa], [ID_plat]
|
||
FROM [dbo].[T_listPlat]
|
||
WHERE ([ID_listPlat] = @ID_listPlat OR @ID_listPlat IS NULL)
|
||
|
||
COMMIT
|
||
GO
|
||
/****** Object: StoredProcedure [dbo].[listPlatUpdate] Script Date: 18-01-19 16:46:32 ******/
|
||
SET ANSI_NULLS ON
|
||
GO
|
||
SET QUOTED_IDENTIFIER ON
|
||
GO
|
||
CREATE PROC [dbo].[listPlatUpdate]
|
||
@ID_listPlat int,
|
||
@ID_repa int,
|
||
@ID_plat int
|
||
AS
|
||
SET NOCOUNT ON
|
||
SET XACT_ABORT ON
|
||
|
||
BEGIN TRAN
|
||
|
||
UPDATE [dbo].[T_listPlat]
|
||
SET [ID_repa] = @ID_repa, [ID_plat] = @ID_plat
|
||
WHERE [ID_listPlat] = @ID_listPlat
|
||
|
||
-- Begin Return Select <- do not remove
|
||
SELECT [ID_listPlat], [ID_repa], [ID_plat]
|
||
FROM [dbo].[T_listPlat]
|
||
WHERE [ID_listPlat] = @ID_listPlat
|
||
-- End Return Select <- do not remove
|
||
|
||
COMMIT
|
||
GO
|
||
/****** Object: StoredProcedure [dbo].[platDelete] Script Date: 18-01-19 16:46:32 ******/
|
||
SET ANSI_NULLS ON
|
||
GO
|
||
SET QUOTED_IDENTIFIER ON
|
||
GO
|
||
CREATE PROC [dbo].[platDelete]
|
||
@ID_plat int
|
||
AS
|
||
SET NOCOUNT ON
|
||
SET XACT_ABORT ON
|
||
|
||
BEGIN TRAN
|
||
|
||
DELETE
|
||
FROM [dbo].[T_plat]
|
||
WHERE [ID_plat] = @ID_plat
|
||
|
||
COMMIT
|
||
GO
|
||
/****** Object: StoredProcedure [dbo].[platInsert] Script Date: 18-01-19 16:46:32 ******/
|
||
SET ANSI_NULLS ON
|
||
GO
|
||
SET QUOTED_IDENTIFIER ON
|
||
GO
|
||
CREATE PROC [dbo].[platInsert]
|
||
@P_nom text = NULL,
|
||
@P_img image = NULL,
|
||
@ID_typePlat int = NULL
|
||
AS
|
||
SET NOCOUNT ON
|
||
SET XACT_ABORT ON
|
||
|
||
BEGIN TRAN
|
||
|
||
INSERT INTO [dbo].[T_plat] ([P_nom], [P_img], [ID_typePlat])
|
||
SELECT @P_nom, @P_img, @ID_typePlat
|
||
|
||
-- Begin Return Select <- do not remove
|
||
SELECT [ID_plat], [P_nom], [P_img], [ID_typePlat]
|
||
FROM [dbo].[T_plat]
|
||
WHERE [ID_plat] = SCOPE_IDENTITY()
|
||
-- End Return Select <- do not remove
|
||
|
||
COMMIT
|
||
GO
|
||
/****** Object: StoredProcedure [dbo].[platSelect] Script Date: 18-01-19 16:46:32 ******/
|
||
SET ANSI_NULLS ON
|
||
GO
|
||
SET QUOTED_IDENTIFIER ON
|
||
GO
|
||
CREATE PROC [dbo].[platSelect]
|
||
@ID_plat int
|
||
AS
|
||
SET NOCOUNT ON
|
||
SET XACT_ABORT ON
|
||
|
||
BEGIN TRAN
|
||
|
||
SELECT [ID_plat], [P_nom], [P_img], [ID_typePlat]
|
||
FROM [dbo].[T_plat]
|
||
WHERE ([ID_plat] = @ID_plat OR @ID_plat IS NULL)
|
||
|
||
COMMIT
|
||
GO
|
||
/****** Object: StoredProcedure [dbo].[platUpdate] Script Date: 18-01-19 16:46:32 ******/
|
||
SET ANSI_NULLS ON
|
||
GO
|
||
SET QUOTED_IDENTIFIER ON
|
||
GO
|
||
CREATE PROC [dbo].[platUpdate]
|
||
@ID_plat int,
|
||
@P_nom text = NULL,
|
||
@P_img image = NULL,
|
||
@ID_typePlat int = NULL
|
||
AS
|
||
SET NOCOUNT ON
|
||
SET XACT_ABORT ON
|
||
|
||
BEGIN TRAN
|
||
|
||
UPDATE [dbo].[T_plat]
|
||
SET [P_nom] = @P_nom, [P_img] = @P_img, [ID_typePlat] = @ID_typePlat
|
||
WHERE [ID_plat] = @ID_plat
|
||
|
||
-- Begin Return Select <- do not remove
|
||
SELECT [ID_plat], [P_nom], [P_img], [ID_typePlat]
|
||
FROM [dbo].[T_plat]
|
||
WHERE [ID_plat] = @ID_plat
|
||
-- End Return Select <- do not remove
|
||
|
||
COMMIT
|
||
GO
|
||
/****** Object: StoredProcedure [dbo].[repaDelete] Script Date: 18-01-19 16:46:32 ******/
|
||
SET ANSI_NULLS ON
|
||
GO
|
||
SET QUOTED_IDENTIFIER ON
|
||
GO
|
||
CREATE PROC [dbo].[repaDelete]
|
||
@ID_repa int
|
||
AS
|
||
SET NOCOUNT ON
|
||
SET XACT_ABORT ON
|
||
|
||
BEGIN TRAN
|
||
|
||
DELETE
|
||
FROM [dbo].[T_repa]
|
||
WHERE [ID_repa] = @ID_repa
|
||
|
||
COMMIT
|
||
GO
|
||
/****** Object: StoredProcedure [dbo].[repaInsert] Script Date: 18-01-19 16:46:32 ******/
|
||
SET ANSI_NULLS ON
|
||
GO
|
||
SET QUOTED_IDENTIFIER ON
|
||
GO
|
||
CREATE PROC [dbo].[repaInsert]
|
||
@ID_listPlat int = NULL,
|
||
@ID_typeRepa int = NULL
|
||
AS
|
||
SET NOCOUNT ON
|
||
SET XACT_ABORT ON
|
||
|
||
BEGIN TRAN
|
||
|
||
INSERT INTO [dbo].[T_repa] ([ID_listPlat], [ID_typeRepa])
|
||
SELECT @ID_listPlat, @ID_typeRepa
|
||
|
||
-- Begin Return Select <- do not remove
|
||
SELECT [ID_repa], [ID_listPlat], [ID_typeRepa]
|
||
FROM [dbo].[T_repa]
|
||
WHERE [ID_repa] = SCOPE_IDENTITY()
|
||
-- End Return Select <- do not remove
|
||
|
||
COMMIT
|
||
GO
|
||
/****** Object: StoredProcedure [dbo].[repaSelect] Script Date: 18-01-19 16:46:32 ******/
|
||
SET ANSI_NULLS ON
|
||
GO
|
||
SET QUOTED_IDENTIFIER ON
|
||
GO
|
||
CREATE PROC [dbo].[repaSelect]
|
||
@ID_repa int
|
||
AS
|
||
SET NOCOUNT ON
|
||
SET XACT_ABORT ON
|
||
|
||
BEGIN TRAN
|
||
|
||
SELECT [ID_repa], [ID_listPlat], [ID_typeRepa]
|
||
FROM [dbo].[T_repa]
|
||
WHERE ([ID_repa] = @ID_repa OR @ID_repa IS NULL)
|
||
|
||
COMMIT
|
||
GO
|
||
/****** Object: StoredProcedure [dbo].[repaUpdate] Script Date: 18-01-19 16:46:32 ******/
|
||
SET ANSI_NULLS ON
|
||
GO
|
||
SET QUOTED_IDENTIFIER ON
|
||
GO
|
||
CREATE PROC [dbo].[repaUpdate]
|
||
@ID_repa int,
|
||
@ID_listPlat int = NULL,
|
||
@ID_typeRepa int = NULL
|
||
AS
|
||
SET NOCOUNT ON
|
||
SET XACT_ABORT ON
|
||
|
||
BEGIN TRAN
|
||
|
||
UPDATE [dbo].[T_repa]
|
||
SET [ID_listPlat] = @ID_listPlat, [ID_typeRepa] = @ID_typeRepa
|
||
WHERE [ID_repa] = @ID_repa
|
||
|
||
-- Begin Return Select <- do not remove
|
||
SELECT [ID_repa], [ID_listPlat], [ID_typeRepa]
|
||
FROM [dbo].[T_repa]
|
||
WHERE [ID_repa] = @ID_repa
|
||
-- End Return Select <- do not remove
|
||
|
||
COMMIT
|
||
GO
|
||
/****** Object: StoredProcedure [dbo].[typeEvenementDelete] Script Date: 18-01-19 16:46:32 ******/
|
||
SET ANSI_NULLS ON
|
||
GO
|
||
SET QUOTED_IDENTIFIER ON
|
||
GO
|
||
CREATE PROC [dbo].[typeEvenementDelete]
|
||
@ID_typeEvenement int
|
||
AS
|
||
SET NOCOUNT ON
|
||
SET XACT_ABORT ON
|
||
|
||
BEGIN TRAN
|
||
|
||
DELETE
|
||
FROM [dbo].[T_typeEvenement]
|
||
WHERE [ID_typeEvenement] = @ID_typeEvenement
|
||
|
||
COMMIT
|
||
GO
|
||
/****** Object: StoredProcedure [dbo].[typeEvenementInsert] Script Date: 18-01-19 16:46:32 ******/
|
||
SET ANSI_NULLS ON
|
||
GO
|
||
SET QUOTED_IDENTIFIER ON
|
||
GO
|
||
CREATE PROC [dbo].[typeEvenementInsert]
|
||
@TE_nom text = NULL
|
||
AS
|
||
SET NOCOUNT ON
|
||
SET XACT_ABORT ON
|
||
|
||
BEGIN TRAN
|
||
|
||
INSERT INTO [dbo].[T_typeEvenement] ([TE_nom])
|
||
SELECT @TE_nom
|
||
|
||
-- Begin Return Select <- do not remove
|
||
SELECT [ID_typeEvenement], [TE_nom]
|
||
FROM [dbo].[T_typeEvenement]
|
||
WHERE [ID_typeEvenement] = SCOPE_IDENTITY()
|
||
-- End Return Select <- do not remove
|
||
|
||
COMMIT
|
||
GO
|
||
/****** Object: StoredProcedure [dbo].[typeEvenementSelect] Script Date: 18-01-19 16:46:32 ******/
|
||
SET ANSI_NULLS ON
|
||
GO
|
||
SET QUOTED_IDENTIFIER ON
|
||
GO
|
||
CREATE PROC [dbo].[typeEvenementSelect]
|
||
@ID_typeEvenement int
|
||
AS
|
||
SET NOCOUNT ON
|
||
SET XACT_ABORT ON
|
||
|
||
BEGIN TRAN
|
||
|
||
SELECT [ID_typeEvenement], [TE_nom]
|
||
FROM [dbo].[T_typeEvenement]
|
||
WHERE ([ID_typeEvenement] = @ID_typeEvenement OR @ID_typeEvenement IS NULL)
|
||
|
||
COMMIT
|
||
GO
|
||
/****** Object: StoredProcedure [dbo].[typeEvenementUpdate] Script Date: 18-01-19 16:46:32 ******/
|
||
SET ANSI_NULLS ON
|
||
GO
|
||
SET QUOTED_IDENTIFIER ON
|
||
GO
|
||
CREATE PROC [dbo].[typeEvenementUpdate]
|
||
@ID_typeEvenement int,
|
||
@TE_nom text = NULL
|
||
AS
|
||
SET NOCOUNT ON
|
||
SET XACT_ABORT ON
|
||
|
||
BEGIN TRAN
|
||
|
||
UPDATE [dbo].[T_typeEvenement]
|
||
SET [TE_nom] = @TE_nom
|
||
WHERE [ID_typeEvenement] = @ID_typeEvenement
|
||
|
||
-- Begin Return Select <- do not remove
|
||
SELECT [ID_typeEvenement], [TE_nom]
|
||
FROM [dbo].[T_typeEvenement]
|
||
WHERE [ID_typeEvenement] = @ID_typeEvenement
|
||
-- End Return Select <- do not remove
|
||
|
||
COMMIT
|
||
GO
|
||
/****** Object: StoredProcedure [dbo].[typePlatDelete] Script Date: 18-01-19 16:46:32 ******/
|
||
SET ANSI_NULLS ON
|
||
GO
|
||
SET QUOTED_IDENTIFIER ON
|
||
GO
|
||
CREATE PROC [dbo].[typePlatDelete]
|
||
@ID_typePlat int
|
||
AS
|
||
SET NOCOUNT ON
|
||
SET XACT_ABORT ON
|
||
|
||
BEGIN TRAN
|
||
|
||
DELETE
|
||
FROM [dbo].[T_typePlat]
|
||
WHERE [ID_typePlat] = @ID_typePlat
|
||
|
||
COMMIT
|
||
GO
|
||
/****** Object: StoredProcedure [dbo].[typePlatInsert] Script Date: 18-01-19 16:46:32 ******/
|
||
SET ANSI_NULLS ON
|
||
GO
|
||
SET QUOTED_IDENTIFIER ON
|
||
GO
|
||
CREATE PROC [dbo].[typePlatInsert]
|
||
@ID_typePlat int,
|
||
@TP_nom varchar(50) = NULL
|
||
AS
|
||
SET NOCOUNT ON
|
||
SET XACT_ABORT ON
|
||
|
||
BEGIN TRAN
|
||
|
||
INSERT INTO [dbo].[T_typePlat] ([ID_typePlat], [TP_nom])
|
||
SELECT @ID_typePlat, @TP_nom
|
||
|
||
-- Begin Return Select <- do not remove
|
||
SELECT [ID_typePlat], [TP_nom]
|
||
FROM [dbo].[T_typePlat]
|
||
WHERE [ID_typePlat] = @ID_typePlat
|
||
-- End Return Select <- do not remove
|
||
|
||
COMMIT
|
||
GO
|
||
/****** Object: StoredProcedure [dbo].[typePlatSelect] Script Date: 18-01-19 16:46:32 ******/
|
||
SET ANSI_NULLS ON
|
||
GO
|
||
SET QUOTED_IDENTIFIER ON
|
||
GO
|
||
CREATE PROC [dbo].[typePlatSelect]
|
||
@ID_typePlat int
|
||
AS
|
||
SET NOCOUNT ON
|
||
SET XACT_ABORT ON
|
||
|
||
BEGIN TRAN
|
||
|
||
SELECT [ID_typePlat], [TP_nom]
|
||
FROM [dbo].[T_typePlat]
|
||
WHERE ([ID_typePlat] = @ID_typePlat OR @ID_typePlat IS NULL)
|
||
|
||
COMMIT
|
||
GO
|
||
/****** Object: StoredProcedure [dbo].[typePlatUpdate] Script Date: 18-01-19 16:46:32 ******/
|
||
SET ANSI_NULLS ON
|
||
GO
|
||
SET QUOTED_IDENTIFIER ON
|
||
GO
|
||
CREATE PROC [dbo].[typePlatUpdate]
|
||
@ID_typePlat int,
|
||
@TP_nom varchar(50) = NULL
|
||
AS
|
||
SET NOCOUNT ON
|
||
SET XACT_ABORT ON
|
||
|
||
BEGIN TRAN
|
||
|
||
UPDATE [dbo].[T_typePlat]
|
||
SET [TP_nom] = @TP_nom
|
||
WHERE [ID_typePlat] = @ID_typePlat
|
||
|
||
-- Begin Return Select <- do not remove
|
||
SELECT [ID_typePlat], [TP_nom]
|
||
FROM [dbo].[T_typePlat]
|
||
WHERE [ID_typePlat] = @ID_typePlat
|
||
-- End Return Select <- do not remove
|
||
|
||
COMMIT
|
||
GO
|
||
/****** Object: StoredProcedure [dbo].[typeRepaDelete] Script Date: 18-01-19 16:46:32 ******/
|
||
SET ANSI_NULLS ON
|
||
GO
|
||
SET QUOTED_IDENTIFIER ON
|
||
GO
|
||
CREATE PROC [dbo].[typeRepaDelete]
|
||
@ID_typeRepa int
|
||
AS
|
||
SET NOCOUNT ON
|
||
SET XACT_ABORT ON
|
||
|
||
BEGIN TRAN
|
||
|
||
DELETE
|
||
FROM [dbo].[T_typeRepa]
|
||
WHERE [ID_typeRepa] = @ID_typeRepa
|
||
|
||
COMMIT
|
||
GO
|
||
/****** Object: StoredProcedure [dbo].[typeRepaInsert] Script Date: 18-01-19 16:46:32 ******/
|
||
SET ANSI_NULLS ON
|
||
GO
|
||
SET QUOTED_IDENTIFIER ON
|
||
GO
|
||
CREATE PROC [dbo].[typeRepaInsert]
|
||
@TR_nom varchar(50) = NULL
|
||
AS
|
||
SET NOCOUNT ON
|
||
SET XACT_ABORT ON
|
||
|
||
BEGIN TRAN
|
||
|
||
INSERT INTO [dbo].[T_typeRepa] ([TR_nom])
|
||
SELECT @TR_nom
|
||
|
||
-- Begin Return Select <- do not remove
|
||
SELECT [ID_typeRepa], [TR_nom]
|
||
FROM [dbo].[T_typeRepa]
|
||
WHERE [ID_typeRepa] = SCOPE_IDENTITY()
|
||
-- End Return Select <- do not remove
|
||
|
||
COMMIT
|
||
GO
|
||
/****** Object: StoredProcedure [dbo].[typeRepaSelect] Script Date: 18-01-19 16:46:32 ******/
|
||
SET ANSI_NULLS ON
|
||
GO
|
||
SET QUOTED_IDENTIFIER ON
|
||
GO
|
||
CREATE PROC [dbo].[typeRepaSelect]
|
||
@ID_typeRepa int
|
||
AS
|
||
SET NOCOUNT ON
|
||
SET XACT_ABORT ON
|
||
|
||
BEGIN TRAN
|
||
|
||
SELECT [ID_typeRepa], [TR_nom]
|
||
FROM [dbo].[T_typeRepa]
|
||
WHERE ([ID_typeRepa] = @ID_typeRepa OR @ID_typeRepa IS NULL)
|
||
|
||
COMMIT
|
||
GO
|
||
/****** Object: StoredProcedure [dbo].[typeRepaUpdate] Script Date: 18-01-19 16:46:32 ******/
|
||
SET ANSI_NULLS ON
|
||
GO
|
||
SET QUOTED_IDENTIFIER ON
|
||
GO
|
||
CREATE PROC [dbo].[typeRepaUpdate]
|
||
@ID_typeRepa int,
|
||
@TR_nom varchar(50) = NULL
|
||
AS
|
||
SET NOCOUNT ON
|
||
SET XACT_ABORT ON
|
||
|
||
BEGIN TRAN
|
||
|
||
UPDATE [dbo].[T_typeRepa]
|
||
SET [TR_nom] = @TR_nom
|
||
WHERE [ID_typeRepa] = @ID_typeRepa
|
||
|
||
-- Begin Return Select <- do not remove
|
||
SELECT [ID_typeRepa], [TR_nom]
|
||
FROM [dbo].[T_typeRepa]
|
||
WHERE [ID_typeRepa] = @ID_typeRepa
|
||
-- End Return Select <- do not remove
|
||
|
||
COMMIT
|
||
GO
|
||
EXEC sys.sp_addextendedproperty @name=N'MS_DiagramPane1', @value=N'[0E232FF0-B466-11cf-A24F-00AA00A3EFFF, 1.00]
|
||
Begin DesignProperties =
|
||
Begin PaneConfigurations =
|
||
Begin PaneConfiguration = 0
|
||
NumPanes = 4
|
||
Configuration = "(H (1[58] 4[16] 2[18] 3) )"
|
||
End
|
||
Begin PaneConfiguration = 1
|
||
NumPanes = 3
|
||
Configuration = "(H (1 [50] 4 [25] 3))"
|
||
End
|
||
Begin PaneConfiguration = 2
|
||
NumPanes = 3
|
||
Configuration = "(H (1 [50] 2 [25] 3))"
|
||
End
|
||
Begin PaneConfiguration = 3
|
||
NumPanes = 3
|
||
Configuration = "(H (4 [30] 2 [40] 3))"
|
||
End
|
||
Begin PaneConfiguration = 4
|
||
NumPanes = 2
|
||
Configuration = "(H (1 [56] 3))"
|
||
End
|
||
Begin PaneConfiguration = 5
|
||
NumPanes = 2
|
||
Configuration = "(H (2 [66] 3))"
|
||
End
|
||
Begin PaneConfiguration = 6
|
||
NumPanes = 2
|
||
Configuration = "(H (4 [50] 3))"
|
||
End
|
||
Begin PaneConfiguration = 7
|
||
NumPanes = 1
|
||
Configuration = "(V (3))"
|
||
End
|
||
Begin PaneConfiguration = 8
|
||
NumPanes = 3
|
||
Configuration = "(H (1[56] 4[18] 2) )"
|
||
End
|
||
Begin PaneConfiguration = 9
|
||
NumPanes = 2
|
||
Configuration = "(H (1 [75] 4))"
|
||
End
|
||
Begin PaneConfiguration = 10
|
||
NumPanes = 2
|
||
Configuration = "(H (1[66] 2) )"
|
||
End
|
||
Begin PaneConfiguration = 11
|
||
NumPanes = 2
|
||
Configuration = "(H (4 [60] 2))"
|
||
End
|
||
Begin PaneConfiguration = 12
|
||
NumPanes = 1
|
||
Configuration = "(H (1) )"
|
||
End
|
||
Begin PaneConfiguration = 13
|
||
NumPanes = 1
|
||
Configuration = "(V (4))"
|
||
End
|
||
Begin PaneConfiguration = 14
|
||
NumPanes = 1
|
||
Configuration = "(V (2))"
|
||
End
|
||
ActivePaneConfig = 0
|
||
End
|
||
Begin DiagramPane =
|
||
Begin Origin =
|
||
Top = 0
|
||
Left = 0
|
||
End
|
||
Begin Tables =
|
||
Begin Table = "T_beneficiaire"
|
||
Begin Extent =
|
||
Top = 11
|
||
Left = 793
|
||
Bottom = 141
|
||
Right = 1002
|
||
End
|
||
DisplayFlags = 280
|
||
TopColumn = 0
|
||
End
|
||
Begin Table = "T_equipe"
|
||
Begin Extent =
|
||
Top = 6
|
||
Left = 307
|
||
Bottom = 136
|
||
Right = 516
|
||
End
|
||
DisplayFlags = 280
|
||
TopColumn = 0
|
||
End
|
||
Begin Table = "T_lieu"
|
||
Begin Extent =
|
||
Top = 154
|
||
Left = 337
|
||
Bottom = 250
|
||
Right = 546
|
||
End
|
||
DisplayFlags = 280
|
||
TopColumn = 0
|
||
End
|
||
Begin Table = "T_listParticipant"
|
||
Begin Extent =
|
||
Top = 43
|
||
Left = 548
|
||
Bottom = 156
|
||
Right = 757
|
||
End
|
||
DisplayFlags = 280
|
||
TopColumn = 0
|
||
End
|
||
Begin Table = "T_typeEvenement"
|
||
Begin Extent =
|
||
Top = 267
|
||
Left = 299
|
||
Bottom = 363
|
||
Right = 508
|
||
End
|
||
DisplayFlags = 280
|
||
TopColumn = 0
|
||
End
|
||
Begin Table = "T_event"
|
||
Begin Extent =
|
||
Top = 7
|
||
Left = 52
|
||
Bottom = 137
|
||
Right = 261
|
||
End
|
||
DisplayFlags = 280
|
||
TopColumn = 0
|
||
End
|
||
End
|
||
End
|
||
Begin SQLPane =
|
||
End
|
||
Begin DataPane =
|
||
Begin ParameterDefaults = ""
|
||
End
|
||
End
|
||
Begin CriteriaPane =
|
||
Begin ColumnWidths = 11
|
||
Colu' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'VIEW',@level1name=N'event'
|
||
GO
|
||
EXEC sys.sp_addextendedproperty @name=N'MS_DiagramPane2', @value=N'mn = 1440
|
||
Alias = 900
|
||
Table = 2715
|
||
Output = 720
|
||
Append = 1400
|
||
NewValue = 1170
|
||
SortType = 1350
|
||
SortOrder = 1410
|
||
GroupBy = 1350
|
||
Filter = 1350
|
||
Or = 1350
|
||
Or = 1350
|
||
Or = 1350
|
||
End
|
||
End
|
||
End
|
||
' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'VIEW',@level1name=N'event'
|
||
GO
|
||
EXEC sys.sp_addextendedproperty @name=N'MS_DiagramPaneCount', @value=2 , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'VIEW',@level1name=N'event'
|
||
GO
|
||
EXEC sys.sp_addextendedproperty @name=N'MS_DiagramPane1', @value=N'[0E232FF0-B466-11cf-A24F-00AA00A3EFFF, 1.00]
|
||
Begin DesignProperties =
|
||
Begin PaneConfigurations =
|
||
Begin PaneConfiguration = 0
|
||
NumPanes = 4
|
||
Configuration = "(H (1[51] 4[12] 2[27] 3) )"
|
||
End
|
||
Begin PaneConfiguration = 1
|
||
NumPanes = 3
|
||
Configuration = "(H (1 [50] 4 [25] 3))"
|
||
End
|
||
Begin PaneConfiguration = 2
|
||
NumPanes = 3
|
||
Configuration = "(H (1 [50] 2 [25] 3))"
|
||
End
|
||
Begin PaneConfiguration = 3
|
||
NumPanes = 3
|
||
Configuration = "(H (4 [30] 2 [40] 3))"
|
||
End
|
||
Begin PaneConfiguration = 4
|
||
NumPanes = 2
|
||
Configuration = "(H (1 [56] 3))"
|
||
End
|
||
Begin PaneConfiguration = 5
|
||
NumPanes = 2
|
||
Configuration = "(H (2 [66] 3))"
|
||
End
|
||
Begin PaneConfiguration = 6
|
||
NumPanes = 2
|
||
Configuration = "(H (4 [50] 3))"
|
||
End
|
||
Begin PaneConfiguration = 7
|
||
NumPanes = 1
|
||
Configuration = "(V (3))"
|
||
End
|
||
Begin PaneConfiguration = 8
|
||
NumPanes = 3
|
||
Configuration = "(H (1[56] 4[18] 2) )"
|
||
End
|
||
Begin PaneConfiguration = 9
|
||
NumPanes = 2
|
||
Configuration = "(H (1 [75] 4))"
|
||
End
|
||
Begin PaneConfiguration = 10
|
||
NumPanes = 2
|
||
Configuration = "(H (1[66] 2) )"
|
||
End
|
||
Begin PaneConfiguration = 11
|
||
NumPanes = 2
|
||
Configuration = "(H (4 [60] 2))"
|
||
End
|
||
Begin PaneConfiguration = 12
|
||
NumPanes = 1
|
||
Configuration = "(H (1) )"
|
||
End
|
||
Begin PaneConfiguration = 13
|
||
NumPanes = 1
|
||
Configuration = "(V (4))"
|
||
End
|
||
Begin PaneConfiguration = 14
|
||
NumPanes = 1
|
||
Configuration = "(V (2))"
|
||
End
|
||
ActivePaneConfig = 0
|
||
End
|
||
Begin DiagramPane =
|
||
Begin Origin =
|
||
Top = 0
|
||
Left = 0
|
||
End
|
||
Begin Tables =
|
||
Begin Table = "T_listPlat"
|
||
Begin Extent =
|
||
Top = 16
|
||
Left = 299
|
||
Bottom = 129
|
||
Right = 508
|
||
End
|
||
DisplayFlags = 280
|
||
TopColumn = 0
|
||
End
|
||
Begin Table = "T_repa"
|
||
Begin Extent =
|
||
Top = 8
|
||
Left = 52
|
||
Bottom = 121
|
||
Right = 261
|
||
End
|
||
DisplayFlags = 280
|
||
TopColumn = 0
|
||
End
|
||
Begin Table = "T_typePlat"
|
||
Begin Extent =
|
||
Top = 14
|
||
Left = 764
|
||
Bottom = 110
|
||
Right = 973
|
||
End
|
||
DisplayFlags = 280
|
||
TopColumn = 0
|
||
End
|
||
Begin Table = "T_typeRepa"
|
||
Begin Extent =
|
||
Top = 170
|
||
Left = 303
|
||
Bottom = 266
|
||
Right = 512
|
||
End
|
||
DisplayFlags = 280
|
||
TopColumn = 0
|
||
End
|
||
Begin Table = "T_plat"
|
||
Begin Extent =
|
||
Top = 2
|
||
Left = 530
|
||
Bottom = 123
|
||
Right = 739
|
||
End
|
||
DisplayFlags = 280
|
||
TopColumn = 0
|
||
End
|
||
End
|
||
End
|
||
Begin SQLPane =
|
||
End
|
||
Begin DataPane =
|
||
Begin ParameterDefaults = ""
|
||
End
|
||
End
|
||
Begin CriteriaPane =
|
||
Begin ColumnWidths = 11
|
||
Column = 1440
|
||
Alias = 900
|
||
Table = 1170
|
||
Output = 720
|
||
Append = 1400
|
||
NewValue = 1170
|
||
SortType = 1350
|
||
SortOrder = 1410
|
||
GroupBy = 1350
|
||
Filter = 1350
|
||
Or = 1350
|
||
Or = 1350
|
||
Or' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'VIEW',@level1name=N'repas'
|
||
GO
|
||
EXEC sys.sp_addextendedproperty @name=N'MS_DiagramPane2', @value=N' = 1350
|
||
End
|
||
End
|
||
End
|
||
' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'VIEW',@level1name=N'repas'
|
||
GO
|
||
EXEC sys.sp_addextendedproperty @name=N'MS_DiagramPaneCount', @value=2 , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'VIEW',@level1name=N'repas'
|
||
GO
|
||
USE [master]
|
||
GO
|
||
ALTER DATABASE [ProjetThe] SET READ_WRITE
|
||
GO
|