or
CREATE
TABLE
[dbo].[Security_Role_To_Webpage](
[ID] [
int
] IDENTITY(1,1)
NOT
NULL
,
[webpage_name] [
varchar
](200)
NULL
,
[security_role_id] [
int
]
NULL
,
[add_privledge] [
bit
]
NULL
,
[edit_privledge] [
bit
]
NULL
,
[delete_privledge] [
bit
]
NULL
,
[view_privledge] [
bit
]
NULL
,
CONSTRAINT
[PK_security_role_to_webpage]
PRIMARY
KEY
CLUSTERED
(
[ID]
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
SET
ANSI_PADDING
OFF
GO
ALTER
TABLE
[dbo].[Security_Role_To_Webpage]
ADD
CONSTRAINT
[DF_Security_Role_To_Webpage_add_privledge]
DEFAULT
((0))
FOR
[add_privledge]
GO
ALTER
TABLE
[dbo].[Security_Role_To_Webpage]
ADD
CONSTRAINT
[DF_Security_Role_To_Webpage_edit_privledge]
DEFAULT
((0))
FOR
[edit_privledge]
GO
ALTER
TABLE
[dbo].[Security_Role_To_Webpage]
ADD
CONSTRAINT
[DF_Security_Role_To_Webpage_delete_privledge]
DEFAULT
((0))
FOR
[delete_privledge]
GO
ALTER
TABLE
[dbo].[Security_Role_To_Webpage]
ADD
CONSTRAINT
[DF_Security_Role_To_Webpage_view_privledge]
DEFAULT
((0))
FOR
[view_privledge]
GO
ALTER
TABLE
[dbo].[Security_Role_To_Webpage]
WITH
CHECK
ADD
CONSTRAINT
[FK__security___secur__60A75C0F]
FOREIGN
KEY
([security_role_id])
REFERENCES
[dbo].[Security_Role] ([ID])
GO
ALTER
TABLE
[dbo].[Security_Role_To_Webpage]
CHECK
CONSTRAINT
[FK__security___secur__60A75C0F]
GO
CREATE
TABLE
[dbo].[Security_Role](
[ID] [
int
] IDENTITY(1,1)
NOT
NULL
,
[Role] [
varchar
](100)
NULL
,
CONSTRAINT
[PK_security_role]
PRIMARY
KEY
CLUSTERED
(
[ID]
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
SET
ANSI_PADDING
OFF
GO
<
DataBinding
SelectMethod
=
"GetAttachmentData"
Location
=
"/FaceToFaceAttachmentUpload"
SortParameterType
=
"List"
FilterParameterType
=
"List"
ResponseType
=
"JSONP"
/>
[WebMethod]
public JsonResult GetAttachmentData(int startRowIndex, int maximumRows, string sortExpression, string filterExpression)
{
List<IAttachment> attachments = new List<IAttachment>();
attachments.Add(new Attachment() { ID = 1, TypeDesc = "test" });
return Json(new { results = attachments });
}
<
div
class
=
"WebpageManagementBox"
>
<
telerik:RadGrid
ID
=
"RadGrid1"
runat
=
"server"
AllowFilteringByColumn
=
"True"
AllowSorting
=
"True"
AutoGenerateDeleteColumn
=
"True"
AutoGenerateEditColumn
=
"True"
DataSourceID
=
"OpenAccessLinqDataSource1"
GroupPanelPosition
=
"Top"
AllowAutomaticDeletes
=
"True"
AllowAutomaticInserts
=
"True"
AllowAutomaticUpdates
=
"True"
>
<
ClientSettings
>
<
Scrolling
AllowScroll
=
"True"
UseStaticHeaders
=
"True"
/>
<
Selecting
AllowRowSelect
=
"true"
/>
</
ClientSettings
>
<
MasterTableView
DataSourceID
=
"OpenAccessLinqDataSource1"
AutoGenerateColumns
=
"false"
>
<
Columns
>
<
telerik:GridBoundColumn
DataField
=
"Webpage_name"
ItemStyle-Width
=
"100px"
FilterControlAltText
=
"Filter Webpage_name column"
HeaderText
=
"Webpage_name"
ReadOnly
=
"True"
SortExpression
=
"Webpage_name"
UniqueName
=
"Webpage_name"
>
<
ColumnValidationSettings
>
<
ModelErrorMessage
Text
=
""
/>
</
ColumnValidationSettings
>
</
telerik:GridBoundColumn
>
<
telerik:GridCheckBoxColumn
DataField
=
"Add_privledge"
DataType
=
"System.Boolean"
FilterControlAltText
=
"Filter Add_privledge column"
HeaderText
=
"Add_privledge"
ReadOnly
=
"False"
SortExpression
=
"Add_privledge"
UniqueName
=
"Add_privledge"
>
</
telerik:GridCheckBoxColumn
>
<
telerik:GridCheckBoxColumn
DataField
=
"Edit_privledge"
DataType
=
"System.Boolean"
FilterControlAltText
=
"Filter Edit_privledge column"
HeaderText
=
"Edit_privledge"
ReadOnly
=
"False"
SortExpression
=
"Edit_privledge"
UniqueName
=
"Edit_privledge"
>
</
telerik:GridCheckBoxColumn
>
<
telerik:GridCheckBoxColumn
DataField
=
"Delete_privledge"
DataType
=
"System.Boolean"
FilterControlAltText
=
"Filter Delete_privledge column"
HeaderText
=
"Delete_privledge"
ReadOnly
=
"False"
SortExpression
=
"Delete_privledge"
UniqueName
=
"Delete_privledge"
>
</
telerik:GridCheckBoxColumn
>
<
telerik:GridCheckBoxColumn
DataField
=
"View_privledge"
DataType
=
"System.Boolean"
FilterControlAltText
=
"Filter View_privledge column"
HeaderText
=
"View_privledge"
ReadOnly
=
"False"
SortExpression
=
"View_privledge"
UniqueName
=
"View_privledge"
>
</
telerik:GridCheckBoxColumn
>
</
Columns
>
</
MasterTableView
>
</
telerik:RadGrid
>
</
div
>
<
telerik:OpenAccessLinqDataSource
ID
=
"OpenAccessLinqDataSource1"
runat
=
"server"
ContextTypeName
=
"GATEModel.EntitiesModel"
EntityTypeName
=
""
ResourceSetName
=
"Security_Role_To_Webpages"
Select
=
"new (Add_privledge, Delete_privledge, Edit_privledge, Security_role_id, View_privledge, Webpage_name)"
>
</
telerik:OpenAccessLinqDataSource
>
USE [GATE]
GO
/****** Object:
Table
[dbo].[Security_Role_To_Webpage] Script
Date
: 2/6/2015 7:51:36 AM ******/
SET
ANSI_NULLS
ON
GO
SET
QUOTED_IDENTIFIER
ON
GO
SET
ANSI_PADDING
ON
GO
CREATE
TABLE
[dbo].[Security_Role_To_Webpage](
[ID] [
int
] IDENTITY(1,1)
NOT
NULL
,
[webpage_name] [
varchar
](200)
NULL
,
[security_role_id] [
int
]
NULL
,
[add_privledge] [
bit
]
NULL
,
[edit_privledge] [
bit
]
NULL
,
[delete_privledge] [
bit
]
NULL
,
[view_privledge] [
bit
]
NULL
,
CONSTRAINT
[PK_security_role_to_webpage]
PRIMARY
KEY
CLUSTERED
(
[ID]
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
SET
ANSI_PADDING
OFF
GO
ALTER
TABLE
[dbo].[Security_Role_To_Webpage]
ADD
CONSTRAINT
[DF_Security_Role_To_Webpage_add_privledge]
DEFAULT
((0))
FOR
[add_privledge]
GO
ALTER
TABLE
[dbo].[Security_Role_To_Webpage]
ADD
CONSTRAINT
[DF_Security_Role_To_Webpage_edit_privledge]
DEFAULT
((0))
FOR
[edit_privledge]
GO
ALTER
TABLE
[dbo].[Security_Role_To_Webpage]
ADD
CONSTRAINT
[DF_Security_Role_To_Webpage_delete_privledge]
DEFAULT
((0))
FOR
[delete_privledge]
GO
ALTER
TABLE
[dbo].[Security_Role_To_Webpage]
ADD
CONSTRAINT
[DF_Security_Role_To_Webpage_view_privledge]
DEFAULT
((0))
FOR
[view_privledge]
GO
ALTER
TABLE
[dbo].[Security_Role_To_Webpage]
WITH
CHECK
ADD
CONSTRAINT
[FK__security___secur__60A75C0F]
FOREIGN
KEY
([security_role_id])
REFERENCES
[dbo].[Security_Role] ([ID])
GO
ALTER
TABLE
[dbo].[Security_Role_To_Webpage]
CHECK
CONSTRAINT
[FK__security___secur__60A75C0F]
GO