<%@ Page Language="C#" AutoEventWireup="true" 
    CodeBehind="frmTrxType.aspx.cs" 
    Inherits="CITAD.Web.Popup.frmTrxType" Culture="auto" UICulture="auto" meta:resourcekey="PageResource1" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head id="Head1" runat="server">
    <title>Danh sách loại giao dịch</title>
    <link href="../../css/citad.css" rel="stylesheet" type="text/css" />
    <link href="../../css/popup.css" rel="stylesheet" type="text/css" />
    <!--script type="text/javascript" src="../../js/CITAD-prototype.js"></script-->
    <script language="javascript" type="text/javascript">
        function fcnOnLoad()
        {

        }
        function fcnOnKeyPress()
        {
            if(event.keyCode == 13)
            {
                fcnGetObject();
            }
            else if(event.keyCode == 27)
            {
                window.close();
            }
        }
        function fcnGetObject()
        {
            try
            {
                var lsb = document.getElementById('<%=lsb.ClientID %>');
                if(lsb.selectedIndex >= 0)
                {
                    var indexSeperator = lsb.options[lsb.selectedIndex].text.indexOf('-') + 2;

                    var arrObject = new Array();
                    arrObject[0] = lsb.options[lsb.selectedIndex].value;
                    arrObject[1] = lsb.options[lsb.selectedIndex].text.substring(indexSeperator);
                    window.returnValue = arrObject;
                }
            }
            catch(err){}            
           window.close();
        }
        function fcnChooseObject()
        {
            try
            {
                var lsb = document.getElementById('<%=lsb.ClientID %>');
                
                if(lsb.selectedIndex >= 0)
                {
                    var indexSeperator = lsb.options[lsb.selectedIndex].text.indexOf('-') + 2;
                   
                    var arrObject = new Array();
                    arrObject[0] = lsb.options[lsb.selectedIndex].value;
                    arrObject[1] = lsb.options[lsb.selectedIndex].text.substring(indexSeperator);
                    
                    window.returnValue = arrObject;
                }
            }
            catch(err){}            
           window.close();
           return false;
        }
    </script>
</head>
<body style="margin:0;" >
    <form id="form1" runat="server">
        <table cellpadding="0" cellspacing="1" style="width:100%;">
        <tr class="grid-header">
            <td style="width: 26px">
                <asp:Label ID="lblCode" runat="server" Text="Mã loại" meta:resourcekey="lblCodeResource1" ></asp:Label>
                </td>
            <td style="text-align:left;padding-left:10px;">
                <asp:Label ID="lblName" runat="server" Text="Tên loại" meta:resourcekey="lblNameResource1" ></asp:Label></td>
        </tr>
        </table>
        
         <table style="width:100%;"><tr><td ><asp:ListBox ID="lsb" runat="server" CssClass="listOPRT" Rows="17" meta:resourcekey="lsbResource1" >
        </asp:ListBox>
        </td></tr>
        <tr><td align="right" >
        <asp:Button ID="btnChon" runat="server" Text="Chọn" Width="80px"  OnClientClick="javascript:return fcnChooseObject();" meta:resourcekey="btnChonResource1" />&nbsp;&nbsp;&nbsp;
       <asp:Button ID="btnDong" runat="server" Text="Đóng" Width="80px"  OnClientClick="javascript:window.close();return false;" meta:resourcekey="btnDongResource1" />
        </td></tr>
        </table>
    </form>
</body>
</html>