<%@ page language="C#" autoeventwireup="true" inherits="Pages, App_Web_pages.aspx.cecc3084" viewStateEncryptionMode="Always" maintainScrollPositionOnPostBack="true" %>
<%@ Register src="../UserControls/Menu.ascx" tagname="Menu" tagprefix="uc1" %>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>Untitled Page</title>
    <link href="../css/Menu.css" rel="stylesheet" type="text/css">
    <link href="../css/Buttons.css" rel="stylesheet" type="text/css">
    <link href="../css/commone.css" rel="stylesheet" type="text/css">
    <link href="../css/footer.css" rel="stylesheet" type="text/css">
    <link href="../css/nav.css" rel="stylesheet" type="text/css">
    <link href="../css/tab.css" rel="stylesheet" type="text/css">
    
</head>
<body>
    <form id="form1" runat="server">
    <table cellpadding="0" border="0" cellspacing="0" height="100%" width="100%">
        <tr>
            <td valign="top">
                <table class="body_MainTB" border="0" cellpadding="0" cellspacing="0">
                    <tr align="center">
                        <td valign="top">
                            <!------------------------------------body St  ---------------------------------------------->
                            <table border="0" cellpadding="0" cellspacing="0" class="body_formTitle">
                                <tr>
                                    <td>
                                        Manage Pages
                                    </td>
                                </tr>
                            </table>
                            <br>
                            <!------------------------------------body End1 ----------------------------------------------->
                            <table border="0" cellpadding="0" cellspacing="0" class="contTB">
                                <tr>
                                    <td align="center">
                                        <table width="100%" border="0" cellpadding="0" cellspacing="0" class="Frow">
                                            <tr>
                                                <td>
                                                </td>
                                            </tr>
                                        </table>
                                        <br />
                                        <table border="0" cellpadding="0" cellspacing="0" class="grid_TitleBG_B">
                                            <tr>
                                                <td>
                                                    Pages
                                                </td>
                                            </tr>
                                        </table>
                                        <asp:Panel ID="pnlGrid" runat="server" Width="100%">
                                            <asp:GridView ID="GridView1" runat="server" CssClass="gridMaster" Width ="100%" AutoGenerateColumns="False"
                                                DataSourceID="SqlDataSource1" OnRowCommand="GridView1_RowCommand" AllowPaging="True"
                                                AllowSorting="True" CellPadding="4" ForeColor="#333333" GridLines="None" OnRowCreated="GridView1_RowCreated"
                                                DataKeyNames="PID">
                                                <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                                                <RowStyle BackColor="#F7F6F3" ForeColor="#333333" />
                                                <Columns>
                                                    <asp:BoundField DataField="NAME_EN" HeaderText="NAME" SortExpression="NAME" />
                                                    <asp:BoundField DataField="DESCRIPTION" HeaderText="DESCRIPTION" SortExpression="DESCRIPTION" />
                                                    <asp:BoundField DataField="URL" HeaderText="URL" SortExpression="URL" />
                                                    <asp:BoundField DataField="STATUS" HeaderText="STATUS" SortExpression="STATUS" />
                                                    <asp:BoundField DataField="MID" HeaderText="MID" SortExpression="MID" />
                                                    <asp:ButtonField ButtonType="Image" CommandName="d" Text="Delete" ImageUrl="~/Images/delete.jpg" />
                                                    <asp:ButtonField ButtonType="Image" CommandName="u" Text="Update" ImageUrl="~/Images/edit.jpg" />
                                                    <asp:ButtonField ButtonType="Image" CommandName="v" Text="View" ImageUrl="~/Images/view.jpg" />
                                                </Columns>
                                                <PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
                                                <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
                                                <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="Black" />
                                                <EditRowStyle BackColor="#999999" />
                                                <AlternatingRowStyle BackColor="White" ForeColor="#284775" />
                                            </asp:GridView>
                                        </asp:Panel>
                                        <table border="0" cellpadding="0" cellspacing="0" class="action_TB_BgForm">
                                            <tr>
                                                <td>
                                                    <asp:Button ID="btnAdd" runat="server" Text="     Add     " OnClick="btnAdd_Click"
                                                        class="Btn_M_Normal" />
                                            </tr>
                                        </table>
                                        <br>
                                        <!------------------------------------body End1 ----------------------------------------------->
                                        <asp:Panel ID="pnlControls" runat="server" Width="100%">
                                            <fieldset id="addItem">
                                                <legend id="addItem">Adding new Page</legend>
                                            </fieldset>
                                            <table border="0" cellpadding="0" cellspacing="0" class="add_ItemTB">
                                                <tr>
                                                    <td class="tdNormal" style="width:20%">
                                                        Page Name
                                                    </td>
                                                    <td class="tdNormal" style="width:20%">
                                                        <asp:TextBox ID="txtPageName" runat="server" Width="100%" class="fieldNormal"></asp:TextBox>
                                                    </td>
                                                    <td class="tdNormal" style="width:20%">
                                                        &nbsp;
                                                    </td>
                                                    <td class="tdNormal" style="width:20%">
                                                        URL
                                                    </td>
                                                    <td class="tdNormal" style="width:20%">
                                                        <asp:TextBox ID="txtURL" runat="server" Width="100%" class="fieldNormal"></asp:TextBox>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td>
                                                        Description
                                                    </td>
                                                    <td colspan=4>
                                                        <asp:TextBox ID="txtDesc" runat="server" Width="100%" Rows="4" class="fieldMultiLine" TextMode="MultiLine"></asp:TextBox>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td>
                                                        Status
                                                    </td>
                                                    <td>
                                                        <asp:RadioButton ID="rdActive" runat="server" Checked="True" class="fieldNormal" GroupName="group" Text="Active" />
                                                        <asp:RadioButton ID="rdInActive" runat="server" class="fieldNormal" GroupName="group" Text="InActive" />
                                                    </td>
                                                    <td>
                                                        &nbsp;
                                                    </td>
                                                    <td>
                                                        Module
                                                    </td>
                                                    <td>
                                                        <asp:TextBox ID="txtModule" class="fieldNormal" runat="server"></asp:TextBox>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td>
                                                        &nbsp;
                                                    </td>
                                                    <td>
                                                        &nbsp;
                                                    </td>
                                                    <td>
                                                        &nbsp;
                                                    </td>
                                                    <td>
                                                        &nbsp;
                                                    </td>
                                                    <td>
                                                        &nbsp;
                                                    </td>
                                                </tr>
                                            </table>
                                            <table border="0" cellpadding="0" cellspacing="0" class="action_TB_BgaddItem">
                                                <tr>
                                                    <td>
                                                        <asp:Button ID="Button2" runat="server" Text="   Cancel   " OnClick="btnCancel_Click" class="Btn_M_Normal" />
                                                        <asp:Button ID="Button1" runat="server" Text="   Save   " OnClick="btnSave_Click" OnClientClick="return validate()" class="Btn_M_Normal" />
                                                    </td>
                                                </tr>
                                            </table>
                                        </asp:Panel>
                                        <!------------------------------------body End2 ----------------------------------------------->
                                        <br>
                                    </td>
                                </tr>
                            </table>
                            <!------------------------------------body End2 ----------------------------------------------->
                        </td>
                    </tr>
                </table>
            </td>
            <td width="200px" bgcolor="#ECECFF" valign=top>
                <table id="Menu" border="0" cellspacing="0" cellpadding="0" class="menuTable">
                    <tr>
                        <td bgcolor="#336699">
                            <img src="/Images/ShowHideArrowRight.gif" width="5" height="35">
                        </td>
                        <td>
                            <uc1:Menu ID="Menu1" runat="server" />
                        </td>
                    </tr>
                </table>
            </td>
        </tr>
        <tr>
            <td height="100%" valign="bottom">
                <table width="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="#ADB7C1">
                    <tr>
                        <td height="20">
                        </td>
                    </tr>
                </table>
            </td>
        </tr>
    </table>
    <!--********************************************************************************->
    <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
        OldValuesParameterFormatString="original_{0}" ProviderName="<%$ ConnectionStrings:ConnectionString.ProviderName %>"
        SelectCommand="SELECT NAME_EN, DESCRIPTION, STATUS, PID, CREATE_DATE, CREATED_BY, MODIFY_DATE, URL, MODIFIED_BY, MID FROM SEC_PAGE"
        DeleteCommand="DELETE FROM SEC_PAGE WHERE PID = :original_PID"
        InsertCommand="INSERT INTO SEC_PAGE (NAME_EN, DESCRIPTION, STATUS, PID, CREATE_DATE, CREATED_BY, MODIFY_DATE, URL, MODIFIED_BY, MID) VALUES (:NAME_EN, :DESCRIPTION, :STATUS, :PID, :CREATE_DATE, :CREATED_BY, :MODIFY_DATE, :URL, :MODIFIED_BY, :MID)"
        UpdateCommand="UPDATE SEC_PAGE SET NAME_EN = :NAME_EN, DESCRIPTION = :DESCRIPTION, STATUS = :STATUS, CREATE_DATE = :CREATE_DATE, CREATED_BY = :CREATED_BY, MODIFY_DATE = :MODIFY_DATE, URL = :URL, MODIFIED_BY = :MODIFIED_BY, MID = :MID WHERE PID = :original_PID">
        <DeleteParameters>
            <asp:Parameter Name="original_PID" Type="Decimal" />
        </DeleteParameters>
        <UpdateParameters>
            <asp:Parameter Name="NAME_EN" Type="String" />
            <asp:Parameter Name="DESCRIPTION" Type="String" />
            <asp:Parameter Name="STATUS" Type="Decimal" />
            <asp:Parameter Name="CREATE_DATE" Type="DateTime" />
            <asp:Parameter Name="CREATED_BY" Type="Decimal" />
            <asp:Parameter Name="MODIFY_DATE" Type="DateTime" />
            <asp:Parameter Name="URL" Type="String" />
            <asp:Parameter Name="MODIFIED_BY" Type="Decimal"></asp:Parameter>
            <asp:Parameter Name="original_PID" Type="Decimal" />
            <asp:Parameter Name="MID" Type="Decimal" />
        </UpdateParameters>
        <InsertParameters>
            <asp:Parameter Name="NAME_EN" Type="String" />
            <asp:Parameter Name="DESCRIPTION" Type="String" />
            <asp:Parameter Name="STATUS" Type="Decimal" />
            <asp:Parameter Name="PID" Type="Decimal" />
            <asp:Parameter Name="CREATE_DATE" Type="DateTime" />
            <asp:Parameter Name="CREATED_BY" Type="Decimal" />
            <asp:Parameter Name="MODIFY_DATE" Type="DateTime" />
            <asp:Parameter Name="URL" Type="String" />
            <asp:Parameter Name="MID" Type="Decimal" />
            <asp:Parameter Name="MODIFIED_BY" Type="Decimal"></asp:Parameter>
        </InsertParameters>
    </asp:SqlDataSource>
    <br />
    </div>
    </form>
</body>
</html>
