or
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default2.aspx.cs" Inherits="Default2" MasterPageFile="~/EUEMain.master" %><%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %><asp:Content ID="Content1" ContentPlaceHolderID="cphLeftNav" runat="Server"> <asp:HyperLink ID="AddNew" runat="server" Text="Add Subdivision" /> <br /> <asp:HyperLink runat="server" ID="CQ_Tickets" Text="CQ Tickets"></asp:HyperLink></asp:Content><asp:Content ID="Content2" ContentPlaceHolderID="cphContent" runat="Server"> <telerik:RadScriptManager runat="server" ID="RadScriptManager1" /> <telerik:RadSkinManager ID="RadSkinManager1" runat="server" ShowChooser="true" /> <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server"> <AjaxSettings> <telerik:AjaxSetting AjaxControlID="RadGrid1"> <UpdatedControls> <telerik:AjaxUpdatedControl ControlID="RadGrid1" LoadingPanelID="RadAjaxLoadingPanel1"></telerik:AjaxUpdatedControl> </UpdatedControls> </telerik:AjaxSetting> </AjaxSettings> </telerik:RadAjaxManager> <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server"> </telerik:RadAjaxLoadingPanel> <div> <telerik:RadGrid ID="RadGrid1" OnPreRender="RadGrid1_PreRender" DataSourceID="SqlDataSource1" runat="server" AutoGenerateColumns="False" AllowSorting="True" AllowMultiRowSelection="False" AllowPaging="True" PageSize="200" GridLines="None" ShowGroupPanel="true" OnItemCreated="RadGrid1_ItemCreated" OnItemUpdated="RadGrid1_ItemUpdated" OnItemCommand="RadGrid1_ItemCommand" AllowAutomaticInserts="True" AllowAutomaticUpdates="True" AllowAutomaticDeletes="True"> <PagerStyle Mode="NumericPages"></PagerStyle> <MasterTableView DataSourceID="SqlDataSource1" DataKeyNames="SubdivisionId" AllowMultiColumnSorting="True" GroupLoadMode="Server"> <NestedViewTemplate> <asp:Panel runat="server" ID="InnerContainer" Visible="False"></asp:Panel> <telerik:RadTabStrip runat="server" ID="TabStip1" MultiPageID="Multipage1" SelectedIndex="0"> <Tabs> <telerik:RadTab runat="server" Text="Details" PageViewID="PageView1"> </telerik:RadTab> <telerik:RadTab runat="server" Text="Collection" PageViewID="PageView3"> </telerik:RadTab> <telerik:RadTab runat="server" Text="Editing" PageViewID="PageView4"> </telerik:RadTab> <telerik:RadTab runat="server" Text="Publishing" PageViewID="PageView5"> </telerik:RadTab> <telerik:RadTab runat="server" Text="Testing" PageViewID="PageView6"> </telerik:RadTab> <telerik:RadTab runat="server" Text="Production" PageViewID="PageView7"> </telerik:RadTab> </Tabs> </telerik:RadTabStrip> <telerik:RadMultiPage runat="server" ID="Multipage1" SelectedIndex="0" RenderSelectedPageOnly="false"> <telerik:RadPageView runat="server" ID="PageView1"> <asp:Label ID="Label1" Font-Bold="true" Font-Italic="true" Text='<%# Eval("SubdivisionId") %>' Visible="False" runat="server"></asp:Label> <telerik:RadGrid runat="server" ID="PrepDetailGrid" DataSourceID="SqlDataSource2" ShowFooter="true" AllowSorting="true" EnableLinqExpressions="false"> <MasterTableView ShowHeader="true" AutoGenerateColumns="False" AllowPaging="true" DataSourceID="SqlDataSource2" DataKeyNames="TrackDatabaseId" PageSize="25" HierarchyLoadMode="ServerOnDemand" EditMode="EditForms"> <Columns> <telerik:GridBoundColumn SortExpression="Version" HeaderText="Version" HeaderButtonType="TextButton" DataField="Version" UniqueName="Version"> </telerik:GridBoundColumn> <telerik:GridBoundColumn SortExpression="Status" HeaderText="Status" HeaderButtonType="TextButton" DataField="SubStatus" UniqueName="Status"> </telerik:GridBoundColumn> <telerik:GridBoundColumn SortExpression="Proposed RSD Date" HeaderText="Proposed RSD Date" HeaderButtonType="TextButton" DataField="ProposedRSDDate" UniqueName="ProposedRSDDate" DataType="System.DateTime" DataFormatString="{0:MM/dd/yyyy}"> </telerik:GridBoundColumn> <telerik:GridBoundColumn SortExpression="Collection" HeaderText="Collection" HeaderButtonType="TextButton" DataField="Collection" UniqueName="Collection"> </telerik:GridBoundColumn> <telerik:GridBoundColumn SortExpression="Extraction" HeaderText="Extraction" HeaderButtonType="TextButton" DataField="Extraction" UniqueName="Extraction"> </telerik:GridBoundColumn> <telerik:GridBoundColumn SortExpression="Editing" HeaderText="Editing" HeaderButtonType="TextButton" DataField="Editing" UniqueName="Editing"> </telerik:GridBoundColumn> <telerik:GridBoundColumn SortExpression="Publishing" HeaderText="Publishing" HeaderButtonType="TextButton" DataField="Publishing" UniqueName="Publishing"> </telerik:GridBoundColumn> <telerik:GridBoundColumn SortExpression="Pre-Val" HeaderText="Pre-Val" HeaderButtonType="TextButton" DataField="Pre-Val" UniqueName="Pre-Val"> </telerik:GridBoundColumn> <telerik:GridBoundColumn SortExpression="V & V" HeaderText="V & V" HeaderButtonType="TextButton" DataField="VandV" UniqueName="VandV"> </telerik:GridBoundColumn> <telerik:GridBoundColumn SortExpression="Loco Lab" HeaderText="Loco Lab" HeaderButtonType="TextButton" DataField="LocoLab" UniqueName="LocoLab"> </telerik:GridBoundColumn> <telerik:GridBoundColumn SortExpression="End 2 End" HeaderText="End 2 End" HeaderButtonType="TextButton" DataField="End 2 End" UniqueName="End2End"> </telerik:GridBoundColumn> <telerik:GridBoundColumn SortExpression="RSD" HeaderText="RSD" HeaderButtonType="TextButton" DataField="Production" UniqueName="RSD"> </telerik:GridBoundColumn> <telerik:GridBoundColumn SortExpression="Out of Service" HeaderText="Out of Service" HeaderButtonType="TextButton" DataField="Out of Service" UniqueName="OutofService"> </telerik:GridBoundColumn> </Columns> </MasterTableView> </telerik:RadGrid> <asp:SqlDataSource ID="SqlDataSource2" ConnectionString="<%$ ConnectionStrings:PtcDbModelEntities %>" ProviderName="System.Data.SqlClient" SelectCommand=" Select [t0].[SubdivisionId], [t1].[Name] AS Subdivision, [t0].[TrackDatabaseId], [t2].[Description] AS SubStatus, [t0].[Version] AS Version, [t0].[ProposedRevenueServiceDate] AS ProposedRSDDate,(CASE WHEN ( ([t0].[ActualCollectionStartDate] IS NOT NULL) AND ([t0].[ActualCollectionEndDate] IS NULL) ) THEN 'P' WHEN ([t0].[ActualCollectionEndDate] IS NOT NULL) THEN 'C' END) AS 'Collection', (CASE WHEN ( ([t0].[ActualExtractionStartDate] IS NOT NULL) AND ([t0].[ActualExtractionEndDate] IS NULL)) THEN 'P' WHEN ([t0].[ActualExtractionEndDate] IS NOT NULL) THEN 'C' END) AS 'Extraction', (CASE WHEN ( ([t0].[ActualEditingStartDate] IS NOT NULL) AND ([t0].[ActualEditingEndDate] IS NULL)) THEN 'P' WHEN ([t0].[ActualEditingEndDate] IS NOT NULL) THEN 'C' END) AS 'Editing', (CASE WHEN ( ([t0].[ActualEditingEndDate] IS NOT NULL) AND ([t0].[ActualVandVStartDate] IS NULL)) THEN 'P' WHEN ( ([t0].[ActualEditingEndDate] IS NOT NULL) AND ([t0].[ActualVandVStartDate] IS NOT NULL) ) THEN 'C' END) AS 'Publishing', (CASE WHEN ( ([t0].[ActualPreValidationStartDate] IS NOT NULL) AND ([t0].[ActualPreValidationEndDate] IS NULL)) THEN 'P' WHEN ([t0].[ActualPreValidationEndDate] IS NOT NULL) THEN 'C' END) AS 'Pre-Val', (CASE WHEN ( ([t0].[ActualVandVStartDate] IS NOT NULL) AND ([t0].[ActualVandVEndDate] IS NULL)) THEN 'P' WHEN ([t0].[ActualVandVEndDate] IS NOT NULL) THEN 'C' END) AS 'VandV', (CASE WHEN ( ([t0].[ActualLabTestingStartDate] IS NOT NULL) AND ([t0].[ActualLabTestingEndDate] IS NULL)) THEN 'P' WHEN ([t0].[ActualLabTestingEndDate] IS NOT NULL) THEN 'C' END) AS 'LocoLab', (CASE WHEN ( ([t0].[ActualE2ERunStartDate] IS NOT NULL) AND ([t0].[ActualE2ERunEndDate] IS NULL)) THEN 'P' WHEN ([t0].[ActualE2ERunEndDate] IS NOT NULL) THEN 'C' END) AS 'End 2 End', (CASE WHEN ( ([t0].[ActualRevenueServiceDate] IS NOT NULL) AND ([t0].[ActualRevenueServiceDate] IS NULL)) THEN 'P' WHEN ([t0].[ActualRevenueServiceDate] IS NOT NULL) THEN 'C' END) AS 'Production' From [PtcDbTracker].[dbo].[TrackDatabase] as [t0] JOIN [PTCDbTracker].[dbo].[Subdivision] as [t1] ON [t0].[SubdivisionId]=[t1].[SubdivisionId] Join [PTCDbTracker].[dbo].[Status] as [t2] ON [t0].[StatusId]=[t2].[StatusId] where [t0].[SubdivisionId] = @SubdivisionId " runat="server"> <SelectParameters> <asp:ControlParameter ControlID="Label1" Name="SubdivisionId" /> </SelectParameters> </asp:SqlDataSource> </telerik:RadPageView> <telerik:RadPageView runat="server" ID="RadPageView3"> <asp:Label ID="Label2" Font-Bold="true" Font-Italic="true" Text='<%# Eval("SubdivisionId") %>' Visible="False" runat="server"></asp:Label> <telerik:RadGrid runat="server" ID="CollectionTab" DataSourceID="SqlDataSource3" ShowFooter="true" AllowSorting="true" EnableLinqExpressions="false" AllowAutomaticUpdates="True" AllowAutomaticInserts="True" AllowAutomaticDeletes="True"> <MasterTableView ShowHeader="true" AutoGenerateColumns="False" AllowPaging="true" CommandItemDisplay="None" DataKeyNames="TrackDatabaseId" PageSize="25" HierarchyLoadMode="ServerOnDemand" DataSourceID="SqlDataSource3" EditMode="EditForms"> <Columns> <telerik:GridEditCommandColumn /> <telerik:GridBoundColumn SortExpression="Version" HeaderText="Version" HeaderButtonType="TextButton" DataField="Version" UniqueName="Version"> </telerik:GridBoundColumn> <telerik:GridBoundColumn SortExpression="Status" HeaderText="Status" HeaderButtonType="TextButton" DataField="SubStatus" UniqueName="Status"> </telerik:GridBoundColumn> <telerik:GridBoundColumn SortExpression="PropCollStart" HeaderText="Proposed Collection Start" HeaderButtonType="TextButton" DataField="PropCollStart" UniqueName="PropCollStart" DataType="System.DateTime" DataFormatString="{0:MM/dd/yyyy}"> </telerik:GridBoundColumn> <telerik:GridBoundColumn SortExpression="ActCollStart" HeaderText="Actual Collection Start" HeaderButtonType="TextButton" DataField="ActCollStart" UniqueName="ActCollStart" DataType="System.DateTime" DataFormatString="{0:MM/dd/yyyy}"> </telerik:GridBoundColumn> <telerik:GridBoundColumn SortExpression="PropCollEnd" HeaderText="Proposed Collection End" HeaderButtonType="TextButton" DataField="PropCollEnd" UniqueName="PropCollEnd" DataType="System.DateTime" DataFormatString="{0:MM/dd/yyyy}"> </telerik:GridBoundColumn> <telerik:GridBoundColumn SortExpression="ActCollEnd" HeaderText="Actual Collection End" HeaderButtonType="TextButton" DataField="ActCollEnd" UniqueName="ActCollEnd" DataType="System.DateTime" DataFormatString="{0:MM/dd/yyyy}"> </telerik:GridBoundColumn> <telerik:GridBoundColumn SortExpression="PropExtStart" HeaderText="Proposed Extraction Start" HeaderButtonType="TextButton" DataField="PropExtStart" UniqueName="PropExtStart" DataType="System.DateTime" DataFormatString="{0:MM/dd/yyyy}"> </telerik:GridBoundColumn> <telerik:GridBoundColumn SortExpression="ActCollStart" HeaderText="Actual Extraction Start" HeaderButtonType="TextButton" DataField="ActCollStart" UniqueName="ActCollStart" DataType="System.DateTime" DataFormatString="{0:MM/dd/yyyy}"> </telerik:GridBoundColumn> <telerik:GridBoundColumn SortExpression="PropExtEnd" HeaderText="Proposed Extraction End" HeaderButtonType="TextButton" DataField="PropExtEnd" UniqueName="PropExtEnd" DataType="System.DateTime" DataFormatString="{0:MM/dd/yyyy}"> </telerik:GridBoundColumn> <telerik:GridBoundColumn SortExpression="ActExtEnd" HeaderText="Actual Extraction End" HeaderButtonType="TextButton" DataField="ActExtEnd" UniqueName="ActExtEnd" DataType="System.DateTime" DataFormatString="{0:MM/dd/yyyy}"> </telerik:GridBoundColumn> </Columns> <EditFormSettings EditFormType="Template"> <FormTemplate> <table id="table1"> <tr> <td>Collection Details</td> </tr> <tr> <td> <table id="Table2"> <tr> <td> </td> <td>Proposed</td> <td>Actual</td> </tr> <tr> <td>Collection Start Date</td> <td> <telerik:RadDatePicker runat="server" ID="PropCollStart" SelectedDate='<%#Eval("PropCollStart") %>'></telerik:RadDatePicker> </td> <td> <telerik:RadDatePicker runat="server" ID="ActCollStart" SelectedDate='<%#Eval("ActCollStart") %>'></telerik:RadDatePicker> </td> </tr> <tr> <td>Collection End Date</td> <td> <telerik:RadDatePicker runat="server" ID="PropCollEnd" SelectedDate='<%#Eval("PropCollEnd") %>'></telerik:RadDatePicker> </td> <td> <telerik:RadDatePicker runat="server" ID="ActCollEnd" SelectedDate='<%#Eval("ActCollEnd") %>'></telerik:RadDatePicker> </td> </tr> <tr> <td>Extraction Start Date</td> <td> <telerik:RadDatePicker runat="server" ID="PropExtStart" SelectedDate='<%#Eval("PropExtStart") %>'></telerik:RadDatePicker> </td> <td> <telerik:RadDatePicker runat="server" ID="ActExtStart" SelectedDate='<%#Eval("ActExtStart") %>'></telerik:RadDatePicker> </td> </tr> <tr> <td>Extraction End Date</td> <td> <telerik:RadDatePicker runat="server" ID="PropExtEnd" SelectedDate='<%#Eval("PropExtEnd") %>'></telerik:RadDatePicker> </td> <td> <telerik:RadDatePicker runat="server" ID="ActExtEnd" SelectedDate='<%#Eval("ActExtEnd") %>'></telerik:RadDatePicker> </td> </tr> <tr> <td> <asp:Button ID="btnUpdate" Text='<%# (Container is GridEditFormInsertItem) ? "Insert" : "Update" %>' runat="server" CommandName='<%# (Container is GridEditFormInsertItem) ? "PerformInsert" : "Update" %>'></asp:Button> <asp:Button ID="btnCancel" Text="Cancel" runat="server" CausesValidation="False" CommandName="Cancel"></asp:Button> </td> </tr> </table> </td> </tr> </table> </FormTemplate> </EditFormSettings> </MasterTableView> </telerik:RadGrid> <asp:SqlDataSource ID="SqlDataSource3" ConnectionString="<%$ ConnectionStrings:PtcDbModelEntities %>" runat="server" ProviderName="System.Data.SqlClient" SelectCommand=" SELECT [t0].[SubdivisionId] , [t1].[Name] AS Subdivision , [t0].[TrackDatabaseId] as TrackDatabaseId , [t2].[Description] AS SubStatus , [t0].[Version] AS Version , [t0].[ProposedCollectionStartDate] AS PropCollStart , [t0].[ActualCollectionStartDate] AS ActCollStart , [t0].[ProposedCollectionEndDate] AS PropCollEnd , [t0].[ActualCollectionEndDate] AS ActCollEnd , [t0].[ProposedExtractionStartDate] AS PropExtStart , [t0].[ActualExtractionStartDate] AS ActExtStart , [t0].[ProposedExtractionEndDate] AS PropExtEnd , [t0].[ActualExtractionEndDate] AS ActExtEnd From [PtcDbTracker].[dbo].[TrackDatabase] as [t0] JOIN [PTCDbTracker].[dbo].[Subdivision] as [t1] ON [t0].[SubdivisionId]=[t1].[SubdivisionId] Join [PTCDbTracker].[dbo].[Status] as [t2] ON [t0].[StatusId]=[t2].[StatusId] where [t0].[SubdivisionId] = @SubdivisionId " UpdateCommand="UPDATE [dbo].[TrackDatabase] SET [ProposedCollectionStartDate] = @PropCollStart , [ActualCollectionStartDate] = @ActCollStart , [ProposedCollectionEndDate] = @PropCollEnd , [ActualCollectionEndDate] = @ActCollEnd , [ProposedExtractionStartDate] = @PropExtStart , [ActualExtractionStartDate] = @ActExtStart , [ProposedExtractionEndDate] = @PropExtEnd , [ActualExtractionEndDate] = @ ActExtEnd WHERE [TrackDatabaseId] = @TrackDatabaseId"> <SelectParameters> <asp:ControlParameter ControlID="Label2" Name="SubdivisionId" /> </SelectParameters> <UpdateParameters> <asp:Parameter Name="ProposedCollectionStartDate" Type="DateTime"></asp:Parameter> <asp:Parameter Name="ActualCollectionStartDate" Type="DateTime"></asp:Parameter> <asp:Parameter Name="ProposedCollectionEndDate" Type="DateTime"></asp:Parameter> <asp:Parameter Name="ActualCollectionEndDate" Type="DateTime"></asp:Parameter> <asp:Parameter Name="ProposedExtractionStartDate" Type="DateTime"></asp:Parameter> <asp:Parameter Name="ActualExtractionStartDate" Type="DateTime"></asp:Parameter> <asp:Parameter Name="ProposedExtractionEndDate" Type="DateTime"></asp:Parameter> <asp:Parameter Name="ActualExtractionEndDate" Type="DateTime"></asp:Parameter> </UpdateParameters> </asp:SqlDataSource> </telerik:RadPageView> </telerik:RadMultiPage> </NestedViewTemplate> <Columns> <telerik:GridBoundColumn SortExpression="Subdivision" HeaderText="Subdivision" HeaderButtonType="TextButton" DataField="Subdivision" UniqueName="Subdivision"> </telerik:GridBoundColumn> <telerik:GridBoundColumn SortExpression="Priority" HeaderText="Priority" HeaderButtonType="TextButton" DataField="Priority" UniqueName="Priority"> </telerik:GridBoundColumn> <telerik:GridBoundColumn SortExpression="Mileage" HeaderText="Mileage" HeaderButtonType="TextButton" DataField="Mileage" UniqueName="Mileage"> </telerik:GridBoundColumn> <telerik:GridBoundColumn SortExpression="Sub Status" HeaderText="Sub Status" HeaderButtonType="TextButton" DataField="SubStatus" UniqueName="SubStatus"> </telerik:GridBoundColumn> </Columns> </MasterTableView> <ClientSettings AllowDragToGroup="true"> </ClientSettings> </telerik:RadGrid> </div> <asp:SqlDataSource ID="SqlDataSource1" ConnectionString="<%$ ConnectionStrings:PtcDbModelEntities %>" ProviderName="System.Data.SqlClient" SelectCommand="SELECT [t0].[Name] as Subdivision,[t0].[Mileage] AS Mileage,[t0].[SubdivisionId],[t0].[Priority] AS Priority,[t1].[Description] AS SubStatus FROM [PtcDbTracker].[dbo].[Subdivision] as [t0] INNER JOIN [PtcDbTracker].[dbo].[Status] as [t1] on [t0].[StatusId]=[t1].[StatusId] Order By Subdivision" runat="server"></asp:SqlDataSource></asp:Content>using System;using System.Web.UI.WebControls;using Telerik.Web.UI;using GridCommandEventArgs = Telerik.Web.UI.GridCommandEventArgs;using GridItemEventArgs = Telerik.Web.UI.GridItemEventArgs;public partial class Default2 : BNSF.EUECommonApplication.EUEBasePage{ public String PageName { get; set; } protected void Page_Load(object sender, EventArgs e) { } protected void RadGrid1_PreRender(object sender, EventArgs e) { if (!Page.IsPostBack) { RadGrid1.MasterTableView.Items[0].Expanded = false; RadGrid1.MasterTableView.Items[0].ChildItem.FindControl("InnerContainer").Visible = true; } } protected void RadGrid1_ItemCommand(object source, GridCommandEventArgs e) { if (e.CommandName == RadGrid.ExpandCollapseCommandName && e.Item is GridDataItem) { ((GridDataItem)e.Item).ChildItem.FindControl("InnerContainer").Visible = !e.Item.Expanded; } if (e.Item is GridNestedViewItem && e.Item.OwnerTableView.ID == "RadGrid1") { GridNestedViewItem nestedItem = (GridNestedViewItem) e.Item; Panel panel = (Panel) nestedItem.FindControl("InnerContainer"); panel.Visible = ((GridNestedViewItem) e.Item).ParentItem.Expanded; } } protected void RadGrid1_ItemCreated(object sender, GridItemEventArgs e) { if (e.Item is GridNestedViewItem) { e.Item.FindControl("InnerContainer").Visible = ((GridNestedViewItem)e.Item).ParentItem.Expanded; } } protected void RadGrid1_ItemUpdated(object sender, GridUpdatedEventArgs e) { }}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]GOSET ANSI_PADDING OFFGOALTER TABLE [dbo].[Security_Role_To_Webpage] ADD CONSTRAINT [DF_Security_Role_To_Webpage_add_privledge] DEFAULT ((0)) FOR [add_privledge]GOALTER TABLE [dbo].[Security_Role_To_Webpage] ADD CONSTRAINT [DF_Security_Role_To_Webpage_edit_privledge] DEFAULT ((0)) FOR [edit_privledge]GOALTER TABLE [dbo].[Security_Role_To_Webpage] ADD CONSTRAINT [DF_Security_Role_To_Webpage_delete_privledge] DEFAULT ((0)) FOR [delete_privledge]GOALTER TABLE [dbo].[Security_Role_To_Webpage] ADD CONSTRAINT [DF_Security_Role_To_Webpage_view_privledge] DEFAULT ((0)) FOR [view_privledge]GOALTER TABLE [dbo].[Security_Role_To_Webpage] WITH CHECK ADD CONSTRAINT [FK__security___secur__60A75C0F] FOREIGN KEY([security_role_id])REFERENCES [dbo].[Security_Role] ([ID])GOALTER TABLE [dbo].[Security_Role_To_Webpage] CHECK CONSTRAINT [FK__security___secur__60A75C0F]GOCREATE 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]GOSET ANSI_PADDING OFFGO<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 ONGOSET QUOTED_IDENTIFIER ONGOSET ANSI_PADDING ONGOCREATE 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]GOSET ANSI_PADDING OFFGOALTER TABLE [dbo].[Security_Role_To_Webpage] ADD CONSTRAINT [DF_Security_Role_To_Webpage_add_privledge] DEFAULT ((0)) FOR [add_privledge]GOALTER TABLE [dbo].[Security_Role_To_Webpage] ADD CONSTRAINT [DF_Security_Role_To_Webpage_edit_privledge] DEFAULT ((0)) FOR [edit_privledge]GOALTER TABLE [dbo].[Security_Role_To_Webpage] ADD CONSTRAINT [DF_Security_Role_To_Webpage_delete_privledge] DEFAULT ((0)) FOR [delete_privledge]GOALTER TABLE [dbo].[Security_Role_To_Webpage] ADD CONSTRAINT [DF_Security_Role_To_Webpage_view_privledge] DEFAULT ((0)) FOR [view_privledge]GOALTER TABLE [dbo].[Security_Role_To_Webpage] WITH CHECK ADD CONSTRAINT [FK__security___secur__60A75C0F] FOREIGN KEY([security_role_id])REFERENCES [dbo].[Security_Role] ([ID])GOALTER TABLE [dbo].[Security_Role_To_Webpage] CHECK CONSTRAINT [FK__security___secur__60A75C0F]GO