<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: gaoyang  
    $Date: 2013-5-6 下午02:38:07  
    $Revision: 1.0  
    $Purpose: 
-->
<a:screen xmlns:a="http://www.leaf-framework.org/application" customizationEnabled="true" trace="true">
    <a:init-procedure/>
    <a:view>
        <script type="text/javascript"><![CDATA[
            function lovcancle() {
                $('${/parameter/@lovid}').win.close();
            }
            
            function griddbclick(grid, record, row, name) {
                $('${/parameter/@lovid}').commit(record);
            
            }
            
            function resetform() {
                var form = $('query_ds').getCurrentRecord();
                form.set('bank_code', null);
                form.set('bank_branch_code', null);
            }
            
            function querygrid() {
                $('grid_result_ds').query();
            }
            function hls211_bank_lov_update(ds,record,name,value,old_value){
                if(name=='bank_code'){
                    record.getField('bank_branch_code').setLovPara('bank_code',value);
                }
            }
        ]]></script>
        <a:dataSets>
            <a:dataSet id="query_ds" autoCreate="true">
                <a:fields>
                    <a:field name="bank_code" autoComplete="true" autoCompleteField="bank_code" fetchRemote="false" lovGridHeight="350" lovHeight="500" lovService="csh.CSH101.csh_bank_lov" lovWidth="500" prompt="HLS.BANK_CODE" title="HLS.BANK_CODE">
                        <a:mapping>
                            <a:map from="bank_code" to="bank_code"/>
                        </a:mapping>
                    </a:field>
                    <a:field name="bank_branch_code" autoComplete="true" autoCompleteField="bank_branch_code" fetchRemote="false" lovGridHeight="350" lovHeight="500" lovService="csh.CSH101.csh_bank_branch_lov" lovWidth="500" prompt="HLS.BANK_BRANCH_CODE" title="HLS.BANK_BRANCH_CODE">
                        <a:mapping>
                            <a:map from="bank_branch_code" to="bank_branch_code"/>
                        </a:mapping>
                    </a:field>
                </a:fields>
                <a:events>
                    <a:event name="update" handler="hls211_bank_lov_update"/>
                </a:events>
            </a:dataSet>
            <a:dataSet id="grid_result_ds" autoQuery="true" model="csh.CSH101.csh_bank_all_v" queryDataSet="query_ds" queryUrl="${/request/@context_path}/autocrud/csh.CSH101.csh_bank_all_v/query"/>
        </a:dataSets>
        <a:screenBody>
            <a:form bindTarget="query_ds" column="2" title="HLS.BANK_ACCOUNT_CODE" width="520">
                <a:lov name="bank_code" bindTarget="query_ds"/>
                <a:lov name="bank_branch_code" bindTarget="query_ds"/>
            </a:form>
            <a:hBox>
                <a:button click="querygrid" text="HLS.QUERY"/>
                <a:button click="resetform" text="HLS.RESET"/>
                <a:button click="lovcancle" text="HLS.CANCLE"/>
            </a:hBox>
            <a:grid id="result_grid" bindTarget="grid_result_ds" height="350" navBar="true" width="520">
                <a:columns>
                    <a:column name="bank_code" width="100"/>
                    <a:column name="bank_short_name" width="100"/>
                    <a:column name="bank_branch_code" width="100"/>
                    <a:column name="bank_branch_name" width="100"/>
                </a:columns>
                <a:events>
                    <a:event name="dblclick" handler="griddbclick"/>
                </a:events>
            </a:grid>
        </a:screenBody>
    </a:view>
</a:screen>
