A
A
GO
/****** Object: StoredProcedure [dbo].[Invoice2] Script Date: 13/03/2019
09:24:42 � ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
GO
/****** Object: StoredProcedure [dbo].[InvoiceOrder] Script Date: 13/03/2019
09:24:42 � ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
GO
/****** Object: Table [dbo].[tblAgent] Script Date: 13/03/2019 09:24:42 �
******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[tblAgent](
[AgentID] [int] IDENTITY(1,1) NOT NULL,
[AgentName] [nvarchar](50) NULL,
[AgentUserName] [nvarchar](50) NULL,
[AgentPassword] [nvarchar](50) NULL,
[AgentUnit] [nvarchar](50) NULL,
[AgentPhone] [nvarchar](50) NULL,
[AgentEmail] [nvarchar](50) NULL,
[AgentAddress] [nvarchar](50) NULL,
CONSTRAINT [PK_tblAgent] PRIMARY KEY CLUSTERED
(
[AgentID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF,
ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
/****** Object: Table [dbo].[tblCustomer] Script Date: 13/03/2019 09:24:42 �
******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[tblCustomer](
[CustomerID] [int] IDENTITY(1,1) NOT NULL,
[CustomerName] [nvarchar](50) NULL,
[CustomerAddress] [nvarchar](50) NULL,
[CustomerCity] [nvarchar](50) NULL,
[CustomerPhone] [nvarchar](50) NULL,
[CustomerEmail] [nvarchar](50) NULL,
CONSTRAINT [PK_tblCustomer] PRIMARY KEY CLUSTERED
(
[CustomerID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF,
ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
/****** Object: Table [dbo].[tblCustomerCreditCard] Script Date: 13/03/2019
09:24:42 � ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[tblCustomerCreditCard](
[CustomerCreditCardID] [int] IDENTITY(1,1) NOT NULL,
[CustomerIDfk] [int] NULL,
[CustomerCreditCardNo] [nchar](10) NULL,
[CustomerCreditCardExpireDate] [nchar](10) NULL,
[CustomerCreditCardValidationDate] [nchar](10) NULL,
CONSTRAINT [PK_tblCustomerCreditCard] PRIMARY KEY CLUSTERED
(
[CustomerCreditCardID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF,
ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
/****** Object: Table [dbo].[tblEmployee] Script Date: 13/03/2019 09:24:42 �
******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[tblEmployee](
[EmployeeID] [int] IDENTITY(1,1) NOT NULL,
[EmployeeName] [nvarchar](50) NULL,
[EmployeeUserName] [nvarchar](50) NULL,
[EmployeePassword] [nvarchar](50) NULL,
[EmployeeTitle] [nvarchar](50) NULL,
[EmployeePhone] [nvarchar](50) NULL,
[EmployeeEmail] [nvarchar](50) NULL,
[EmployeeAddress] [nvarchar](50) NULL,
[TokenID] [uniqueidentifier] NULL,
CONSTRAINT [PK_tblEmployee] PRIMARY KEY CLUSTERED
(
[EmployeeID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF,
ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
/****** Object: Table [dbo].[tblOnlineProduct] Script Date: 13/03/2019 09:24:42
� ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[tblOnlineProduct](
[OnlineProductID] [int] IDENTITY(1,1) NOT NULL,
[OnlineProductCardNo] [nvarchar](50) NULL,
[OnlineProductSerialNo] [nvarchar](50) NULL,
[OnlineProductCategoryIDfk] [int] NULL,
[OnlineProductUnitPrice] [int] NULL,
[OnlineProductValid] [int] NOT NULL,
CONSTRAINT [PK_tblOnlineProduct] PRIMARY KEY CLUSTERED
(
[OnlineProductID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF,
ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
/****** Object: Table [dbo].[tblOrderDetails] Script Date: 13/03/2019 09:24:42
� ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[tblOrderDetails](
[OrderDetailsID] [int] IDENTITY(1,1) NOT NULL,
[ProductIDfk] [int] NULL,
[OrderIDfk] [int] NULL,
[UnitPrice] [int] NULL,
[Quantity] [int] NULL,
[Discount] [int] NULL,
[OnlineProductIDfk] [int] NULL,
CONSTRAINT [PK_tblOrderDetails] PRIMARY KEY CLUSTERED
(
[OrderDetailsID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF,
ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
/****** Object: Table [dbo].[tblOrders] Script Date: 13/03/2019 09:24:42 �
******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[tblOrders](
[OrderID] [int] IDENTITY(1,1) NOT NULL,
[CostumerIDfk] [int] NULL,
[EmployeeIDfk] [int] NULL,
[AgentIDfk] [int] NULL,
[OrderNo] [int] NULL,
[OrderDate] [nvarchar](50) NULL,
[Paied] [int] NULL,
CONSTRAINT [PK_tblOrders] PRIMARY KEY CLUSTERED
(
[OrderID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF,
ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
/****** Object: Table [dbo].[tblProduct] Script Date: 13/03/2019 09:24:42 �
******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[tblProduct](
[ProductID] [int] IDENTITY(1,1) NOT NULL,
[ProductName] [nvarchar](50) NULL,
[ProductUnitPrice] [nchar](10) NULL,
CONSTRAINT [PK_tblProduct] PRIMARY KEY CLUSTERED
(
[ProductID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF,
ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
/****** Object: Table [dbo].[tblProductCategory] Script Date: 13/03/2019
09:24:42 � ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[tblProductCategory](
[ProductCategoryID] [int] IDENTITY(1,1) NOT NULL,
[ProductCategory] [nvarchar](20) NULL,
[ProductCategoryDescription] [nvarchar](50) NULL,
CONSTRAINT [PK_tblProductCategory] PRIMARY KEY CLUSTERED
(
[ProductCategoryID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF,
ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
/****** Object: View [dbo].[ViewAgentAccount] Script Date: 13/03/2019 09:24:42
� ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE VIEW [dbo].[ViewAgentAccount]
AS
SELECT dbo.tblAgent.AgentName AS [Agent Name], dbo.tblOrders.OrderNo AS
[Order No], dbo.tblOrders.OrderDate AS [Order Date],
SUM(dbo.tblOrderDetails.UnitPrice *
dbo.tblOrderDetails.Quantity) AS Amount, dbo.tblOrders.Paied AS Debit,
SUM(dbo.tblOrderDetails.UnitPrice *
dbo.tblOrderDetails.Quantity) - dbo.tblOrders.Paied AS Credit
FROM dbo.tblAgent INNER JOIN
dbo.tblOrders ON dbo.tblAgent.AgentID =
dbo.tblOrders.AgentIDfk INNER JOIN
dbo.tblOrderDetails ON dbo.tblOrders.OrderID =
dbo.tblOrderDetails.OrderIDfk
GROUP BY dbo.tblAgent.AgentName, dbo.tblOrders.OrderNo, dbo.tblOrders.OrderDate,
dbo.tblOrders.Paied
GO
/****** Object: View [dbo].[ViewSumOf Agent] Script Date: 13/03/2019 09:24:42 �
******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE VIEW [dbo].[ViewSumOf Agent]
AS
SELECT [Agent Name], SUM(Amount) AS [Sum of Amount], SUM(Debit) AS [Sum og
Debit], SUM(Credit) AS [Sum of Credit]
FROM dbo.ViewAgentAccount
GROUP BY [Agent Name]
GO
/****** Object: View [dbo].[ViewCostumerAccount] Script Date: 13/03/2019
09:24:42 � ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE VIEW [dbo].[ViewCostumerAccount]
AS
SELECT dbo.tblCustomer.CustomerName AS [Customer Name],
dbo.tblOrders.OrderNo AS [Order No], dbo.tblOrders.OrderDate AS [Order Date],
SUM(dbo.tblOrderDetails.UnitPrice *
dbo.tblOrderDetails.Quantity) AS Amount, dbo.tblOrders.Paied AS Debit,
SUM(dbo.tblOrderDetails.UnitPrice *
dbo.tblOrderDetails.Quantity) - dbo.tblOrders.Paied AS Credit,
dbo.tblCustomer.CustomerName
FROM dbo.tblOrders INNER JOIN
dbo.tblOrderDetails ON dbo.tblOrders.OrderID =
dbo.tblOrderDetails.OrderIDfk INNER JOIN
dbo.tblCustomer ON dbo.tblOrders.CostumerIDfk =
dbo.tblCustomer.CustomerID
GROUP BY dbo.tblOrders.OrderNo, dbo.tblOrders.OrderDate, dbo.tblOrders.Paied,
dbo.tblCustomer.CustomerName
GO
/****** Object: View [dbo].[ViewSumOfCostumer] Script Date: 13/03/2019 09:24:42
� ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE VIEW [dbo].[ViewSumOfCostumer]
AS
SELECT [Customer Name], SUM(Amount) AS [Sum of Amount], SUM(Debit) AS [Sum
og Debit], SUM(Credit) AS [Sum of Credit]
FROM dbo.ViewCostumerAccount
GROUP BY [Customer Name]
GO
/****** Object: View [dbo].[viewUnValidProduct] Script Date: 13/03/2019
09:24:42 � ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE VIEW [dbo].[viewUnValidProduct]
AS
SELECT dbo.tblProductCategory.ProductCategory,
COUNT(dbo.tblOnlineProduct.OnlineProductID) AS Expr2,
dbo.tblOnlineProduct.OnlineProductValid
FROM dbo.tblOnlineProduct INNER JOIN
dbo.tblProductCategory ON
dbo.tblOnlineProduct.OnlineProductCategoryIDfk =
dbo.tblProductCategory.ProductCategoryID
GROUP BY dbo.tblProductCategory.ProductCategory,
dbo.tblOnlineProduct.OnlineProductValid
HAVING (dbo.tblOnlineProduct.OnlineProductValid = 1)
GO
/****** Object: View [dbo].[viewValidProduct] Script Date: 13/03/2019 09:24:42
� ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE VIEW [dbo].[viewValidProduct]
AS
SELECT dbo.tblProductCategory.ProductCategory,
COUNT(dbo.tblOnlineProduct.OnlineProductID) AS Expr1
FROM dbo.tblOnlineProduct INNER JOIN
dbo.tblProductCategory ON
dbo.tblOnlineProduct.OnlineProductCategoryIDfk =
dbo.tblProductCategory.ProductCategoryID
GROUP BY dbo.tblProductCategory.ProductCategory
GO
/****** Object: View [dbo].[viewValidCards] Script Date: 13/03/2019 09:24:42 �
******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE VIEW [dbo].[viewValidCards]
AS
SELECT dbo.viewValidProduct.ProductCategory, COALESCE
(dbo.viewValidProduct.Expr1, 0) AS Expr1, COALESCE (dbo.viewUnValidProduct.Expr2,
0) AS Expr2,
COALESCE (dbo.viewValidProduct.Expr1 -
dbo.viewUnValidProduct.Expr2, 0) AS Expp
FROM dbo.viewValidProduct FULL OUTER JOIN
dbo.viewUnValidProduct ON
dbo.viewValidProduct.ProductCategory = dbo.viewUnValidProduct.ProductCategory
GROUP BY dbo.viewValidProduct.ProductCategory, dbo.viewValidProduct.Expr1,
dbo.viewUnValidProduct.Expr2, dbo.viewValidProduct.Expr1 -
dbo.viewUnValidProduct.Expr2
GO
/****** Object: View [dbo].[View_1] Script Date: 13/03/2019 09:24:42 � ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE VIEW [dbo].[View_1]
AS
SELECT dbo.tblProduct.ProductName, dbo.tblOrderDetails.UnitPrice,
dbo.tblOrderDetails.Quantity, dbo.tblOrderDetails.Discount,
dbo.tblOrderDetails.OrderIDfk,
dbo.tblOrders.OrderNo, dbo.tblOrders.OrderDate
FROM dbo.tblOrderDetails INNER JOIN
dbo.tblProduct ON dbo.tblOrderDetails.ProductIDfk =
dbo.tblProduct.ProductID INNER JOIN
dbo.tblOrders ON dbo.tblOrderDetails.OrderIDfk =
dbo.tblOrders.OrderID
GO
/****** Object: View [dbo].[ViewAgentDepts] Script Date: 13/03/2019 09:24:42 �
******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE VIEW [dbo].[ViewAgentDepts]
AS
SELECT dbo.tblOrders.OrderNo AS [Order No], dbo.tblOrders.OrderDate AS
[Order Date], dbo.tblAgent.AgentName AS [Agent Name],
SUM(dbo.tblOrderDetails.UnitPrice *
dbo.tblOrderDetails.Quantity) AS Amount, dbo.tblOrders.Paied AS Debit,
SUM(dbo.tblOrderDetails.UnitPrice *
dbo.tblOrderDetails.Quantity) - dbo.tblOrders.Paied AS Credit
FROM dbo.tblOrders INNER JOIN
dbo.tblOrderDetails ON dbo.tblOrders.OrderID =
dbo.tblOrderDetails.OrderIDfk LEFT OUTER JOIN
dbo.tblAgent ON dbo.tblOrders.AgentIDfk =
dbo.tblAgent.AgentID
GROUP BY dbo.tblOrders.OrderNo, dbo.tblOrders.OrderDate, dbo.tblOrders.Paied,
dbo.tblAgent.AgentName
HAVING (SUM(dbo.tblOrderDetails.UnitPrice * dbo.tblOrderDetails.Quantity) -
dbo.tblOrders.Paied <> 0)
GO
/****** Object: View [dbo].[ViewGains] Script Date: 13/03/2019 09:24:42 �
******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE VIEW [dbo].[ViewGains]
AS
SELECT dbo.tblOrders.OrderNo AS [Order No], dbo.tblProduct.ProductUnitPrice
AS [Product Unit Price], dbo.tblOrderDetails.UnitPrice AS [Unit Price],
dbo.tblOrderDetails.Quantity,
dbo.tblOrderDetails.UnitPrice * dbo.tblOrderDetails.Quantity -
dbo.tblProduct.ProductUnitPrice AS Gains
FROM dbo.tblProduct INNER JOIN
dbo.tblOrderDetails ON dbo.tblProduct.ProductID =
dbo.tblOrderDetails.ProductIDfk INNER JOIN
dbo.tblOrders ON dbo.tblOrderDetails.OrderIDfk =
dbo.tblOrders.OrderID
GO
/****** Object: View [dbo].[ViewOnlineGains] Script Date: 13/03/2019 09:24:42 �
******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE VIEW [dbo].[ViewOnlineGains]
AS
SELECT dbo.tblOrders.OrderDate AS [Order Date],
dbo.tblOnlineProduct.OnlineProductUnitPrice AS [Online Product],
dbo.tblOrderDetails.UnitPrice AS [Unit Price],
dbo.tblOrderDetails.Quantity,
dbo.tblOrderDetails.UnitPrice * dbo.tblOrderDetails.Quantity -
dbo.tblOnlineProduct.OnlineProductUnitPrice AS Gains
FROM dbo.tblOnlineProduct INNER JOIN
dbo.tblOrderDetails ON
dbo.tblOnlineProduct.OnlineProductID = dbo.tblOrderDetails.OnlineProductIDfk INNER
JOIN
dbo.tblOrders ON dbo.tblOrderDetails.OrderIDfk =
dbo.tblOrders.OrderID
GO
/****** Object: View [dbo].[viewTotal] Script Date: 13/03/2019 09:24:42 �
******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE VIEW [dbo].[viewTotal]
AS
SELECT OrderIDfk, SUM(Discount) AS dis, SUM(UnitPrice * Quantity) AS Total
FROM dbo.tblOrderDetails
GROUP BY OrderIDfk
GO
SET IDENTITY_INSERT [dbo].[tblAgent] ON
GO
INSERT [dbo].[tblAgent] ([AgentID], [AgentName], [AgentUserName], [AgentPassword],
[AgentUnit], [AgentPhone], [AgentEmail], [AgentAddress]) VALUES (1, N'Ahmed', NULL,
NULL, N'Baghdad', N'123', N'[email protected]', N'Baghdad')
GO
INSERT [dbo].[tblAgent] ([AgentID], [AgentName], [AgentUserName], [AgentPassword],
[AgentUnit], [AgentPhone], [AgentEmail], [AgentAddress]) VALUES (2, N'ali', NULL,
NULL, N'basrah', N'123321', N'aa', N'basrah')
GO
INSERT [dbo].[tblAgent] ([AgentID], [AgentName], [AgentUserName], [AgentPassword],
[AgentUnit], [AgentPhone], [AgentEmail], [AgentAddress]) VALUES (3, N'ali2', NULL,
NULL, N'basrah2', N'123321', N'aa', N'basrah')
GO
SET IDENTITY_INSERT [dbo].[tblAgent] OFF
GO
SET IDENTITY_INSERT [dbo].[tblCustomer] ON
GO
INSERT [dbo].[tblCustomer] ([CustomerID], [CustomerName], [CustomerAddress],
[CustomerCity], [CustomerPhone], [CustomerEmail]) VALUES (1, N'Costumer',
N'baghdad', N'baghdad', N'123', N'11')
GO
SET IDENTITY_INSERT [dbo].[tblCustomer] OFF
GO
SET IDENTITY_INSERT [dbo].[tblEmployee] ON
GO
INSERT [dbo].[tblEmployee] ([EmployeeID], [EmployeeName], [EmployeeUserName],
[EmployeePassword], [EmployeeTitle], [EmployeePhone], [EmployeeEmail],
[EmployeeAddress], [TokenID]) VALUES (2, N'1', N'1',
N'356A192B7913B04C54574D18C28D46E6395428AB', N'sales', N'1', N'[email protected]', N'1',
N'c3405b2f-3694-4e78-8bfb-acc746f9254b')
GO
INSERT [dbo].[tblEmployee] ([EmployeeID], [EmployeeName], [EmployeeUserName],
[EmployeePassword], [EmployeeTitle], [EmployeePhone], [EmployeeEmail],
[EmployeeAddress], [TokenID]) VALUES (3, N'3', N'3',
N'77DE68DAECD823BABBB58EDB1C8E14D7106E83BB', N'Acc', N'3', N'3', N'3', N'ec1d95e6-
2f62-4ebc-8ec0-dbbfed190cc6')
GO
SET IDENTITY_INSERT [dbo].[tblEmployee] OFF
GO
SET IDENTITY_INSERT [dbo].[tblOnlineProduct] ON
GO
INSERT [dbo].[tblOnlineProduct] ([OnlineProductID], [OnlineProductCardNo],
[OnlineProductSerialNo], [OnlineProductCategoryIDfk], [OnlineProductUnitPrice],
[OnlineProductValid]) VALUES (1, N'123', N'321', 1, 4500, 1)
GO
INSERT [dbo].[tblOnlineProduct] ([OnlineProductID], [OnlineProductCardNo],
[OnlineProductSerialNo], [OnlineProductCategoryIDfk], [OnlineProductUnitPrice],
[OnlineProductValid]) VALUES (2, N'123456', N'321654', 1, 4500, 0)
GO
INSERT [dbo].[tblOnlineProduct] ([OnlineProductID], [OnlineProductCardNo],
[OnlineProductSerialNo], [OnlineProductCategoryIDfk], [OnlineProductUnitPrice],
[OnlineProductValid]) VALUES (3, N'1234566', N'321654', 2, 9500, 1)
GO
INSERT [dbo].[tblOnlineProduct] ([OnlineProductID], [OnlineProductCardNo],
[OnlineProductSerialNo], [OnlineProductCategoryIDfk], [OnlineProductUnitPrice],
[OnlineProductValid]) VALUES (4, N'1234562', N'321654', 2, 9500, 0)
GO
INSERT [dbo].[tblOnlineProduct] ([OnlineProductID], [OnlineProductCardNo],
[OnlineProductSerialNo], [OnlineProductCategoryIDfk], [OnlineProductUnitPrice],
[OnlineProductValid]) VALUES (5, N'12344', N'3216', 3, 4500, 1)
GO
INSERT [dbo].[tblOnlineProduct] ([OnlineProductID], [OnlineProductCardNo],
[OnlineProductSerialNo], [OnlineProductCategoryIDfk], [OnlineProductUnitPrice],
[OnlineProductValid]) VALUES (6, N'1234', N'321699', 3, 4500, 0)
GO
INSERT [dbo].[tblOnlineProduct] ([OnlineProductID], [OnlineProductCardNo],
[OnlineProductSerialNo], [OnlineProductCategoryIDfk], [OnlineProductUnitPrice],
[OnlineProductValid]) VALUES (7, N'123411', N'321699', 4, 9500, 1)
GO
INSERT [dbo].[tblOnlineProduct] ([OnlineProductID], [OnlineProductCardNo],
[OnlineProductSerialNo], [OnlineProductCategoryIDfk], [OnlineProductUnitPrice],
[OnlineProductValid]) VALUES (8, N'1234112', N'321699', 4, 9500, 0)
GO
INSERT [dbo].[tblOnlineProduct] ([OnlineProductID], [OnlineProductCardNo],
[OnlineProductSerialNo], [OnlineProductCategoryIDfk], [OnlineProductUnitPrice],
[OnlineProductValid]) VALUES (9, N'12322321', N'123', 1, 4500, 0)
GO
INSERT [dbo].[tblOnlineProduct] ([OnlineProductID], [OnlineProductCardNo],
[OnlineProductSerialNo], [OnlineProductCategoryIDfk], [OnlineProductUnitPrice],
[OnlineProductValid]) VALUES (10, N'12322321', N'123', 1, 4500, 0)
GO
INSERT [dbo].[tblOnlineProduct] ([OnlineProductID], [OnlineProductCardNo],
[OnlineProductSerialNo], [OnlineProductCategoryIDfk], [OnlineProductUnitPrice],
[OnlineProductValid]) VALUES (11, N'666', N'666', 1, 4500, 0)
GO
SET IDENTITY_INSERT [dbo].[tblOnlineProduct] OFF
GO
SET IDENTITY_INSERT [dbo].[tblOrderDetails] ON
GO
INSERT [dbo].[tblOrderDetails] ([OrderDetailsID], [ProductIDfk], [OrderIDfk],
[UnitPrice], [Quantity], [Discount], [OnlineProductIDfk]) VALUES (2, 1, 7, 5000,
10, 0, NULL)
GO
INSERT [dbo].[tblOrderDetails] ([OrderDetailsID], [ProductIDfk], [OrderIDfk],
[UnitPrice], [Quantity], [Discount], [OnlineProductIDfk]) VALUES (3, 1, 7, 5000,
10, 0, NULL)
GO
INSERT [dbo].[tblOrderDetails] ([OrderDetailsID], [ProductIDfk], [OrderIDfk],
[UnitPrice], [Quantity], [Discount], [OnlineProductIDfk]) VALUES (4, 1, 7, 5000,
10, 0, NULL)
GO
INSERT [dbo].[tblOrderDetails] ([OrderDetailsID], [ProductIDfk], [OrderIDfk],
[UnitPrice], [Quantity], [Discount], [OnlineProductIDfk]) VALUES (5, 1, 7, 5000,
10, 0, NULL)
GO
INSERT [dbo].[tblOrderDetails] ([OrderDetailsID], [ProductIDfk], [OrderIDfk],
[UnitPrice], [Quantity], [Discount], [OnlineProductIDfk]) VALUES (6, 1, 7, 5000,
10, 0, NULL)
GO
INSERT [dbo].[tblOrderDetails] ([OrderDetailsID], [ProductIDfk], [OrderIDfk],
[UnitPrice], [Quantity], [Discount], [OnlineProductIDfk]) VALUES (7, 3, 7, 5000, 1,
1, NULL)
GO
INSERT [dbo].[tblOrderDetails] ([OrderDetailsID], [ProductIDfk], [OrderIDfk],
[UnitPrice], [Quantity], [Discount], [OnlineProductIDfk]) VALUES (8, 3, 7, 5000, 1,
1, NULL)
GO
INSERT [dbo].[tblOrderDetails] ([OrderDetailsID], [ProductIDfk], [OrderIDfk],
[UnitPrice], [Quantity], [Discount], [OnlineProductIDfk]) VALUES (9, 1, 7, 10000,
1, 0, NULL)
GO
INSERT [dbo].[tblOrderDetails] ([OrderDetailsID], [ProductIDfk], [OrderIDfk],
[UnitPrice], [Quantity], [Discount], [OnlineProductIDfk]) VALUES (10, 2, 7, 5000,
1, 0, NULL)
GO
INSERT [dbo].[tblOrderDetails] ([OrderDetailsID], [ProductIDfk], [OrderIDfk],
[UnitPrice], [Quantity], [Discount], [OnlineProductIDfk]) VALUES (15, 1, 8, 5000,
2, 0, NULL)
GO
INSERT [dbo].[tblOrderDetails] ([OrderDetailsID], [ProductIDfk], [OrderIDfk],
[UnitPrice], [Quantity], [Discount], [OnlineProductIDfk]) VALUES (16, 1, 8, 0, 0,
0, NULL)
GO
INSERT [dbo].[tblOrderDetails] ([OrderDetailsID], [ProductIDfk], [OrderIDfk],
[UnitPrice], [Quantity], [Discount], [OnlineProductIDfk]) VALUES (17, 1, 8, 0, 0,
0, NULL)
GO
INSERT [dbo].[tblOrderDetails] ([OrderDetailsID], [ProductIDfk], [OrderIDfk],
[UnitPrice], [Quantity], [Discount], [OnlineProductIDfk]) VALUES (18, 1, 8, 0, 0,
0, NULL)
GO
INSERT [dbo].[tblOrderDetails] ([OrderDetailsID], [ProductIDfk], [OrderIDfk],
[UnitPrice], [Quantity], [Discount], [OnlineProductIDfk]) VALUES (19, 1, 9, 1, 1,
0, NULL)
GO
INSERT [dbo].[tblOrderDetails] ([OrderDetailsID], [ProductIDfk], [OrderIDfk],
[UnitPrice], [Quantity], [Discount], [OnlineProductIDfk]) VALUES (20, 1, 10, 4500,
15, 0, NULL)
GO
INSERT [dbo].[tblOrderDetails] ([OrderDetailsID], [ProductIDfk], [OrderIDfk],
[UnitPrice], [Quantity], [Discount], [OnlineProductIDfk]) VALUES (21, 2, 10, 10000,
2, 0, NULL)
GO
INSERT [dbo].[tblOrderDetails] ([OrderDetailsID], [ProductIDfk], [OrderIDfk],
[UnitPrice], [Quantity], [Discount], [OnlineProductIDfk]) VALUES (22, 1, 10, 1, 1,
0, NULL)
GO
INSERT [dbo].[tblOrderDetails] ([OrderDetailsID], [ProductIDfk], [OrderIDfk],
[UnitPrice], [Quantity], [Discount], [OnlineProductIDfk]) VALUES (23, 1, 10, 0, 0,
0, NULL)
GO
INSERT [dbo].[tblOrderDetails] ([OrderDetailsID], [ProductIDfk], [OrderIDfk],
[UnitPrice], [Quantity], [Discount], [OnlineProductIDfk]) VALUES (24, 1, 11, 1, 1,
0, NULL)
GO
INSERT [dbo].[tblOrderDetails] ([OrderDetailsID], [ProductIDfk], [OrderIDfk],
[UnitPrice], [Quantity], [Discount], [OnlineProductIDfk]) VALUES (25, 1, 12, 5000,
1, 0, NULL)
GO
INSERT [dbo].[tblOrderDetails] ([OrderDetailsID], [ProductIDfk], [OrderIDfk],
[UnitPrice], [Quantity], [Discount], [OnlineProductIDfk]) VALUES (26, 1, 13, 5000,
2, 0, NULL)
GO
INSERT [dbo].[tblOrderDetails] ([OrderDetailsID], [ProductIDfk], [OrderIDfk],
[UnitPrice], [Quantity], [Discount], [OnlineProductIDfk]) VALUES (27, 1, 13, 5000,
2, 1, NULL)
GO
INSERT [dbo].[tblOrderDetails] ([OrderDetailsID], [ProductIDfk], [OrderIDfk],
[UnitPrice], [Quantity], [Discount], [OnlineProductIDfk]) VALUES (28, 1, 13, 0, 0,
0, NULL)
GO
INSERT [dbo].[tblOrderDetails] ([OrderDetailsID], [ProductIDfk], [OrderIDfk],
[UnitPrice], [Quantity], [Discount], [OnlineProductIDfk]) VALUES (29, 1, 14, 5000,
1, 0, NULL)
GO
INSERT [dbo].[tblOrderDetails] ([OrderDetailsID], [ProductIDfk], [OrderIDfk],
[UnitPrice], [Quantity], [Discount], [OnlineProductIDfk]) VALUES (30, 1, 15, 5000,
10, 0, NULL)
GO
INSERT [dbo].[tblOrderDetails] ([OrderDetailsID], [ProductIDfk], [OrderIDfk],
[UnitPrice], [Quantity], [Discount], [OnlineProductIDfk]) VALUES (31, 1, 15, 5000,
1, 0, NULL)
GO
INSERT [dbo].[tblOrderDetails] ([OrderDetailsID], [ProductIDfk], [OrderIDfk],
[UnitPrice], [Quantity], [Discount], [OnlineProductIDfk]) VALUES (32, 1, 15, 5000,
1, 0, NULL)
GO
INSERT [dbo].[tblOrderDetails] ([OrderDetailsID], [ProductIDfk], [OrderIDfk],
[UnitPrice], [Quantity], [Discount], [OnlineProductIDfk]) VALUES (33, 1, 15, 5000,
1, 0, NULL)
GO
INSERT [dbo].[tblOrderDetails] ([OrderDetailsID], [ProductIDfk], [OrderIDfk],
[UnitPrice], [Quantity], [Discount], [OnlineProductIDfk]) VALUES (34, 1, 14, 0, 0,
0, NULL)
GO
INSERT [dbo].[tblOrderDetails] ([OrderDetailsID], [ProductIDfk], [OrderIDfk],
[UnitPrice], [Quantity], [Discount], [OnlineProductIDfk]) VALUES (35, 1, 15, 0, 0,
0, NULL)
GO
INSERT [dbo].[tblOrderDetails] ([OrderDetailsID], [ProductIDfk], [OrderIDfk],
[UnitPrice], [Quantity], [Discount], [OnlineProductIDfk]) VALUES (36, 1, 15, 0, 0,
0, NULL)
GO
INSERT [dbo].[tblOrderDetails] ([OrderDetailsID], [ProductIDfk], [OrderIDfk],
[UnitPrice], [Quantity], [Discount], [OnlineProductIDfk]) VALUES (37, 1, 15, 0, 0,
0, NULL)
GO
INSERT [dbo].[tblOrderDetails] ([OrderDetailsID], [ProductIDfk], [OrderIDfk],
[UnitPrice], [Quantity], [Discount], [OnlineProductIDfk]) VALUES (38, 1, 15, 0, 0,
0, NULL)
GO
INSERT [dbo].[tblOrderDetails] ([OrderDetailsID], [ProductIDfk], [OrderIDfk],
[UnitPrice], [Quantity], [Discount], [OnlineProductIDfk]) VALUES (39, 1, 15, 0, 0,
0, NULL)
GO
INSERT [dbo].[tblOrderDetails] ([OrderDetailsID], [ProductIDfk], [OrderIDfk],
[UnitPrice], [Quantity], [Discount], [OnlineProductIDfk]) VALUES (40, 1, 15, 0, 0,
0, NULL)
GO
INSERT [dbo].[tblOrderDetails] ([OrderDetailsID], [ProductIDfk], [OrderIDfk],
[UnitPrice], [Quantity], [Discount], [OnlineProductIDfk]) VALUES (41, 1, 16, 10000,
15, 0, NULL)
GO
INSERT [dbo].[tblOrderDetails] ([OrderDetailsID], [ProductIDfk], [OrderIDfk],
[UnitPrice], [Quantity], [Discount], [OnlineProductIDfk]) VALUES (42, 1, 16, 5000,
1, 0, NULL)
GO
INSERT [dbo].[tblOrderDetails] ([OrderDetailsID], [ProductIDfk], [OrderIDfk],
[UnitPrice], [Quantity], [Discount], [OnlineProductIDfk]) VALUES (43, 1, 17, 5000,
1, 0, NULL)
GO
INSERT [dbo].[tblOrderDetails] ([OrderDetailsID], [ProductIDfk], [OrderIDfk],
[UnitPrice], [Quantity], [Discount], [OnlineProductIDfk]) VALUES (44, 3, 17, 5250,
1, 0, NULL)
GO
INSERT [dbo].[tblOrderDetails] ([OrderDetailsID], [ProductIDfk], [OrderIDfk],
[UnitPrice], [Quantity], [Discount], [OnlineProductIDfk]) VALUES (45, 3, 17, 5250,
1, 0, NULL)
GO
INSERT [dbo].[tblOrderDetails] ([OrderDetailsID], [ProductIDfk], [OrderIDfk],
[UnitPrice], [Quantity], [Discount], [OnlineProductIDfk]) VALUES (46, 3, 17, 5250,
1, 0, NULL)
GO
INSERT [dbo].[tblOrderDetails] ([OrderDetailsID], [ProductIDfk], [OrderIDfk],
[UnitPrice], [Quantity], [Discount], [OnlineProductIDfk]) VALUES (47, 1, 18, 5000,
2, 0, NULL)
GO
INSERT [dbo].[tblOrderDetails] ([OrderDetailsID], [ProductIDfk], [OrderIDfk],
[UnitPrice], [Quantity], [Discount], [OnlineProductIDfk]) VALUES (48, 2, 18, 10000,
2, 0, NULL)
GO
INSERT [dbo].[tblOrderDetails] ([OrderDetailsID], [ProductIDfk], [OrderIDfk],
[UnitPrice], [Quantity], [Discount], [OnlineProductIDfk]) VALUES (49, 1, 19, 5000,
2, 0, NULL)
GO
INSERT [dbo].[tblOrderDetails] ([OrderDetailsID], [ProductIDfk], [OrderIDfk],
[UnitPrice], [Quantity], [Discount], [OnlineProductIDfk]) VALUES (50, 1, 19, 5000,
2, 0, NULL)
GO
INSERT [dbo].[tblOrderDetails] ([OrderDetailsID], [ProductIDfk], [OrderIDfk],
[UnitPrice], [Quantity], [Discount], [OnlineProductIDfk]) VALUES (51, 1, 10, 0, 0,
0, NULL)
GO
INSERT [dbo].[tblOrderDetails] ([OrderDetailsID], [ProductIDfk], [OrderIDfk],
[UnitPrice], [Quantity], [Discount], [OnlineProductIDfk]) VALUES (52, 1, 20, 5000,
1, 0, NULL)
GO
INSERT [dbo].[tblOrderDetails] ([OrderDetailsID], [ProductIDfk], [OrderIDfk],
[UnitPrice], [Quantity], [Discount], [OnlineProductIDfk]) VALUES (53, 1, 21, 5000,
10, 0, NULL)
GO
INSERT [dbo].[tblOrderDetails] ([OrderDetailsID], [ProductIDfk], [OrderIDfk],
[UnitPrice], [Quantity], [Discount], [OnlineProductIDfk]) VALUES (54, 2, 21, 10000,
20, 0, NULL)
GO
INSERT [dbo].[tblOrderDetails] ([OrderDetailsID], [ProductIDfk], [OrderIDfk],
[UnitPrice], [Quantity], [Discount], [OnlineProductIDfk]) VALUES (55, 1, 22, 5000,
15, 0, NULL)
GO
INSERT [dbo].[tblOrderDetails] ([OrderDetailsID], [ProductIDfk], [OrderIDfk],
[UnitPrice], [Quantity], [Discount], [OnlineProductIDfk]) VALUES (56, 1, 22, 10000,
10, 1, NULL)
GO
INSERT [dbo].[tblOrderDetails] ([OrderDetailsID], [ProductIDfk], [OrderIDfk],
[UnitPrice], [Quantity], [Discount], [OnlineProductIDfk]) VALUES (57, 1, 23, 5000,
1, 0, NULL)
GO
INSERT [dbo].[tblOrderDetails] ([OrderDetailsID], [ProductIDfk], [OrderIDfk],
[UnitPrice], [Quantity], [Discount], [OnlineProductIDfk]) VALUES (58, 1, 23, 5000,
1, 0, NULL)
GO
INSERT [dbo].[tblOrderDetails] ([OrderDetailsID], [ProductIDfk], [OrderIDfk],
[UnitPrice], [Quantity], [Discount], [OnlineProductIDfk]) VALUES (60, NULL, 24,
5000, 1, 0, 1)
GO
INSERT [dbo].[tblOrderDetails] ([OrderDetailsID], [ProductIDfk], [OrderIDfk],
[UnitPrice], [Quantity], [Discount], [OnlineProductIDfk]) VALUES (61, 2, 25, 10000,
90, 0, NULL)
GO
INSERT [dbo].[tblOrderDetails] ([OrderDetailsID], [ProductIDfk], [OrderIDfk],
[UnitPrice], [Quantity], [Discount], [OnlineProductIDfk]) VALUES (62, 1, 25, 5000,
2, 0, NULL)
GO
SET IDENTITY_INSERT [dbo].[tblOrderDetails] OFF
GO
SET IDENTITY_INSERT [dbo].[tblOrders] ON
GO
INSERT [dbo].[tblOrders] ([OrderID], [CostumerIDfk], [EmployeeIDfk], [AgentIDfk],
[OrderNo], [OrderDate], [Paied]) VALUES (2, NULL, 2, 1, 1, N'1-1-2019', 1000)
GO
INSERT [dbo].[tblOrders] ([OrderID], [CostumerIDfk], [EmployeeIDfk], [AgentIDfk],
[OrderNo], [OrderDate], [Paied]) VALUES (3, NULL, 2, 1, 2, N'1-1-2019', 500)
GO
INSERT [dbo].[tblOrders] ([OrderID], [CostumerIDfk], [EmployeeIDfk], [AgentIDfk],
[OrderNo], [OrderDate], [Paied]) VALUES (4, NULL, 2, 1, 3, N'1-1-2019', 400)
GO
INSERT [dbo].[tblOrders] ([OrderID], [CostumerIDfk], [EmployeeIDfk], [AgentIDfk],
[OrderNo], [OrderDate], [Paied]) VALUES (5, NULL, 2, 1, 4, N'1-1-2019', 100)
GO
INSERT [dbo].[tblOrders] ([OrderID], [CostumerIDfk], [EmployeeIDfk], [AgentIDfk],
[OrderNo], [OrderDate], [Paied]) VALUES (6, NULL, 2, 1, 5, N'1-1-2019', 1000)
GO
INSERT [dbo].[tblOrders] ([OrderID], [CostumerIDfk], [EmployeeIDfk], [AgentIDfk],
[OrderNo], [OrderDate], [Paied]) VALUES (7, NULL, 2, 1, 6, N'1-1-2019', 275000)
GO
INSERT [dbo].[tblOrders] ([OrderID], [CostumerIDfk], [EmployeeIDfk], [AgentIDfk],
[OrderNo], [OrderDate], [Paied]) VALUES (8, NULL, 2, 1, 7, N'1-1-2019', 100)
GO
INSERT [dbo].[tblOrders] ([OrderID], [CostumerIDfk], [EmployeeIDfk], [AgentIDfk],
[OrderNo], [OrderDate], [Paied]) VALUES (9, NULL, 2, 1, 8, N'1-1-2019', 1)
GO
INSERT [dbo].[tblOrders] ([OrderID], [CostumerIDfk], [EmployeeIDfk], [AgentIDfk],
[OrderNo], [OrderDate], [Paied]) VALUES (10, NULL, 2, 1, 9, N'1-1-2019', 60)
GO
INSERT [dbo].[tblOrders] ([OrderID], [CostumerIDfk], [EmployeeIDfk], [AgentIDfk],
[OrderNo], [OrderDate], [Paied]) VALUES (11, NULL, 2, 1, 10, N'1-1-2019', 1)
GO
INSERT [dbo].[tblOrders] ([OrderID], [CostumerIDfk], [EmployeeIDfk], [AgentIDfk],
[OrderNo], [OrderDate], [Paied]) VALUES (12, NULL, 2, 1, 11, N'1-1-2019', 250)
GO
INSERT [dbo].[tblOrders] ([OrderID], [CostumerIDfk], [EmployeeIDfk], [AgentIDfk],
[OrderNo], [OrderDate], [Paied]) VALUES (13, NULL, 2, 1, 12, N'2-1-2019', 1000)
GO
INSERT [dbo].[tblOrders] ([OrderID], [CostumerIDfk], [EmployeeIDfk], [AgentIDfk],
[OrderNo], [OrderDate], [Paied]) VALUES (14, NULL, 2, 1, 13, N'1-1-2019', 100)
GO
INSERT [dbo].[tblOrders] ([OrderID], [CostumerIDfk], [EmployeeIDfk], [AgentIDfk],
[OrderNo], [OrderDate], [Paied]) VALUES (15, NULL, 2, 1, 14, N'1-3-2019', 2000)
GO
INSERT [dbo].[tblOrders] ([OrderID], [CostumerIDfk], [EmployeeIDfk], [AgentIDfk],
[OrderNo], [OrderDate], [Paied]) VALUES (16, NULL, 2, 1, 15, N'2-1-2019', 155000)
GO
INSERT [dbo].[tblOrders] ([OrderID], [CostumerIDfk], [EmployeeIDfk], [AgentIDfk],
[OrderNo], [OrderDate], [Paied]) VALUES (17, NULL, 2, 1, 16, N'1-1-2019', 3000)
GO
INSERT [dbo].[tblOrders] ([OrderID], [CostumerIDfk], [EmployeeIDfk], [AgentIDfk],
[OrderNo], [OrderDate], [Paied]) VALUES (18, NULL, 2, 1, 17, N'2-2-2019', 2000)
GO
INSERT [dbo].[tblOrders] ([OrderID], [CostumerIDfk], [EmployeeIDfk], [AgentIDfk],
[OrderNo], [OrderDate], [Paied]) VALUES (19, NULL, 2, 1, 18, N'1-1-2019', 500)
GO
INSERT [dbo].[tblOrders] ([OrderID], [CostumerIDfk], [EmployeeIDfk], [AgentIDfk],
[OrderNo], [OrderDate], [Paied]) VALUES (20, NULL, 2, 1, 19, N'2019-02-14', 1000)
GO
INSERT [dbo].[tblOrders] ([OrderID], [CostumerIDfk], [EmployeeIDfk], [AgentIDfk],
[OrderNo], [OrderDate], [Paied]) VALUES (21, NULL, 2, 1, 20, N'2019-02-14', 100)
GO
INSERT [dbo].[tblOrders] ([OrderID], [CostumerIDfk], [EmployeeIDfk], [AgentIDfk],
[OrderNo], [OrderDate], [Paied]) VALUES (22, NULL, 2, 1, 21, N'2019-02-22', 1000)
GO
INSERT [dbo].[tblOrders] ([OrderID], [CostumerIDfk], [EmployeeIDfk], [AgentIDfk],
[OrderNo], [OrderDate], [Paied]) VALUES (23, NULL, 2, 1, 22, N'2019-02-24', 4000)
GO
INSERT [dbo].[tblOrders] ([OrderID], [CostumerIDfk], [EmployeeIDfk], [AgentIDfk],
[OrderNo], [OrderDate], [Paied]) VALUES (24, 1, NULL, NULL, 3, N'2019-02-24', 1000)
GO
INSERT [dbo].[tblOrders] ([OrderID], [CostumerIDfk], [EmployeeIDfk], [AgentIDfk],
[OrderNo], [OrderDate], [Paied]) VALUES (25, NULL, 2, 2, 454, N'2019-03-11', 4000)
GO
SET IDENTITY_INSERT [dbo].[tblOrders] OFF
GO
SET IDENTITY_INSERT [dbo].[tblProduct] ON
GO
INSERT [dbo].[tblProduct] ([ProductID], [ProductName], [ProductUnitPrice]) VALUES
(1, N'Telephone Card 5', N'4500 ')
GO
INSERT [dbo].[tblProduct] ([ProductID], [ProductName], [ProductUnitPrice]) VALUES
(2, N'Telephone Card 10', N'9500 ')
GO
INSERT [dbo].[tblProduct] ([ProductID], [ProductName], [ProductUnitPrice]) VALUES
(3, N'Wireless Card 5', N'4750 ')
GO
INSERT [dbo].[tblProduct] ([ProductID], [ProductName], [ProductUnitPrice]) VALUES
(4, N'Wireless Card 10', N'9750 ')
GO
SET IDENTITY_INSERT [dbo].[tblProduct] OFF
GO
SET IDENTITY_INSERT [dbo].[tblProductCategory] ON
GO
INSERT [dbo].[tblProductCategory] ([ProductCategoryID], [ProductCategory],
[ProductCategoryDescription]) VALUES (1, N'Telephone Card 5', N'Telephone Card 5')
GO
INSERT [dbo].[tblProductCategory] ([ProductCategoryID], [ProductCategory],
[ProductCategoryDescription]) VALUES (2, N'Telephone Card 10', N'Telephone Card
10')
GO
INSERT [dbo].[tblProductCategory] ([ProductCategoryID], [ProductCategory],
[ProductCategoryDescription]) VALUES (3, N'Wireless Card 5', N'Wireless Card 5')
GO
INSERT [dbo].[tblProductCategory] ([ProductCategoryID], [ProductCategory],
[ProductCategoryDescription]) VALUES (4, N'Wireless Card 10', N'Wireless Card 10')
GO
SET IDENTITY_INSERT [dbo].[tblProductCategory] OFF
GO
ALTER TABLE [dbo].[tblEmployee] ADD CONSTRAINT [DF_tblEmployee_TokenID] DEFAULT
(newid()) FOR [TokenID]
GO
ALTER TABLE [dbo].[tblOnlineProduct] ADD CONSTRAINT
[DF_tblOnlineProduct_OnlineProductValid] DEFAULT ((0)) FOR [OnlineProductValid]
GO
ALTER TABLE [dbo].[tblCustomerCreditCard] WITH CHECK ADD CONSTRAINT
[FK_tblCustomerCreditCard_tblCustomer] FOREIGN KEY([CustomerIDfk])
REFERENCES [dbo].[tblCustomer] ([CustomerID])
GO
ALTER TABLE [dbo].[tblCustomerCreditCard] CHECK CONSTRAINT
[FK_tblCustomerCreditCard_tblCustomer]
GO
ALTER TABLE [dbo].[tblOnlineProduct] WITH CHECK ADD CONSTRAINT
[FK_tblOnlineProduct_tblProductCategory] FOREIGN KEY([OnlineProductCategoryIDfk])
REFERENCES [dbo].[tblProductCategory] ([ProductCategoryID])
GO
ALTER TABLE [dbo].[tblOnlineProduct] CHECK CONSTRAINT
[FK_tblOnlineProduct_tblProductCategory]
GO
ALTER TABLE [dbo].[tblOrderDetails] WITH CHECK ADD CONSTRAINT
[FK_tblOrderDetails_tblOnlineProduct] FOREIGN KEY([OnlineProductIDfk])
REFERENCES [dbo].[tblOnlineProduct] ([OnlineProductID])
GO
ALTER TABLE [dbo].[tblOrderDetails] CHECK CONSTRAINT
[FK_tblOrderDetails_tblOnlineProduct]
GO
ALTER TABLE [dbo].[tblOrderDetails] WITH CHECK ADD CONSTRAINT
[FK_tblOrderDetails_tblOrders] FOREIGN KEY([OrderIDfk])
REFERENCES [dbo].[tblOrders] ([OrderID])
GO
ALTER TABLE [dbo].[tblOrderDetails] CHECK CONSTRAINT [FK_tblOrderDetails_tblOrders]
GO
ALTER TABLE [dbo].[tblOrderDetails] WITH CHECK ADD CONSTRAINT
[FK_tblOrderDetails_tblProduct] FOREIGN KEY([ProductIDfk])
REFERENCES [dbo].[tblProduct] ([ProductID])
GO
ALTER TABLE [dbo].[tblOrderDetails] CHECK CONSTRAINT
[FK_tblOrderDetails_tblProduct]
GO
ALTER TABLE [dbo].[tblOrders] WITH CHECK ADD CONSTRAINT [FK_tblOrders_tblAgent]
FOREIGN KEY([AgentIDfk])
REFERENCES [dbo].[tblAgent] ([AgentID])
GO
ALTER TABLE [dbo].[tblOrders] CHECK CONSTRAINT [FK_tblOrders_tblAgent]
GO
ALTER TABLE [dbo].[tblOrders] WITH CHECK ADD CONSTRAINT
[FK_tblOrders_tblCustomer] FOREIGN KEY([CostumerIDfk])
REFERENCES [dbo].[tblCustomer] ([CustomerID])
GO
ALTER TABLE [dbo].[tblOrders] CHECK CONSTRAINT [FK_tblOrders_tblCustomer]
GO
ALTER TABLE [dbo].[tblOrders] WITH CHECK ADD CONSTRAINT
[FK_tblOrders_tblEmployee] FOREIGN KEY([EmployeeIDfk])
REFERENCES [dbo].[tblEmployee] ([EmployeeID])
GO
ALTER TABLE [dbo].[tblOrders] CHECK CONSTRAINT [FK_tblOrders_tblEmployee]
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[40] 4[20] 2[20] 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 = "tblOrderDetails"
Begin Extent =
Top = 6
Left = 38
Bottom = 181
Right = 221
End
DisplayFlags = 280
TopColumn = 0
End
Begin Table = "tblProduct"
Begin Extent =
Top = 6
Left = 259
Bottom = 118
Right = 438
End
DisplayFlags = 280
TopColumn = 0
End
Begin Table = "tblOrders"
Begin Extent =
Top = 6
Left = 476
Bottom = 135
Right = 646
End
DisplayFlags = 280
TopColumn = 2
End
End
End
Begin SQLPane =
End
Begin DataPane =
Begin ParameterDefaults = ""
End
Begin ColumnWidths = 9
Width = 284
Width = 1500
Width = 1500
Width = 1500
Width = 1500
Width = 1500
Width = 1500
Width = 1500
Width = 1500
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 = 1350
End
End
End
' , @level0type=N'SCHEMA',@level0name=N'dbo',
@level1type=N'VIEW',@level1name=N'View_1'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_DiagramPaneCount', @value=1 ,
@level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'VIEW',@level1name=N'View_1'
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[29] 4[23] 2[20] 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 = "tblAgent"
Begin Extent =
Top = 6
Left = 38
Bottom = 135
Right = 214
End
DisplayFlags = 280
TopColumn = 0
End
Begin Table = "tblOrders"
Begin Extent =
Top = 6
Left = 252
Bottom = 173
Right = 422
End
DisplayFlags = 280
TopColumn = 1
End
Begin Table = "tblOrderDetails"
Begin Extent =
Top = 0
Left = 461
Bottom = 188
Right = 648
End
DisplayFlags = 280
TopColumn = 0
End
End
End
Begin SQLPane =
End
Begin DataPane =
Begin ParameterDefaults = ""
End
Begin ColumnWidths = 9
Width = 284
Width = 1500
Width = 1500
Width = 1500
Width = 2100
Width = 1500
Width = 1500
Width = 1500
Width = 1500
End
End
Begin CriteriaPane =
Begin ColumnWidths = 12
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 = 1350
End
End
End
' , @level0type=N'SCHEMA',@level0name=N'dbo',
@level1type=N'VIEW',@level1name=N'ViewAgentAccount'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_DiagramPaneCount', @value=1 ,
@level0type=N'SCHEMA',@level0name=N'dbo',
@level1type=N'VIEW',@level1name=N'ViewAgentAccount'
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[20] 4[37] 2[24] 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 = "tblOrders"
Begin Extent =
Top = 0
Left = 351
Bottom = 186
Right = 534
End
DisplayFlags = 280
TopColumn = 0
End
Begin Table = "tblOrderDetails"
Begin Extent =
Top = 0
Left = 592
Bottom = 188
Right = 781
End
DisplayFlags = 280
TopColumn = 0
End
Begin Table = "tblAgent"
Begin Extent =
Top = 102
Left = 0
Bottom = 231
Right = 176
End
DisplayFlags = 280
TopColumn = 0
End
End
End
Begin SQLPane =
End
Begin DataPane =
Begin ParameterDefaults = ""
End
Begin ColumnWidths = 9
Width = 284
Width = 1500
Width = 1500
Width = 1500
Width = 1500
Width = 1500
Width = 1500
Width = 1500
Width = 1500
End
End
Begin CriteriaPane =
Begin ColumnWidths = 12
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 = 1350
End
End
End
' , @level0type=N'SCHEMA',@level0name=N'dbo',
@level1type=N'VIEW',@level1name=N'ViewAgentDepts'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_DiagramPaneCount', @value=1 ,
@level0type=N'SCHEMA',@level0name=N'dbo',
@level1type=N'VIEW',@level1name=N'ViewAgentDepts'
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[41] 4[21] 2[17] 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 = "tblOrders"
Begin Extent =
Top = 6
Left = 268
Bottom = 135
Right = 454
End
DisplayFlags = 280
TopColumn = 0
End
Begin Table = "tblOrderDetails"
Begin Extent =
Top = 6
Left = 492
Bottom = 135
Right = 695
End
DisplayFlags = 280
TopColumn = 0
End
Begin Table = "tblCustomer"
Begin Extent =
Top = 7
Left = 16
Bottom = 154
Right = 215
End
DisplayFlags = 280
TopColumn = 0
End
End
End
Begin SQLPane =
End
Begin DataPane =
Begin ParameterDefaults = ""
End
Begin ColumnWidths = 9
Width = 284
Width = 1500
Width = 1500
Width = 1500
Width = 1500
Width = 1500
Width = 1500
Width = 1500
Width = 1500
End
End
Begin CriteriaPane =
Begin ColumnWidths = 12
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 = 1350
End
End
End
' , @level0type=N'SCHEMA',@level0name=N'dbo',
@level1type=N'VIEW',@level1name=N'ViewCostumerAccount'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_DiagramPaneCount', @value=1 ,
@level0type=N'SCHEMA',@level0name=N'dbo',
@level1type=N'VIEW',@level1name=N'ViewCostumerAccount'
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[41] 4[28] 2[13] 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 = "tblProduct"
Begin Extent =
Top = 6
Left = 38
Bottom = 118
Right = 217
End
DisplayFlags = 280
TopColumn = 0
End
Begin Table = "tblOrderDetails"
Begin Extent =
Top = 43
Left = 319
Bottom = 198
Right = 511
End
DisplayFlags = 280
TopColumn = 0
End
Begin Table = "tblOrders"
Begin Extent =
Top = 21
Left = 540
Bottom = 188
Right = 710
End
DisplayFlags = 280
TopColumn = 0
End
End
End
Begin SQLPane =
End
Begin DataPane =
Begin ParameterDefaults = ""
End
Begin ColumnWidths = 9
Width = 284
Width = 1500
Width = 1875
Width = 1500
Width = 1500
Width = 1500
Width = 1500
Width = 1500
Width = 1500
End
End
Begin CriteriaPane =
Begin ColumnWidths = 11
Column = 2175
Alias = 900
Table = 1170
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'ViewGains'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_DiagramPaneCount', @value=1 ,
@level0type=N'SCHEMA',@level0name=N'dbo',
@level1type=N'VIEW',@level1name=N'ViewGains'
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[31] 4[30] 2[21] 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 = "tblOnlineProduct"
Begin Extent =
Top = 6
Left = 38
Bottom = 135
Right = 273
End
DisplayFlags = 280
TopColumn = 0
End
Begin Table = "tblOrderDetails"
Begin Extent =
Top = 6
Left = 311
Bottom = 135
Right = 498
End
DisplayFlags = 280
TopColumn = 0
End
Begin Table = "tblOrders"
Begin Extent =
Top = 6
Left = 536
Bottom = 135
Right = 706
End
DisplayFlags = 280
TopColumn = 2
End
End
End
Begin SQLPane =
End
Begin DataPane =
Begin ParameterDefaults = ""
End
Begin ColumnWidths = 9
Width = 284
Width = 2265
Width = 1500
Width = 1500
Width = 1500
Width = 1500
Width = 1500
Width = 1500
Width = 1500
End
End
Begin CriteriaPane =
Begin ColumnWidths = 11
Column = 1440
Alias = 1275
Table = 1170
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'ViewOnlineGains'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_DiagramPaneCount', @value=1 ,
@level0type=N'SCHEMA',@level0name=N'dbo',
@level1type=N'VIEW',@level1name=N'ViewOnlineGains'
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[41] 4[31] 2[12] 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 = "ViewAgentAccount"
Begin Extent =
Top = 6
Left = 38
Bottom = 199
Right = 225
End
DisplayFlags = 280
TopColumn = 0
End
End
End
Begin SQLPane =
End
Begin DataPane =
Begin ParameterDefaults = ""
End
Begin ColumnWidths = 9
Width = 284
Width = 1500
Width = 1500
Width = 1500
Width = 1500
Width = 1500
Width = 1500
Width = 1500
Width = 1500
End
End
Begin CriteriaPane =
Begin ColumnWidths = 12
Column = 1440
Alias = 1620
Table = 1170
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'ViewSumOf Agent'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_DiagramPaneCount', @value=1 ,
@level0type=N'SCHEMA',@level0name=N'dbo',
@level1type=N'VIEW',@level1name=N'ViewSumOf Agent'
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[41] 4[26] 2[15] 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 = "ViewCostumerAccount"
Begin Extent =
Top = 6
Left = 277
Bottom = 196
Right = 479
End
DisplayFlags = 280
TopColumn = 0
End
End
End
Begin SQLPane =
End
Begin DataPane =
Begin ParameterDefaults = ""
End
Begin ColumnWidths = 9
Width = 284
Width = 1500
Width = 1500
Width = 1500
Width = 1500
Width = 1500
Width = 1500
Width = 1500
Width = 1500
End
End
Begin CriteriaPane =
Begin ColumnWidths = 12
Column = 1440
Alias = 900
Table = 1905
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'ViewSumOfCostumer'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_DiagramPaneCount', @value=1 ,
@level0type=N'SCHEMA',@level0name=N'dbo',
@level1type=N'VIEW',@level1name=N'ViewSumOfCostumer'
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[27] 4[30] 2[16] 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 = "tblOrderDetails"
Begin Extent =
Top = 6
Left = 38
Bottom = 178
Right = 221
End
DisplayFlags = 280
TopColumn = 0
End
End
End
Begin SQLPane =
End
Begin DataPane =
Begin ParameterDefaults = ""
End
Begin ColumnWidths = 9
Width = 284
Width = 1500
Width = 1500
Width = 1500
Width = 1500
Width = 1500
Width = 1500
Width = 1500
Width = 1500
End
End
Begin CriteriaPane =
Begin ColumnWidths = 12
Column = 1920
Alias = 900
Table = 1170
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'viewTotal'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_DiagramPaneCount', @value=1 ,
@level0type=N'SCHEMA',@level0name=N'dbo',
@level1type=N'VIEW',@level1name=N'viewTotal'
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[40] 4[20] 2[20] 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 = "tblOnlineProduct"
Begin Extent =
Top = 6
Left = 38
Bottom = 135
Right = 289
End
DisplayFlags = 280
TopColumn = 0
End
Begin Table = "tblProductCategory"
Begin Extent =
Top = 6
Left = 327
Bottom = 118
Right = 582
End
DisplayFlags = 280
TopColumn = 0
End
End
End
Begin SQLPane =
End
Begin DataPane =
Begin ParameterDefaults = ""
End
Begin ColumnWidths = 9
Width = 284
Width = 1815
Width = 1500
Width = 1500
Width = 1500
Width = 1500
Width = 1500
Width = 1500
Width = 1500
End
End
Begin CriteriaPane =
Begin ColumnWidths = 12
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 = 1350
End
End
End
' , @level0type=N'SCHEMA',@level0name=N'dbo',
@level1type=N'VIEW',@level1name=N'viewUnValidProduct'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_DiagramPaneCount', @value=1 ,
@level0type=N'SCHEMA',@level0name=N'dbo',
@level1type=N'VIEW',@level1name=N'viewUnValidProduct'
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[28] 4[22] 2[24] 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 = "viewValidProduct"
Begin Extent =
Top = 6
Left = 38
Bottom = 130
Right = 232
End
DisplayFlags = 280
TopColumn = 0
End
Begin Table = "viewUnValidProduct"
Begin Extent =
Top = 6
Left = 268
Bottom = 129
Right = 460
End
DisplayFlags = 280
TopColumn = 0
End
End
End
Begin SQLPane =
End
Begin DataPane =
Begin ParameterDefaults = ""
End
Begin ColumnWidths = 9
Width = 284
Width = 1785
Width = 1500
Width = 1500
Width = 1500
Width = 1500
Width = 1500
Width = 1500
Width = 1500
End
End
Begin CriteriaPane =
Begin ColumnWidths = 12
Column = 2130
Alias = 900
Table = 1170
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'viewValidCards'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_DiagramPaneCount', @value=1 ,
@level0type=N'SCHEMA',@level0name=N'dbo',
@level1type=N'VIEW',@level1name=N'viewValidCards'
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[33] 4[25] 2[17] 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 = "tblOnlineProduct"
Begin Extent =
Top = 6
Left = 38
Bottom = 195
Right = 274
End
DisplayFlags = 280
TopColumn = 0
End
Begin Table = "tblProductCategory"
Begin Extent =
Top = 6
Left = 312
Bottom = 118
Right = 551
End
DisplayFlags = 280
TopColumn = 0
End
End
End
Begin SQLPane =
End
Begin DataPane =
Begin ParameterDefaults = ""
End
Begin ColumnWidths = 9
Width = 284
Width = 1710
Width = 1815
Width = 2175
Width = 1500
Width = 1500
Width = 1500
Width = 1500
Width = 1500
End
End
Begin CriteriaPane =
Begin ColumnWidths = 12
Column = 2655
Alias = 900
Table = 1440
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'viewValidProduct'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_DiagramPaneCount', @value=1 ,
@level0type=N'SCHEMA',@level0name=N'dbo',
@level1type=N'VIEW',@level1name=N'viewValidProduct'
GO