<commonData:SecurityPage
           xmlns:commonData="clr-namespace:HD.SL.Common.Data.CommonData;assembly=HD.SL.Common.Data"
           xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
           x:Class="HD.SL.RSM.Config.MetaData.CustomerImport" 
           xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
           xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
           xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
           xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
           mc:Ignorable="d"
           xmlns:navigation="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Navigation"
           d:DesignWidth="640" d:DesignHeight="480"
           Title="CustomerImport Page">
    <telerik:RadBusyIndicator x:Name="busyIndicator">
        <Grid>
            <Grid.RowDefinitions>
                <RowDefinition Height="*"/>
                <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>

            <telerik:RadGridView Grid.Row="0"  
                                 x:Name="gridViewCustomer" 
                                 Height="Auto"
                                 AutoGenerateColumns="False" 
                                 EnableLostFocusSelectedState="False" 
                                 ShowGroupPanel="False"
                                 IsSynchronizedWithCurrentItem="False"
                                 CanUserSelect="True" 
                                 SelectionMode="Single" >
                <telerik:RadGridView.Columns>
                    <telerik:GridViewToggleRowDetailsColumn Header="" ExpandMode="Multiple" />
                </telerik:RadGridView.Columns>
                <telerik:RadGridView.RowDetailsTemplate>
                    <DataTemplate>
                        <telerik:RadGridView Height="Auto" 
                                             AutoGenerateColumns="False" 
                                             EnableLostFocusSelectedState="False" 
                                             ShowGroupPanel="False"
                                             IsSynchronizedWithCurrentItem="False" 
                                             CanUserSelect="True"
                                             SelectionMode="Single">
                            <telerik:RadGridView.Columns>
                                <telerik:GridViewDataColumn Header="联系人编号" DataMemberBinding="{Binding CONTACT_ID}" Width="100" IsReadOnly="True"></telerik:GridViewDataColumn>
                                <telerik:GridViewDataColumn Header="客户编号" DataMemberBinding="{Binding CUSTOMER_ID}" Width="100" IsReadOnly="True"></telerik:GridViewDataColumn>
                                <telerik:GridViewDataColumn Header="性别" DataMemberBinding="{Binding CONTACT_GENDER}" Width="40" IsReadOnly="True"></telerik:GridViewDataColumn>
                                <telerik:GridViewDataColumn Header="名称" DataMemberBinding="{Binding CONTACT_PERSON}" Width="80" IsReadOnly="True"></telerik:GridViewDataColumn>
                                <telerik:GridViewDataColumn Header="手机" DataMemberBinding="{Binding CONTACT_MOBILE}" Width="100" IsReadOnly="True"></telerik:GridViewDataColumn>
                                <telerik:GridViewDataColumn Header="角色" DataMemberBinding="{Binding CONTACT_ROLE}" Width="80" IsReadOnly="True"></telerik:GridViewDataColumn>
                                <telerik:GridViewDataColumn Header="职务" DataMemberBinding="{Binding CONTACT_DUTY}" Width="80" IsReadOnly="True"></telerik:GridViewDataColumn>
                                <telerik:GridViewDataColumn Header="个人喜好" DataMemberBinding="{Binding EF_CHAR1}" Width="120" IsReadOnly="True"></telerik:GridViewDataColumn>
                                <telerik:GridViewDataColumn Header="联系人生日" DataMemberBinding="{Binding CONTACT_BIRTHDAY}" Width="100" IsReadOnly="True" ></telerik:GridViewDataColumn>
                                <telerik:GridViewDataColumn Header="阴阳历" DataMemberBinding="{Binding EF_CHAR2}" Width="60" IsReadOnly="True"></telerik:GridViewDataColumn>
                                <telerik:GridViewDataColumn Header="邮箱" DataMemberBinding="{Binding CONTACT_EMAIL}" Width="120" IsReadOnly="True"></telerik:GridViewDataColumn>
                                <telerik:GridViewDataColumn Header="电话" DataMemberBinding="{Binding CONTACT_TEL}" Width="100" IsReadOnly="True"></telerik:GridViewDataColumn>
                                <telerik:GridViewDataColumn Header="传真" DataMemberBinding="{Binding CONTACT_FAX}" Width="100" IsReadOnly="True"></telerik:GridViewDataColumn>
                                <telerik:GridViewDataColumn Header="微信号" DataMemberBinding="{Binding WEXIN_CODE}" Width="100" IsReadOnly="True"></telerik:GridViewDataColumn>
                                <telerik:GridViewDataColumn Header="QQ号" DataMemberBinding="{Binding QQ_CODE}" Width="100" IsReadOnly="True"></telerik:GridViewDataColumn>
                                <telerik:GridViewDataColumn Header="省份编号" DataMemberBinding="{Binding PROVINCE_ID}" Width="80" IsReadOnly="True"></telerik:GridViewDataColumn>
                                <telerik:GridViewDataColumn Header="省份名称" DataMemberBinding="{Binding PROVINCE_NAME}" Width="80" IsReadOnly="True"></telerik:GridViewDataColumn>
                                <telerik:GridViewDataColumn Header="城市编号" DataMemberBinding="{Binding CITY_ID}" Width="80" IsReadOnly="True"></telerik:GridViewDataColumn>
                                <telerik:GridViewDataColumn Header="城市名称" DataMemberBinding="{Binding CITY_NAME}" Width="80" IsReadOnly="True"></telerik:GridViewDataColumn>
                                <telerik:GridViewDataColumn Header="区县编码" DataMemberBinding="{Binding DISTRICT_ID}" Width="80" IsReadOnly="True"></telerik:GridViewDataColumn>
                                <telerik:GridViewDataColumn Header="区县名称" DataMemberBinding="{Binding DISTRICT_NAME}" Width="80" IsReadOnly="True"></telerik:GridViewDataColumn>
                                <telerik:GridViewDataColumn Header="详细地址" DataMemberBinding="{Binding DETAIL_ADDRESS}" Width="120" IsReadOnly="True"></telerik:GridViewDataColumn>
                                <telerik:GridViewDataColumn Header="默认标记" DataMemberBinding="{Binding DEFAULT_FLAG}" Width="80" IsReadOnly="True"></telerik:GridViewDataColumn>
                                <telerik:GridViewDataColumn Header="备注" DataMemberBinding="{Binding REMARK}" Width="120" IsReadOnly="True"></telerik:GridViewDataColumn>

                            </telerik:RadGridView.Columns>
                        </telerik:RadGridView>
                    </DataTemplate>
                </telerik:RadGridView.RowDetailsTemplate>
            </telerik:RadGridView>

            <StackPanel Grid.Row="1"  Orientation="Horizontal" HorizontalAlignment="Left">
                <telerik:RadButton x:Name="btnDownload" Content="下载模板" Style="{StaticResource commonButton}"  Click="btnDownLoad_Click" ToolTipService.ToolTip="下载模板"></telerik:RadButton>
                <telerik:RadButton x:Name="btnLoad" Content="加载文档"  Style="{StaticResource commonButton}"  Click="btnLoad_Click" ToolTipService.ToolTip="加载Excel文档"></telerik:RadButton>
                <telerik:RadButton x:Name="btnImport" Content="导入数据"  Style="{StaticResource commonButton}" Click="btnImport_Click" ToolTipService.ToolTip="导入工艺数据" ></telerik:RadButton>
            </StackPanel>
            
        </Grid>
    </telerik:RadBusyIndicator>
</commonData:SecurityPage>