<%@ Page Language="C#" 
MasterPageFile="~/CITAD.Master" 
AutoEventWireup="true" 
CodeBehind="frmEnv_Control_List.aspx.cs" 
Inherits="CITAD.Web.Modules.ThongTinHeThongNganHang.frmEnv_Control_List" 
Title="Danh sách biến môi trường" 
Culture="auto"     
EnableEventValidation="false"
UICulture="auto"
 meta:resourcekey="PageResource1" %>
<%@ Register Src="../../Controls/MessageBox.ascx" TagName="MessageBox" TagPrefix="uc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
<script language="javascript" type="text/javascript" >
	    //Cài đặt sự kiện phím tắt
        window.document.onkeyup=ShortcutKeys;
        function ShortcutKeys()
        {
            if(event.ctrlKey)
            {
                switch (event.keyCode)
                {
                    case 49://Ctrl + 1
                        __doPostBack('ctl00$ContentPlaceHolder1$Menu1','mnuNew');
                        break;
                    case 50://Ctrl + 2
                        __doPostBack('ctl00$ContentPlaceHolder1$Menu1','mnuDetail');
                        break;
                    case 51://Ctrl + 3
                        __doPostBack('ctl00$ContentPlaceHolder1$Menu1','mnuDelete');
                        break;
                    case 52://Ctrl + 4
                        __doPostBack('ctl00$ContentPlaceHolder1$Menu1','mnuQuery');
                        break;                    
                    case 69://Ctrl + E
                        __doPostBack('ctl00$ContentPlaceHolder1$Menu1','mnuClose');
                        break;
                }
            }
        }
    </script>
<ajaxToolkit:ToolkitScriptManager runat="Server" ID="ScriptManager1" EnableScriptGlobalization="True"
             EnableScriptLocalization="True" CombineScripts="True" EnablePageMethods="True"  />
             
<div style="width:770px;">
 <table class="toolbar" cellpadding="0" cellspacing="0" >
        <tr><td class="toolbar-tdleft"></td>
        <td class="toolbar-tdmain">
            <asp:Menu ID="Menu1" runat="server" 
                DynamicHorizontalOffset="2" 
                Font-Names="Verdana"
                Font-Size="11px"                
                Orientation="Horizontal" 
                CssClass="citad-menu" 
                StaticSubMenuIndent="10px"                 
                StaticHoverStyle-CssClass="citad-menu-hover"
                StaticMenuStyle-CssClass="citad-menu"
                StaticSelectedStyle-CssClass="citad-menu-selected"
                StaticMenuItemStyle-HorizontalPadding="5px"
                StaticMenuItemStyle-VerticalPadding="2px" OnMenuItemClick="Menu1_MenuItemClick" meta:resourcekey="Menu1Resource1"
                >
                <Items>
                    <asp:MenuItem Text="Tho&#225;t" Value="mnuClose"  ImageUrl="~/Images/Menu/home.gif" meta:resourcekey="MenuItemResource1" ></asp:MenuItem>
                    <asp:MenuItem Text="Truy vấn" Value="mnuQuery"  ImageUrl="~/Images/Menu/search.gif" meta:resourcekey="MenuItemResource2"></asp:MenuItem>
                </Items>
                <StaticMenuStyle CssClass="citad-menu" />
                <StaticMenuItemStyle HorizontalPadding="5px" VerticalPadding="2px" />
                <StaticSelectedStyle CssClass="citad-menu-selected" />
                <StaticHoverStyle CssClass="citad-menu-hover" />
            </asp:Menu>
       </td>
       </tr>
    </table>

  <table style="margin-bottom:7px;">
            <tr>
                <td style="width: 100px">
                    <asp:Label ID="lblTenThamSo" runat="server" Text="Tên tham số:" meta:resourcekey="lblTenThamSoResource1" ></asp:Label>&nbsp;</td>
                <td>
                    <asp:TextBox ID="txtTenThamSo" runat="server" Width="150px" CssClass="citad-txt" meta:resourcekey="txtTenThamSoResource1" OnTextChanged="txtTenThamSo_TextChanged"></asp:TextBox></td>               
                <%--<td style="width: 100px">
                    <asp:Label ID="lblGiaTri" runat="server" Text="Giá trị:"></asp:Label></td>
                <td>
                    <asp:TextBox ID="txtGiaTri" runat="server" Width="250px" CssClass="citad-txt"></asp:TextBox></td>
                <td style="width: 100px">
                    <asp:Label ID="lblMoTa" runat="server" Text="Mô tả:"></asp:Label></td>
                <td>
                    <asp:TextBox ID="txtMoTa" runat="server" Width="250px" CssClass="citad-txt"></asp:TextBox></td>--%>
            </tr>
        </table>   
   
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
        <Triggers>
            <asp:AsyncPostBackTrigger ControlID="Menu1" EventName="MenuItemClick" />
        </Triggers>
        <ContentTemplate>
        <asp:GridView DataKeyNames="TYPE" ID="grvEnvControlList" runat="server" 
                CellPadding="1"                
                AllowPaging="True"                                 
                AutoGenerateColumns="False" 
                CssClass="grid" OnPageIndexChanging="grvEnvControlList_PageIndexChanging" OnRowDataBound="grvEnvControlList_RowDataBound" OnSelectedIndexChanged="grvEnvControlList_SelectedIndexChanged" meta:resourcekey="grvEnvControlListResource1"
                >
                <FooterStyle CssClass="grid-footer" />
                <RowStyle CssClass="grid-row" />
                <SelectedRowStyle CssClass="grid-selectedRow" />
                <PagerStyle HorizontalAlign="Center" CssClass="grid-pager" />
                <HeaderStyle CssClass="grid-header" />
                <AlternatingRowStyle CssClass="grid-alternating" />      
                <Columns>
                    <asp:BoundField HeaderText="STT" meta:resourcekey="BoundFieldResource1" >
                        <ItemStyle HorizontalAlign="Center" />
                        <HeaderStyle HorizontalAlign="Center" Width="40px" />
                    </asp:BoundField>
                    <asp:TemplateField meta:resourcekey="TemplateFieldResource1" >
                        <HeaderTemplate>
                            <asp:Label runat="server" ID="lblTenThamSo" Text="T&#234;n tham số" meta:resourcekey="lblTenThamSoResource2" ></asp:Label>
                        </HeaderTemplate>
                        <HeaderStyle Width="100px" HorizontalAlign="Center" />
                        <ItemTemplate>
                            <asp:LinkButton ID="lbtTenThamSo" runat="server" CommandName="Select" Text='<%# Bind("TYPE") %>' meta:resourcekey="lbtTenThamSoResource1"></asp:LinkButton>
                        </ItemTemplate>
                        <ItemStyle HorizontalAlign="Left" />
                    </asp:TemplateField>
                    <asp:BoundField HeaderText="Gi&#225; trị" DataField="VALUE" meta:resourcekey="BoundFieldResource2" >   
                       <ItemStyle HorizontalAlign="Left" />                 
                    </asp:BoundField>
                    <asp:BoundField HeaderText="M&#244; tả" DataField="DESCRIPTION" meta:resourcekey="BoundFieldResource3" >   
                       <ItemStyle HorizontalAlign="Left" />                 
                    </asp:BoundField>
                </Columns>
                <EmptyDataTemplate>
                    <asp:Label ID="lblEmptyDataGrid" runat="server" 
                        Text="Kh&#244;ng tồn tại" meta:resourcekey="lblEmptyDataGridResource1"></asp:Label>
                </EmptyDataTemplate>
                <PagerSettings Mode="NumericFirstLast" />
            </asp:GridView>
        </ContentTemplate>
</asp:UpdatePanel>
    <uc1:MessageBox ID="MessageBox1" runat="server" />
</div>
</asp:Content>
